mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-09 01:18:21 +00:00
Expect &Topology
in BuildSketch::empty
This commit is contained in:
parent
34d083e505
commit
de4cdc9cfb
@ -1,4 +1,4 @@
|
||||
use crate::topology::Sketch;
|
||||
use crate::topology::{Sketch, Topology};
|
||||
|
||||
/// Build a [`Sketch`]
|
||||
///
|
||||
@ -7,7 +7,7 @@ use crate::topology::Sketch;
|
||||
/// [module-level documentation]: super
|
||||
pub trait BuildSketch {
|
||||
/// Create a sketch with no regions
|
||||
fn empty() -> Sketch {
|
||||
fn empty(_: &Topology) -> Sketch {
|
||||
Sketch::new([])
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ pub fn model(size: impl Into<Vector<3>>, core: &mut fj::core::Core) -> Solid {
|
||||
let bottom_surface = core.layers.topology.surfaces.xy_plane();
|
||||
let sweep_path = Vector::from([Scalar::ZERO, Scalar::ZERO, z]);
|
||||
|
||||
Sketch::empty()
|
||||
Sketch::empty(&core.layers.topology)
|
||||
.add_regions(
|
||||
[Region::polygon(
|
||||
[
|
||||
|
@ -20,7 +20,7 @@ pub fn model(
|
||||
let bottom_surface = core.layers.topology.surfaces.xy_plane();
|
||||
let sweep_path = Vector::from([0., 0., height]);
|
||||
|
||||
Sketch::empty()
|
||||
Sketch::empty(&core.layers.topology)
|
||||
.add_regions(
|
||||
[Region::circle(Point::origin(), outer, core).add_interiors(
|
||||
[Cycle::circle(Point::origin(), inner, core).reverse(core)],
|
||||
|
@ -43,7 +43,7 @@ pub fn model(
|
||||
let bottom_surface = core.layers.topology.surfaces.xy_plane();
|
||||
let sweep_path = Vector::from([0., 0., h]);
|
||||
|
||||
Sketch::empty()
|
||||
Sketch::empty(&core.layers.topology)
|
||||
.add_regions(
|
||||
[Region::polygon(outer_points, core).add_interiors(
|
||||
[Cycle::polygon(inner_points, core).reverse(core)],
|
||||
|
Loading…
x
Reference in New Issue
Block a user