Extend sketch constraints toward FreeCAD parity, staying DWG-native-compatible

Arcs are now full constraint participants (center/radius via the existing
Circle-shaped solver path, plus real endpoints kept consistent by arc-rules
CurveValue constraints); adds Diameter/DistanceX/DistanceY/ArcLength/Normal
constraint kinds and initial Ellipse entity support (center-based
constraints only). DWG-native class mappings and gaps (ArcLength, Ellipse)
are grounded against real ObjectARX headers rather than guessed, so files
saved with DWG-native constraints stay honest about what AutoCAD can
actually represent.

Also fixes a case-sensitivity bug where a lowercase named-parameter
reference typed at a dimensional constraint's value prompt was rejected
(the command line uppercases SingleToken input before the parameter-name
lookup), and adds a "Used by" column to the Named Parameters panel.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-10 10:58:21 +02:00
1 parent eb96e8b6ed
commit 3d0a41b69a
12 files changed
+1660 -60

No files matched your search

+2 -1
View File
@@ -36,7 +36,7 @@ impl CadModule for DrawModule {
use clipboard::{copy_clip, cut, paste};
use constrain::{
angle_tool, center_point_tool, coincident_tool, colinear, concentric, distance_tool, equal,
equal_distance_tool, fixed, horizontal, midpoint_tool, parallel, perpendicular, point_on_curve_tool,
equal_distance_tool, fixed, horizontal, midpoint_tool, normal, parallel, perpendicular, point_on_curve_tool,
symmetric, tangent, vertical,
};
use draw::{arc, circle, ellipse, hatch, line, polyline, shapes};
@@ -135,6 +135,7 @@ impl CadModule for DrawModule {
perpendicular::tool().into(),
equal::tool().into(),
tangent::tool().into(),
normal::tool().into(),
coincident_tool::tool().into(),
distance_tool::tool().into(),
angle_tool::tool().into(),