Commit Graph
477 Commits
Author SHA1 Message Date
Hakan Seven 9b58ca8a93 Harden parametric sketch constraints 2026-09-11 09:45:57 +03:00
Felix Riestra ad718def3f Merge remote-tracking branch 'origin/main' into merge-test/main-into-constraints
# Conflicts:
#	src/app/command_driver.rs
#	src/command.rs
#	src/ui/ribbon/mod.rs
#	src/ui/window/options.rs
2026-09-10 23:34:50 +02:00
Felix RiestraandClaude Sonnet 5 bd9a2d08f7 Add Properties-panel Constraints/Parameters sections, a constraint-pill
value toggle, and redesigned constraint-ribbon icons

Properties panel:
- New "Parameters" section (shown with no selection) listing every named
  parameter with inline name/formula editing, add, and delete, backed by
  new PropValue::ParamRow/ParamAddRow and command_driver handlers
  (resolve_named_parameter_edit, on_prop_param_commit/_delete/_add_new).
  A fresh parameter's formula now defaults to "1", not "0" — a 0-length
  seed value is a genuine solver singularity for a Distance constraint
  driven by that parameter, with no defined direction to grow back out of.
- New "Constraints" section (shown for a single selected entity) listing
  every constraint touching it as a clickable PropValue::EntityLink that
  selects the linked entities in the viewport, danger-tinted when the
  constraint conflicts.

Constraint pills:
- New Options > General toggle, "Show values and parameter names on
  constraint markers" (on by default, persisted). Off, every pill shows
  just its bare glyph instead of glyph+driven-value/parameter-name — the
  glyph alone is enough to see a constraint is present, without the value
  text covering nearby geometry on a dense sketch.

Constraint-ribbon icons:
- Replaced all 18 unicode/letter glyph icons (including the plain "F",
  "L", "M", "S" letters) with proper SVGs under assets/icons/constrain/,
  matching the Modify section's two-color style (#B4B6B9 white / #6DB7ED
  blue, consistent stroke width). Tangent reuses the Draw section's
  white-arc-plus-blue-dots motif.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-10 23:16:11 +02:00
ramox81 32abf522f2 Merge remote-tracking branch 'origin/main' into codex/draw-panel
# Conflicts:
#	src/ui/ribbon/draw_panel.rs
2026-09-10 22:30:32 +03:00
ramox81 16e52dcd20 Align and compact Draw popup with accent border 2026-09-10 22:28:05 +03:00
Hakan Seven 5ffbf598a9 refactor(display): trim isolines follow-up comments 2026-09-10 18:05:42 +03:00
Panos a202a61ffe fix(display): regenerate existing solid isolines
Rebuild cached solid meshes for REGEN and apply Options ISOLINES changes once when the slider is released.
2026-09-10 18:00:53 +03:00
Hakan Seven acba9f87bd refactor(ribbon): simplify draw tool registry 2026-09-10 17:23:08 +03:00
Hakan Seven 1b3efb84de Merge pull request #1152 from ramox81 2026-09-10 17:16:01 +03:00
Hakan Seven 464ebc3140 Merge pull request #1151 from ramox81 2026-09-10 17:15:58 +03:00
Hakan Seven 0c46d2d828 Merge pull request #1150 from ramox81 2026-09-10 17:15:57 +03:00
Hakan Seven 1ad8eccbe6 Merge pull request #1149 from ramox81 2026-09-10 17:15:55 +03:00
Hakan Seven e69a7d73a1 Merge pull request #1148 from ramox81 2026-09-10 17:15:52 +03:00
Hakan Seven 9e9664c843 Merge pull request #1147 from ramox81 2026-09-10 17:15:50 +03:00
Hakan Seven ae4f739757 Merge pull request #1146 from ramox81 2026-09-10 17:15:49 +03:00
Hakan Seven abfd7943f3 Merge pull request #1145 from ramox81 2026-09-10 17:15:47 +03:00
Hakan Seven dc3602e774 Merge pull request #1144 from ramox81 2026-09-10 17:15:45 +03:00
Hakan Seven dbd3bf15a9 Merge pull request #1143 from ramox81 2026-09-10 17:15:44 +03:00
Hakan Seven 8b17ddaa22 Merge pull request #1142 from ramox81 2026-09-10 17:15:42 +03:00
Hakan Seven 8ef6150790 Merge pull request #1141 from ramox81 2026-09-10 17:15:40 +03:00
Hakan Seven 09cd547d19 Merge pull request #1140 from ramox81 2026-09-10 17:15:38 +03:00
Hakan Seven 3c72b2a815 Merge pull request #1139 from ramox81/codex/draw-panel 2026-09-10 17:15:25 +03:00
ramox81 74d2f428ac chore: remove unused popup length import 2026-09-10 16:14:51 +03:00
ramox81 d4b23112b1 fix: constrain Draw popup with supported scroll sizing 2026-09-10 16:14:20 +03:00
ramox81 6b58717ce2 fix: release collapsed flyout before opening Draw tools 2026-09-10 15:58:19 +03:00
ramox81 786e31e3a7 feat: expose Revision Cloud in the Draw expansion 2026-09-10 15:57:27 +03:00
ramox81 8604950912 feat: expose Donut in the Draw expansion 2026-09-10 15:57:26 +03:00
ramox81 cf34df4061 feat: expose Helix in the Draw expansion 2026-09-10 15:57:25 +03:00
ramox81 274706ee99 feat: expose Boundary in the Draw expansion 2026-09-10 15:57:24 +03:00
ramox81 6c102a841e feat: expose Wipeout in the Draw expansion 2026-09-10 15:57:23 +03:00
ramox81 c50610e37b feat: expose Region in the Draw expansion 2026-09-10 15:57:22 +03:00
ramox81 1abfb30659 feat: expose Measure in the Draw expansion 2026-09-10 15:57:22 +03:00
ramox81 894058fa60 feat: expose Divide in the Draw expansion 2026-09-10 15:57:21 +03:00
ramox81 0f81166c3a feat: expose Multiple Points in the Draw expansion 2026-09-10 15:57:20 +03:00
ramox81 cc503f1847 feat: expose Ray in the Draw expansion 2026-09-10 15:57:19 +03:00
ramox81 dc83a3e5fa feat: expose Construction Line in the Draw expansion 2026-09-10 15:57:18 +03:00
ramox81 306d998ebf feat: expose Spline CV in the Draw expansion 2026-09-10 15:57:17 +03:00
ramox81 f7a240acd9 feat: expose Spline Fit in the Draw expansion 2026-09-10 15:57:16 +03:00
ramox81 2b4d8fe046 feat: add theme-aware expandable Draw panel 2026-09-10 15:57:15 +03:00
Jonathan 4d3b8d8b79 Merge pull request #1125 from ramox81/codex/sectionplane-wireframe-clipping
Align live section wireframes and SECTIONPLANE grips
2026-09-10 12:34:26 +02:00
Felix RiestraandClaude Sonnet 5 3d0a41b69a 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 <[email protected]>
2026-09-10 10:58:21 +02:00
ramox81 0426df79ca fix(section): add state grip menu 2026-09-10 11:25:33 +03:00
PanosandClaude Opus 5 7ea1aef95e Add a Files page, and links out to the editors that own their own dialogs
The application has no support-file search path — the four folders it uses
are functions returning fixed paths, not settings. Rather than build a Files
page that pretends otherwise, this one answers the question people actually
open it to ask: where does this thing keep my plot styles. Each row shows the
location and opens it in the file manager, and a row whose path the platform
could not give says so with its button disabled.

General gains buttons through to the plugin manager, the keyboard shortcut
editor and the alias editor. Those three have good dialogs of their own and
are not absorbed; Options simply stops being a place you cannot reach them
from.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:45:20 +03:00
PanosandClaude Opus 5 5a638f243a Make the view toggles survive a restart, and give them a page
The ViewCube, the UCS icon, its at-origin placement and selection cycling all
have commands and status-bar pills, and all four kept their value only on the
app struct. Turn the ViewCube off with NAVVCUBE, restart, and it is back.
Nothing failed — the setting evaporated — so a checkbox for any of them would
have been a checkbox that forgets. They are persisted first, with a
round-trip test, and only then given controls.

The new 3D Modeling page carries the three view tools plus the drawing
variables that decide how solids are tessellated: ISOLINES, DISPSILH, SURFU,
SURFV, SURFTYPE, SOLIDHIST and SHOWHIST. Those are saved in the DWG rather
than in preferences, so the page says so beside each group and hides them
entirely when no drawing is open.

Changing them also rebuilds the geometry. The SETVAR path never did, which is
why the comment beside LTSCALE's invalidation exists — the same reasoning
applies here, and without it a new isoline count does not appear until some
unrelated edit rebuilds the solid.

Selection cycling joins the Selection page next to the other two selection
modes, since that is what it is.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:41:26 +03:00
PanosandClaude Opus 5 b5f4b4d1cc Add a Drafting page for the rotation angle and the polar increment
Two drafting preferences had no proper home. The Drafting Settings dialog
displays the drafting rotation and offers only a Reset button — there was no
way to type an angle short of `SETVAR SNAPANG`. The polar tracking increment
existed in exactly one place: a pop-up hanging off the status-bar pill.

The rotation is a text field over an edit buffer rather than the value
itself, so clearing it to retype does not snap the crosshair to zero on the
way through; the buffer is reseeded whenever the value is restored from
behind it. Angles render without a trailing `.0`, matching how the polar
pop-up has always shown them — same kind of number, same reader.

Snap modes, grid spacing and object snap stay in Drafting Settings, where
they belong; the page links to it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:33:19 +03:00
PanosandClaude Opus 5 9c3f3625da Add a User Preferences page for six command-only settings
Zoom direction and factor, whether TEXTEDIT ends after one object, whether
continued dimensions inherit the base dimension's style, which points QDIM
measures from, and which annotative objects pick up a newly set scale. All
six work today; none had a control.

Two of them needed their meaning worked out rather than copied.

ANNOAUTOSCALE stores the mode in the magnitude and on/off in the sign, and
the four modes are not documented anywhere in the app — the command prompt
just says `[-4..4]`. Reading `add_annotation_scale_to_objects` gives them:
1 skips layers that are off, frozen, locked or frozen in the viewport, 2
keeps the locked ones, 3 skips only locked, 4 takes everything. The dropdown
names them instead of showing bare numbers, and choosing Off negates rather
than zeroing, so the mode survives being switched off and back on — which is
the convention the status-bar pill already follows.

The QDIM origin priority had no system variable at all; it could only be
reached through a keyword inside the running command.

Drawing units stay in their own dialog; this page links to it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:29:48 +03:00
PanosandClaude Opus 5 a0027a8977 Put text fill and the command-line preferences on the Display page
Three settings that work, persist, and could only be reached by typing their
name: TEXTFILL, CLIPROMPTLINES and COMMANDLINEFADETIME. The last two govern
how much of the command window is prompt and how long its history lingers —
the kind of thing people fiddle with once and then leave, which is exactly
what a settings dialog is for.

One fix rides along. TEXTFILL is a process-global, so changing it invalidates
the text in every open drawing; the SETVAR path rebuilt only the active tab,
leaving the others rendering the previous setting until an unrelated edit
happened to rebuild them. Both paths now go through
`invalidate_text_everywhere`, so the checkbox and the command cannot disagree.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:26:20 +03:00
PanosandClaude Opus 5 ec8d733857 Give saving its own page, with the two settings that had no control
General had become three unrelated controls: a language picker, a save format
and a file association. The last two move to an Open and Save page, where
they join the two saving preferences that have never had a widget.

Automatic save has worked since the SAVETIME command was added and is
persisted; the only way to change the interval was to type it. Same for the
`.bak` copy from #205 and its ISAVEBAK command. Both are settings people
expect to find in a dialog, and neither was in one.

The page also carries a button through to the Plot dialog. Options holds the
preferences; the plot device, paper and plot styles stay where they already
work well. Note that the modal stack shows one dialog at a time, so the
button replaces Options rather than stacking on it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:22:36 +03:00
PanosandClaude Opus 5 b1d2ac2744 Give the Options dialog a tab rail that can hold more pages
The dialog laid its pages out as a row of buttons across the top, which is
what AutoCAD does and what fits while there are four of them. The pages this
series adds take it to nine, and the names are translated into 21 languages —
a row of nine German or Russian page names does not fit at any dialog width
worth having.

The rail is now a vertical list down the left, the dialog is 880×620 rather
than 540×560, and the content pane scrolls on its own.

Which page was open is now remembered. With four pages, reopening on General
was a shrug; with nine it means hunting for the one you were last in.

The ribbon's Options tool has existed all along — `ToolDef`, icon and all —
but was marked `#[allow(dead_code)]` and never added to a group, so the
dialog could only be reached by typing OPTIONS or from the start page. It
now sits in Manage ▸ Application, beside About.

No settings change in this commit; it is only the shell the rest needs.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:18:23 +03:00
Felix RiestraandClaude Sonnet 5 d675244fb8 Merge branch 'main' into feature/parametric-constraint-system
Brings in 54 commits from origin/main: a selection-performance overhaul,
surface thickening, GPU-native wide/tapered stroke rendering, continued
ocs_doc_api evolution, and assorted fixes/polish (block double-click
editing, DWG hatch/database repair, clipboard, collapsible Properties
sections).

Six real conflicts, all where this branch had independently re-applied
a fix upstream later revised or already carried natively:

- src/app/automation.rs, src/app/command_driver.rs: combined both
  sides — kept this branch's sketch-constraint/named-parameter loading
  on "new"/"open", adopted main's Scene::clear()/material_base_dir and
  its newer rebuild_derived_caches() over the older bump_geometry().
  Scene::clear() (src/scene/entity.rs) now also resets
  sketch_constraints/named_parameters, so every caller gets this for
  free instead of each call site repeating it.
- src/io/mod.rs, src/scene/render_graph.rs: adopted main's design
  outright (commit 973af87d, authored by Hakan directly) — a large
  MINSERT is no longer purged as "corrupt" at load, only its rendering
  is bounded, preserving the source data. This branch's own earlier
  design (reject at load) predates that revision.
- src/scene/pipeline/mesh_gpu.rs: adopted main's valid_rgba_size()
  guard (a real robustness improvement over this branch's version).
- src/snap.rs: replaced wholesale with main's version — this branch's
  copy was an explicit verbatim snapshot from an earlier upstream PR
  (commit 4c264b8c) with zero constraint-system-specific content, and
  main has since evolved it considerably further.

Also removed two now-dead duplicates the merge surfaced without a
conflict marker (both branches had independently fixed the same
things): the OPTIONS/OP command dispatch/autocomplete entries, and
automation.rs's open_finalizes_and_purges_like_the_ui_open_path test
(kept main's version, which covers strictly more: solid_models/
material_base_dir reset on "new").

Full workspace suite passes (812 lib tests + this branch's own 24
constraint/persistence integration tests) except the one pre-existing,
unrelated font-test failure already present on main. Zero clippy
findings in the hand-written merge resolution itself; the ~1,171
warnings clippy reports are pre-existing in the 54 absorbed commits,
not introduced here.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-09 20:44:38 +02:00