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