Commit Graph
1970 Commits
Author SHA1 Message Date
Hakan SevenandClaude Opus 5 36e328f7d7 feat(layers): add LAYTRANS to translate layers onto a standard
Drawings arrive from elsewhere carrying someone else's layer names, and
folding them into a set of house layers meant renaming and merging by
hand, one layer at a time.

LAYTRANS reads a layer set out of another drawing and moves this one onto
it. Given a file it maps every name the two already share and translates
at once, which is all most incoming drawings need. Bare, it opens a
translator: the drawing's layers on one side, the loaded set on the
other, mappings built up between them and applied only on Translate, so a
mapping can be reconsidered and the whole translation is a single undo
step. Mappings can be saved and read back, objects can be forced to
ByLayer so the target layer's properties are what actually shows, and the
result can be written out as a log.

The move itself is the one LAYMRG already made for a single pair, so
LAYMRG now goes through it too rather than keeping its own copy.

Three things fell out for free or nearly so. A standards file is a
drawing, so .dws and .dwt need nothing but a place in the file filter.
The entity list is flat and holds block definitions, so objects inside
blocks travel with everything else instead of being stranded on a layer
that no longer exists. And a target layer that this drawing already has
is left alone: the drawing has an opinion about it, and restyling it
would reach past what was asked for -- only newly created targets take
the standard's properties.

Mappings are saved beside the drawing rather than inside a DWS. That is
where AutoCAD keeps them, but putting them there would mean inventing a
place in the drawing that nothing else reads back.

Closes #624

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 16:51:15 +03:00
Hakan SevenandClaude Opus 5 f7590b1aa8 feat(plugin-api): let add-ons ask for a visual style by name
Removing the binary wireframe event left add-ons with no way to set a
visual style except by spelling out a command string. Give them the
intent back, in the vocabulary everything else now speaks.

The name is carried as text rather than the render-mode type: this crate
is dependency-free by default and only pulls acadrust in behind the host
feature, which is not a weight to add to the manifest contract for one
enum. The host resolves it against the same list its ribbon, its picker
and its commands read, so an add-on can offer exactly the styles the
application does and no others. An unknown name says so and lists the
ones that exist, from that same list.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 14:29:01 +03:00
Hakan SevenandClaude Opus 5 b5a1146966 feat(view): one list of visual styles behind every way of choosing one
The ribbon offered four styles and dispatched each one's id as a command.
Two of those ids were not visual-style commands: "Shaded" carried SOLID,
which draws a 2D filled polygon, so choosing it started a draw command;
"Hidden" carried HIDDEN, which matched nothing at all, so it did nothing.
The intent had been for the button to fire its tool's event, but the
dropdown never reads one -- it dispatches the id.

Behind that sat two generations of the same feature. The render-mode
picker offered the seven styles a viewport can actually be drawn in;
everything else -- the ribbon, VSCURRENT, SHADEMODE, VISUALSTYLES and a
handful of bare verbs -- went through a binary wireframe-or-shaded flag
that could only approximate them, reporting "Hidden (shown shaded)" and
"X-Ray (shown as wireframe)" when asked for something it had no way to
draw. Four descriptions of one choice, each drifting on its own.

There is one list now. Each style names itself once -- mode, label, icon,
and the command that applies it -- and the ribbon, the picker, the
VISUALSTYLES verb and the interactive prompt all read from it, down to
the line that lists the choices, so what is offered cannot disagree with
what works. Keywords are the render modes' own names, since there is one
set of styles left to name.

The binary path is gone rather than kept alongside: its message, its
module event, the tool definitions that produced it, the ribbon's
special-cased highlight arms, the bare style verbs and the older keyword
spellings. X-Ray goes with it -- no render mode draws one, and it was
already coming out as a plain wireframe. Three files that had been left
holding a single icon constant each fold into the list.

Note: ModuleEvent::SetWireframe leaves the plugin API with it.

Closes #621

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 14:15:59 +03:00
Hakan SevenandClaude Opus 5 5c5c7606a1 feat(select): offer the selection modes at "Select objects"
Only Previous and Last were on offer, so Window, Crossing, Fence, the two
polygons and All could not be reached at all -- and with no keyboard to
type them into, the buttons were the only way in.

Window and Crossing fix the sense of the next box. Dragging derives that
from the direction the corner travels and would overwrite it the moment
the corner moved, so the derivation stands down while a keyword holds it.
Add and Remove decide what a pick does for the rest of the round: Remove
subtracts the way Shift already does, rather than through PICKADD, which
decides whether a pick *replaces* the set and so would have wiped
everything gathered so far. Both are dropped when the next command
starts, since neither outlives the selection that asked for them.

Fence and the polygons are picked point by point, which TRIM and EXTEND
already ask for. That gesture -- the points, the rubber-banded dashed
preview, whether the path closes -- moves into one place both bind to,
and the two preview builders duplicated in trim.rs go with it.

A fence is not the polygon test with crossing set: that closes the point
list and counts whatever lies inside, so a line drawn past a row of
objects would take everything behind it too. It gets a hit test that only
counts a real intersection, and skips the area-based geometry entirely.

The lasso gathered its hits from wires, hatches, block hatches, meshes and
block meshes inline; the new modes need the same list, and a second copy
would drift. Both now come through `Scene::path_hit_handles`.

Closes #596

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 13:32:11 +03:00
Hakan SevenandClaude Opus 5 22890a9411 ci: keep the issue-welcome run in Actions history
The job deleted its own run once the comment was posted, so a failure to
post left nothing behind to look at. Keep the run, and drop the
`actions: write` permission it needed only in order to delete itself.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 12:02:16 +03:00
Hakan SevenandClaude Opus 5 ca152de1c0 refactor(text): let acadrust carry the rotation through a transform
The merged fix added the rotation update on this side, matching only
`EntityTransform::Rotate`. That left `Affine` -- which several entity
paths and the UCS world transform emit -- still dropping the angle, and
it sat against the contract this crate already relies on: MIRROR is
delegated precisely because acadrust's entity-aware paths "handle
direction flags, stored-angle conventions and bulges themselves", and
`mirror_text` did exactly that for the same field.

Moved upstream (acadrust 9ecaffc), where one helper carries the angle for
every entity that keeps one. That covers rotation, affine and reflection
in a single place, and closes the same gap for SHAPE and the ATTRIB pair,
which a rotation left facing the old way too -- attributes noticeably so,
since INSERT already turned itself while its attributes did not.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 11:48:53 +03:00
Hakan Seven 05f875b1ff Merge pull request #692 from gianlucafiore/fix/690-text-rotation
Fix text rotation transforms
2026-08-07 11:40:12 +03:00
Hakan SevenandClaude Opus 5 0af6b470ed refactor(snap): measure typed distance along the guide that is drawn
Extension answered "which acquired ray is this snap on?" twice, from two
different tests: the overlay picked its guide by off-ray distance in
screen pixels, while typed-distance entry re-searched the tracking set in
world space. Two tests can disagree, and the ways they disagree are both
bad -- a guide on screen that typing ignores, or a distance running off
along a ray the user cannot see. The second search could also come up
empty on its own, since only four acquisitions are kept and the oldest is
dropped as new ones arrive.

Ask once. The search that draws the guide now also reports the endpoint it
drew from, the snap carries it, and typed distance reads the ray straight
off that -- the direction is just the way from the endpoint to the snap,
which sits beyond it by construction. The screen-space test stays the only
one, which is what the guide wanted anyway: it stays scale-independent
where a world test would not.

Also correct the tracking-point doc: it claims XZ with Y=0, but
`edge_dirs_at` builds every direction from X/Y with Z zeroed and the rays
follow it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 11:29:15 +03:00
Hakan SevenandClaude Opus 5 b8f9727a27 fix(grip): stop double-offsetting the UCS grip snap marker
The extension anchors needed the same pane-to-canvas lift the snap
marker already got, but the block that added it was placed next to the
one that was already there rather than merged into it, so `screen` took
the tile origin twice. A single full-canvas tile has no origin to add, so
it only shows once the viewport is split. Fold the anchors into the
existing block.

Also require the ray to pass through the snapped point before offering it
as a distance reference. Only four acquisitions are kept and the oldest is
dropped as new ones arrive, so the ray that produced a snap can be gone by
the time a distance is typed; picking the nearest survivor unconditionally
sent the point off along an unrelated ray instead of falling back to plain
point input. `extension_snap` projects onto the ray in exact f64, so the
tolerance only has to clear rounding, scaled with the coordinate to hold at
UTM magnitudes.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 11:22:04 +03:00
Hakan Seven 687bc2079d Merge pull request #691 from gianlucafiore/fix/grip-direct-distance
Support tracking and direct distance input for grip editing
2026-08-07 11:16:49 +03:00
Hakan SevenandClaude Opus 5 e5974a8895 fix(setvar): refresh geometry the variable is baked into
LTSCALE scales the dash pattern baked into every wire, and PDMODE /
PDSIZE decide the point glyph built at tessellation time. Each has its
own command that invalidates for exactly that reason -- and PDMODE /
PDSIZE are also reached from the point style dialog and the viewport
setting, both of which invalidate too. Only SETVAR, the fourth way in,
set the header and stopped there, so the drawing kept rendering the old
value until some unrelated edit happened to rebuild it.

Invalidate the same way each variable's own command does, alongside the
TEXTFILL case already handled here.

The rest of the SETVAR list needs nothing: FILLMODE is read at render
time and hashed into viewport state, CELTSCALE and TEXTSIZE only seed
new entities, SPLFRAME is never read outside this file, and the others
are behaviour rather than geometry.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-07 11:10:42 +03:00
gianlucafiore 4dbe9775eb Fix text rotation transforms 2026-08-07 00:16:48 -03:00
gianlucafiore 62457be90e Support tracking and direct distance input for grip editing 2026-08-06 23:35:58 -03:00
gianlucafiore 6752df6ea4 Fix linetype refresh and circle rendering 2026-08-06 23:35:16 +03:00
Hakan SevenandClaude Opus 5 30b8974b73 fix(solid3d): pick up the SAT record-splitting fix
A drawing whose bodies are built only of planes opened without error but
drew nothing, while the solids still selected. Pre-7.0 SAT writes strings
as a length and the characters, so one may contain the record
terminator; ODA's builder emits `8 STEP Id#` inside a dxid-attrib. The
parser split there, every later record answered to the wrong index, and
faces resolved their surface pointer to a coedge or a vertex, so nothing
meshed.

Fixed upstream in acadrust 41149d7. All 22 solids in the reported drawing
now parse to exactly the record count their header declares, and all 22
mesh.

Closes #670

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-06 23:27:18 +03:00
Hakan SevenandClaude Opus 5 5c7aeca321 fix(solid3d): close torn cylinder walls from truck revolutions
A revolution comes back from rsweep as three 120-degree segment faces,
but every hole was attached to the first of them. A window wider than a
segment cannot sit on one face, so that face turned invalid and its
whole third of the tube vanished -- the pump's cylinders lost 120
degrees of wall each and the solid read as open where they met the body.
One of them shed a segment with no hole involved at all, so chasing the
individual causes would not have covered it.

Measure the result instead: after a cone face whose boundary closes the
revolution is triangulated, check that the meshed vertices actually span
it, and hand the face to the parametric sampler when they do not. That
catches a tear whatever produced it, while genuinely partial cones and
every non-cone surface pass straight through -- the tee's pierced run
cylinder still meshes through the kernel.

Also bring truck's chord tolerance in line with the detailed LOD. Truck
emits a single mesh rather than an LOD ladder, so a tenth of the radius
left a wide pipe as a hexagonal prism whose flats sank nine units inside
the true surface, pulling the wall away from the caps and planar faces
that meet it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-06 22:29:41 +03:00
Hakan SevenandClaude Opus 5 2a1a8f4b94 fix(solid3d): read cone radius from the major axis
The cone-surface record's trailing real is a parameter scale, not
geometry. It equals the radius on many bodies, so cylinders generally
came out right, but where the two diverge the lateral surface was built
at the wrong size while the flat caps stayed on their own rims -- a
gauge dial drew as a ring around its own face, its band at 43.2 against
caps at 34.56.

The major axis is the radius vector at the reference cross-section, so
its length is the radius. Route every read through one helper and keep
the record's field only as a fallback for a degenerate major axis, so
the band, the silhouette generators, the isolines and the coaxial-rim
check all size themselves the same way. Taper is unchanged: the major
axis is still the h=0 radius that radius + h*tan(a) extends.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-06 22:00:22 +03:00
Hakan SevenandClaude Opus 5 01d8b87db1 fix(solid3d): trim sphere caps and pierced cone legs
Sphere faces drew as complete balls. ACIS parametrises a sphere about
any pole, so a vessel's dished head is commonly bounded by a circle that
is no line of latitude in that frame, and a theta/phi bounding box of
such a boundary covers nearly the whole ball. Derive the window
analytically instead: when a face's loops are circles lying on the
sphere, re-pole the frame onto their common axis, where each seam is an
exact latitude at acos(d / R). One ring bounds a cap, two bound a zone;
the material side comes from the boundary winding, reusing the helper
the torus path already had.

Separately, the longitude wrap flag was resetting the colatitude window
to the whole meridian. A cap centred on the pole covers every longitude
while still ending at its seam, so that reset grew every cap back into a
ball. Trim the two angles independently and rename the flag theta_full
so the split reads at each use, including the silhouette generator,
which skipped the colatitude test the same way.

Cone faces took their height span from the first boundary loop alone. A
lateral face closed off by one rim and one pierce curve -- a pipe branch
meeting its run -- carries its two ends on different loops, so the tube
was sized to whichever came first and the leg above the junction went
undrawn. Read every loop.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-06 21:44:49 +03:00
Karim Jerbi 8f009d0058 feat(insert): add docked block palette
Add a searchable block palette with previews, file import, collision-safe nested definitions, and dependency/table-record import. Keep palette thumbnails current across drawing switches and block-definition edits.
2026-08-06 11:02:52 +03:00
Hakan Seven 67a767e23b fix(view): pause hover during navigation 2026-08-06 00:21:44 +03:00
Hakan Seven afcf7baead fix(solid3d): honor torus trim winding 2026-08-06 00:07:25 +03:00
Hakan Seven c45daeffb6 feat(render): add scene environment pipeline 2026-08-05 23:42:18 +03:00
Hakan Seven b667eeeb05 refactor(render): unify scene rendering paths
Route model, paper, viewport and nested block content through one traversal while preserving leaf renderers. Carry decoded material state into mesh shading and harden solid geometry conversion.
2026-08-05 21:44:59 +03:00
Hakan Seven afc94dce13 feat(qselect): expand filter workflow
Refs #511
2026-08-05 13:40:53 +03:00
Hakan Seven e07f4f959b fix(view): preserve projection framing
Use full 3D bounds to derive a safe perspective eye distance without changing the camera target, orientation, or field of view.

Refs #502
2026-08-05 12:47:46 +03:00
Hakan Seven 5a0c286a10 chore(release): prepare v0.9.3 v0.9.3 2026-08-05 01:03:51 +03:00
Hakan Seven deaecdfb1e fix(ribbon): mask tools on start
Refs #494

Refs #507
2026-08-05 00:52:52 +03:00
Hakan Seven b92b8df997 fix(trim): handle lasso and box selection
Keep selection gestures in the active trim flow so crossed segments are modified instead of selected.\n\nRefs #487
2026-08-05 00:26:29 +03:00
Hakan Seven 474bfcc7db fix(input): restore arrow key navigation
Route editor and command-line arrows by active context and recall successfully dispatched commands.\n\nRefs #485
2026-08-05 00:08:35 +03:00
Hakan Seven 657d023fb7 feat(ucs): integrate coordinate systems
Route coordinate input, geometry creation, transforms, properties,\nviews, and viewport persistence through a shared working plane.\n\nRefs #484
2026-08-04 23:17:54 +03:00
Hakan Seven b1d55c6a7e feat(view): add visual style previews
- preview render modes on hover without committing
- distinguish 2D and 3D wireframe fill and depth behavior

Refs #483
2026-08-04 21:23:25 +03:00
Hakan Seven 44d0c65ae9 feat(ui): add viewport tooltips
Reuse ribbon tooltip styling for every viewport toolbar action and expose translated action names with related commands.

Refs #482
2026-08-04 19:10:47 +03:00
Hakan Seven 7c893d8f5f feat(ui): refine drawing tabs
Use theme-driven active and hover states, integrate close controls, and keep tab spacing stable across drawing states.

Refs #481
2026-08-04 19:04:59 +03:00
Hakan Seven 9cf0c9f945 fix(ui): refine command line and clipboard
- preserve command history colors after reopening
- remove collapsed command bar residue and split the unsaved prompt
- read system text when the drawing clipboard is empty

Refs #467
Refs #468
Refs #470
2026-08-04 18:53:08 +03:00
Hakan Seven d1f9055901 feat(ui): refine ribbon and view navigation 2026-08-04 18:21:52 +03:00
Hakan Seven 675538eb8d fix(layers): disable redundant set current
Refs #459
2026-08-04 17:37:19 +03:00
Hakan Seven c9550b48f9 feat(properties): refine quick properties
- Keep the floating panel near the selection and inside the viewport
- Persist the toggle and hide the panel without a selection
- Show only Material in 3D Visualization
2026-08-04 17:32:06 +03:00
Hakan Seven 5ad95d1d2e fix(context-menu): keep menu inside viewport
Refs #457
2026-08-04 17:10:27 +03:00
Hakan Seven b0806679c9 feat(command-line): resize history panel
Refs #456
2026-08-04 16:54:59 +03:00
Hakan Seven 282a5176af fix(groups): highlight full group on hover
Refs #454
2026-08-04 16:40:22 +03:00
Hakan Seven 539d83de47 feat(grips): improve direct editing
Refit arcs from fixed control points and highlight hovered grips.
Let Lengthen preview from the cursor or accept a typed distance.
2026-08-04 16:27:03 +03:00
Hakan Seven b744d4bf2d fix(viewport): align picks in oblique views
Project cursor rays directly onto the active drawing plane so previews
and committed points remain under the pointer.

Refs #429
Refs #452
2026-08-04 15:58:53 +03:00
Hakan Seven 429d2eb06b feat(ui): refine about dialog
Use intrinsic modal sizing and present platform details in a balanced layout.\n\nRefs #450
2026-08-04 15:53:34 +03:00
Hakan Seven 2f86bfde8e feat(input): add editable shortcut table
Persist all active bindings and route keyboard events through the configured table.\n\nRefs #449
2026-08-04 15:35:06 +03:00
Hakan Seven 3f6959d7d0 fix(i18n): repair Fluent locale syntax
Refs #656
2026-08-04 14:29:27 +03:00
Hakan Seven fb0f409bfd feat(input): expand shortcut support 2026-08-04 14:20:02 +03:00
Hakan Seven 4be8d9735c feat(ui): add dockable properties panel
Preserve panel width across left/right docking and persist resize, position, and auto-collapse preferences.

Refs #348
Refs #650
2026-08-04 13:46:02 +03:00
Hakan Seven e35348525a fix: resolve offset and theme regressions
Keep OFFSET picks current across newly created entities and preserve the command after pick-first offsets.

Use palette-provided contrast colors for active status controls and Alias Editor removal buttons.

Refs #653
Refs #658
Refs #659
2026-08-04 13:24:38 +03:00
Hakan Seven 62818cfd7b fix(update): delay notifications one hour 2026-08-04 13:00:33 +03:00
Hakan Seven 0936e6e4df fix(ci): authenticate star history fetch 2026-08-04 12:50:54 +03:00