Commit Graph
2473 Commits
Author SHA1 Message Date
Hakan Seven fba1dfcd88 Merge review/1845: PR #1845 DGNIMPORT with fixes
# Conflicts:
#	src/app/commands/dgn_import.rs
2026-10-16 23:51:54 +03:00
Hakan Seven ea72ffad5f Merge review/1844: PR #1844 IMPORT with fixes 2026-10-16 23:50:58 +03:00
Hakan SevenandClaude Opus 5.5 f07d6e19fc Save: don't wait forever for the thumbnail frame or screenshot
A save from the active drawing first redraws the viewport without its
overlays and screenshots it for the file's preview. When the compositor
delivered no frame or never answered the screenshot (an occluded or
throttled Wayland window), the save never started: the input layer stayed
hidden, so the window ignored the mouse and keyboard, and automation
requests waited on the save forever. A timer now stands in for the frame,
and the screenshot races a half-second timeout; whichever answers first
runs the save, without the refreshed preview if it has to.

Closes #1801

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:25:59 +03:00
Hakan SevenandClaude Opus 5.5 56861aa0bc Escape DGN text in MTEXT and read 3D text by its byte count
Backslashes and braces in a DGN text stay characters in the MTEXT it
becomes instead of turning into formatting codes.

A 3D V8 text is cut at its stored byte count before it is decoded, so a
multi-byte character no longer shifts where the text ends.

Doc comments that had slipped onto the wrong functions are back on
their own, comments describe the behaviour instead of pointing at
another program, and a few lines added in the previous commits are laid
out the way the rest of the code is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:25:27 +03:00
Hakan SevenandClaude Opus 5.5 a0ed20df28 Fix IMPORT naming, messages and 3D Studio limits
STEP assemblies: a link that closes a loop in the assembly is dropped,
so no block inserts itself; the walk is iterative. Each imported block
gets a name the drawing does not use yet instead of silently reusing an
existing definition, inserts are pointed at the names the blocks got,
and an insert of a block that could not be defined is left out with
the error reported.

Names that come from files (STEP products, 3D Studio objects, materials
and cameras, WMF font faces) go through a new shared
scene::sanitized_table_name, which applies the block-name rules
(reserved and control characters, 255 characters).

3D Studio: meshes with more vertices than a polyface mesh can index are
split over several meshes. Single-layer mode uses the current layer.
Materials are only created when the drawing has a material dictionary.
Camera views get the current view's proportions and the perspective
flag.

Messages show paths as given, the file-not-found and read-failure
messages are plain text of our own, and the "Press Esc" line is gone
since the import cannot be cancelled. The true-colour packing is
shared. "Select ACIS File" and "Import WMF" get catalog entries and
keys in all 22 locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:20:03 +03:00
Hakan SevenandClaude Opus 5.5 ed4dc91670 Keep DGN reference attachments and cell instances well-formed
Plain -DGNIMPORT no longer writes drawings next to referenced files on
its own: references are ignored unless the window (or the kept import
settings) asks to translate them or attach them as underlays.

A referenced file named relative to the host is looked up in the host's
folder rather than the working directory. Its translated drawing takes
a file name made from the model name with path separators and other
reserved characters replaced, so it is always written in the
reference's own folder. A reference placed in sub units is scaled by the
same factor as its origin.

Layer, block, text style and reference names read from the file are
made valid symbol names (reserved characters become underscores).

An instance of a cell that has no block (the point display cell, an
empty or missing definition) is dropped instead of inserting a block
that does not exist.

"Prompt to overwrite" still keeps an existing translated drawing; the
code now says so instead of implying a prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:11:18 +03:00
Hakan SevenandClaude Opus 5.5 854641bb55 Start page: a From Template button next to New Drawing
New Drawing starts from the default template (Options > Files), so a
template made here or in another program could only be reached through
the NEW command. The button runs NEW, which asks for the .dwt, .dwg or
.dxf to start from.

Closes #1849

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:46:07 +03:00
Hakan Seven c3baff7ea2 Merge pull request #1844 from ramox81/codex/import-formats
IMPORT: read SAT, STEP, IGES and WMF files; ACISIN and WMFIN

# Conflicts:
#	Cargo.lock
2026-10-16 22:41:32 +03:00
Hakan Seven 2b807a7654 Merge pull request #1845 from ramox81/codex/dgnimport-followups
DGNIMPORT: names, cells, text placement, curves, 3D, models and references

# Conflicts:
#	Cargo.lock
2026-10-16 22:41:12 +03:00
Hakan SevenandClaude Opus 5.5 907fa8d760 STRETCH: arcs keep their height; splines stretch; real preview
An arc moved only when its centre was in the window, so stretching a
rounded end left the arc where it was or blew it up. Its ends now decide:
both in move it, one in moves that end while the arc keeps its height
(sagitta) over the new chord. Polyline arc segments keep their height the
same way instead of their bulge, spline control and fit points in the
window move, and 3D polylines and points stretch too. Old-style polylines
were tested in X/Z.

The preview moved the tessellated points that happened to be in the
window, which bent arcs out of shape; it now draws the stretched entities
through one shared function the commit also uses, via a new
preview_entities hook, and hides the originals while it shows.

Closes #1851

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:40:02 +03:00
Hakan Seven ecdcc5d2b6 Merge pull request #1838 from ramox81/codex/pdf-shx-text-followups
PDFSHXTEXT: reference text grouping, object share and wider character set
2026-10-16 22:40:02 +03:00
Hakan Seven fa7bb9de12 Merge pull request #1841 from ramox81/codex/pdfimport-followups
PDFIMPORT: reference coordinate precision, unreadable file and page messages, picker automation
2026-10-16 22:39:59 +03:00
gianlucafiore 590ca17f94 Merge pull request #1853 from gianlucafiore/fix/extension-guide-visual-anchor
fix(osnap): keep Extension guides anchored when moving the cursor
2026-10-16 16:16:29 -03:00
ramox81andClaude Opus 5.5 0158ea533f Merge upstream main; codec and kernel patches on branches merged with it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:12:01 +03:00
ramox81andClaude Opus 5.5 0b179a862e Merge upstream main; codec patch on the palette branch merged with it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:03:16 +03:00
ramox81andClaude Opus 5.5 78e429732e IMPORT: 3D Studio files
A .3ds file opens the 3D Studio Import window: the file's objects with
their kind and material count, filtered by kind or name, checked one by
one or all at once, where to put them on layers and what a mesh with
several materials becomes. Checked meshes come in as polyface meshes on
the chosen layers with materials made from the file's colours, cameras
as named views; a mesh with several materials is split, given its first
material, given none, or asked about on the command line. Automation
drives the window with tds_import_dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:12:16 +03:00
gianlucafiore de990b5a1a chore(visual): remove temporary Extension anchor logging 2026-10-16 14:07:10 -03:00
Karim Jerbi 677ff0e08c feat(block-editor): select and edit native parameter and action grips
Parameters and Move/Scale action markers were drawn as overlays with no selectable authoring objects. Pick their points, labels or graphics in BEDIT to display editable definition, endpoint, reference and label grips using the existing selection overlay and point-input commands. Show the selected object's coordinates in the Properties panel.

Write edits to the native parameter/grip/action records while preserving graph identities and target bindings. Maintain Rotation radii and oriented grip directions, synchronize visibility lookup data, and retain Basepoint attribute relocation with recorded entity history. Escape cancels edits or clears selection; editor undo/redo and save/discard preserve the native changes.

Validate with self-contained viewport-input and native DWG/DXF persistence regressions, all ten parameter types, action bindings, cancellation and Basepoint attribute undo. Checks: 3 focused, 323 block (6 existing opt-in ignored), 39 dock and 23 viewport tests passed; counts overlap.

Ordinary drawing-reference grips and per-instance saved action evaluation follow in the next milestone.
2026-10-16 17:44:09 +01:00
gianlucafiore d96476187f diagnostic: trace Extension anchor coordinates on demand 2026-10-16 13:34:50 -03:00
gianlucafiore 6792c7265c fix(visual): anchor Extension at the acquired world endpoint projection 2026-10-16 13:16:45 -03:00
gianlucafiore 3f056ecd9d fix(osnap): offset Extension guide origins into canvas coordinates 2026-10-16 13:13:14 -03:00
ramox81andClaude Opus 5.5 9ddc103bcc WMF: arcs on whole units, text by its font's ascent, no chords
Arcs and pies are cut at whole multiples of 1/99 turn round the
ellipse's whole-unit centre and radii, rounded down, from the start ray
to the end ray. Text sits the font's ascent below its reference point
and is four fifths of it tall; its style is WMF-<face><n> on the
installed file of that face. CHORD records are not read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:12:47 +03:00
Karim Jerbi f69aefc3df feat(block-editor): author Move and Scale actions with Test Block evaluation
Add BACTION/BACTIONTOOL workflows for compatible parameter endpoints, selected geometry and native action markers. Persist Move/Scale records, target handles and evaluation graph bindings; reuse shared adjacency editing with Lookup and the existing palette, tooltips and selection UI.

Evaluate endpoint changes in the disposable Test Block document from immutable starting geometry, with geometry/grip undo, source isolation and transformed-reference support. Preserve visibility representations and their native Basepoint anchor. Refuse unsupported options, value constraints and shared test references.

This milestone supports default Move and uniform Scale on basic drawing entities. Other actions, custom options, live preview and ordinary drawing-reference evaluation remain pending.

Validation: self-contained synthetic DWG/DXF roundtrips, graph adjacency, command cancellation/history, Test Block isolation/undo, transformed references, visibility/Basepoint and real-view palette/viewport input checks; broader block and dock suites.

Keep action object selection active across mouse picks/removals and advance only on Enter. Cover empty selection, multiple targets, Shift removal, marker placement and Move/Scale Test Block evaluation using viewport mouse events. Verified 10 focused, 320 block and 39 dock tests (6 existing opt-in block checks ignored).
2026-10-16 17:05:18 +01:00
gianlucafiore e5e08a5a12 fix(visual): project acquired Extension rays with a stable screen baseline 2026-10-16 11:45:40 -03:00
Karim Jerbi 10c5a9d382 feat(block-editor): author Lookup tables and wire Basepoint insertion
Add native Basepoint placement and relocation, shared insertion and Test Block anchor behavior, and attribute-safe coordinate reframing. Wire native Lookup parameter placement and the Property Lookup Table editor through the existing palettes and BLOOKUPTABLE.

Stage input columns, rows, reverse lookup and audit across multiple tables; apply all drafts atomically as one undo entry. Persist native Lookup actions and graph dependencies while preserving unrelated objects and IDs. New inputs cover Linear and Polar distances; reference Lookup evaluation and geometry actions remain separate work.

Pin codec c418d92, kernel 0f6f225 and graph dcb9eda for correct R2010 inline constraint-group decoding. The codec regression uses a checked-in synthetic DWG and reproducible generator, with normal self-contained loading and edited DWG/DXF tests. Keep dock control tests independent of scene adapter warning dialogs in software snapshots.

Validation covers native round trips, all 17 research fixtures, graph preservation, insertion and attributes, staged editing, undo/cancel, and real palette/dialog controls.
2026-10-16 15:29:08 +01:00
gianlucafiore 54fb20d343 fix(visual): anchor Extension and OTRACK guides to acquired ray direction 2026-10-16 11:13:03 -03:00
ramox81 d8959a4635 Merge remote-tracking branch 'origin/main' into codex/import-formats
# Conflicts:
#	Cargo.lock
2026-10-16 16:58:41 +03:00
ramox81andClaude Opus 5.5 8f20f0aef6 Merge upstream main; follow the boxed MText codec type and the updated palette branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:56:46 +03:00
ramox81andClaude Opus 5.5 659bb06cd6 IMPORT: read SAT, STEP, IGES and WMF files; ACISIN and WMFIN
ACIS text files come in one object per body (3DSOLID, REGION or SURFACE).
STEP B-rep models become a block per product with component inserts at
their placements, scaled to the drawing's units; IGES manifold solids come
in as 3DSOLIDs scaled to the drawing's units with their colours. Splines
that are exactly analytic shapes are kept as those shapes. Windows
metafiles become a WMF<n> block of polylines and text fitted to half the
view, placed at its top-left corner or by WMFIN's insertion prompts. The
Import File window lists the four formats as supported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:06:16 +03:00
ramox81andClaude Opus 5.5 dca6c9d116 DGNIMPORT: cells inside shared cell definitions are part of the definition; empty cells stay out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:58:28 +03:00
ramox81andClaude Opus 5.5 fc04472472 DGNIMPORT: a cell that draws nothing still becomes a block
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:47:56 +03:00
ramox81andClaude Opus 5.5 6fdff6c515 DGNIMPORT: reference naming, cells, text placement, curves, references
Name clashes, DGNIMPORTMODE and prefixing as the reference names them;
V7 cell copies, unshared cells and mirrored placements as blocks;
justified text and text nodes placed at their justification points with
the reference's MTEXT contents; B-spline curves as splines and 3D arcs and
ellipses in their own planes; every V8 level as a layer; design models
only; reference attachments translated, ignored or attached as underlays.
The colour index palette comes from the codec fix it depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:33:07 +03:00
ramox81andClaude Opus 5.5 dae01bdb14 fix(pdfimport): reference geometry precision, file and page messages, picker automation
- The page transform is read as 16.16 fixed point held in single precision
  and each user-space coordinate as a single-precision value kept to six
  decimals, so imported coordinates match the reference to the last digit.
- Paths wholly outside the page (crop box) or the current clip are left out.
- The page's /UserUnit scales the import.
- Unreadable files (no trailer, empty, not a PDF) print the "This file
  cannot be opened." block; encrypted files are asked for again silently.
- Page prompt: digits only, "There is no N in <file>." past the last page;
  page list prompt keeps asking with "Please enter page number or *.".
- Automation: pdf_import_pick (the path the next PDF picker returns) and
  pdf_import_dialog (page / on_screen / scale / rotation / ok / cancel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:37:20 +03:00
Hakan SevenandClaude Opus 5.5 04b2c07a38 Use the codec audit and repair in place of OCS's corruption guard
Opening a drawing no longer drops entities with its own sanity checks or
rewrites knotless splines; recovery runs the codec's repair and records
its actions and unresolved issues in the drawing's notifications. Xref
merges keep every entity. The dropped-entity counts, their command-line
warnings, recovery report rows and the automation "purged" field go with
the guard.

AUDIT now reports the codec's audit (counts plus the first 50 issues) and
asks whether to fix; Yes applies the codec repair as one undo step.

Cargo: codec 325fa98, kernel dfca391, graph 5d4e713.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:02:39 +03:00
ramox81andClaude Opus 5.5 2eb60f333f fix(pdfshxtext): reference grouping, object share, wider glyph set, drawing-order import
Text blocks join side by side or stacked within two heights; oversized
shapes join no group; the group share counts selected objects; Latin-1,
Latin Extended, Greek, Cyrillic and the diameter sign are compared from
the font's own glyphs with look-alikes resolved to the lowest code; a lone
circle reads 0; MTEXT direction is by style. PDFIMPORT keeps drawing order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:03:48 +03:00
Hakan SevenandClaude Opus 5.5 e4d04ef132 Cargo: codec e023bc3 (acadrust sync), kernel abca4e8, graph c63556f
The codec now holds wide EntityType variants boxed (MText, Helix,
Dimension, Hatch, Viewport, MultiLeader, Surface, Table, Ole2Frame,
Light, Extended). Constructors box their entity; nested patterns reach
a dimension through entities::dimension::as_dimension(_mut). Also
follows BlockAction::action_ids, LineTypeComplexData::source_flags and
the decimal tab stop with an explicit character.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:17:01 +03:00
Hakan SevenandClaude Opus 5.5 218150c76a fix(clipboard): copied XDATA keeps its application in another drawing
EED names its application by APPID handle. Copying between drawings
(paste, COPYTO, block palette insert, REFEDIT) kept the source
drawing's handles, so the saved DWG named APPIDs it did not have and
the reference program refused to open it (xdata.cpp eInvalidInput).
The copy now carries the APPID records its XDATA names, registers the
missing ones, and re-points the EED at them.

COPYTO also skipped every layer the target lacked (the check tested
the source) and filled the target with the whole linetype catalog; it
now copies the missing layers and loads only the linetypes used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:37:19 +03:00
gianlucafiore ec44bcdd71 cleanup: remove unused generic drag threshold import 2026-10-15 20:31:16 -03:00
gianlucafiore 8ebe3fc89f fix(selection): prevent incidental mouse motion from starting lasso 2026-10-15 20:31:04 -03:00
gianlucafiore 0004113e0a refine(selection): allow 250ms before a small pointer drag starts 2026-10-15 20:22:09 -03:00
gianlucafiore 52e8cd1002 fix(otrack): commit Extension intersection at tracked crossing on click 2026-10-15 20:10:08 -03:00
gianlucafiore dd3b18e550 docs: clarify extension exception in OTRACK priority guards 2026-10-15 20:02:39 -03:00
gianlucafiore 6a767390dd fix(otrack): allow Extension tracking intersections while preserving point snap priority 2026-10-15 20:02:21 -03:00
Hakan SevenandClaude Opus 5.5 9a567d4f44 fix(linetype): an opened drawing keeps exactly its own linetypes (#1826)
Opening a drawing added all 50 catalog linetypes to it, so PURGE found
and removed them again after every save and reopen. Opening now only
repairs the catalog linetypes a drawing already has. The linetype
pickers (layers, properties, ribbon, attribute editor, layer states)
offer the missing catalog ones after the drawing's own, and the one
picked, or named in LINETYPE SET, is loaded on first use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:27:50 +03:00
Hakan Seven a62598cd63 Merge pull request #1828 from schoeller/xdata_entity_type_labels 2026-10-16 01:12:36 +03:00
Hakan Seven 012ccc7b65 Merge pull request #1831 from manuvarkey/system-ui-font-face 2026-10-16 01:11:11 +03:00
Hakan Seven 57d80654be Merge pull request #1827 from MarcelP102/auto-hide-fixes 2026-10-16 01:09:10 +03:00
Hakan SevenandClaude Opus 5.5 0126ea212f feat(layout): copy a layout from its tab menu (#1822)
The layout tab's right-click menu gains New Layout, Copy, Page Setup
and Plot beside Rename and Delete. Copy makes "<name> (2)" with the
source's page setup, sheet view and every paper-space object,
viewports included, and opens it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:08:07 +03:00
Hakan SevenandClaude Opus 5.5 38d81bf838 feat(selection): highlight opacity and extra width (#1823)
Options > Selection gains "Selection highlight opacity" and "Selection
highlight extra width". Below full opacity the object's own colour
shows through the highlight. The selection overlay draws with its own
copy of the frame uniforms: transparency on, and every line widened by
the extra width. Drawings opened at startup now get the selection
colour settings too; they used to keep the defaults until a setting
changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:07:23 +03:00
Hakan SevenandClaude Opus 5.5 977135fbbd feat(grid): the coloured grid axis lines can be turned off (#1815)
Drafting Settings > Snap and Grid gains "Display grid axis lines",
kept with the other grid settings; the grid itself stays as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:42:03 +03:00