mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-03 17:38:27 +00:00
Add boundary to HalfEdgeGeometry
This commit is contained in:
parent
4b74964372
commit
ed00c7e19e
@ -31,6 +31,9 @@ pub struct HalfEdgeGeometry {
|
||||
/// really belong here. It exists here for practical reasons that are,
|
||||
/// hopefully, temporary.
|
||||
pub path: SurfacePath,
|
||||
|
||||
/// # The boundary of the half-edge on its curve
|
||||
pub boundary: CurveBoundary<Point<1>>,
|
||||
}
|
||||
|
||||
impl HalfEdgeGeometry {
|
||||
|
@ -68,9 +68,13 @@ pub trait BuildHalfEdge {
|
||||
[arc.start_angle, arc.end_angle].map(|coord| Point::from([coord]));
|
||||
|
||||
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
||||
core.layers
|
||||
.geometry
|
||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
||||
core.layers.geometry.define_half_edge(
|
||||
half_edge.clone(),
|
||||
HalfEdgeGeometry {
|
||||
path,
|
||||
boundary: boundary.into(),
|
||||
},
|
||||
);
|
||||
|
||||
half_edge
|
||||
}
|
||||
@ -86,9 +90,13 @@ pub trait BuildHalfEdge {
|
||||
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));
|
||||
|
||||
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
||||
core.layers
|
||||
.geometry
|
||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
||||
core.layers.geometry.define_half_edge(
|
||||
half_edge.clone(),
|
||||
HalfEdgeGeometry {
|
||||
path,
|
||||
boundary: boundary.into(),
|
||||
},
|
||||
);
|
||||
|
||||
half_edge
|
||||
}
|
||||
@ -107,7 +115,13 @@ pub trait BuildHalfEdge {
|
||||
|
||||
HalfEdge::unjoined(boundary, core)
|
||||
.insert(core)
|
||||
.set_geometry(HalfEdgeGeometry { path }, &mut core.layers.geometry)
|
||||
.set_geometry(
|
||||
HalfEdgeGeometry {
|
||||
path,
|
||||
boundary: boundary.into(),
|
||||
},
|
||||
&mut core.layers.geometry,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ impl JoinCycle for Cycle {
|
||||
)
|
||||
.insert(core)
|
||||
.set_geometry(
|
||||
HalfEdgeGeometry { path },
|
||||
HalfEdgeGeometry { path, boundary },
|
||||
&mut core.layers.geometry,
|
||||
)
|
||||
})
|
||||
|
@ -21,9 +21,10 @@ impl ReverseCurveCoordinateSystems for Handle<HalfEdge> {
|
||||
.insert(core)
|
||||
.derive_from(self, core);
|
||||
|
||||
core.layers
|
||||
.geometry
|
||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
||||
core.layers.geometry.define_half_edge(
|
||||
half_edge.clone(),
|
||||
HalfEdgeGeometry { path, boundary },
|
||||
);
|
||||
|
||||
half_edge
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user