Commit Graph
398 Commits
Author SHA1 Message Date
ramox81 42439c2e50 Pick spline control vertices with the configured screen aperture 2026-09-11 11:13:09 +03:00
ramox81 12c661d118 Refresh spline planarity after control vertex deletion 2026-09-11 11:07:49 +03:00
ramox81 b24feab498 Apply and edit drawing current transparency 2026-09-11 11:06:52 +03:00
ramox81 36b7998773 Preserve unsupported closed spline deletion state 2026-09-11 11:05:52 +03:00
ramox81 abab89e206 Delete spline control vertices through the Refine submenu 2026-09-11 11:05:10 +03:00
ramox81 ebef847870 Edit individual polyline segment widths at the selected vertex 2026-09-11 11:04:30 +03:00
ramox81 25ac594d85 Reverse complete helix geometry and preserve top radius semantics 2026-09-11 11:03:58 +03:00
ramox81 6e74cc48d8 Recreate hatch boundaries as exact regions 2026-09-11 10:57:32 +03:00
ramox81 83a930950a Accept two-point MEASURE spacing in spatial coordinates 2026-09-11 10:57:05 +03:00
ramox81 b42a9e7735 Accept two-point XLINE angles and offset distances 2026-09-11 10:56:54 +03:00
ramox81 35bbb35f58 Preserve joined polyline widths and add arc closure and spline joins 2026-09-11 10:45:27 +03:00
ramox81 7a9ffef5cf Preserve periodic control-vertex spline seams 2026-09-11 10:43:58 +03:00
ramox81 8e5f0955d2 Convert fitted polylines through the spline Object option 2026-09-11 10:43:42 +03:00
ramox81 6c07892d07 Complete rectangular and polygonal revision clouds directly 2026-09-11 10:39:12 +03:00
ramox81 9ca2db82bf Add source-first joins with retained object identity 2026-09-11 10:39:08 +03:00
ramox81 4deaffeb0a Add boundary region output selection 2026-09-11 10:38:50 +03:00
ramox81 4d90c91372 Validate wipeout boundary before asking to erase its source 2026-09-11 10:34:22 +03:00
ramox81 ec723fb97b Match MEASURE marker placement behavior 2026-09-11 10:26:09 +03:00
ramox81 18569687a1 Match DIVIDE marker placement behavior 2026-09-11 10:26:08 +03:00
ramox81 376faec4db Add polyline vertex and multiple-object editing 2026-09-11 10:25:12 +03:00
ramox81 2d9befc77c Add spline refinement and repeatable editing workflows 2026-09-11 10:25:12 +03:00
ramox81 f80e9f742c Reverse selected curves while preserving spline shape 2026-09-11 10:25:11 +03:00
ramox81 a3eee372e4 Support first-point reset and same-point breaks 2026-09-11 10:25:10 +03:00
ramox81 b84d387f43 Match SPLINE CV command behavior 2026-09-11 10:24:58 +03:00
ramox81 bfac3f130c Match SPLINE FIT command behavior 2026-09-11 10:24:58 +03:00
ramox81 60da282654 Add tolerant OVERKILL settings and geometric cleanup 2026-09-11 10:24:39 +03:00
ramox81 88956e306b Apply SETBYLAYER choices and property mask to selected objects 2026-09-11 10:24:15 +03:00
ramox81 d10b50778c Match LENGTHEN command behavior 2026-09-11 10:23:43 +03:00
ramox81 227928257b Match ALIGN command behavior 2026-09-11 10:23:43 +03:00
ramox81 452e61121b Match RAY command behavior 2026-09-11 10:23:42 +03:00
ramox81 cbc81df7cc Match XLINE command behavior 2026-09-11 10:23:42 +03:00
ramox81 f24fdc7965 Implement nested object selection and placement for NCOPY 2026-09-11 10:23:38 +03:00
ramox81 c947e1ce50 Add hatch editing option stages and appearance association workflows 2026-09-11 10:22:55 +03:00
ramox81 48a5d22efc Match wipeout point stages and reject wide boundaries 2026-09-11 10:22:36 +03:00
ramox81 9948309f5c Accept planar and pointed helices with bounded turn counts 2026-09-11 10:22:35 +03:00
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 <noreply@anthropic.com>
2026-09-10 23:16:11 +02: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 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
ramox81 786e31e3a7 feat: expose Revision Cloud in the Draw expansion 2026-09-10 15:57:27 +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
Felix RiestraandClaude Sonnet 5 9f7972ee0d Register all sketch-constraint commands in the autocomplete registry
None of the 17 constraint commands (HCONSTRAINT, VCONSTRAINT,
PCONSTRAINT, QCONSTRAINT, ECONSTRAINT, TCONSTRAINT, NCONSTRAINT,
NRCONSTRAINT, LCONSTRAINT, FXCONSTRAINT, SYCONSTRAINT, CCONSTRAINT,
EDCONSTRAINT, CPCONSTRAINT, MPCONSTRAINT, OCCONSTRAINT, DCONSTRAINT,
ACONSTRAINT) carried an inventory::submit! registration, so they were
invisible to command-line autocomplete, the MCP commands listing, and
the ALIASEDIT shortcut editor (which rejects a custom shortcut target
that isn't in this same registry). Each constraint module now
registers itself, with a regression test pinning the full set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 11:24:30 +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 <noreply@anthropic.com>
2026-09-10 10:58:21 +02: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 <noreply@anthropic.com>
2026-09-09 20:44:38 +02:00
Felix RiestraandClaude Sonnet 5 31b5ef4ec3 Add 8 geometric constraint kinds and an opt-in DWG-native persistence toggle
New ConstraintKind variants — Concentric, CenterPoint, Colinear, Midpoint,
Fixed, PointOnCurve, EqualDistance, Symmetric — each built entirely from
existing ocs_gcs (FreeCAD planegcs) primitives, no new solver math needed.
build_constraint now returns Vec<Rc<dyn Constraint>> instead of
Option<Rc<...>>, generalizing the old Coincident-only "needs a second
system-level constraint" special case to every kind that needs one.
Wired into the ribbon (7 new buttons), a new point+pre-selected-entity
command for CenterPoint/Midpoint/PointOnCurve, a new 4-point command for
EqualDistance, and the existing DWG-native class-name mapping (all 8 reuse
the same generic "plain Geometrical node" path already built for
Coincident/Horizontal/etc.). Deliberately not modeled: Normal and
EqualCurvature, which for this app's Line/Circle-only entity model would
just be Perpendicular and Equal wearing different DWG class names.

Also makes DWG-native constraint persistence opt-in (Options > General,
off by default) rather than unconditional: a scope that doesn't yet have
the native graph is only given one when the setting is on, but a scope
that already has one — from an earlier save, or a file that came from
real AutoCAD — keeps getting it resynced regardless of the setting, so
toggling it off never freezes a stale graph in place.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 19:38:31 +02:00