Commit Graph
3702 Commits
Author SHA1 Message Date
Hakan Seven fbdc97af4a Merge pull request #1381 from huaninstratech/pr/isoplane-session-only
fix(settings): keep isometric drafting session-only
2026-09-19 23:06:51 +03:00
Hakan Seven 7204d4f98d Merge pull request #1380 from huaninstratech/pr/io-locked-drawings
fix(io): open locked, shrinking and cloud-placeholder drawings without crashing
2026-09-19 23:06:51 +03:00
Hakan Seven 97596de147 Merge pull request #1377 from helenkwok/fix/control-accepts-point-with-keywords
Control: a point step that takes keywords accepts points
2026-09-19 23:06:51 +03:00
Hakan Seven 5a1a115b85 Merge pull request #1373 from helenkwok/ci/wasm-check
ci: type-check the web target on pushes to main and on pull requests
2026-09-19 23:06:51 +03:00
Hakan SevenandClaude Fable 5.1 92ce142c03 fix: drop the stray lock fixture; align merged plot code across targets
- tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock was the app's own
  single-instance lock file, committed by accident in #1343; remove it and
  ignore *.ocs.lock.
- load_plotsettings_into_dialog: #1343's refresh_custom_scale_fields borrowed
  self while #1360 still wrote through the plot_dialog borrow; write the
  style error first.
- The wasm list_printers stub returns the Result #1358 gave the native one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-19 23:06:09 +03:00
Hakan Seven 829a69ae6a Merge pull request #1367 from ramox81/codex/axis-hover-markers
Hover an object-mode Horizontal/Vertical glyph without endpoint markers
2026-09-19 23:01:01 +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
Hakan Seven b131102784 Merge pull request #1365 from ramox81/codex/axis-align-perpendicular
Turn an object onto its Horizontal/Vertical axis before solving
2026-09-19 23:00:46 +03:00
Hakan Seven f20c823ffe Merge pull request #1360 from HakanSeven12/plot/b4-ctb-leniency
fix(plot-style): load plot style tables written by other applications

# Conflicts:
#	src/app/update/file.rs
#	src/ui/window/plot.rs
2026-09-19 23:00:19 +03:00
Hakan Seven 996412c405 Merge pull request #1359 from HakanSeven12/plot/b4-windows-printer-media
feat(plot): Windows printer media and printable areas

# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
#	src/locale_catalog.rs
2026-09-19 23:00:18 +03:00
Hakan Seven 377f551b48 Merge pull request #1358 from HakanSeven12/plot/b4-windows-printer-routing
fix(print): send Windows plots to the chosen printer, name the default, report failures

# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
#	src/locale_catalog.rs
2026-09-19 23:00:18 +03:00
Hakan Seven 1c0ef9d7a0 Merge pull request #1353 from HakanSeven12/ui/options-ok-apply-close
feat(options): OK / Apply / Close with a discard guard

# Conflicts:
#	src/app/view/modal.rs
#	src/ui/window/options.rs
2026-09-19 22:59:56 +03:00
Hakan Seven b1080e02ca Merge pull request #1344 from HakanSeven12/plot/b3-psetupin
feat(plot): PSETUPIN, page-setup import and page setup for new layouts
2026-09-19 22:59:36 +03:00
Hakan Seven 879bb70c12 Merge pull request #1343 from HakanSeven12/plot/b2-dialog-options-sysvars
feat(plot): page-setup units, custom scale, dialog options and plot sysvars
2026-09-19 22:59:36 +03:00
Hakan Seven 10827283ee Merge pull request #1339 from mechpanos/snap/line-endpoint-lookup
fix(snap): keep the key-vertex lookup linear and pin the vertex layouts
2026-09-19 22:59:36 +03:00
huanld 8cabadd147 fix(settings): keep isometric drafting session-only
A persisted ISODRAFT flag turned every drawing's crosshair into the
isoplane pair (one vertical, one diagonal arm) on every launch, with no
visible control to switch it back off — F5 (ISOPLANE) only cycles the
plane. Drop the flag when saving and ignore it when an old settings
file still carries it; turning it on stays a per-session choice.
2026-09-19 16:52:25 +07:00
huanld dc23d4073a fix(io): survive locked, shrinking and cloud-placeholder drawings
Opening a drawing that another program or machine holds without read
sharing used to fail with a raw OS error, and the memory-mapped fast
path could kill the process outright: a mapped file that shrinks
mid-parse (a writer saving over it) or a cloud placeholder that cannot
page in raises an in-page exception no Rust code can catch.

Read the DWG through a guarded fast path instead: mmap when possible,
and fall back to one in-memory snapshot read — opened with the most
permissive share mode Windows offers (FILE_SHARE_READ | WRITE |
DELETE) — whenever the map fails or an I/O error surfaces mid-parse.
A snapshot can never fault: a concurrent writer just ends the read
early. Sharing violations (os error 32/33) now answer with a message
that names the file and the remedy, and OneDrive-style placeholder
attributes skip mmap entirely.
2026-09-19 16:52:24 +07:00
Karim Jerbi f8d5099cda fix(block-palette): use theme-aware label colors with contrast coverage 2026-09-19 10:03:44 +01:00
Karim Jerbi 4fdef48502 fix(viewcube): deterministic horizon for obliques, generic opposite
Top Front Right/Left kept Y (north) as up when starting from Top,
tilting the base because orbit is turntable (never banks). Make
snap_to_direction deterministic: world +Z horizon except near +-Z
where north +Y is used, sign-preserved only for intentionally
inverted views. Expand opposite() from faces-only to all 26 regions
so already-there flip works for edges/corners.
2026-09-19 09:37:56 +01:00
Helen Kwok be99983b72 Control: a point step that takes keywords accepts points
active_command_metadata listed one input kind per step. A point step that
also takes keyword letters (point_step_accepts_keywords) reports
SingleToken, so MOVE and COPY's base point with [Displacement] were
described as accepting only token and enter, and the input example was the
D keyword, though the step takes a point. List point as well; the keyword
letters are still listed as token from the options.
2026-09-19 18:01:14 +09:30
Helen Kwok 80d4adaee5 ci: type-check the web target on pushes to main and on pull requests
The web bundle is only built when a release is published, so a desktop-only
call in shared code can reach main unnoticed and fail the next release at
the wasm step (#1224, #1347). Run cargo check for wasm32-unknown-unknown on
the app and the web worker instead.
2026-09-19 14:48:47 +09:30
ramox81andClaude Fable 5.1 b24d04d620 Hover an object-mode Horizontal/Vertical glyph without endpoint markers
The reference highlights only the object when its Horizontal/Vertical bar
is hovered; the extra cross markers at the line's ends were ours alone.
Point-mode (2Points) relations keep marking their two points.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 23:46:26 +03:00
ramox81andClaude Fable 5.1 4e2fc8c9de Draw the Equal glyph symbol in green
Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 23:45:01 +03:00
ramox81andClaude Fable 5.1 3492ae32eb Show the Equal glyph on every object of the relation
The reference places an Equal bar on each object it joins; one glyph on
the first object only left the follower unmarked.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 23:32:42 +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 <[email protected]>
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 <[email protected]>
2026-09-18 22:56:31 +03:00
ramox81andClaude Fable 5.1 1f0b888833 Turn an object onto its Horizontal/Vertical axis before solving
The solver cannot start from an axis lying exactly across the datum: the
distance and direction equations are singular there, so a horizontal line,
a text at 0 degrees or an ellipse whose major axis is horizontal stayed
put when Vertical was applied. The command now turns the object about its
anchor (line start, picked segment's first vertex, text insertion point,
ellipse center) onto the axis first — a polyline moves only the segment's
end vertex — and lets the constraint hold what already fits. Two points on
one entity follow the same rule about the first point.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 22:40:39 +03:00
Hakan SevenandClaude Fable 5.1 5ba72ec3e4 chore: pick up cadcodec #47 and cadkernel #66; guard the re-align length
- acadrust 7ea4247: clamped-knot degree and MINSERT reservation fixes
  (cadcodec #47). cadkernel a0b962a: dogleg fails on a non-finite
  Jacobian (cadkernel #66) and pins the same codec rev, so one acadrust
  stays in the graph.
- The axis re-alignment from #1361 retains its transformed length through
  retain_segment_length, which holds a zero-length segment with per-axis
  differences instead of a P2PDistance whose gradient is NaN there.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 22:16:06 +03:00
Hakan Seven edc45caa14 Merge pull request #1363 from ramox81/codex/capture-minimized-guard
Refuse an automation capture while the window is minimized
2026-09-18 22:12:21 +03:00
Hakan Seven f137ce96f1 Merge pull request #1362 from ramox81/codex/axis-point-reprompt
Report a missed first 2Points pick at once for Horizontal/Vertical
2026-09-18 22:12:21 +03:00
Hakan Seven a3dc1506ac Merge pull request #1361 from ramox81/codex/constraint-edit-parity
Match edit behavior of fixed and axis-constrained entities
2026-09-18 22:12:21 +03:00
ramox81andClaude Fable 5.1 02a75ead50 Refuse an automation capture while the window is minimized
A minimized window has a 0x0 surface; the renderer's screenshot path
panicked on the empty read-back buffer and took the whole application
down. The capture op now checks the window size first and answers with
an error instead of requesting the screenshot.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 20:36:08 +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 <[email protected]>
2026-09-18 20:36:01 +03:00
ramox81andClaude Fable 5.1 b45e8bce1f Keep the transformed length when an axis-constrained entity re-aligns
The temporary end-point pin of a transformed Horizontal/Vertical entity is
paired with the length the transform left it, so a scaled vertical line
stays scaled while a rotated one stays vertical at its rotated length.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 19:18:13 +03:00
ramox81andClaude Fable 5.1 5ac6dc279b Keep only the end point of a transformed axis-constrained entity pinned
10) A transformed entity with a Horizontal or Vertical relation keeps only
    its end point where the transform put it; the rest re-aligns to the
    axis at the retained length, so a rotated vertical line stays vertical
    below its moved end instead of the whole-entity pin contradicting the
    axis and leaving the constraint unmet.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 19:18:13 +03:00
ramox81andClaude Fable 5.1 e572625de3 Refuse an edit the constraints can only satisfy by collapsing the entity
9) When an edit contradicts a fixed point together with another constraint
   so that the only solution collapses the entity (a rotated line with a
   fixed start and a Vertical relation), the entity returns to its pre-edit
   shape instead of degenerating, as the reference does.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 19:18:13 +03:00
PanosandClaude Opus 5 7a75d430cd fix(plot-style): load plot style tables written by other applications
Tables copied from other applications into the plot styles folder were
listed but refused on selection, showing as "missing" with the reason
lost on a console: the loader failed hard on a checksum or a text length
that did not add up and on any non-UTF-8 byte — and those files carry
their descriptions in Windows-1252.

- decompress_ctb reads the file as it is: a checksum or length mismatch is
  reported and read past (a genuinely cut-off file is still an error), a
  zlib stream with a bad trailer is retried as raw deflate, and text that
  is not UTF-8 is read as Windows-1252 (pens and colours are numbers and
  unaffected; other code pages only show wrong characters in descriptions).
- PlotStyleTable carries load_warnings; every load site reports them on the
  command line, so a table that needed tolerance says so.
- load_named explains itself: a .stb name says named tables are not
  supported yet, a .ctb missing from the folder says which folder to copy
  it into (instead of "Unknown built-in plot style").
- The Plot dialog shows the reason under the Table row (style_error) —
  from a selection, from a page setup that names a table, and from the
  Load… picker, whose error used to be swallowed.
- A table picked with Load… from outside the plot styles folder is copied
  into it (unless a file of that name is already there), so it is listed
  from then on and page setups naming it resolve after a restart.

Tests: flipped checksum, text length off by one, a short payload field,
Windows-1252 descriptions, a truncated stream, .stb and missing names.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-18 19:00:28 +03:00
Hakan Seven a7ab5314f2 Merge pull request #1356 from ramox81/codex/fixed-constraint-parity
Let other constraints reconcile a partly fixed entity's free points
2026-09-18 18:59:26 +03:00
Hakan SevenandClaude Fable 5.1 2b69e6e94c fix: point cadkernel at upstream after #1352; unify duplicate-constraint message
- #1352 pinned cadkernel/cadkernel-constraints to ramox81's fork. Its one
  extra commit (cadkernel #67, SymmetricLineDirections) is now on
  HakanSeven12/cadkernel main as the same SHA, so the manifests and lock
  point back at the upstream repo at rev 0493b59.
- SYCONSTRAINT reports a repeated relation with the same message Fix and
  Vertical use, as an error instead of plain output.
- The knot-less spline test consumes the add_entity results.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 18:58:00 +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 Seven 9613e6edf9 Merge pull request #1351 from helenkwok/feat/web-open-from-bytes
Web control: open a drawing from bytes
2026-09-18 18:52:37 +03:00
Hakan Seven 752894e82b Merge pull request #1350 from helenkwok/fix/set-properties-number-expected
set_properties: compare expected numbers by value
2026-09-18 18:52:37 +03:00
Hakan Seven 4905d99e51 Merge pull request #1347 from helenkwok/fix/wasm32-main-build
Fix wasm32 build: gate the font download and XREF open call sites
2026-09-18 18:52:37 +03:00
Hakan Seven ce6db72c78 Merge pull request #1346 from huaninstratech/fix/block-text-wipeout-depth
fix: keep block text above its own block's wipeouts (compose glyph depth through the scene graph)
2026-09-18 18:52:37 +03:00
Hakan Seven 3c1ad62e9b Merge pull request #1340 from CiberNin/fix/editor-crashes
Fix editor crashes from typed input, text, and degenerate geometry
2026-09-18 18:52:37 +03:00
Hakan Seven 37b24296d8 Merge pull request #1338 from ramox81/codex/properties-hyperlink-control
Fix Properties hyperlink collection editing
2026-09-18 18:52:37 +03:00
ramox81andClaude Fable 5.1 d837109076 Let other constraints reconcile a partly fixed entity's free points
8) A moved entity that a Fixed holds only in part no longer pins its free
   points as hard anchors: they stay where the edit put them unless another
   constraint on the entity (e.g. Vertical) moves them, so the fixed point
   holds and the solve no longer fails when the two disagree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-18 18:49:48 +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 <[email protected]>
2026-09-18 18:42:44 +03:00