Commit Graph
4727 Commits
Author SHA1 Message Date
ramox81andClaude Opus 5.5 042223a09c Insert ribbon: Reference panel after Block Definition; Snap to Underlays list follows UOSNAP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:52:27 +03:00
Hakan SevenandClaude Opus 5.5 b1d4c9bd9b feat(clipboard): PASTESPEC pastes in a chosen format
PASTESPEC offers the formats on the clipboard: Objects and Block for
objects copied in the application (the PASTECLIP and PASTEBLOCK paths),
and Text for the system clipboard's text, placed as multi-line text in
the current text style with its lines as paragraphs.

Refs #645

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:06:58 +03:00
Hakan SevenandClaude Opus 5.5 4ffae00199 feat(view): DVIEW twists the view about its line of sight
DVIEW (alias DV) offers TWist and Undo. TWist rolls the active view
or viewport camera to the typed angle; Undo steps back through the
twists made in the session. The new alias reaches existing profiles
through the alias migration table.

Refs #638

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:47:34 +03:00
Hakan SevenandClaude Opus 5.5 6490a625f2 feat(hatch): add and remove boundary vertices from the grip menu
A non-associative hatch's boundary vertex grips now offer Add Vertex and
Remove Vertex next to Stretch, on polyline boundaries and on boundaries
made of line edges alike. Add Vertex inserts the vertex after the picked
one, halfway along the next segment (on the arc for a bulged polyline
segment, splitting its bulge), and lets it be placed like any grip.
Remove Vertex drops it while keeping at least a triangle.

Line-edge boundaries used to show two grips at every corner (one line's
end, the next one's start), so dragging one opened the loop; each corner
is now one grip that moves both ends.

The automation grip_menu_pick action chooses an entry of the open grip
menu, so these edits can be scripted and checked.

Fixes #1058

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:38:58 +03:00
Hakan SevenandClaude Opus 5.5 4518569b61 feat(plot): PUBLISH opens the batch plot of the drawing's layouts
PUBLISH now runs what PRINTALL does: pick the layouts, each plotted with
its own page setup, into one multi-page PDF or to the printer.

Refs #1124

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:24:34 +03:00
Hakan SevenandClaude Opus 5.5 0eec9c450f feat(input): lock the next point to a typed <angle
Typing <angle at a point prompt (e.g. <30) now fixes the direction of
the next point from the last one until a point is placed: the cursor
moves along that direction, and a bare number entered next is the
distance along it. The angle is read in the drawing's angle base and
direction and turned into the current UCS. Works from the command line
and from scripts or the automation token input alike.

Fixes #1464

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:21:50 +03:00
Hakan SevenandClaude Opus 5.5 29c0d1df9a perf(blocks): keep repeated block copies as one stub wire each
Every further reference to an already expanded block (a translated copy
of the same definition, at the top level or nested) was materialised as
a full copy of every wire, although the GPU already draws those copies
from one shared source with a per-copy offset. Such a copy is now a
single stub wire holding the shared prototype and its offset (stubs nest
inside prototypes, so nested repeats collapse too).

- The block renderer expands stubs into instance references while it
  groups by source, so drawing is unchanged.
- Interaction queries expand only the stubs near the query, so snapping,
  picking, window and crossing selection see each copy's geometry.
- Plot, boundary detection, viewport projection and entity_wires() get
  fully expanded wires; count and reference-edit recolouring expand the
  set while they are active.
- OCS_NO_BLOCK_STUBS turns it off.

A drawing with 480 references to a block of 100 nested 50-line blocks
(2.4M lines) now opens with 11k wires instead of 2.4M: peak memory
5.4 GB -> 0.37 GB, wire assembly 2.4 s -> 36 ms, interaction index
3.7 s -> 23 ms. The viewport, a plotted PDF, snaps and selections are
identical with and without stubs, and on five real drawings the view
renders the same.

Refs #1698, #1542

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:06:27 +03:00
Karim Jerbi 8d287decd8 fix(explode): use codec block explosion for attributes and arrays
Delegate INSERT and MINSERT explosion to the document-aware codec implementation, removing duplicate attribute and base-point handling. Update workspace, kernel and graph pins together and cover rotated arrays with a nonzero base.
2026-10-13 11:10:11 +01:00
Karim Jerbi 9c08e8a3ed fix(blocks): prevent circular block nesting and cut render cycles
Introduce would_create_cycle in block_service to prevent recursive block definitions with case-insensitive matching across block records. Enforce cycle refusal at INSERT commit in BEDIT and during block redefinition (redefine_block_raw) with a shared error message. Ensure render-time recursion truncates safely with a one-time session warning on cyclic documents.
2026-10-13 11:10:11 +01:00
Karim Jerbi 59bb6faabd fix(blocks): enforce constant attributes in ATTEDIT and restore ATTDEFs on explode
Enforce constant attribute flag in ATTEDIT dialog by presenting constant attributes as disabled and ignoring modifications. When exploding an insert, restore block-definition attribute definitions as transformed ATTDEF entities while dropping instance attribute values.
2026-10-13 11:10:11 +01:00
Hakan SevenandClaude Opus 5.5 df22824fbe perf(scene): keep resident wires once, not again in the memo
The resident tessellation memo held its own copy of every entity's wires
next to the assembled resident set. Runs now stay only in the set: a memo
entry whose wires the set holds just marks them valid (InSet) and reads
them back through a weak link with the set's layout ranges, so the set
remains uniquely owned for in-place patches. A resident build moves new
tessellations straight into the set (Pending until it is bound); hidden
entities copy their run out before the patch blanks it, and an abandoned
patch hands its half-taken set back for the full build that follows.
Builds whose runs are recoloured afterwards (reference edit, count) keep
owned copies as before.

On a drawing with 2.4M nested block lines: wire assembly 3.7s -> 2.3s,
memory after it 4.6 GB -> 3.8 GB.

Refs #1542, #1698

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:55:00 +03:00
Hakan SevenandClaude Opus 5.5 9cc890c911 fix(grips): drag model grips in the drawing plane, not onto themselves
In a tilted 3D view a grip followed the cursor onto the screen plane
through the orbit target, so a circle or arc jumped to another radius and
a polyline vertex left its plane. A model-space grip now moves in the UCS
XY plane at its own elevation (the screen plane only when seen edge-on).
A solid stays drawn while its grip moves, and its own edges were still
snap candidates: a cone's base radius landed on its own side. The edited
entities are left out of the grip's snap set.

Fixes #1033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:12:27 +03:00
Hakan SevenandClaude Opus 5.5 df94117fe5 feat(automation): replay pointer events on the canvas
The new pointer op sends moves (canvas pixels, or a world point projected
through the camera the cursor edits with), button presses/releases and
wheel steps in order, and reports the cursor's world point after each, so
grip drags and picks go through the same cursor path as the mouse.
click now projects through that editing camera too (it used the model
camera inside an entered viewport), and the grips read reports each
grip's constraint axis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:12:27 +03:00
Karim Jerbi 006be8909e feat(mcp): add side-effect-free request preflight
Add local ocs_read validate calls that check operation parameters, nested definitions, request envelopes and batch bindings without dispatching. Report document-dependent checks and unresolved result bindings explicitly. Share validation with execution and validate inline JSON Schema fragments before dispatch.

Validation: 66 targeted tests, desktop build, WebAssembly app/worker check, schema validation and MCP stdio smoke tests.
2026-10-13 09:33:49 +01:00
Karim Jerbi 97afb57333 feat(mcp): expose entity creation schemas on demand
Expose creation fields, constraints and examples for the 11 supported types without expanding startup tool schemas. Share the creation contract and constructor with execution to keep accepted inputs consistent.

Validation: MCP, contract/factory and entity creation regression tests.
2026-10-13 09:33:49 +01:00
Hakan SevenandClaude Opus 5.5 a5435a6df6 i18n: catalogue the two messages #1741 and #1743 added
"Requires a number." and "Requires 0 or 1 only, or option keyword."
had no catalogue entry, so every locale showed them in English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:30:46 +03:00
Hakan Seven 798014c773 Merge pull request #1741 from ramox81/codex/view-background-followups 2026-10-13 11:27:33 +03:00
Hakan Seven 7095802e8e Merge pull request #1743 from ramox81/codex/layout-create-viewport 2026-10-13 11:27:33 +03:00
Hakan SevenandClaude Opus 5.5 fa00c27e31 fix(dist): count the XY angle from ANGBASE in ANGDIR's sense
DIST printed the raw world angle (-180..180) while the Properties panel
and typed directions follow the drawing's base angle and direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:22:53 +03:00
ramox81andClaude Opus 5.5 bd80d96ce2 Layouts: the first-open viewport is on and drawn at once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:19:35 +03:00
Hakan SevenandClaude Opus 5.5 f6503ad4d3 fix(ui): keep a typed layer or style name when the field loses focus
Renaming a layer or a style was only applied on Enter; clicking anywhere
else dropped the typed name. A click that moves focus off a field whose
text changed now commits it. New and Copy in the style managers open the
generated name for renaming, so a new style can be named right away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:19:12 +03:00
Hakan SevenandClaude Opus 5.5 4639546472 fix(windows): fall back to Settings when the default-apps dialog fails
Windows 10/11 retired IApplicationAssociationRegistrationUI's advanced
dialog; it fails with 0x80070490 and the user was left with only an
error. Open Settings > Default apps on the app's registered page instead.

Refs #725

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:12:28 +03:00
Hakan SevenandClaude Opus 5.5 4762987fef docs(scene): keep the unit-factor comment on its own function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:11:36 +03:00
ramox81andClaude Opus 5.5 e3a0ff1bad Layouts: a viewport on first opening (LAYOUTCREATEVIEWPORT)
A layout opened for the first time - one whose sheet viewport had to be
made, or one created in this session - gets a viewport centred on the
printable area, 0.8 of its width and height, zoomed to the model's
extents, while LAYOUTCREATEVIEWPORT is on. The profile variable takes
ON/OFF or 1/0 and is kept with the settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:09:03 +03:00
ramox81andClaude Opus 5.5 2a808c4526 Background dialog preview: mirrored images, device pixels; faint inactive values
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:05:01 +03:00
Hakan SevenandClaude Opus 5.5 5d0390bcdf fix(annotative): start new drawings at the unit-aware annotation scale
A new drawing is metric with metre insertion units, but its annotation
multiplier stayed at Scene::new()'s unitless 1 while opened files and
CANNOSCALE convert paper millimetres into drawing units (0.001 at 1:1).
Annotative text and dimensions were drawn 1000x too large until the
first scale change, then shrank to their real size and looked gone,
also after switching back to 1:1.

One helper now derives the multiplier from the header; new drawings,
file open and every INSUNITS change (UNITS, the units popup, DWGUNITS,
SETVAR) go through it.

Fixes #1674

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:41:00 +03:00
ramox81andClaude Opus 5.5 0ee95fa4ba Background dialog: adjust an image's offset and scale; visual style names
- The Image tab gains an Adjust card: X/Y offset in pixels (-2000..2000)
  and X/Y scale (-10..10, tenth steps, a negative scale mirrors, zero keeps
  the image's scale) with spinners and Reset, inactive while the image is
  stretched; Keep aspect ratio is a switch and makes both scales follow.
- The preview shows the image at its offset and scale, tiled when tiled,
  and a stretched image kept to its aspect ratio covers the view.
- Automation: step=<field>,+1|-1 and reset; offset/scale take any numbers.
- Shaded with edges, Shades of Gray and Sketchy have catalog entries in
  every language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:28:18 +03:00
Hakan SevenandClaude Opus 5.5 85627ebc8a feat(web): return saved drawings to an embedding page
The web control channel gains a save operation that serializes the
active drawing in the requested format and returns it as base64 in the
reply, clearing the dirty flag, the counterpart of opening from bytes.
A host page can also define window.openCadStudioSaveFile(name, bytes)
to receive every saved or exported file in place of a browser
download; while it is set no file picker opens.

Fixes #1704
Fixes #1705

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:12:07 +03:00
Hakan SevenandClaude Opus 5.5 d1a2e9db64 fix(render): draw transparent hatches over the lines behind them
Hatches are drawn before the wires and write depth, so a transparent
hatch above lines in draw order still hid them through the depth test.
Transparent hatches now go to their own renderer drawn after the wires:
the lines behind show through the blend and the lines in front still
win the depth test.

Fixes #1720

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:04:25 +03:00
Hakan SevenandClaude Opus 5.5 088dec4ab6 fix(pdf): plot wide polylines with square ends and mitred corners
A polyline band was stroked like a pen line, with round caps and round
joins, and each segment as its own path, so corners came out rounded
and overlapping. Bands now use butt caps and mitre joins in one path,
and a tapered band fills each segment's quad so a zero-width segment
stays a thin line.

Fixes #1721

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:04:25 +03:00
Hakan SevenandClaude Opus 5.5 893dcee6a7 feat(resources): load the user's own hatch patterns and linetypes
*.pat files in <config>/patterns and *.lin files in <config>/linetypes
are read after the bundled catalogs, next to the fonts folder SHX
files already resolve from.

Fixes #1725

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:04:25 +03:00
ramox81andClaude Opus 5.5 064da8829e View backgrounds: image colours as stored, viewport style name, adjust automation
- The background image texture is not an sRGB view: the image is drawn with
  its own colours, as the solid and gradient colours are.
- An entered paper-space viewport shows its named visual style (Realistic,
  ...) in the render-mode picker, and a mode picked there is recorded as the
  viewport's visual style.
- The view_background automation action takes offset=x,y and scale=x,y.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:44:49 +03:00
Karim Jerbi b5b505ee9d fix(blocks): cross-document entity copies must not share extension dictionaries
add_entity_clone reset handle, owner and mode but kept the source extension dictionary handle, so a copy claimed a dictionary its document does not own. The clone now gets no extension dictionary, like baked and transformed-block children. Failing-first test included.
2026-10-13 07:05:54 +01:00
Hakan SevenandClaude Opus 5.5 2f08719026 fix(fillet): join a filleted line or arc into the polyline
Filleting a polyline segment with a line or arc moved the segment's
vertex and left the polyline closed and the other object separate, so a
closed shape bent into an unexpected outline. The polyline is now
opened if closed, cut at the fillet point keeping the picked side, and
the fillet arc and the trimmed line or arc are joined onto it as one
polyline, as the reference does.

Refs #1422

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:44:16 +03:00
Hakan SevenandClaude Opus 5.5 468d1e4f43 fix(plot): honour the requested plot style over the layout's own
A headless plot with plot_style loaded the layout's stored page setup,
which put the layout's CTB back in place and, when that file was not in
the plot styles folder, failed the plot with "not loaded". The
requested table now stays active for every page.

Bump codec ddf0fd2 (viewport on state from DXF group 68, so viewports
written without bit 0x8000 show their contents), kernel b80079a,
graph 45c9649.

Refs #1739

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:18:37 +03:00
Hakan SevenandClaude Opus 5.5 3840630ab4 fix(extend): use preselected objects as boundary edges
TRIM already takes objects selected before the command as cutting
edges; EXTEND ignored them and extended to the nearest object in the
path. It now takes them as boundary edges the same way.

Fixes #1732

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan SevenandClaude Opus 5.5 925c91ccfa fix(pasteblock): place the block at the picked point
The pasted block is defined around the clipboard base, so its origin
is already that point, but the insertion still subtracted the base and
landed the block offset from the pick. The base now only positions the
world-space preview, and it stays f64.

Fixes #1731

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan SevenandClaude Opus 5.5 9e31af3ff2 fix(save): retry the atomic replace while the drawing is briefly in use
Sync clients, indexers and virus scanners open a freshly written file
for a moment without delete sharing, which refuses ReplaceFileW with a
sharing violation. Saving straight after Save As into a Dropbox folder
hit this every time. The replace now retries for about two seconds
before reporting the file in use.

Fixes #1712

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan SevenandClaude Opus 5.5 88803cd692 fix(start): let the quick-access New button work on the Start screen
The button runs QNEW since #1635, and QNEW was missing from the
commands the Start screen allows, so it was refused until a drawing
was open.

Fixes #1728

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan SevenandClaude Opus 5.5 74bffe77be fix: follow-ups to the merged PRs
- Selection filter: condition rows name INSERT as a block reference, as
  the object-type list does since #1726 (shared qselect_type_label).
- MCP: re-pin the tool schema digest for the view_background action
  added in #1722.
- -VIEW: fix an indentation slip and wrap two long lines from #1722.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 07:50:30 +03:00
Hakan Seven 03445a540d Merge pull request #1722 from ramox81/codex/view-background
# 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/lo-LA/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
2026-10-13 07:44:01 +03:00
Hakan Seven 5d279d4e0c Merge pull request #1726 from turbuczn/hungarian-localization-v2 2026-10-13 07:41:57 +03:00
Hakan Seven a8af415976 Merge pull request #1736 from turbuczn/feature/selection-filter-list 2026-10-13 07:39:32 +03:00
Hakan Seven a60ef6dc7d Merge pull request #1724 from schoeller/plugin_grip_refresh 2026-10-13 07:38:55 +03:00
Hakan Seven d33c5791f1 Merge pull request #1740 from KevinGriffin-new/fix/769-dmg-applications-link 2026-10-13 07:38:42 +03:00
Hakan Seven 5581bbeedb Merge pull request #1738 from gianlucafiore/fix/block-wipeout-hatch-order 2026-10-13 07:32:50 +03:00
Hakan Seven 41e2c93acc Merge pull request #1719 from ramox81/codex/extrude-taper-per-command 2026-10-13 07:27:31 +03:00
Hakan Seven 3006d93ee5 Merge pull request #1718 from ramox81/codex/region-clears-selection 2026-10-13 07:27:29 +03:00
Hakan SevenandClaude Opus 5.5 710a837a9b fix(layout): place a window-plot sheet around its plot window
A layout plotted by window drew its sheet at the paper-space origin, so
the title block sat on the grey background away from the paper. The
sheet now centres on the plot window, or sits at the plot offset from it
when the plot is not centred.

Bump codec 8aa574a (polyline vertices in owned-handle order, which fixes
self-crossing viewport clip boundaries), kernel d79bb30, graph 4810ee0.

Fixes #1678

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 06:50:19 +03:00
Kevin GriffinandClaude Opus 5.5 f769b8750d fix(release): ship the macOS DMG with an Applications link (#769)
#1286 added the drag-to-install Applications symlink to
packaging/build_macos_signed.sh, but official DMGs come from release.yml,
which still ran `hdiutil create -srcfolder OpenCADStudio.app`. That image
holds only the app, so the merge had no effect on the downloads #769 is
about.

Stage the app beside an /Applications symlink, as the signing script
does, and build the image from that folder. A new step mounts the result
and fails the job unless the app is present, `Applications` points at
/Applications, and the app's signature still verifies. Untagged runs
upload the DMG as a workflow artifact, as the snap job does, so the
layout can be checked without cutting a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:45:52 -07:00