mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-22 09:56:06 +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,
|
/// really belong here. It exists here for practical reasons that are,
|
||||||
/// hopefully, temporary.
|
/// hopefully, temporary.
|
||||||
pub path: SurfacePath,
|
pub path: SurfacePath,
|
||||||
|
|
||||||
|
/// # The boundary of the half-edge on its curve
|
||||||
|
pub boundary: CurveBoundary<Point<1>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HalfEdgeGeometry {
|
impl HalfEdgeGeometry {
|
||||||
|
@ -68,9 +68,13 @@ pub trait BuildHalfEdge {
|
|||||||
[arc.start_angle, arc.end_angle].map(|coord| Point::from([coord]));
|
[arc.start_angle, arc.end_angle].map(|coord| Point::from([coord]));
|
||||||
|
|
||||||
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
||||||
core.layers
|
core.layers.geometry.define_half_edge(
|
||||||
.geometry
|
half_edge.clone(),
|
||||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
HalfEdgeGeometry {
|
||||||
|
path,
|
||||||
|
boundary: boundary.into(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
half_edge
|
half_edge
|
||||||
}
|
}
|
||||||
@ -86,9 +90,13 @@ pub trait BuildHalfEdge {
|
|||||||
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));
|
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));
|
||||||
|
|
||||||
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
let half_edge = HalfEdge::unjoined(boundary, core).insert(core);
|
||||||
core.layers
|
core.layers.geometry.define_half_edge(
|
||||||
.geometry
|
half_edge.clone(),
|
||||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
HalfEdgeGeometry {
|
||||||
|
path,
|
||||||
|
boundary: boundary.into(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
half_edge
|
half_edge
|
||||||
}
|
}
|
||||||
@ -107,7 +115,13 @@ pub trait BuildHalfEdge {
|
|||||||
|
|
||||||
HalfEdge::unjoined(boundary, core)
|
HalfEdge::unjoined(boundary, core)
|
||||||
.insert(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)
|
.insert(core)
|
||||||
.set_geometry(
|
.set_geometry(
|
||||||
HalfEdgeGeometry { path },
|
HalfEdgeGeometry { path, boundary },
|
||||||
&mut core.layers.geometry,
|
&mut core.layers.geometry,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -21,9 +21,10 @@ impl ReverseCurveCoordinateSystems for Handle<HalfEdge> {
|
|||||||
.insert(core)
|
.insert(core)
|
||||||
.derive_from(self, core);
|
.derive_from(self, core);
|
||||||
|
|
||||||
core.layers
|
core.layers.geometry.define_half_edge(
|
||||||
.geometry
|
half_edge.clone(),
|
||||||
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
|
HalfEdgeGeometry { path, boundary },
|
||||||
|
);
|
||||||
|
|
||||||
half_edge
|
half_edge
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user