mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 10:28:27 +00:00
Return boundary from BuildHalfEdge::arc
This commit is contained in:
parent
9cddbb3c5f
commit
eab0f0da5c
@ -59,7 +59,9 @@ pub trait BuildCycle {
|
||||
[[a, b], [b, c], [c, d], [d, a]]
|
||||
.into_iter()
|
||||
.map(|[start, end]| {
|
||||
HalfEdge::arc(start, end, angle, surface.clone(), core)
|
||||
let (half_edge, _) =
|
||||
HalfEdge::arc(start, end, angle, surface.clone(), core);
|
||||
half_edge
|
||||
});
|
||||
|
||||
Cycle::new(half_edges)
|
||||
|
@ -50,7 +50,7 @@ pub trait BuildHalfEdge {
|
||||
angle_rad: impl Into<Scalar>,
|
||||
surface: Handle<Surface>,
|
||||
core: &mut Core,
|
||||
) -> Handle<HalfEdge> {
|
||||
) -> (Handle<HalfEdge>, CurveBoundary<Point<1>>) {
|
||||
let angle_rad = angle_rad.into();
|
||||
if angle_rad <= -Scalar::TAU || angle_rad >= Scalar::TAU {
|
||||
panic!("arc angle must be in the range (-2pi, 2pi) radians");
|
||||
@ -76,7 +76,7 @@ pub trait BuildHalfEdge {
|
||||
.geometry
|
||||
.define_half_edge(half_edge.clone(), HalfEdgeGeom { boundary });
|
||||
|
||||
half_edge
|
||||
(half_edge, boundary)
|
||||
}
|
||||
|
||||
/// Create a line segment
|
||||
|
Loading…
Reference in New Issue
Block a user