Repository navigation
DWG-native constraint & parametric compatibility — progress update #1117
Closed
felixriestra
started this conversation in
Show and tell
Replies: 1 comment
|
This was merged in #1157 and ships in v2026.41. Thanks, Felix. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What's there today
crates/ocs_gcs, aRust port of FreeCAD's
planegcssolver): 18 constraint kinds —Coincident, Horizontal/Vertical, Parallel/Perpendicular, Equal,
Tangent, Concentric, CenterPoint, Colinear, Midpoint, Fixed,
PointOnCurve, EqualDistance, Symmetric, Distance, Angle, Radius — all
re-solving live as geometry is edited, with a DOF badge and a
conflict/redundancy resolver.
a dimensional constraint's driving value.
materialized as
acadrust'sAssocNetwork/Assoc2dConstraintGroupobject graph — the same object model AutoCAD/BricsCAD themselves
use — additive alongside this app's own XRecord format. Confirmed
self-consistent through a real DWG/DXF byte round trip via
acadrust's own reader/writer.file weight on every save whether or not AutoCAD interop is wanted.
Design doc:
docs/dwg_constraint_compatibility_design.md.What's confirmed vs. what's still open
Three open questions were resolved against Autodesk's own primary
sources (the ObjectARX SDK headers, Autodesk's live ObjectARX
reference): the network's dictionary key, the
ImplicitPointaddressing enum, and the
AssocVariableevaluator default.What's not yet confirmed: this has not been opened in real AutoCAD
or BricsCAD. Verification so far is a round trip through
acadrust'sown reader — that proves internal self-consistency, not that AutoCAD
actually recognizes the graph as a live constraint. That's the next
real test, and I don't have a licensed copy of either to run it myself
— if anyone here does and is willing to try opening a saved file, that
would answer the two remaining open questions in the design doc
directly.
One real limitation found along the way:
acadrust's DXF writerdeliberately omits the dependency-chain objects (geometry/value
links, named variables) from DXF output — DWG carries the full graph,
DXF only keeps the constraint-group shell. Documented, not a bug.
Known gaps, deliberately out of scope for now
splines, and polylines/rectangles aren't constrainable yet.
NormalandEqualCurvaturearen't modeled as distinct constraintkinds: for a Line/Circle-only entity model they'd be mathematically
identical to
PerpendicularandEqual, so adding them as separatekinds would just mean two buttons doing the same thing under
different DWG class names.
We have added a global UI scale factor that cover everything, it is useful for those users with Hi-Res displays. It is presented in Options dialog.
More practical testing of the both new features (constrains & named parameters) will be done.
A local help system (not localized yet) is being worked on.
Update: merged with
mainand fixed a longstanding font bugThe branch is now caught up with
main(54 commits, including theselection-performance work, surface thickening, and the GPU-native
wide/tapered stroke rendering). A handful of real conflicts came from
places where this branch had independently re-applied a fix
mainlater revised or already carried — notably the MINSERT load-time
handling, which now follows
main's own more recent design (preservethe source data, only bound rendering, rather than purging it as
"corrupt").
Also fixed a font bug that had nothing to do with the constraint work
but turned up while testing it: on macOS, any character not covered by
a stroke font or an explicitly-requested family (e.g. Turkish
Ğ/ş/İ/Ş/ğin aSIMPLEX-style font) silently rendered asnothing. Root cause: the system fallback font (San Francisco) is a
variable TrueType font, and
ttf-parser's outline extraction needs itsvariation axes pinned to get a real outline — without that it returns
no contours (not an error), so the glyph resolved successfully but had
nothing to draw. Fixed by pinning default variation coordinates before
outlining, plus a second-chance search across the rest of the installed
fonts for anything that resolved but still failed to outline (San
Francisco specifically still needed that even pinned, likely due to how
ttf-parserreads itsglyf/gvardata). This was probably affectingany real text using a variable system font, not just the fallback case.
Branch: https://github.com/felixriestra/OpenCADStudio/tree/feature/parametric-constraint-system
All reactions