Skip to content

Commit

Permalink
Set curve geometry in BuildShell method
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Apr 30, 2024
1 parent e032ab1 commit b29d731
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions crates/fj-core/src/operations/build/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use fj_interop::ext::ArrayExt;
use fj_math::Point;

use crate::{
geometry::CurveBoundary,
geometry::{CurveBoundary, HalfEdgeGeom},
operations::{
build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon},
geometry::UpdateHalfEdgeGeometry,
geometry::{UpdateCurveGeometry, UpdateHalfEdgeGeometry},
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
join::JoinCycle,
reverse::ReverseCurveCoordinateSystems,
Expand Down Expand Up @@ -90,21 +90,27 @@ pub trait BuildShell {
.map(|((vertex, positions), (curve, boundary))| {
let boundary = boundary.reverse();

let half_edge = HalfEdge::line_segment(
let curve = curve.make_line_on_surface(
positions,
Some(boundary),
surface.clone(),
core,
&mut core.layers.geometry,
);
half_edge

HalfEdge::unjoined(core)
.update_start_vertex(|_, _| vertex, core)
.update_curve(|_, _| curve, core)
.update_curve(|_, _| curve.clone(), core)
.insert(core)
.set_geometry(
*core
.layers
.geometry
.of_half_edge(&half_edge),
HalfEdgeGeom {
path: core
.layers
.geometry
.of_curve(&curve)
.local_on(&surface)
.path,
boundary,
},
&mut core.layers.geometry,
)
})
Expand Down

0 comments on commit b29d731

Please sign in to comment.