Commit Graph
3966 Commits
Author SHA1 Message Date
Hakan Seven e2e2c36b6a Merge pull request #1484 from ramox81/codex/pdf-import-followups
PDF import and underlay follow-ups
2026-09-25 15:15:49 +03:00
Hakan Seven 8d190a20d8 Merge pull request #1488 from ramox81/codex/raster-image-pixels
Raster images show square pixels when magnified
2026-09-25 15:15:49 +03:00
Hakan SevenandClaude Opus 5.5 e7e759268a fix(paste): Ctrl+V over the command line still pastes copied objects
#1481 skipped the shortcut whenever any text input had focus. The command
line is focused almost always, so copied drawing objects no longer pasted
with Ctrl+V. The probe now tells the command line apart from other fields:
another field keeps Ctrl+V to itself; over the command line copied objects
start PASTECLIP and plain text is left to the input's native paste; with
nothing focused text goes to the command line as before. PASTECLIP goes
through Message::Command again, which also closes the context menus. The
tests use the codec crate name and cover the command-line case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 15:15:44 +03:00
Hakan Seven 9c04fb8bd1 Merge pull request #1481 from yztink/fix/command-line-duplicate-paste
fix(command-line): prevent duplicate paste in command line and text fields
2026-09-25 15:12:12 +03:00
ramox81andClaude Opus 5.5 005594fc58 PDFIMPORT: stored image paths use one separator style
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 12:32:50 +03:00
ramox81andClaude Opus 5.5 46fa08a041 Raster images show square pixels when magnified
Raster image textures use nearest magnification; PDF pages and OLE
pictures keep bilinear filtering.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 12:22:45 +03:00
ramox81andClaude Opus 5.5 72f7ff5cc5 PDFIMPORTIMAGEPATH and per-import layer prefixes
- PDFIMPORTIMAGEPATH names the image extraction folder: relative to the
  PDF's folder (default "PDF Images"), absolute as given, "." for none.
- Every import of the session gets the next prefix (PDF_, PDF2_, PDF3_ ...),
  also when the same file is imported again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 12:22:43 +03:00
ramox81andClaude Opus 5.5 edbbc9d135 PDF follow-ups: import layers, arcs and joins, names, background, page placement, snaps
- Unlayered raster images go with the PDF layer drawn last before them.
- Circular Bezier arcs import as arcs: bulged polyline segments with Join,
  ARC entities without it; straight chains still join.
- Imported PNGs go to "PDF Images" next to the PDF; import blocks are
  numbered imp31, imp32, ...
- Background darkness is its HSL lightness below one half.
- All chosen pages attach at the same insertion point.
- PDF geometry snaps as separate pieces: centre from the rim, intersections
  and perpendiculars.
- Automation: snap query with an optional base point.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 10:33:48 +03:00
Hakan SevenandClaude Opus 5.5 3013c1b570 feat(graph): node library as a docked panel; shared dock chrome
The node library leaves the overlay and becomes a dock panel (PanelId::
NodeGraph), docked on the right the first time the graph opens and movable
like any other panel; closing it closes the graph. It follows the block
palette's layout: title bar, then a search box with New / Open / Save
beside it, then the categories, of which only Objects starts open. Entries
are clicked (placed at the canvas top-left) or dragged onto the canvas.

The title bar (title, auto-collapse pin, close, drag to re-dock), the
toolbar icon button and the panel frame were copied across Properties,
Block Palette, External References and Browser; they are now
dock::title_bar, dock::tool_button and dock::frame, used by all of them.
Block Palette's two tool buttons gain tooltips, and External References'
Auto / Close tooltips are now translated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 10:17:44 +03:00
yztink fa1b4db490 fix(command-line): prevent duplicate paste in command line and text fields 2026-09-24 23:37:32 -07:00
Hakan SevenandClaude Opus 5.5 857f2f2e58 feat(graph): save and open node graphs as .ocg files
The graph panel gets New, Open and Save. A .ocg file is JSON holding the
graph (nodes, parameters, links), the canvas (positions, open sections,
pan, zoom) and each object node's entity handles, plus the fingerprint
GUID of the drawing those entities live in. On open, handles are reused
only in that same drawing and only while the entity is still the node's
kind; otherwise evaluation creates new entities, so a graph opened in
another drawing never takes over unrelated objects. A drawing without a
fingerprint gets one when its graph is first saved.

Pins opencadcodec d6d534f (DXF now writes $FINGERPRINTGUID and
$VERSIONGUID), opencadkernel 5d9e921 and opencadgraph 5c9b004 (graph
JSON round trip).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 08:14:56 +03:00
Hakan Seven 5639b29209 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	src/app/command_driver/clipboard.rs
#	src/app/command_driver/mod.rs
#	src/app/update/command.rs
2026-09-25 07:35:36 +03:00
Hakan SevenandClaude Opus 5.5 f537aff75c feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph
The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 07:34:23 +03:00
Karim Jerbi 631c0c97aa fix(command-line): Enter runs the highlighted autocomplete pre-selection 2026-09-24 23:38:01 +01:00
Karim Jerbi bd1fdcc1c5 refactor(chprop): convert choice arms to apply_property_op, fix CTB snapshot leak
Converts 12 selection arms of on_prop_geom_choice_changed to the shared helper: transparency, material, tol text and dim styles, dim overrides, viewport scale, UCS, named views, loft, history, surface and table style. Miss paths no longer push no-op undo entries.

Fixes a leaked undo snapshot: changing plot style in CTB mode is a no-op but pushed an entry. Guard hoisted before the shared snapshot, with a regression test.

Left manual by design: mleader, leader, block and fallback arms, all no-selection arms, and on_prop_geom_commit, whose constraint-aware invalidation the helper cannot express.
2026-09-24 23:16:29 +01:00
Karim Jerbi acc3e05001 refactor(clipboard): share table and block merge copies
merge_dependencies and merge_clipboard_blocks duplicated the table-record and block-definition merge logic already ported into paste_entities_kernel. Extract merge_table_records and merge_block_defs as the single shared copies; both the methods and the kernel delegate to them. The method keeps one batched geometry rebuild instead of one per definition.
2026-09-24 23:16:29 +01:00
Hakan SevenandClaude Opus 5.5 56c04408d6 Merge remote-tracking branch 'origin/main'
The command driver was split into command_driver/ upstream; the PDF
underlay and XCLIP additions to the old file move with it: their
CmdResult arms into the router (mod.rs) and the block-reference
selection filter with its clip lookup into utilities.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 00:05:11 +03:00
Hakan SevenandClaude Opus 5.5 2fcdf43f44 fix(ribbon): follow-ups to the Reference panel merge
- The palette launcher arrow is recoloured from the theme like the other
  interface icons, instead of drawing the raw SVG.
- The Frames dropdown shares one icon constant; its entries were left
  misindented.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 23:57:20 +03:00
Hakan Seven 0ea8599f86 Merge pull request #1476 from ramox81:codex/insert-reference-panel 2026-09-24 23:48:30 +03:00
Karim Jerbi 7052016dce refactor(kernels): extract reusable clipboard and matchprop kernels
Publishes app-free domain logic for shared use: match_special_props and PolylineMatchStyle move to entities::match_props; xdict trio usable headlessly; new match_layer, copy_to_clipboard, paste_entities and match_properties kernels over CadDocument. Handlers stay thin shells keeping undo, dirty flags, selection and command-line echo.

Adds cross-document copy, paste and property-match tests plus a headless proof driving copy, paste and match with no app instance.
2026-09-24 21:47:14 +01:00
Karim Jerbi e4fa5232f6 refactor(command_driver): split 11.5k-line driver into domain modules
Moves the exhaustive CmdResult router and its 116 handlers out of a single file into command_driver/: thin router stays in mod.rs (no wildcard, compiler-enforced coverage); handlers grouped by domain (entity_commit, clipboard, property_match, modify, solid3d, transform, viewport, text_edit, constraint, dim_edit); shared helpers in utilities/parameters; tests in tests.rs. All moves verbatim 1:1; all entry-point signatures and visibilities unchanged, so every existing caller (ribbon, commands, headless, plugins) resolves untouched.
2026-09-24 21:47:14 +01:00
Hakan SevenandClaude Opus 5.5 6d9365ea88 fix(xclip): follow-ups to the XCLIP merge
- An inverted clip's roundtrip record goes in the filter's extension
  dictionary through the codec's own API (ensure_extension_dictionary /
  xrecord / extension_dictionary_handle) instead of a scan of every
  object, which the renderer ran for each clipped reference.
- Pin cadcodec 1c3be0c (the DXF writer now links a spatial filter's
  extension dictionary, so that record is not left unreferenced) and
  cadkernel deb529b; plugin crates and the Python plugin lock follow.
- The XCLIP boundary preview stays f64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 23:46:50 +03:00
Hakan Seven 58671b191c Merge pull request #1475 from ramox81:codex/xclip-command 2026-09-24 23:30:38 +03:00
Hakan SevenandClaude Opus 5.5 d5016c7044 fix(pdf): follow-ups to the PDF underlay merge
- Pin cadcodec upstream at d290dbe (the merged underlay change) and
  cadkernel at 4134ae3, which follows it; drop the fork patch, move the
  plugin-API and web-worker crates and the Python plugin lock to the same
  codec so one copy is built.
- "Import as block" with raster images left IMAGE entities without an
  image definition: block definition now creates it like add_entity does,
  through one shared helper.
- The three preview outlines (attach frame, clip boundary, import area)
  stay f64 instead of casting world points to f32.
- Page size / total / PDF scale entries use the catalog's positional
  placeholder; the bare {name} form failed to format in 20 locales.
- The Underlay Layers bulb is the SVG layer icon, not a text glyph.
- PDF dialogs use the shared dialog buttons and radios.
- Options opened from a PDF dialog clears its saved state on return.
- Paper-space underlay background reuses the model block handle already
  resolved; dead `let _ = i` lines and a misplaced doc comment removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 23:24:51 +03:00
Hakan Seven 2e60c4da1b Merge pull request #1472 from ramox81:codex/pdf-attach-parity 2026-09-24 23:24:43 +03:00
7ed6a362dc feat(ui): show ribbon command icons in menus and suggestions
The ribbon definition beside each command stays the one source of its
label and icon. One cached lookup (modules::registry::ribbon_commands)
walks the core ribbon and the expanded Draw/Modify panels; the shortcut
list, the right-click menu, the grip menu and the command-line
suggestions read it.

- Context menu: command rows carry their ribbon icon; Undo/Redo and
  Isolate use interface glyphs, Draw Order its ribbon icon; icons and
  the caret fade on disabled rows.
- Grip menu: Stretch, Move, Rotate, Scale, Mirror and Copy icons.
- Suggestions: an icon column, aligned when a command has none.
- Shortcut list: dropdown entries were read as (label, command) though
  the ribbon stores (command, label), so they never got a label or icon.

Reworked from #1449.

Co-Authored-By: MarcelP102 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 22:46:32 +03:00
ramox81andClaude Opus 5.5 cfa4b186c5 PDF underlays: adjusting for a dark background turns every colour's lightness over
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 20:04:53 +03:00
ramox81andClaude Opus 5.5 5f294035db Reference panel launcher: arrow icon
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:39:23 +03:00
ramox81andClaude Opus 5.5 13ccb82d8e Reference panel: the palette launcher sits beside the title
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:39:23 +03:00
ramox81andClaude Opus 5.5 95e2bae0d2 Insert Reference panel: one Attach, labelled underlay tools, slide-out with Edit Reference and xref fading
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:39:23 +03:00
ramox81andClaude Opus 5.5 32467adcef XCLIP: roundtrip record keeps its cloning flag
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:39:09 +03:00
ramox81andClaude Opus 5.5 2078fc02f8 XCLIP and CLIP: clip boundaries on block references, CLIP routed by the picked object
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:39:09 +03:00
ramox81 c1ecb0edaf Merge remote-tracking branch 'origin/main' into codex/pdf-attach-parity
# 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/app/control/actions.rs
#	src/app/mod.rs
#	src/app/update/mod.rs
#	src/app/view/modal.rs
#	src/io/xref.rs
#	src/ui/window/mod.rs
2026-09-24 19:38:48 +03:00
Karim Jerbi 6b37476687 feat(ui): migrate dialogs across application to shared dialog_button and form_radio builders 2026-09-24 17:33:45 +01:00
ramox81andClaude Opus 5.5 b7a897b414 Import PDF dialog shows the PDF scale
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:23:14 +03:00
ramox81andClaude Opus 5.5 c9426a5d6d Automation: ribbon tab and dropdown actions; _PDFIMPORTFILE takes a path
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:10:41 +03:00
ramox81andClaude Opus 5.5 28853cd32e PDF import keeps drawing order when joining strokes; automation: layer toggle and page selection
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 19:02:47 +03:00
ramox81andClaude Opus 5.5 f63e351a12 Automation: pdf_dialog_ok presses the open PDF dialog's OK
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 18:55:30 +03:00
Karim Jerbi 1a6279e841 feat(blocks): implement WBLOCK dialog and unify dialog buttons and radio builders 2026-09-24 16:44:24 +01:00
ramox81andClaude Opus 5.5 3f6bdf8c59 PDF underlays: attach dialog with pages, underlay tab, layers, import settings and file import, unload on the definition
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 18:31:40 +03:00
Luis MartinezandClaude Opus 5.5 dddf60d79e Add audited, versioned MCP save workflow (#1452)
- `--export ... --target-version`, and explicit target_format /
  target_version on automation and protocol saves; a conversion that
  would drop unsupported records is refused unless allow_lossy is set.
- `audit` read op: dangling layers/blocks, duplicate handles, non-finite
  bounds, serialization, lossy records and the source DXF handle graph.
- `save_verified`: writes the requested version from the same snapshot a
  normal save writes, reopens it, checks the version and the entity
  manifest, audits the ASCII DXF handle graph and returns a SHA-256.
- ZOOM EXTENTS includes SDF text glyphs.
- Live MCP acceptance script and an optional reference-console audit
  runner under docs/automation.

Squashed from the PR with review fixes: merged with the DWT save path,
the save snapshot, the tool lists added since, and vendor-neutral
harness names; the dated verification record is left out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 16:49:11 +03:00
Hakan SevenandClaude Opus 5.5 0f99b77004 test(plot): pin the paper-scale tests to millimetre drawing units
New drawings now default to metre insertion units, and the plot dialog
reads a ratio against the drawing's units, so these tests (written for
millimetres) saw 1:100 as 10 mm per unit. The metre case keeps its own
test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 16:38:21 +03:00
Hakan Seven 3619e00033 Merge pull request #1463 from ramox81:codex/new-drawing-meters 2026-09-24 16:32:56 +03:00
ramox81andClaude Opus 5.5 0c50013ca7 PDF underlays: attach prompts and definitions, display adjustments and clipping, Properties, snapping, PDFCLIP and PDFIMPORT
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 16:00:12 +03:00
Hakan SevenandClaude Opus 5.5 eae5662099 fix(test): keep tests out of the user's config folder
Tests resolved the real per-user config dir. When the alias table
version moved, parallel tests migrated and rewrote the user's alias
file concurrently and one left it holding a single alias. Under test,
config_dir() is a per-process temp folder and the alias table comes
from the shipped defaults with no file I/O.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 15:37:00 +03:00
Hakan SevenandClaude Opus 5.5 163763c42a fix(xref): follow-ups to the xref attach parity merge
- `XREF <args>` runs whole: probing the bare verb first now opens the
  External References palette, which refreshed every entry and toggled
  the palette before `XREF Reload A` / `XREF ?` ran.
- Update the two tests that encoded the old behaviour: `-XREF ?` prints
  the reference table, and attaching a missing file is rejected.
- Drop the duplicate "Specify On-screen" catalog entry that shadowed the
  translated common key, with its unused ftl keys.
- Move `remove_pipe_symbols`' doc comment back above its function.
- Note in `document_for_save` that resolved xref content stays out.
- Gate the desktop-only preview cap and tab index for wasm.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 15:37:00 +03:00
Hakan Seven 1988424638 Merge pull request #1462 from ramox81:codex/xref-attach-parity 2026-09-24 15:09:56 +03:00
Hakan SevenandClaude Opus 5.5 73b560de99 fix(plugin): append the multi-entity command steps after the existing ones
#1469 inserted `CommitMany` and `CommitManyAndEnd` between `Commit`,
`CommitAndEnd` and `Done`. `CommandStep` crosses the plugin IPC, which
encodes a variant by its position, so a plugin built against the previous
API that answered `Done` would have been read as `CommitAndEnd` — or
rejected as undecodable — by the new host. The two variants now sit after
`Cancel`, as the other additions to the v7 wire types do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 15:09:01 +03:00
Hakan Seven 8ae804d921 Merge pull request #1469 from yztink:feat/plugin-interactive-preview 2026-09-24 15:02:00 +03:00
Hakan Seven 9cf9184d9a Merge pull request #1460 from lalomalvi:codex/missing-font-prompt-hardening-pr 2026-09-24 15:01:55 +03:00