forked from 1b-agent/opencadstudio-upstream
Associate hatch boundaries from internal points and selected sources
This commit is contained in:
1 parent
49d1125530
commit
1039f51abf
5 files changed
+74
-8
No files matched your search
@@ -628,6 +628,14 @@ pub(crate) fn boundary_entities_from_sources(
|
||||
}
|
||||
|
||||
impl Scene {
|
||||
pub(crate) fn replace_hatch_association(&mut self,handle:Handle,paths:Vec<acadrust::entities::BoundaryPath>) {
|
||||
let Some(EntityType::Hatch(hatch))=self.document.get_entity_mut(handle) else{return;};
|
||||
hatch.paths=paths;
|
||||
hatch.is_associative=true;
|
||||
self.associative_hatch_source_cache.borrow_mut().take();
|
||||
self.refresh_fill_model(handle);
|
||||
}
|
||||
|
||||
pub(crate) fn edit_hatch_boundary_handles(
|
||||
&mut self,
|
||||
hatch_handle: Handle,
|
||||
|
||||
@@ -141,7 +141,7 @@ fn boundary_sources(scene: &Scene, plane: WorkingPlane) -> FxHashMap<Handle, Bou
|
||||
}).collect()
|
||||
}
|
||||
|
||||
fn selected_rings(sources: &FxHashMap<Handle, BoundarySource>, point: [f64; 2]) -> Option<Vec<Vec<[f64; 2]>>> {
|
||||
pub(crate) fn selected_rings(sources: &FxHashMap<Handle, BoundarySource>, point: [f64; 2]) -> Option<Vec<Vec<[f64; 2]>>> {
|
||||
let rings = boundary_faces(sources, BOUNDARY_TOLERANCE);
|
||||
let loops = boundary_loops(sources, &rings)?;
|
||||
let tolerance = Tolerance::new(BOUNDARY_TOLERANCE);
|
||||
|
||||
Reference in new issue
Block a user