Commit graph cad-editor/Cargo.lock
Author SHA1 Message Date
Hakan Seven
397fb38292 refactor(offset): take polyline offsetting from cadkernel
The offset core moves out: normalising the source, the cavalier_contours
call, the sharp-corner join fixup and the conversion back. What stays is
entity work — reading an LwPolyline in, writing offset LwPolylines out,
and the per-type offsets for lines, arcs, circles, ellipses and splines,
which are analytic and never needed the polyline machinery.

`BulgeArc` moves with it, since the offset preprocessing splits over-half-
turn arcs and cannot work without it. `entities::common` now re-exports it
from the kernel, so the twelve modules already reaching for
`entities::common::BulgeArc` are untouched.

`norm_rad` was a fourth copy of angle normalisation, after the three
removed from trim, fillet and explode. It now aliases the kernel's.

cavalier_contours leaves this crate's manifest: nothing here calls it any
more, and it arrives through the kernel's `offset` feature instead, which
acadifc forwards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 16:01:43 +03:00
Hakan Seven
06a0fc4ddf fix(trim): cut a closed ellipse at the right span
Two faults met on the same command, both of them older than the move to
cadkernel and both hidden until ellipse previews started rendering
truthfully.

The survivor came back in two pieces. `trim_ellipse` handed its cuts to
`trim_intervals`, which is the open-curve routine: it anchors on bounds at
0.0 and 1.0, so a closed ellipse gained invented cuts at the parameter
seam and the surviving arc arrived split either side of it. Worse, a click
in the wrapping piece landed in one of those two halves, so the wrong span
disappeared. A closed ellipse now takes the cyclic route circles already
used — find the cut-to-cut gap holding the click, keep everything else,
and let end < start signal the wrap.

The cut span was also short. That came from `line_ellipse`, fixed upstream
in cadkernel 46e76cc: it returned the geometric angle at the centre rather
than the ellipse parameter, which are the same thing only on a circle. On
anything eccentric the cuts sat tens of degrees off where the line
actually crossed, so the removed piece was consistently too small. The
lock bump brings that fix in.

Elliptical arcs, lines, rays, xlines and open splines keep using
`trim_intervals`; nothing about the open-curve path changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 15:42:30 +03:00
Hakan Seven
d0cc3284d2 refactor(modify): take plane geometry from cadkernel
TRIM, FILLET and EXPLODE each carried their own copy of the same plane
maths. The copies had already drifted apart: `ll` differed only in
parameter names between trim.rs and fillet.rs, `arc_pts` only in which
angle helper it called, and `norm` meant angle normalisation in trim.rs
and explode.rs while meaning vector normalisation in two other files.

The implementations now live in cadkernel's geom2d. A new local `geom`
module adapts the call shapes — the kernel takes `[f64; 2]` points and
returns `[f64; 3]`, while these commands pass loose scalars and feed
`WireModel::points`, which is `[f32; 3]`. Narrowing stays on this side
because only the caller knows whether it is a preview wire, which leaves
`points_low` empty and accepts the loss, or resident geometry, which
splits the f64 into a high/low pair instead.

Call sites are untouched: the kernel functions are imported under the old
local names, so the signatures they were written against still hold.

This also fixes ELLIPSE trim and extend previews. `ellipse_pts` wrote its
components as [x, z, y] while `arc_pts` — reached from the same match in
`entity_pts`, feeding the same `[f32; 3]` — wrote [x, y, z], and
`WireModel::points` is documented as world-space positions. Ellipse
previews were collapsing onto y = 0 and displacing along Z. The kernel's
`ellipse_arc` orders them correctly, so delegating corrects it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 15:27:45 +03:00
Hakan Seven
051272ad71 build: reach the CAD stack through acadifc
The DWG/DXF/ACIS codec now lives in its own crate and acadifc re-exports
it alongside the geometry kernel, so this is the single dependency:

    OpenCADStudio -> acadifc -> { cadcodec, cadkernel }

acadifc is aliased to `acadrust`, which leaves the 2569 `use acadrust::…`
paths across 253 files untouched — the alias is a manifest-level rename,
not a source change.

The old `[patch.crates-io]` entry goes away with it: the dependency is a
git revision now rather than a crates.io version being redirected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 13:11:33 +03:00
Hakan Seven
17b2f158f4 chore(release): prepare v0.9.4
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 03:23:27 +03:00
Hakan Seven
7c8271c716 fix(icon): draw every icon from the logo file
Two places still showed the old mark after the logo was redrawn.

The window icon was built by drawing the letterforms stroke by stroke in
code, background colour and all, which made it the one icon in the
application not coming from assets/logo.svg. It now rasterises that file,
fitted to the square without distorting whatever aspect the logo has. It
returns nothing when the logo cannot be rendered, so the window falls back
to the platform default instead of to something invented here -- which is
how it ended up stale in the first place.

The icon installed into the icon theme was only ever written from inside
the desktop-entry write, behind that write's own "nothing changed" early
return. The entry's text does not change when the logo does, so once it
had been written the icon was never refreshed again. The two change for
different reasons; the icon is now checked first and on its own terms. It
already compares bytes, so an unchanged logo still costs only a read.

Worth knowing on Wayland: the compositor ignores the window icon entirely
and takes the dock icon from the desktop entry, so there the installed
theme file is the only one that matters -- and it refreshes when the file
associations are next set up, not at launch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 17:37:59 +03:00
Hakan Seven
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 <noreply@anthropic.com>
2026-08-07 11:48:53 +03:00
Hakan Seven
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 <noreply@anthropic.com>
2026-08-06 23:27:18 +03:00
Hakan Seven
5a0c286a10 chore(release): prepare v0.9.3 2026-08-05 01:03:51 +03:00
Hakan Seven
f18ba87858 fix(acis): render complex solid surfaces
Scope revolution spans to face boundaries and preserve pierced cylinders and rational spline lofts so valid bodies no longer produce stretched or missing shells.
2026-08-03 19:03:59 +03:00
Hakan Seven
8dc642d40c chore(release): v0.9.2 2026-08-03 13:02:37 +03:00
Hakan Seven
9e90e50662 feat(io): add user-approved recovery 2026-08-03 12:47:48 +03:00
Hakan Seven
b90b3e3ecf feat(locale): add Fluent translations
Default to the platform language with persisted overrides across native and web builds.

Refs #630
2026-08-02 18:53:38 +03:00
Hakan Seven
678938ddf7 chore(release): v0.9.1 2026-07-31 19:22:04 +03:00
Hakan Seven
bf9d43f679 build: update acadrust mtext revision 2026-07-31 19:20:31 +03:00
Hakan Seven
e23dde8eae build: update acadrust cleanup revision 2026-07-31 18:13:37 +03:00
Hakan Seven
9fdd26e1ed build: update acadrust codec revision 2026-07-31 18:05:51 +03:00
Hakan Seven
5c2b9add8b fix(build): use Iced AW 0.15 fork 2026-07-31 14:48:34 +03:00
Hakan Seven
9eb47c43a9 fix(linux): focus browser on external links 2026-07-30 21:07:31 +03:00
Hakan Seven
3ab8dc3ca5 fix(ui): make modal layouts intrinsic
Pin Iced 0.15 so dialogs can measure content before distributing the resolved frame across child panels. Keep the web plugin notice compact and non-resizable.\n\nCloses #582
2026-07-30 14:47:28 +03:00
Hakan Seven
d495e31d37 fix(offset): handle curved self-intersections
Closes #544
2026-07-30 00:06:02 +03:00
Hakan Seven
7b708372a8 chore(release): v0.9.0 2026-07-29 21:43:26 +03:00
Hakan Seven
6ecd67ff6e feat(layer-state): add saved-state editor 2026-07-29 18:39:55 +03:00
Hakan Seven
1e624cc6b7 feat(layers): add native state manager
Replace session-only layer snapshots with drawing-backed DWG and DXF states, exposed through the ribbon and LAYERSTATE commands.\n\nCloses #562
2026-07-29 18:00:41 +03:00
Hakan Seven
ad736e20ea fix(grid): remove implicit drawing limits 2026-07-29 17:21:57 +03:00
Hakan Seven
a717572d65 fix(plugins): trust platform certificates
Use the operating system trust store and Windows proxy settings while keeping TLS verification enabled. Add retryable registry errors with copyable diagnostics.\n\nRefs #563
2026-07-29 15:00:07 +03:00
Hakan Seven
4e25e88c31 feat(plugins): redesign plugin manager 2026-07-29 14:27:32 +03:00
Hakan Seven
93b9a840ff refactor(renderer): select paths by GPU limits
Keep storage fast paths on capable adapters and use packed or texture fallbacks only when device limits require them.\n\nCompact mesh-edge varyings to avoid WebGL shader rejection.
2026-07-29 12:49:41 +03:00
Hakan Seven
8a5bca8aa0 chore(release): v0.8.9 2026-07-28 12:51:38 +03:00
Hakan Seven
b9de8940bc refactor(statusbar): unify popup menus 2026-07-28 01:02:00 +03:00
Hakan Seven
3d90450b3f build(deps): update AcadIfc revision
Pull the default multileader and table style initialization from AcadIfc.

Refs #523
2026-07-27 18:19:56 +03:00
Hakan Seven
b1a52d9229 chore(release): v0.8.8 2026-07-27 01:20:56 +03:00
Hakan Seven
731df4a725 feat(cad): integrate standard codec coverage
Render, edit, query, select, and explode newly decoded standard entity variants. Pin acadifc de8d6b5 and preserve None color semantics.
2026-07-26 19:30:43 +03:00
Hakan Seven
34d0c377e2 fix(3d): complete ACIS solid rendering
- track per-face coverage and retain safe display fallbacks
- tessellate shared NURBS, pcurve trims and periodic surfaces
- pin the matching acadifc decoder revision
2026-07-26 01:35:16 +03:00
Hakan Seven
a16914a22a build: pin CAD round-trip fixes 2026-07-25 23:54:02 +03:00
Hakan Seven
a22681e751 fix(io): prevent lossy Save As
Use the verified acadifc round-trip fixes and warn for every unsupported object or entity the selected format would drop.
2026-07-25 23:02:05 +03:00
Hakan Seven
bca65600cd fix: stabilize web loading and paper rendering 2026-07-25 21:34:29 +03:00
Hakan Seven
fe49cc8eb5 revert(web): drop vendored iced renderer
Keep iced_wgpu external and leave the WebGPU storage-buffer optimization out of scope.
2026-07-25 19:24:32 +03:00
Hakan Seven
deec48ad99 perf: keep heavy work off UI thread 2026-07-25 18:49:18 +03:00
Hakan Seven
12bf126646 perf: remove large drawing stalls
Keep resident geometry and GPU resources stable across edits, MSPACE zoom, and Model/Paper switches. Add unified PERF output for tracing remaining costs.
2026-07-25 13:34:48 +03:00
Hakan Seven
47423eae18 build: pin DBCOLOR round-trip fix 2026-07-25 09:22:35 +03:00
Hakan Seven
39449ec684 perf: speed large drawing workflows 2026-07-25 09:05:52 +03:00
Hakan Seven
97be4fefaa build: update acadrust DWG pipeline 2026-07-25 03:32:31 +03:00
Hakan Seven
71e0b88839 perf: optimize large drawing workflows 2026-07-25 02:58:46 +03:00
Hakan Seven
ea93e169ea perf: make edit history incremental
Replace full-document snapshots with Arc first-touch deltas and batch cache invalidation. Reuse interaction and GPU category caches across unrelated edits.
2026-07-24 23:25:33 +03:00
Hakan Seven
77ea43fb96 fix(dwg): pull AC15 locator fix 2026-07-24 17:44:02 +03:00
Hakan Seven
8c36d3aca8 chore(deps): bump acadrust for down-saved gradient false-positive fix
Solid hatches carrying stale GradientColor1/2ACI EED (no ACAD_XREC_ROUNDTRIP
XRecord) no longer resurrect as a two-colour gradient — red / ACI-253 solids
now render solid instead of blue→yellow.

Closes #471

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 14:45:04 +03:00
Hakan Seven
d59f90992c fix(dxf): tapered R12 polyline widths via acadrust c209306
Heavy 2D POLYLINE vertices with absent width codes now inherit the
polyline default while explicit-zero segments stay zero, so tapered
polylines (e.g. sample_AC1009 handle 0x35B) render variable-width
instead of constant — matching the DWG/LWPOLYLINE form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 13:52:32 +03:00
Hakan Seven
6ba8bb15bc chore(deps): bump acadrust for R12 paper-space entity placement
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 13:11:50 +03:00
Hakan Seven
106fbbec71 chore(deps): bump acadrust for R12 block-content owner fix
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:54:24 +03:00