mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-20 00:46:10 +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 crate::{storage::Handle, topology::Surface};
|
||||||
|
|
||||||
use super::SurfacePath;
|
use super::SurfacePath;
|
||||||
@ -22,7 +24,7 @@ pub struct CurveGeom {
|
|||||||
/// which is a prerequisite for making the required tooling practical:
|
/// which is a prerequisite for making the required tooling practical:
|
||||||
///
|
///
|
||||||
/// <https://github.com/hannobraun/fornjot/issues/2118>
|
/// <https://github.com/hannobraun/fornjot/issues/2118>
|
||||||
pub definitions: Vec<LocalCurveGeom>,
|
pub definitions: BTreeMap<Handle<Surface>, LocalCurveGeom>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CurveGeom {
|
impl CurveGeom {
|
||||||
@ -31,7 +33,9 @@ impl CurveGeom {
|
|||||||
path: SurfacePath,
|
path: SurfacePath,
|
||||||
surface: Handle<Surface>,
|
surface: Handle<Surface>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let definitions = vec![LocalCurveGeom { path, surface }];
|
let mut definitions = BTreeMap::new();
|
||||||
|
definitions.insert(surface.clone(), LocalCurveGeom { path, surface });
|
||||||
|
|
||||||
Self { definitions }
|
Self { definitions }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user