forked from 1b-agent/opencadstudio-upstream
Bring the Equal constraint to reference parity
Equal was applied through a generic gather-then-apply flow and, with the default size-retaining solve mode, never changed anything: the solver held both sizes and the relation could not be met. Now: - GCEQUAL joins ECONSTRAINT and GEOMCONSTRAINT Equal; both objects are picked inside the command (`Select first object or [Multiple]:`, `Select second object:`; Multiple gathers `Select objects to make equal to the first:`), a selection made beforehand is not used, a miss says `No object found.` and re-asks, an unsupported object or the same object twice is reported and re-asked, a repeat is refused. - The follower is resized in place before the relation is added: a line or straight polyline segment keeps its start and direction and its end moves to the first object's length; a circle or arc keeps its center and takes the radius. - During edits the side that is not being edited follows the same rule: its size is not retained, its start (or center) and other vertices are held and its direction kept, so only its length or radius changes; a chain of Equal relations follows along. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
1f0b888833
commit
8520ee45e8
10 files changed
+598
-5
No files matched your search
@@ -1592,6 +1592,14 @@ pub enum CmdResult {
|
||||
direction: acadrust::types::Vector3,
|
||||
label: &'static str,
|
||||
},
|
||||
/// Adds an Equal relation from `first` to each of `others` (the second
|
||||
/// object, or a Multiple set). The host resizes every follower to the
|
||||
/// first object's length or radius before the relation holds it there.
|
||||
AddEqualConstraint {
|
||||
first: crate::scene::parametric_constraints::ParametricRef,
|
||||
others: Vec<crate::scene::parametric_constraints::ParametricRef>,
|
||||
label: &'static str,
|
||||
},
|
||||
/// Adds a point or object symmetry relation around a picked line. The
|
||||
/// first reference and axis remain fixed during initial placement.
|
||||
AddSymmetricConstraint {
|
||||
@@ -2894,6 +2902,7 @@ mod constraint_registry_tests {
|
||||
"QCONSTRAINT",
|
||||
"GCPERPENDICULAR",
|
||||
"ECONSTRAINT",
|
||||
"GCEQUAL",
|
||||
"TCONSTRAINT",
|
||||
"GCCONCENTRIC",
|
||||
"NRCONSTRAINT",
|
||||
|
||||
Reference in new issue
Block a user