Complete automatic constraint behavior

This commit is contained in:
ramox81 committed 2026-09-15 11:47:28 +03:00
1 parent d738ebfcc6
commit 66be530655
25 files changed
+1494 -102

No files matched your search

+11 -1
View File
@@ -835,7 +835,17 @@ bg={bg_ms:.1}ms n={view_count}"
set.constraints
.iter()
.filter(|c| c.enabled)
.filter(|c| tab.scene.is_parametric_constraint_visible(scope, c.id))
.filter(|c| {
let selected = c.refs.iter().any(|reference| {
tab.scene.selected.contains(&reference.entity)
});
tab.scene.should_display_parametric_constraint(
scope,
c.id,
selected,
self.constraint_bar_display,
)
})
.filter_map(|c| {
let (anchor, outward) =
crate::scene::parametric_constraints::glyph_placement(
+15
View File
@@ -25,6 +25,7 @@ impl OpenCADStudio {
Some(K::DrawingUnits) => crate::t!("Drawing Units").into_owned(),
Some(K::GeometricTolerance) => crate::t!("Geometric Tolerance").into_owned(),
Some(K::DraftingSettings) => crate::t!("Drafting Settings").into_owned(),
Some(K::AutoConstrainSettings) => crate::t!("Constraint Settings").into_owned(),
Some(K::LayerStateEditor) => crate::tr!("modal", "edit-layer-state"),
Some(K::Plot) => crate::tr!("modal", "plot"),
Some(K::PrintAll) => t!("Print All").into_owned(),
@@ -307,6 +308,20 @@ impl OpenCADStudio {
},
)
}
super::super::ModalKind::AutoConstrainSettings => sized_flow(
ex,
620,
610,
|flow| {
crate::ui::window::auto_constrain_settings::view_window(
&self.auto_constrain_settings,
self.auto_constrain_selected_row,
&self.auto_constrain_distance_input,
&self.auto_constrain_angle_input,
flow,
)
},
),
super::super::ModalKind::FindReplace => automatic_flow(ex, |flow| {
crate::ui::window::find_replace::view_window(
&self.find_replace.search,