forked from 1b-agent/opencadstudio-upstream
Extend selected polyline terminals using bounded kernel intersections
This commit is contained in:
1 parent
356c8b5a7b
commit
aa11b10c9a
2 files changed
+80
-8
No files matched your search
@@ -3216,7 +3216,7 @@ impl OpenCADStudio {
|
||||
apply_pedit, convert_to_polyline, PeditOp,
|
||||
};
|
||||
match &op {
|
||||
PeditOp::JoinSelection(handles) => {
|
||||
PeditOp::JoinSelection(handles, fuzz) => {
|
||||
let mut available = handles.iter().filter_map(|handle| {
|
||||
if self.tabs[i].scene.is_layer_locked(*handle) { return None; }
|
||||
self.tabs[i].scene.document.get_entity(*handle).cloned().map(|entity| (*handle, entity))
|
||||
@@ -3225,7 +3225,7 @@ impl OpenCADStudio {
|
||||
while !available.is_empty() {
|
||||
let (source_handle, source) = available.remove(0);
|
||||
let candidates = available.iter().map(|(handle, entity)| (*handle, entity)).collect::<Vec<_>>();
|
||||
if let Some((mut result, consumed)) = crate::modules::draw::modify::join::join_to_source(&source, &candidates) {
|
||||
if let Some((mut result, consumed)) = crate::modules::draw::modify::pedit::join_selection_extend(&source, &candidates, *fuzz) {
|
||||
*result.common_mut() = source.common().clone();
|
||||
available.retain(|(handle, _)| !consumed.contains(handle));
|
||||
changes.push((source_handle, result, consumed));
|
||||
|
||||
Reference in new issue
Block a user