mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-09 03:26:07 +00:00
Don't allow multiple curve definitions per surface
This commit is contained in:
parent
b0e6b676f5
commit
7079b28538
@ -1,3 +1,5 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use crate::{storage::Handle, topology::Surface};
|
||||
|
||||
use super::SurfacePath;
|
||||
@ -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 {
|
||||
@ -31,7 +33,9 @@ impl CurveGeom {
|
||||
path: SurfacePath,
|
||||
surface: Handle<Surface>,
|
||||
) -> Self {
|
||||
let definitions = vec![LocalCurveGeom { path, surface }];
|
||||
let mut definitions = BTreeMap::new();
|
||||
definitions.insert(surface.clone(), LocalCurveGeom { path, surface });
|
||||
|
||||
Self { definitions }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user