Commit Graph
167 Commits
Author SHA1 Message Date
ramox81andClaude Opus 5 19204d1b2c DCDIAMETER/DCRADIUS: the reference flow with a real radial dimension
The commands ask for the circle or arc themselves, report the measured
size, take a dimension line location and then the value or name and
value, creating a radius or diameter dimension as the constraint's
dynamic dimension with a radN/diaN parameter, refusing a second radial
constraint on the same object and any non-positive value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 15:21:11 +03:00
ramox81andClaude Fable 5.1 4ad4041858 Angular dimensional constraint: reference flow, dynamic angular dimension, angN parameters
DCANGULAR picks two lines, an arc or three points, takes the dimension
line location to choose the sector and the value or name, and creates the
dynamic two-line or three-point angular dimension driven by an angN
parameter. Reference messages for invalid, repeated and parallel sides,
existing names and invalid names; angle values display within one turn at
the angular precision; the first side (or vertex and first point) stays
when the value changes; the ribbon Dimensional panel follows the reference
order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 10:02:40 +03:00
ramox81andClaude Fable 5.1 6969c19746 Aligned dimensional constraint: Point & line, 2Lines, value and property parity
DCALIGNED opens with `[Object/Point & line/2Lines] <Object>`. Point & line
asks `Specify constraint point or [Line] <Line>:` then `Select line:` (or the
line first and `Select constraint point:`), measures perpendicular to the
line from the constraint point to the line end nearest to it, and stores a
directed distance with the line as direction reference. 2Lines asks
`Select first line:` and `Select second line to make parallel:`, adds a
Parallel constraint solved with the first line pinned, then measures on the
solved geometry between the nearest ends. Unsupported line picks report the
reference's message; the same measurement again reports `The constraint
already exists on the selected objects.` and ends the command; an invalid
expression reports both reference lines and asks again.

The offered default and seeded expression carry twelve significant digits;
a typed value moves the second point (or the other object) while the first
point and its measured line stay, negative values keep their sign in the
parameter and use their magnitude, zero folds the points together, and the
dynamic dimension's origins follow every solve. The lock mark sits after the
text, a selected dynamic dimension shows triangle grips at its points and the
text square, and its Properties show the Constraint section (Name and
Expression editable) plus Text rotation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 14:52:37 +03:00
ramox81andClaude Fable 5.1 72fd3fd35b Linear dimensional constraints: point flow, dynamic dimension, driving parameter
DCLINEAR, DCHORIZONTAL, DCVERTICAL and DCALIGNED follow the reference flow:
`Specify first constraint point or [Object] <Object>:`, `Specify second
constraint point:`, `Specify dimension line location:`, then `Dimension
text = …` and `Enter value or name and value <d1=100>:`. Linear reads
horizontal or vertical from the dimension line location the way a linear
dimension does; Object takes a line's, an arc's or a polyline segment's
ends. A miss reports `No valid constraint point found.` / `No object
found.` and asks again; another object type reports `Invalid selection for
Linear. Select a line, polyline segment or arc.`.

Each constraint creates a drawing parameter (`d1`, `d2`, …, or the typed
`name=expression`), drives the constraint through it, and draws a dynamic
dimension in constraint gray whose text follows CONSTRAINTNAMEFORMAT
(`d1=100.0000`); the dimension is associated with the constrained objects
and its text is refreshed after every solve. A typed value other than the
measured one moves the second point while the first stays, and so does a
later parameter edit. Deleting the constraint removes its dimension and,
when nothing else reads it, its parameter.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 11:53:19 +03:00
Hakan Seven 3ba370bcd1 Merge pull request #1366 from ramox81/codex/equal-constraint-parity
Bring the Equal constraint to reference parity

# Conflicts:
#	src/command.rs
2026-09-19 23:01:01 +03:00
ramox81andClaude Fable 5.1 e32e7e68e4 Equal: apply each Multiple pick at once, take typed coordinates as picks
Multiple now follows the reference flow: every pick after the first is
made equal right away under `Select object to make equal to first:` and
Enter ends the command with `Length of objects made equal` (or `Radius
…`). A typed coordinate at one of the command's object prompts picks the
object under that point instead of being refused as a point.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 23:04:49 +03:00
ramox81andClaude Fable 5.1 8520ee45e8 Bring the Equal constraint to reference parity
Equal was applied through a generic gather-then-apply flow and, with the
default size-retaining solve mode, never changed anything: the solver
held both sizes and the relation could not be met. Now:

- GCEQUAL joins ECONSTRAINT and GEOMCONSTRAINT Equal; both objects are
  picked inside the command (`Select first object or [Multiple]:`,
  `Select second object:`; Multiple gathers `Select objects to make equal
  to the first:`), a selection made beforehand is not used, a miss says
  `No object found.` and re-asks, an unsupported object or the same object
  twice is reported and re-asked, a repeat is refused.
- The follower is resized in place before the relation is added: a line or
  straight polyline segment keeps its start and direction and its end
  moves to the first object's length; a circle or arc keeps its center and
  takes the radius.
- During edits the side that is not being edited follows the same rule:
  its size is not retained, its start (or center) and other vertices are
  held and its direction kept, so only its length or radius changes; a
  chain of Equal relations follows along.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 22:56:31 +03:00
ramox81andClaude Fable 5.1 cda0627804 Report a missed first 2Points pick at once for Horizontal/Vertical
The first empty-space click of the 2Points flow was only resolved against
the document together with the second one, so "No valid constraint point
found." appeared one pick late. The command now hands the first pick to
the host (`CmdResult::CheckHorizontalPoint`), which resolves it right away:
a miss reports and re-asks for the first point, a hit moves on to the
second point.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 20:36:01 +03:00
Hakan Seven 3ba7b38934 Merge pull request #1357 from ramox81/codex/vertical-constraint-parity
Match Vertical geometric constraint behavior

# Conflicts:
#	src/app/commands/draw.rs
#	src/scene/parametric_constraints.rs
#	src/ui/overlay.rs
2026-09-18 18:54:12 +03:00
Hakan Seven 7ef4e9f336 Merge pull request #1356 from ramox81/codex/fixed-constraint-parity
Match Fix geometric constraint behavior

# Conflicts:
#	src/scene/parametric_constraints.rs
#	src/scene/parametric_solve.rs
2026-09-18 18:53:18 +03:00
Hakan Seven da02e38208 Merge pull request #1352 from ramox81/codex/symmetric-constraint-parity
Complete Symmetric constraint behavior
2026-09-18 18:52:41 +03:00
Hakan SevenandClaude Fable 5.1 9978713acc fix: UCS FACE/OBJECT pick from the interactive prompt; reuse ocs_axes
Follow-up to #1341:
- interactive UCS offers Face / OBject; bare UCS OBJECT starts an entity pick
- one UcsPickCommand serves both FACE and OBJECT
- ucs_from_normal calls the existing arbitrary-axis helper instead of a copy
- prompt catalogue key and en-US text follow the new option list

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 18:42:44 +03:00
ramox81andClaude Fable 5.1 26e458d6f7 Match Vertical geometric constraint behavior
1) VCONSTRAINT (and the new GCVERTICAL name) uses the axis constraint flow:
   "Select an object or [2Points] <2Points>:", 2Points mode with the
   reference's re-prompts and messages, and the same object types as
   Horizontal — line, polyline segment, text, MText, ellipse axis.
2) Object mode turns the object about its first vertex; a two-point relation
   across two objects slides the second object rigidly onto the axis.
3) Re-applying an axis constraint reports that the constraint already
   exists; Vertical follows the UCS Y direction.
4) The constraint bar draws Vertical as the reference's axis mark, with the
   point marker for a two-point relation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 18:19:49 +03:00
ramox81andClaude Fable 5.1 f998b59193 Match Fix geometric constraint behavior
1) FXCONSTRAINT (and the new GCFIX name) prompts "Select point or [Object]
   <Object>:" — a pick fixes that constraint point; Enter or O asks for one
   line, polyline segment, circle, arc, ellipse or spline; misses and
   unsupported objects report the reference messages and re-prompt.
2) Point, block, text, MText, attribute and table insertion points are
   addressable constraint points.
3) Re-applying Fixed to the same point or object reports that the constraint
   already exists instead of adding a duplicate.
4) A persistent Fixed holds its pre-edit geometry through MOVE, ROTATE,
   SCALE, STRETCH, grip and Properties edits: fixed points stay, free points
   of a partly fixed entity follow the edit, and size retention skips fixed
   entities.
5) Object mode on a polyline fixes the picked segment (natively persisted)
   instead of the whole polyline; arc segments pin endpoints, center and
   radius.
6) Ribbon label "Fix" with a padlock icon.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 15:38:33 +03:00
ramox81 9aadc97c11 feat: complete symmetric constraint behavior 2026-09-18 10:27:00 +03:00
dichhead bec382a99b Merge branch 'HakanSeven12:main' into main 2026-09-17 17:56:03 +02:00
Hakan Seven f0a3336302 fix: retain horizontal constraint axes 2026-09-17 17:55:56 +03:00
Matus Mastena bfb786d56e Add UCS FACE and UCS OBJECT
Draw a profile, extrude it, then sketch on a face of the result: the
operations were all there, but nothing turned a solid's face into the
active drawing plane, so the second half of that loop was unreachable.

UCS FACE takes a surface pick, finds the planar face under it and
builds the plane from the face normal. X comes from the Arbitrary Axis
Algorithm, so the same face always yields the same X axis and a sketch
drawn on it does not spin when the UCS is rebuilt.

UCS OBJECT adopts a planar entity's own stored axes instead of
re-deriving X, so a sketch started from a circle lines up with how
that circle is stored. It reuses the profile extraction EXTRUDE
already runs, which means anything extrudable can also be sketched on.

Bare UCS FACE starts an interactive pick that resolves through the
same inline handler, so the clicked and typed paths cannot diverge.
2026-09-17 16:51:41 +02:00
Hakan Seven f9c59503f0 Merge pull request #1334 from ramox81/codex/horizontal-constraint-parity 2026-09-17 17:39:44 +03:00
Hakan Seven 80f2d5fd72 fix: solve concentric geometry in kernel 2026-09-17 17:39:01 +03:00
Hakan Seven 16c417f81d Merge pull request #1332 from ramox81/codex/concentric-constraint-parity
# Conflicts:
#	src/entities/arc.rs
#	src/entities/ellipse.rs
#	src/modules/parametric/mod.rs
#	src/scene/parametric_solve.rs
#	src/ui/overlay.rs
2026-09-17 17:24:14 +03:00
ramox81 059906f347 Fix horizontal geometric constraint behavior 2026-09-17 17:18:59 +03:00
ramox81 a6a70420c4 fix: align concentric constraint behavior 2026-09-17 15:31:26 +03:00
PanosandClaude Opus 5 d753874fe4 feat(modify): commercial solutions keyword options for MOVE, COPY, FILLET, CHAMFER, OFFSET
MOVE: Displacement, Enter at the second point uses the base as the vector.
COPY: Displacement, mOde (Single/Multiple), Undo of the last copy.
FILLET: Undo of the last fillet (the command refreshes its entity cache
through the new CadCommand::on_document_undone hook after the host undoes
the document step). CHAMFER: Multiple and Undo. OFFSET: Erase (the offset
replaces its source), Layer (Current/Source), Undo, Exit.
POLY3D, TRACE, MIRROR and MEASUREGEOM expose the keywords they already
accepted as options, so the context menu and option buttons list them.

The pinned prompt now keeps informational bracket groups such as
"[3 objects]" and only drops real option listings when the buttons take over.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 12:05:14 +03:00
Hakan Seven 79bc800728 Merge pull request #1320 from ghost/styled-dimension-preview 2026-09-17 07:11:10 +03:00
Hakan Seven dfe7904308 Merge pull request #1312 from ghost/ordered-tangent 2026-09-17 07:08:54 +03:00
Christopher Overbeck acbbb23297 feat(dimension): styled placement previews for creation commands
Show the styled dimension and its value while placing a dimension, using
the same builder the command commits with. Each creation command
(DIMLINEAR, DIMALIGNED, DIMANGULAR, DIMRADIUS, DIMDIAMETER, DIMARC,
DIMJOGGED, DIMORDINATE, DIMCONTINUE, DIMBASELINE, QDIM) reports the
dimensions it would commit at the current stage through
`CadCommand::dimension_preview`. The application applies the current
creation style, or the base dimension's style for DIMCONTINUEMODE=1,
and the same viewport measurement scale as commit, then tessellates the
transient entity through the normal dimension renderer.

While the second definition point is being acquired, a hovered model
snap supplies a provisional viewport scale; once both points are fixed,
hovering another viewport does not change the value. Angular dimensions
never receive length compensation. Degenerate geometry, an invalid
scale, or conflicting viewports fall back to the plain rubber-band
preview so no misleading value is shown.
2026-09-16 13:58:44 -05:00
ramox81 60bfc88b39 Fix ordered perpendicular constraint behavior 2026-09-16 18:21:16 +03:00
ramox81 a1e809b61b Match ordered tangent constraint behavior 2026-09-16 16:13:17 +03:00
Christopher Overbeck 5424a19482 Track mixed paper and viewport dimension references 2026-09-15 16:00:11 -05:00
Christopher Overbeck 2ee3782850 Fix viewport dimension acquisition and preserve measurement scaling 2026-09-15 14:13:19 -05:00
Christopher Overbeck 369e0c9fc5 Merge remote-tracking branch 'origin/main' into feat/viewport-dimensions
# Conflicts:
#	src/app/command_driver.rs
#	src/scene/mod.rs
2026-09-15 13:53:12 -05:00
Christopher OverbeckandClaude Fable 5.1 30c5ccbba1 Measure paper-space dimensions through the viewport they were picked in
DIMLINEAR / DIMALIGNED / DIMRADIUS / DIMDIAMETER / DIMANGULAR created on a
sheet now report the model measurement of the geometry seen through a
viewport, at any viewport scale, while definition points, the dimension line
and the text stay in paper coordinates and the annotation keeps its sheet
size (DIMSCALE is untouched).

A viewport frame is a similarity - uniform scale plus in-plane twist - so
projecting the model span onto the paper axis and compensating gives exactly
the raw paper measurement times 1/scale. No geometry is rewritten: the
compensation is persisted once as a negative DIMLFAC override on the
dimension and applied once by the linear formatter, so preview text,
dimension text, the properties measurement row and DXF/DWG export all agree.
User measurement multipliers fold into the same magnitude, and an explicit
text override still bypasses formatting entirely, so it is never re-scaled.
Angular dimensions are never compensated - a similarity preserves angles.

Mixed input (one point through viewport A, another through viewport B or on
the sheet) is refused rather than silently mis-measured: the command line
explains why and the dimension falls back to plain paper measurement.

A dimension measured through a viewport is left unassociated: its definition
points are projected paper coordinates, so inferring a paper-space
association would bind it to geometry that is not there. PR3 records the real
dimension -> viewport -> entity chain.

The result is one ordinary dimension entity carrying one style override, so
undo/redo works through the existing history with no new out-of-document
state.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 12:40:44 -05:00
Christopher OverbeckandClaude Fable 5.1 49fe48f89c Add shared viewport frame, accepted snap, and measurement scale interfaces
Contract module for the viewport snapping, viewport dimension measurement,
and dimension association work that builds on it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 12:10:28 -05:00
Hakan Seven b12314c3ed Merge pull request #1289 from ramox81/fix/coincident-standard-command 2026-09-15 15:43:13 +03:00
Hakan Seven acde01cfc3 Merge pull request #1289 from ramox81/fix/coincident-standard-command
# Conflicts:
#	src/command.rs
#	src/scene/mod.rs
#	src/scene/parametric_solve.rs
2026-09-15 15:08:35 +03:00
ramox81 f6d8209139 Merge upstream main into Coincident parity 2026-09-15 14:39:17 +03:00
ramox81 ba2b371269 Complete Coincident command behavior 2026-09-15 14:00:26 +03:00
ramox81 66be530655 Complete automatic constraint behavior 2026-09-15 11:47:28 +03:00
Hakan Seven d738ebfcc6 Standardize parametric constraints and interoperability 2026-09-15 03:19:52 +03:00
Hakan Seven 6c0badbdc8 fix: resolve annotation pull request findings 2026-09-14 20:16:46 +03:00
ramox81 a35c996f9f fix(annotate): complete table and data workflows 2026-09-14 14:54:55 +03:00
ramox81 6505b27818 fix(annotate): align annotation ribbon workflows 2026-09-14 11:55:08 +03:00
Hakan Seven cf33455e93 Move parametric tools to their own ribbon tab 2026-09-11 20:58:37 +03:00
Hakan Seven f0676d35dc Merge pull request #1197 from Ramox81/codex/parity-measure-20260911 2026-09-11 15:44:27 +03:00
ramox81 33429ffa4c Merge current main with measured curve markers 2026-09-11 15:23:10 +03:00
ramox81 f076db6d53 Merge current main with division marker support 2026-09-11 15:23:05 +03:00
Hakan Seven 753fa17b68 Merge pull request #1184 from Ramox81/codex/hatchedit-command-parity 2026-09-11 15:14:43 +03:00
Hakan Seven e11796af29 Merge pull request #1199 from ramox81/codex/join-source-workflow 2026-09-11 13:02:17 +03:00
Hakan Seven 67768a3eca Merge pull request #1187 from ramox81/codex/complete-splinedit-options 2026-09-11 12:52:49 +03:00