Commit graph cad-editor/Cargo.lock
Author SHA1 Message Date
Hakan Seven
9838cd6d83 fix(dxf): stop writing a duplicate *Active viewport (#319)
Opening a DXF whose active viewport is stored uppercase (*ACTIVE),
editing and re-saving produced a file with two full-window model-space
viewports — the file's own *ACTIVE plus a fresh *Active we add on save.
The reserved viewport name is case-insensitive, so the two didn't
collapse and other CAD apps drew them one on top of the other, which
read as the copied objects being linked / "reacting as one".

save_model_tiles_to_vports dropped existing active viewports with a
case-sensitive `name != "*Active"` filter, so an uppercase *ACTIVE
survived and sat next to the new entry. Route every *Active comparison
(save filter + camera/tile restore) through a case-insensitive
is_active_vport_name helper so the file's record is recognised and
replaced instead of duplicated.

Also bumps acadrust to #99f75fe (merged PR #1): the ASCII DXF writer now
emits shortest round-trippable floats instead of the full 16-digit
expansion, halving the round-tripped file size.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 22:36:00 +03:00
Hakan Seven
26cab3b712 fix(dxf): bump acadrust for DXF hatch pattern parsing (#330)
Pulls acadrust f1f4dbf, which makes the DXF reader parse hatch pattern
definition lines (and types group code 79 correctly) so custom/dashed
patterns load identically to the DWG instead of collapsing to flat
horizontal lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 20:42:55 +03:00
Hakan Seven
f91e45a62a chore(release): v0.7.8
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 00:42:01 +03:00
Hakan Seven
82203f2f22 chore: bump acadrust — read/write layer true-color on DXF (#223)
Pulls acadrust d32c9cf so DXF import reads RGB layer colours (code 420)
instead of collapsing every true-colour layer to Index(7)/white; ByLayer
entities then resolve to the correct colour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 16:07:55 +03:00
Hakan Seven
0e368934ea chore: release v0.7.7 2026-07-08 00:33:34 +03:00
Hakan Seven
d528a3e2a5 feat(text): parse TEXT via acadrust + extend SDF text to MTEXT
Two related steps for the text pipeline:

- TEXT parsing now goes through acadrust's parse_plain_text (like MTEXT
  uses parse_mtext). text::acad_text_encode parses the value's %% codes —
  including %%u/%%o underline/overline and %%nnn — and re-encodes to the
  stroke tessellator's \L/\O + resolved-Unicode grammar, so OCS no longer
  tokenizes TEXT %% codes itself. (ATTRIB/TOLERANCE/DIMENSION still use the
  local tokenizer for now.) Bumps the acadrust pin to the commit that
  completes the TEXT/MTEXT control-code set.

- SDF text (OCS_TEXT_SDF) now covers MTEXT and every text-producing
  entity, not just top-level TEXT. TextStroke carries a GlyphRun (layout
  params); the collector walks convert()'s TruckObject::Text runs and
  applies annotation scale exactly as tessellate does for strokes.
  layout_glyph_quads shares lff::tokenize_run so %% specials resolve and
  \L/\O decorations are skipped (decoration LINES in SDF are still TODO).

Verified: stroke rendering unchanged with the flag off; SDF glyphs render
correctly for TEXT and MTEXT with OCS_TEXT_SDF=1. 154 lib tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 00:53:19 +03:00
Hakan Seven
b88e5e4ad5 refactor(mtext): parse MTEXT via acadrust, drop OCS's own parser
OCS maintained a second MTEXT inline-code parser that duplicated
acadrust's `mtext_format::parse_mtext`. Replace it with an adapter
(`adapt_mtext_paragraphs`) that maps acadrust's structured MTextDocument
onto the existing layout types (`MTextLine`/`RunState`); the layout
engine (`layout_mtext`, `mtext_line_count`, and their callers) is
unchanged. Removed the hand-rolled `parse_mtext_paragraphs*` and its
helpers.

Validated during migration by a differential test (adapter vs the old
parser matched byte-for-byte over a 20-case corpus) and confirmed
rendering identically in the app; the differential test is replaced with
adapter-only unit tests. Relies on acadrust's new `MTextScalar` to tell
absolute `\H` from relative `\Hx` (bumped the acadrust pin).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 00:04:11 +03:00
Hakan Seven
ced42daff5 chore(release): v0.7.6 2026-07-05 21:05:51 +03:00
Hakan Seven
c91593ab9c perf(render): bump acadrust for O(1) ACIS record lookup
Pull in acadrust 4d51947, which makes SatDocument::record() an O(1) hit
instead of a linear scan. Tessellating an ACIS-heavy drawing was
O(records²) per solid; this drops the post-load mesh build for Clinic.dwg
(~9900 xref'd solids) from ~2.2s to ~0.85s of parallel tessellation, with
identical geometry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 01:25:57 +03:00
Hakan Seven
13de968ee9 perf(xref): fix O(n²) AcDs parse and skip host re-tessellation
Opening a drawing that xrefs several 3D-heavy DWGs (e.g. Clinic.dwg with
5 discipline files) took ~137s, effectively all of it inside the DWG
parser's AcDs SAB blob extraction.

Bump the acadrust pin to ceef045, which bounds the AcDs end-marker search
so a missing marker family no longer scans the whole buffer per record.
Total xref resolve for Clinic.dwg drops from ~97s to ~4s.

Also make the post-xref mesh pass incremental: the host solids were
already tessellated by the background loader and the merge assigns fresh
handles to every imported entity, so `populate_missing_meshes_from_document`
keeps the cached host meshes and tessellates only the merged xref solids
instead of clearing and rebuilding the whole document.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 00:38:38 +03:00
Hakan Seven
60872da62a chore(deps): bump acadrust to f76e41a for the xref save fix
Picks up the acadrust change that writes xref blocks as external
references instead of serializing their resolved contents as owned
entities. An xref attached with XATTACH now survives a save + reopen as
a reference instead of being bound/exploded into loose objects.

Closes #268

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 22:40:25 +03:00
Hakan Seven
23d9a261b1 chore(release): v0.7.5 2026-07-04 20:18:47 +03:00
Hakan Seven
e515fa3156 feat(spline): draw fit-point splines via Catmull-Rom interpolation
A spline stored by fit points (DWG R2013+ scenario 2) has no control points
or knots, so the renderer — which built its curve from control points —
produced nothing and the spline was invisible. When a spline has fewer than
two control points but at least two fit points, interpolate a smooth
Catmull-Rom curve through the fit points and emit it as a dense polyline.
Open ends use reflected phantom points; closed/periodic splines wrap.

Pairs with the acadrust bump (e8e422a) that decodes the R2013+ fit-point
scenario correctly — together they make the fit-point spline in
Annotation-2D-Mesh-Solid-BIM.dwg render.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 19:52:56 +03:00
Hakan Seven
a8c368aef9 chore(deps): bump acadrust to 4f0599a (ENC transparency field-order + opacity fix)
Fixes entity transparency dropping to opaque on DWG read (e.g. the 85%
area-highlight solids in Clinic_Architectural.dwg). The ENC codec read/wrote
the transparency BL before the rgb BL (real order is rgb then transparency)
and stored the on-disk opacity byte without inverting to the internal
transparency-amount representation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:48:15 +03:00
Hakan Seven
c94e50a8e1 chore(deps): bump acadrust (AcDs pre-table blob pool — HVAC 2446/2446 vs reference)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 07:22:31 +03:00
Hakan Seven
a360da25fb chore(deps): bump acadrust to edfe3bd (AcDs record-table data-offset blob pairing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 07:00:24 +03:00
Hakan Seven
d6ad3100fe chore(deps): bump acadrust to f65a7e4 (AcDs record-table blob pairing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 05:49:45 +03:00
Hakan Seven
33f1150fad chore(release): v0.7.4 2026-07-04 01:46:33 +03:00
Hakan Seven
b3ead4f691 chore(deps): bump acadrust to 063da6f (AcDs SAB blob handle-pairing fix)
Fixes BIM 3D solids rendering at wrong positions — the AcDs SAB blob→solid
pairing now follows handle order instead of object-stream order, so every
solid gets its own geometry and body transform. Corrects the regression that
broke 3D solids in 0.7.3 (they were correct in 0.7.2) and places wall/floor
solids that previously piled near the origin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 01:42:31 +03:00
Hakan Seven
313a0eacfd chore(deps): bump acadrust to 6d5c47b (issue 225 — DWG opens in strict readers)
Pulls the acadrust fixes that make a saved DWG containing 3D solids open
cleanly in a strict conformance reader: the AcDsPrototype datastore section is
now built correctly (segment-header ds_version, datidx, and the handle-sorted
search index) so 3D solids keep their geometry instead of being dropped, and a
dim-style/block handle collision on read is repaired so layouts round-trip.
Validated end-to-end on two real 107- and 273-solid files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 21:17:04 +03:00
Hakan Seven
f4fffa1359 chore(release): v0.7.3
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:55:43 +03:00
Hakan Seven
f9b6834ad9 feat(export): exact ACIS geometry for planar solids on save
OCS models 3-D solids with truck, but extrude/boolean results carried no ACIS
body, so other CAD apps dropped them on open. Add an exact planar exporter and
run it at save time.

- scene::convert::acis_export::planar_solid_to_sat walks a truck Solid whose
  faces are all planes bounded by straight edges into a vertex/face-ring mesh
  and builds an exact ACIS body via acadrust's build_planar_body. Curved
  faces/edges return None (left for the NURBS path). A signed-volume check
  flips the winding if the shell comes out inside-out.
- OpenCADStudio::sync_truck_solids_to_acis fills in ACIS geometry for every
  cached truck solid that still has none, just before a Save / Save-As, so the
  written DWG/DXF carries real modeler geometry.
- Bump acadrust to 9142a50 (build_planar_body + classic-ACIS AcDs roundtrip fix).

Booleans (already cached as truck solids) now export exact geometry. Extruded
polygons will too once the EXTRUDE command caches its truck solid (a separate
change kept out of this commit because command_driver.rs holds unrelated
in-progress edits).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 15:43:37 +03:00
Hakan Seven
b5bee92335 chore(deps): bump acadrust to e06182f (AcDs 3DSOLID fix, issue 225)
Pulls the acadrust fix that links R2013+ 3DSOLID/REGION/BODY geometry to its
AcDs SAB blob (writes the has_ds_data flag, corrects the AcDsPrototype header,
and pairs blobs in object-stream order). DWG files saved with 3D solids now
reopen with their geometry intact in AutoCAD/BricsCAD instead of being dropped
as an empty data stream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 07:04:07 +03:00
Hakan Seven
1523eda00f feat(properties): fill solid-history + viewport clipped rows
Bump acadrust to ef0e231 (region/body history handle + viewport clip
boundary now stored) and populate the rows the builders left blank:

- Solid3D / Body "Show History": derived from the history handle's
  presence (there is no separate stored bool — the DWG carries only the
  H 350 history link).
- Body "History": the history handle, matching how Solid3D already shows
  it.
- Viewport "Clipped": Yes when the clip-boundary handle is non-NULL.

Hatch Origin X/Y and Boundary retention stay blank by design: they are
not part of the persisted AcDbHatch record in DWG or DXF (retention is a
BHATCH command setting), so there is nothing to read.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 00:17:58 +03:00
Hakan Seven
f50ad0dde4 feat(properties): fill placeholder rows from acadrust fields + doc lookups
Bump acadrust to a46cb8b (spline knot parameterization + mtext line-space
style now stored) and populate rows the builders left blank:

Entity-local: spline Knot Parameterization + closed-spline Area (shoelace),
mtext Line space style, hatch Spacing (pattern-line offset), leader Text
offset (annotation offset), region Area + Perimeter (wire-loop approx).

Doc-dependent (resolved in app/properties.rs where the document is
reachable): insert Block Unit + Unit factor (block record units vs
INSUNITS), underlay Name + Path (definition object), leader Text style /
vertical placement / overall scale and tolerance Text style (dimension
style), multileader Max points + segment angles (mleader style).

Rows needing an annotation-scale / sheet-set subsystem or an internal
PDF/DWF layer parser are intentionally left blank.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 00:05:58 +03:00
Hakan Seven
147255aa40 build(deps): bump acadrust to 486c0a9; handle the Helix entity
Pull in this session's acadrust work — the HELIX / ACAD_TABLE read+write,
underlay reader/writer/definition, spline tolerances & tangents, etc. The new
EntityType::Helix variant breaks three exhaustive matches; add its arm to
entity_type_name, the UI-name / DXF-name maps and entity_type_key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:28:37 +03:00
Hakan Seven
f9f7138370 feat(plugin): persist XDATA to DWG and let plugins modify/delete entities (#249, #250)
#249 — plugin XDATA written via write_record survived only in memory: the
acadrust DWG writer dropped ExtendedData::records on save. Bump acadrust to
e88a9a6 (records now encode to EED and decode back on read) and fix the host
side that fed it:
  - ensure_app_id allocates a real APPID handle; a null handle serializes as
    0 and the EED reference can't resolve, so the XDATA vanished on reopen.
  - write_record / remove_record drop stale raw_dwg_eed for the target app so
    an edit made after a save/reopen wins over the pre-edit bytes.

#250 — out-of-process plugins got a throwaway document_mut() snapshot, so
edits to existing entities were silently discarded and deletion wasn't
expressible at all. Add the missing mutation surface:
  - UpdateEntity / RemoveEntity IPC requests + HostApi::update_entity /
    remove_entity (default in-process impls, RPC overrides on the client that
    invalidate the stale document cache).
  - Scene::update_entity replaces the entity in place, preserving its handle
    and owning block, and reseeds only its derived caches; remove reuses the
    cache-coherent erase_entities (which also honours layer locks).
  - document_mut() is documented as a local-only snapshot out-of-process.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:39:26 +03:00
Hakan Seven
8a69ef9de3 chore(release): bump to 0.7.2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 01:02:40 +03:00
Hakan Seven
78670a2a27 fix(dwg): bump acadrust for R2013 save conformance (#182, #225)
Pull in acadrust 4ae2ceb, which fixes two R2013+ (AC1027) DWG writer
bugs that made OCS-saved files unreadable in AutoCAD/TrueView/BricsCAD:

- #182: R2013 header string stream was unlocatable because the file
  wrote maintenance_version 0 (omitting the R2010+ extra RL).
- #225: 3DSOLID/REGION/BODY omitted the R2013+ revision block, corrupting
  the entity stream and dropping 3D solids on load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 23:55:31 +03:00
Hakan Seven
ad5b71440f fix(dwg): bump acadrust to fix solid hatch missing (#46)
Pull in acadrust ad0471e, which corrects the entity ENC color decode
for book colors. R2007 files whose hatches carry a book color (e.g.
the santeen.dwg from issue 46) desynced on read, dropping all 270
SOLID hatch boundaries; they now load and render.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 23:02:07 +03:00
Hakan Seven
53a4882c7f chore(release): bump to 0.7.1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 19:17:42 +03:00
Hakan Seven
c71950fa7c fix(deps): bump acadrust for MOVE attribute/MultiLeader fix (#224)
Pulls the acadrust translate fix: MOVE now carries a block's attributes
and the whole MultiLeader (text/base/block-content anchors + break
points), not just the insert point / leader line. No OCS code change —
the transform path already calls translate and re-tessellates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:39:00 +03:00
Hakan Seven
0eb347bf47 feat(attedit): show attribute prompts in the editor
Each row in the attribute editor now shows the attribute's prompt — the
text defined on the block's ATTDEF — falling back to the tag when the
block defines no prompt. The prompt is read from the block definition,
since attribute instances carry only tag + value.

Bumps the acadrust pin to pull the matching reader fix: its DWG object
reader was discarding the ATTDEF prompt, so every prompt came back empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 08:23:54 +03:00
Hakan Seven
27896e3401 chore(deps): bump acadrust for AcDs SAB scan perf fix (#203)
Pulls the quadratic→linear AcDs blob-extraction fix in acadrust. 3D-heavy
DWGs (and master files that xref them) that took 28s+ to parse — minutes
for a multi-discipline set — now open in well under a second each.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 18:51:50 +03:00
Hakan Seven
da76918320 chore(release): bump to 0.7.0
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 16:48:15 +03:00
Hakan Seven
2ec3348740 chore(deps): bump acadrust 7e20fd1 — DXF dangling-ref cleanup
DWG→DXF conversion now drops references to objects that have no DXF form
(unsupported AEC/application objects dropped on conversion), so the output
opens clean instead of auditing 619 dangling handle references.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 11:01:20 +03:00
Hakan Seven
76ef544cda chore(release): bump to 0.6.9
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 01:48:04 +03:00
Karim Jerbi
3d23c45016 chore: disable printpdf default features (unused html deps)
printpdf's default = ["html"] pulled in azul-layout, rust-fontconfig,
kuchiki, xmlparser and their transitive trees (~40+ crates including
two with cdylib targets) — none of which are used by the project's
PDF export (only basic primitives like Mm, Line, Polygon, Rgb).

Also fixes a MinGW linker error (export ordinal too large: 100035)
triggered when ld.bfd tries to build a DLL for printpdf with >65535
exported symbols.
2026-06-29 01:06:28 +03:00
Hakan Seven
7c0d9d003a chore(deps): bump acadrust ffdd494 — R2018 MLEADER tail fix
R2018 cross-version saves now open in AutoCAD with NO recovery: the
MLEADER entity tail (block labels + dir/bottom/top attach order) is
correct, so all 3 MLEADERs are accepted — the Civil3D test file opens
clean (only the unconvertible AEC objects are dropped, as expected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 22:07:35 +03:00
Hakan Seven
c23b956861 feat(io): default DWG save to 2018; bump acadrust handle-counter fix
- Save As now defaults the version dropdown to DWG/DXF 2018 (latest)
  instead of the loaded file's version; the selected version is written
  as-is (removed the source-version fallback for version-locked data).
- Pin acadrust 55a2caa: allocate_handle respects header.handle_seed as a
  floor, fixing the corruption where opening a file and saving it
  silently overwrote existing XRECORD/DICTIONARY objects (handle reuse)
  and AutoCAD refused the result.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 20:31:30 +03:00
Hakan Seven
e04b580a70 chore(deps): bump acadrust to R2018 cross-version conformance fixes
Pins acadrust 0831995 (HakanSeven12/acadrust main): cross-version DWG
writer/reader conformance so R2004->R2018 saves open in AutoCAD for
LAYER, VPORT and ATTRIB objects (22/25 previously-discarded objects in
the Civil3D test file now open clean). MLEADER cross-version still WIP.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 19:26:06 +03:00
Hakan Seven
d1efa4ea7c feat(io): preserve source DWG version for files with version-locked data
Civil3D/AEC objects (and raw MLEADER/Surface records, EED) can only be
written losslessly in their source DWG version. On save, fall back to the
source version when the chosen version is an incompatible encoding family
(acadrust CadDocument::has_version_locked_data), with a command-line
notice, across every save path (Save, Save As, save-before-close/quit)
via a shared dwg_save_version helper. Default the Save-As format dropdown
to the loaded file's version so a round-trip preserves it.

Picks up acadrust DWG-writer conformance fixes (3dbae05) so a Civil3D
R2004 drawing round-trips through OCS and opens in AutoCAD with no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 02:46:13 +03:00
Hakan Seven
959dd66e93 fix(dimension): land DXF round-trip fixes (re-pin acadrust)
Re-pins acadrust to the dimension DXF round-trip fixes (rotation/text/oblique
degree<->radian units, radial/angular/ordinate group codes, ordinate X/Y bit)
and drops the OCS-side fix_dxf_dimension_rotations dimension arm, which now
lives in the acadrust DXF reader (keeping it here would double-convert).

Completes the dimension audit (Batch 5). Refs #181.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:15:14 +03:00
Hakan Seven
4116b85af0 chore(release): bump to 0.6.8
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 12:23:51 +03:00
Hakan Seven
f40144deac deps: bump acadrust to latest main (7c0c12fe)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 18:06:14 +03:00
Hakan Seven
da9562466d deps: bump acadrust to LWPOLYLINE BD/3BD parse fix
Picks up acadrust 2a59d3e, which reads/writes LWPOLYLINE thickness and
extrusion as BD / 3BD instead of BT / BE. Without it, polylines carrying
a thickness or extrusion flag parsed with a garbage normal and point
count and were dropped by the corrupt-entity guard on open — e.g. ~1600
valid polylines in the PLN_Sev block of a route drawing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 16:47:31 +03:00
Hakan Seven
eaf72254e7 chore(release): v0.6.7
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 07:33:41 +03:00
Hakan Seven
0efa559bd6 chore(deps): bump acadrust 0.3.4 → 0.4
Tracks acadrust main at 0.4.x: plotstyle/material common-entity
ordering fix plus in-flight DWG reader work. Patch comment updated
to match; drop the git patch once these land in a published 0.4 crate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 07:00:36 +03:00
Karim Jerbi
627761b629 fix(text): render TTF glyphs as solid fills, fix font fallback, correct Z-order
Text elements previously rendered as hollow wireframe outlines and sometimes
fell back to the wrong system font due to case-sensitive exact matching. Also,
the viewport background grid drew on top of solid entities.

Case-insensitive and partial-name fallback matching (e.g., mapping "arialn"
to "Arial Narrow") is now added to `sysfont::canonical_family_name`, ensuring
text resolves to the correct installed system font.

TrueType font contours are now triangulated into solid fills (`fill_tris`)
using `lyon_tessellation` in `ttf_glyph.rs`. To prevent the GPU from misclassifying
this 2D text as a 3D mesh (which broke flat shading), text tessellation splits
the output into separate outline and fill `WireModel`s.

The background grid is extracted from `SelectionCanvas` into `GridCanvas` and
moved beneath the 3D viewport to ensure proper layering. Finally, `DepthBiasState`
is enabled on all face/fill pipelines to apply a polygon offset, perfectly
resolving Z-fighting between coplanar wireframe lines and solid faces.
2026-06-25 18:17:01 +01:00
Hakan Seven
57153254bc build(deps): bump acadrust for the SORTENTSTABLE draw-order fix (#146)
Pull in acadrust 16332e5, which reads/writes the DWG SORTENTSTABLE in the
correct stream layout (sort handles inline in the data section; owner block
+ entity handles in the handle stream). Draw order set in other CAD apps —
e.g. a line sent behind a hatch — is now honoured instead of falling back to
handle order.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 15:04:53 +03:00