Commit Graph
3094 Commits
Author SHA1 Message Date
Hakan Seven 9b58ca8a93 Harden parametric sketch constraints 2026-09-11 09:45:57 +03:00
Hakan Seven 41c07e9858 Merge pull request #1157 from felixriestra/feature/parametric-constraint-system 2026-09-11 08:39:05 +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 eca4e9d7a5 Document Properties-panel constraints/parameters, pill toggle, icon
redesign, and the ellipse solver fix in CHANGELOG

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 23:16:37 +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 <noreply@anthropic.com>
2026-09-10 23:16:11 +02:00
Felix RiestraandClaude Sonnet 5 faf3473b2b Fix ellipse solver drift: pin focus1 offset from center, not focus1 itself
An ocs_gcs Ellipse stores focus1 as an absolute point rather than an
offset from center, so a constraint that pulls only on center (e.g.
Concentric) left focus1's absolute coordinates untouched while center
moved — changing the derived focus1-center vector that major_axis and
minor_axis_ratio are computed from on write-back, so the ellipse visibly
rotated and reshaped even though nothing asked it to.

solve_scope now adds two Difference constraints per registered ellipse
pinning focus1.x-center.x and focus1.y-center.y to their pre-solve
values, so focus1 translates rigidly with center unless something
actually constrains it. Fixed's Ellipse arm no longer re-pins focus1
directly since that's now redundant with these rules.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 23:15:19 +02:00
Hakan Seven 7d0c059b30 Merge pull request #1155 from ramox81/codex/draw-panel
Align and compact Draw popup with theme accent border
2026-09-10 22:57:06 +03: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
Karim Jerbi f77c337af4 feat(command): add MTP/M2P midpoint-between-two-points modifier
Add MTP (Midpoint Between Two Points) as a keyword that can be typed
during any point-picking command (e.g. LINE) to suspend the current
command, prompt for two points, and return the midpoint to the parent.

- New Mid2PointCommand registered under both "MTP" and "M2P" aliases
- ReturnPoint CmdResult variant feeds the resolved midpoint back to
  the suspended parent command
- MTP/M2P typed during a point step suspends the active command and
  starts the midpoint modifier; Escape restores the parent command
- Preview wires show a rubber-band line with a triangle marker at
  the midpoint
- Character-by-character typing is routed correctly even with dynamic
  input active (digits no longer leak into dyn fields)
- Three automation tests cover the full workflow, ESC restoration, and
  dynamic-input character routing
2026-09-10 20:30:18 +01:00
ramox81 16e52dcd20 Align and compact Draw popup with accent border 2026-09-10 22:28:05 +03:00
Hakan Seven f4eeba75df style(icons): refresh editing tool artwork 2026-09-10 22:20:34 +03:00
Hakan Seven c50427a834 i18n(tr): shorten shaded render mode labels 2026-09-10 21:48:37 +03:00
Felix RiestraandClaude Sonnet 5 d27eb625ca fix(constraints): split large XRecord Chunk data across entries for DWG
The DWG writer truncates an XRecord Chunk to u8::MAX bytes, so a sketch's
constraint set or named-parameter table silently lost every entry on the
next DWG open once serialization passed ~255 bytes (found live: a
23-constraint demo round-tripped fine through DXF but came back empty
through DWG). Split the blob across multiple same-code 310 entries on
save and reassemble them on load, entirely on the OCS side.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 19:25:24 +02:00
Hakan Seven 14ef6c7bcd fix(i18n): translate render mode choices 2026-09-10 19:16:30 +03:00
Hakan Seven c50eb52320 refactor(arcs): use kernel geometry for grip values 2026-09-10 18:37:55 +03:00
Hakan Seven a8645c2d95 fix(grips): cancel value edits before new commands 2026-09-10 18:37:55 +03:00
MarcelP102 d47e3234d8 Add dynamic input for grip-based geometry editing (#1138) 2026-09-10 18:23:28 +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 4de2792798 fix(doc-api): preserve XDATA and XRecord integrity 2026-09-10 18:00:07 +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
Hakan Seven 2f2d894eee fix(surface): refresh construction display 2026-09-10 17:14:44 +03:00
Hakan Seven 4201b0a031 Merge pull request #1131 from ramox81/codex/thicken-surface-grips 2026-09-10 17:05:43 +03:00
Hakan Seven 035d31e201 fix(section): preserve selected slice depth 2026-09-10 17:00:16 +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 11057cc5e9 Fix extrusion surface properties and snapping 2026-09-10 16:07:05 +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