Skip to content

Commit

Permalink
Merge pull request #2328 from hannobraun/geometry
Browse files Browse the repository at this point in the history
Clean up curve geometry representation
  • Loading branch information
hannobraun authored Apr 29, 2024
2 parents 2ac0933 + 00e983c commit 215996a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/fj-core/src/geometry/curve.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::collections::BTreeMap;

use crate::{storage::Handle, topology::Surface};

use super::SurfacePath;
Expand All @@ -22,7 +24,7 @@ pub struct CurveGeom {
/// which is a prerequisite for making the required tooling practical:
///
/// <https://github.com/hannobraun/fornjot/issues/2118>
pub definitions: Vec<LocalCurveGeom>,
pub definitions: BTreeMap<Handle<Surface>, LocalCurveGeom>,
}

impl CurveGeom {
Expand All @@ -31,9 +33,10 @@ impl CurveGeom {
path: SurfacePath,
surface: Handle<Surface>,
) -> Self {
Self {
definitions: vec![LocalCurveGeom { path, surface }],
}
let mut definitions = BTreeMap::new();
definitions.insert(surface, LocalCurveGeom { path });

Self { definitions }
}
}

Expand All @@ -42,7 +45,4 @@ impl CurveGeom {
pub struct LocalCurveGeom {
/// The path that defines the curve on its surface
pub path: SurfacePath,

/// The surface that the curve is defined on
pub surface: Handle<Surface>,
}

0 comments on commit 215996a

Please sign in to comment.