Commit Graph
1989 Commits
Author SHA1 Message Date
Hakan SevenandClaude Sonnet 4.6 f80d694818 feat: DATAEXTRACTION — export entity data to CSV
- DATAEXTRACTION / EATTEXT / ATTEXT commands trigger an async save dialog
- Extracts all model-space entities with: Type, Handle, Layer, Color,
  Linetype, and a geometry summary per entity type (coords, radius, etc.)
- DataExtractionSave / DataExtractionSaveResult message pair drives
  the rfd save-file dialog asynchronously
- CSV fields are properly escaped (commas, quotes, newlines)
- ROADMAP.md: 12 DATAEXTRACTION marked ✅

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:07:58 +03:00
Hakan SevenandClaude Sonnet 4.6 b15be3af3d feat: WBLOCK — write block or selected entities to external file
- src/modules/insert/wblock.rs: extract_block_to_doc() copies a named
  block's entities into a fresh CadDocument; extract_entities_to_doc()
  does the same for a selection set; layer definitions are carried over
- WBLOCK <name> writes the named block; WBLOCK * writes selected entities
- WblockSave / WblockSaveResult messages drive the async save-dialog flow
- ROADMAP.md: 1.10 WBLOCK marked ✅

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:05:04 +03:00
Hakan SevenandClaude Sonnet 4.6 64837e9aed feat: XREF management — auto-resolve, XATTACH, XREF, XRELOAD
- src/io/xref.rs: resolve_xrefs() scans block_records for is_xref flags,
  resolves paths relative to the opened file's directory, loads the
  referenced DWG/DXF and merges model-space entities into the xref block
- src/modules/insert/xattach.rs: XATTACH command with file-picker flow
  (XAttachPick/XAttachPickResult messages), prepare_xref_block() creates
  BlockRecord + Block entities and immediately resolves content
- XREF command: lists all external references in the drawing
- XRELOAD command: re-resolves all xref paths and rebuilds scene caches
- Auto-resolve on FileOpened: reports Loaded/NotFound per xref block
- CadCommand trait: added optional xattach_path() method
- ROADMAP.md: 1.9 XREF management marked ✅

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:02:38 +03:00
Hakan SevenandClaude Sonnet 4.6 4c1c13cab6 feat: Grid snap adaptive spacing + Polar tracking improvements
Grid snap (F9):
  • snap spacing now tracks the visible grid zoom level — computed via
    compute_grid_step() (same adaptive pow-of-5 logic as draw_grid),
    updated on every ViewportMove so zooming in/out keeps snap aligned
    with the grid lines on screen

Polar tracking (F10):
  • configurable angle increment stored in polar_increment_deg (default 45°)
  • right-click the POLAR pill to cycle through 15 → 30 → 45 → 90°
  • pill label shows current angle ("POLAR 45°")
  • visual guide line: while drawing with polar on, a dashed cyan line is
    drawn from last_point along the snapped direction across the viewport
  • SetPolarAngle message + handler; all polar_constrain() calls use the
    stored increment instead of the hardcoded 45°

ROADMAP updated: Grid snap and Polar tracking marked ✅.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 19:30:25 +03:00
Hakan SevenandClaude Sonnet 4.6 b3dcbe6eb9 chore: remove unused imports and variables (zero warnings)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 19:20:24 +03:00
Hakan SevenandClaude Sonnet 4.6 a99115bda5 feat: Solid3D (3DSOLID) ACIS tessellation
Parse SAT geometry directly into GPU MeshModel without going through
the truck B-rep pipeline:
  • plane-surface faces  → fan-triangulate the coedge-loop polygon
  • cone-surface faces   → parametric grid (handles cylinders and cones)
  • sphere-surface faces → UV sphere grid (GRID_U × GRID_V)
  • torus-surface faces  → UV torus grid

Scene integration:
  • add_entity(): tessellates Solid3D on insert, stores in scene.meshes
  • erase_entities(): removes mesh from scene.meshes on delete
  • populate_meshes_from_document(): rebuilds all meshes on file load
    and undo/redo (called alongside populate_hatches/images)

ROADMAP updated: Solid3D tessellation marked ✅ in sections 2.12, 14.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 19:11:24 +03:00
Hakan SevenandClaude Sonnet 4.6 5a682a365a feat: EXTEND and LENGTHEN now support LwPolyline
Both commands detect which terminal segment/vertex is nearest to the
pick point, compute the new endpoint along the segment direction, and
move only that terminal vertex — preserving all other vertices and bulge
values intact.  ROADMAP updated: EXTEND and LENGTHEN marked ✅.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:05:44 +03:00
Hakan SevenandClaude Sonnet 4.6 083eb5cbb5 feat: Spline support for TRIM, EXTEND, OFFSET, BREAK, and LENGTHEN
Add shared spline_ops module with:
- spline_to_bspline / bspline_to_spline: acadrust ↔ truck BSplineCurve conversion
- spline_sample_xy: sample DXF-XY projection at N+1 points with parameters
- spline_nearest_t: nearest-parameter search via coarse+bisection
- spline_pts_wire: world-space wire points for WireModel preview

TRIM: Spline entities can now be used as cutting boundaries (Geo::Spline
sampled into polyline segments) and as entities being trimmed; uses
BSplineCurve::cut() to produce surviving pieces.

EXTEND: extend_spline() shoots a tangent ray from the nearest endpoint
and appends a control point at the first boundary hit.

OFFSET: offset_spline() offsets each sample point along the local
perpendicular normal and rebuilds a new spline from the offset control pts.

BREAK: break_spline() uses spline_nearest_t() + BSplineCurve::cut() to
split the spline at one or two click points.

LENGTHEN: lengthen_spline() uses numerical arc-length integration +
bisection to cut the spline at the parameter corresponding to the new
requested length.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:00:22 +03:00
Hakan Seven 71667cfafe cleanup 2026-04-07 14:43:25 +03:00
Hakan SevenandClaude Sonnet 4.6 2c71ad5aeb feat: FILLET now supports LwPolyline segments and corner filleting
- Add LwPolyline helper functions: nearest-segment finder, segment-to-line
  extractor, corner vertex replacer, segment shortener, bulge calculator
- Add FilletEntity::LwPoly variant carrying poly, handle, and segment index
- compute_fillet_entities handles all new combinations: LwPoly×LwPoly
  (same entity corner fillet with bulge encoding), LwPoly×LwPoly (different
  entities), LwPoly×Line, LwPoly×Arc and their symmetric counterparts
- on_entity_pick detects LwPolyline picks and allows same-entity re-pick for
  adjacent-segment corner filleting
- on_hover_entity preview updated to show LwPolyline wire geometry
- entity_pts extended to cover LwPolyline for preview rendering
- Update prompts to mention LwPolyline as a supported entity type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 14:42:49 +03:00
Hakan SevenandClaude Sonnet 4.6 7a07ef8710 feat: EXPLODE now supports Dimension entities
Decomposes Dimension (Linear, Aligned, Radius, Diameter, Angular2Ln,
Angular3Pt, Ordinate) into constituent Lines (extension lines, dimension
line) plus a Text entity for the dimension label value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:29:39 +03:00
Hakan SevenandClaude Sonnet 4.6 d3d4ec4a08 feat: STRETCH with proper crossing-window vertex selection
Replaced the simplified MOVE-based STRETCH with a real crossing-window
implementation. Workflow: pick two crossing-window corners, then base+target
points. Only vertices/endpoints inside the window are translated:
- Line: moves start/end independently
- LwPolyline/Polyline: moves individual vertices inside window
- Arc/Circle/Ellipse: moves whole entity if center is inside
- Insert/Text/MText: moves if insertion point is inside

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:25:39 +03:00
Hakan SevenandClaude Sonnet 4.6 1ef7bb5131 docs: update ROADMAP priorities — mark completed roadmap items
Mark as done: Named Views, DDEDIT, HATCHEDIT, MASSPROP, FILLET Arc support.
Update priority list to reflect remaining work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:09:06 +03:00
Hakan SevenandClaude Sonnet 4.6 f6d716dfc5 feat: HATCHEDIT command to edit existing hatch pattern, scale, and angle
Add HATCHEDIT (HE alias) command. Works on pre-selected hatch or via
entity pick. Accepts text options: P <pattern>, S <scale>, A <angle>.
Enter applies changes; rebuilds hatch entity and GPU model via add_hatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:08:51 +03:00
Hakan SevenandClaude Sonnet 4.6 8078c4c9da feat: DDEDIT command and double-click text editing
Add DDEDIT (ED alias) command that edits Text/MText/Attribute entities
in-place via the command line. Double-clicking a text entity in model space
now auto-launches DDEDIT for that entity. Supports Text, MText,
AttributeDefinition, and AttributeEntity types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:05:24 +03:00
Hakan SevenandClaude Sonnet 4.6 25ec6f66e5 feat: add MASSPROP command — area, perimeter, centroid of selected entities
Computes mass properties for selected entities and prints results to the
command line. Supports: Circle (area+perimeter), Arc (sector area+arc length),
Line (length), LwPolyline (shoelace area+perimeter+centroid), Ellipse
(numerical 256-pt integration for area and arc length).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:00:18 +03:00
Hakan SevenandClaude Sonnet 4.6 cfb27d93c3 feat: FILLET now supports Line-Arc, Arc-Line, and Arc-Arc pairs
Extended FilletCommand and ChamferCommand to accept Lines and Arcs as
first/second entity. Added fillet_line_arc() and fillet_arc_arc()
geometry functions that find a tangent fillet circle between the two
entities, trim each to the tangent point, and insert the fillet arc.
r=0 case trims/extends to the nearest intersection without inserting an arc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:58:46 +03:00
Hakan SevenandClaude Sonnet 4.6 8e484d55cf docs: update ROADMAP to reflect completed session work
Mark as completed: ARRAY Path, BREAK/TRIM/EXTEND/OFFSET/LENGTHEN Ellipse
support, EXPLODE MLine, command history navigation (↑↓), RECTANG/POLYGON
command aliases. Update priority list accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:54:43 +03:00
Hakan SevenandClaude Sonnet 4.6 44af4278f2 feat: EXPLODE MLine support and accurate header documentation
- Add explode_mline() that decomposes each MLine segment into its
  spine Line plus two ±scale/2 offset Lines using per-vertex miter
  directions, matching the visual representation of MLine entities
- Update file header to document all actually-supported entity types
  (LwPolyline, Polyline2D/3D, Polyline, Insert, MLine)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:52:05 +03:00
Hakan SevenandClaude Sonnet 4.6 b425c9e790 feat: LENGTHEN support for Ellipse entities
Add lengthen_ellipse() that approximates the arc length via 128-point
numerical integration, then bisects to find the new angular span matching
the requested delta/total/percent, and adjusts the nearer endpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:50:52 +03:00
Hakan SevenandClaude Sonnet 4.6 eca4c96569 feat: OFFSET support for Ellipse entities
Add offset_ellipse() that scales both semi-axes uniformly by the offset
distance (inside vs outside determined by projecting side_pt onto the
ellipse local frame).  This is the standard CAD approximation; a true
offset of an ellipse is a higher-order Lamé curve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:49:57 +03:00
Hakan SevenandClaude Sonnet 4.6 519b305f0e feat: BREAK support for Ellipse entities
Add break_ellipse() that projects the two break points onto the ellipse
parameter space (eccentric anomaly) and removes the CCW segment between
them, producing a partial Ellipse entity — matching AutoCAD break behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:48:40 +03:00
Hakan SevenandClaude Sonnet 4.6 09a6cc3521 feat: TRIM and EXTEND support for Ellipse entities
- Add Ellipse variant to the Geo boundary enum
- Implement algebraic line-ellipse intersection (le()) for fast boundary checks
- Add ellipse_seg_ts() using bisection for all boundary types including
  Arc/Circle/Ellipse boundaries (64-sample sign-change + 32-step bisection)
- Add trim_ellipse() producing partial Ellipse entities with updated parameters
- Add extend_ellipse() to stretch an ellipse arc to the nearest boundary
- Wire Ellipse into TrimCommand and ExtendCommand: on_entity_pick,
  on_entity_replaced, and on_hover_entity (live red/cyan preview)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:47:32 +03:00
Hakan SevenandClaude Sonnet 4.6 80ca095121 feat: command history navigation with up/down arrow keys
CommandLine now records every submitted command in a recall list (up to
50 entries).  Pressing ↑ in the command input walks back through the
list, ↓ moves forward, and returning to the newest position restores
the draft text the user had typed before navigating.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:04:12 +03:00
Hakan SevenandClaude Sonnet 4.6 0868a1719c feat: add RECTANG/REC and POLYGON/POL command aliases
Standard AutoCAD aliases now dispatch to the existing RECT and POLY
commands respectively, so users familiar with AutoCAD naming find
them without modification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:02:35 +03:00
Hakan SevenandClaude Sonnet 4.6 c184535d5e fix: render wipeout fills after wire pass so they correctly mask wires
Previously wipeout solid fills were part of the hatch pass (pass 1),
drawn before wires (pass 5), so all wires appeared on top of the
wipeout. This fix moves wipeout fills into a dedicated pass 6 that
runs after wires, so the background-colored polygon correctly covers
the lines/text beneath it — matching AutoCAD behaviour.

- Scene.wipeout_models() separated from synced_hatch_models()
- Primitive.wipeout_hatches populated via wipeout_models()
- Pipeline.gpu_wipeouts + upload_wipeouts() + pass 6 after wires

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:44:36 +03:00
Hakan SevenandClaude Sonnet 4.6 efc259fdbe feat: per-viewport layer freeze columns in Layer Manager
Add VP freeze/thaw toggle columns to the layer panel when in a paper
space layout. Each viewport gets its own column (VP 1, VP 2, …) showing
a freeze icon per layer. Clicking toggles frozen_layers on the Viewport
entity and syncs back to the panel.

- scene: viewport_list() → [(handle, label, frozen_handles)]
- LayerPanel: VpCol + vp_frozen per layer, sync_with_viewports()
- Message::LayerToggleVpFreeze(layer_idx, vp_col_idx)
- Sync VP columns on layout switch, VPLAYER cmd, undo/redo, layer ops

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:41:39 +03:00
Hakan SevenandClaude Sonnet 4.6 c2f1c9078f fix: use file_path as GPU texture debug label to eliminate dead_code warning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:35:13 +03:00
Hakan SevenandClaude Sonnet 4.6 5d0edb3a1f fix: Wipeout fill color respects BACKGROUND command override
Scene now carries bg_color / paper_bg_color fields (defaults match
previous hard-coded values). synced_hatch_models() reads these instead
of hard-coded constants, so Wipeout fills correctly use the custom
background when BACKGROUND <r> <g> <b> has been set.
BACKGROUND command syncs both DocumentTab.bg_color and scene.bg_color.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:32:11 +03:00
Hakan SevenandClaude Sonnet 4.6 cc314e75fc feat: Shape entity support (render + grips + props + transform)
- src/entities/shape.rs: diamond marker at insertion point (SHX glyphs
  cannot be rendered without the binary .shx file, so a placeholder is used)
- Grips: single insertion-point grip
- Properties: Name, Style (read-only), Insert X/Y/Z, Size, Rotation
- Transformable: translate, mirror, scale, rotate
- Registered in entities/mod.rs, entities/traits.rs, app/commands.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:30:27 +03:00
Hakan SevenandClaude Sonnet 4.6 f470f6ebe2 chore: exclude ROADMAP.md from version control
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:28:04 +03:00
Hakan SevenandClaude Sonnet 4.6 b3afefc345 docs: ROADMAP §5.2 GDT, §5.3 IMAGE, §2.3 background marked complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:27:05 +03:00
Hakan SevenandClaude Sonnet 4.6 41a5d98b33 feat: per-viewport background color (BACKGROUND command)
- DocumentTab: bg_color / paper_bg_color Optional<[f32;4]> fields
- view.rs: use custom color when set, fall back to defaults
- BACKGROUND <r> <g> <b>: set model or paper-space background (0–255 RGB)
- BACKGROUND RESET: restore default dark grey / paper grey

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:26:26 +03:00
Hakan SevenandClaude Sonnet 4.6 4782c3bd96 feat: ImageDefinition object auto-created on RasterImage placement
When add_entity receives a RasterImage without a definition_handle,
create an ImageDefinition object in document.objects and link it.
This ensures DWG/DXF files save the IMAGEDEF section correctly so
other CAD programs can resolve image paths on reload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:24:20 +03:00
Hakan SevenandClaude Sonnet 4.6 8404f22292 feat: Tolerance GD&T feature control frame render
Replace raw text dump with proper boxed feature-control frame:
- parse_gdt_rows(): splits %%v cells and ^J row separators
- substitute_gdt_codes(): strips {\Fgdt;X} patterns, maps symbol chars
  to 3-letter ASCII labels (POS, PRP, PAR, SYM, CIR, CYL, …)
- tessellate_tolerance(): outer rectangle, row separators, column
  dividers, and CXF-tessellated cell text — all as Vec<Vec<[f32;2]>>
  (TruckObject::Text polyline path)
- Column widths computed per cell content; text centred in each cell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:23:06 +03:00
Hakan SevenandClaude Sonnet 4.6 4312b6c3a5 feat: raster image render pipeline (IMAGE command + GPU textured quad)
- Add IMAGE / IMAGEATTACH / IM command with async file-picker (rfd)
- src/scene/image_model.rs: ImageModel with RGBA pixel data + quad corners
- src/scene/pipeline/image_gpu.rs: ImageGpu with wgpu texture, sampler, opacity uniform
- src/scene/pipeline/mod.rs: image render pipeline (pass 2, between hatches and meshes)
- src/scene/render.rs: include images in Primitive, call upload_images in prepare
- src/scene/mod.rs: images HashMap, populate_images_from_document, cache on add_entity
- src/modules/home/draw/raster_image.rs: ImageCommand (two-click: origin + width, aspect-correct preview)
- src/io/mod.rs: pick_image_file() async helper (file dialog + dimension decode)
- app: ImagePick / ImagePickResult messages, populate on file open and undo/redo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:19:08 +03:00
Hakan SevenandClaude Sonnet 4.6 3d1f355a5c feat: TextStyle font browser (STYLE DIALOG command)
- STYLE DIALOG / TEXTSTYLE DIALOG opens the Text Style Font Browser
- Three-panel dialog: style list | built-in CXF font list | properties
- Properties panel: font file text field, width factor, oblique angle
- Apply button commits edits; Set Current sets the active text style
- Built-in font picker (20 CXF fonts from assets/fonts/) auto-applies
  font to the selected style on click
- Preview pane shows "AaBbCc 0123" sample text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 15:01:25 +03:00
Hakan SevenandClaude Sonnet 4.6 552ab7eb6a feat: TableStyle manager (TABLESTYLE command + dialog)
- TABLESTYLE/TS command: LIST, NEW subcommands for managing table styles
- Table Style Manager dialog: style list with details panel showing
  name, margins, suppression flags, and row styles (data/header/title)
  with text style, height, and alignment per row type
- New / Delete buttons in the dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:57:11 +03:00
Hakan SevenandClaude Sonnet 4.6 34076b26bb feat: MLineStyle manager (MLSTYLE command + dialog)
- MLSTYLE command: LIST, NEW, SET, DEL subcommands
- Multiline Style Manager dialog: style list, element details (offset,
  color, linetype), Set Current / New / Delete buttons
- MLINE/ML command now reads document header.multiline_style to apply
  the current style to newly created MLine entities
- MlineCommand.with_style() constructor for style-aware multiline drawing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:54:05 +03:00
Hakan SevenandClaude Sonnet 4.6 7e6de57c8d feat: Wipeout solid fill masking
Wipeout entities now render a background-colored solid fill polygon
(via the hatch GPU pipeline) that masks other hatch fills beneath them.
Fills use model space background (0.11 grey) or paper space background
(0.22/0.24/0.28). Polygon and rectangular clip boundaries both supported.
Selected wipeouts use a translucent blue highlight instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:46:47 +03:00
Hakan SevenandClaude Sonnet 4.6 6f19b4fd81 feat: add Underlay entity support (PDF/DWF/DGN)
- New src/entities/underlay.rs: TruckConvertible (clip boundary polygon
  or cross marker), Grippable (insertion + boundary vertex grips),
  PropertyEditable (position, scale, rotation, contrast, fade, flags),
  Transformable (translate, mirror, scale, rotate)
- Wire EntityType::Underlay into all four match arms in traits.rs
- UNDERLAY command: FADE/CONTRAST/ON/OFF/CLIP ON|OFF/MONO ON|OFF
  subcommands to edit selected underlay entities
- Entity type name map entry for UNDERLAY

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:43:44 +03:00
Hakan SevenandClaude Sonnet 4.6 1db3ad6a33 Feat: implement CTB/STB plot style table with PDF export integration
- src/io/plot_style.rs: PlotStyleTable and PlotStyleEntry data structures;
  CTB reader (deflate/zlib decompressed text format) with ACI→RGB and
  ACI→lineweight lookup; CTB writer (zlib compressed); LW_TABLE constant
- src/io/pdf_export.rs: accept optional PlotStyleTable; apply ACI color
  and lineweight overrides during PDF rendering
- src/scene/wire_model.rs: add `aci: u8` field to carry ACI index
- src/scene/render.rs: render_style() now returns ACI alongside RGBA
- src/scene/mod.rs + tessellate.rs: propagate aci through wire building
- app: PlotStyleLoad/Loaded/Clear messages and handlers;
  PLOTSTYLE LOAD | CLEAR | STATUS command; active_plot_style state on H7CAD
- flate2 added as dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:37:23 +03:00
Hakan SevenandClaude Sonnet 4.6 911e36ba04 Feat: add Dimension Style Manager dialog (DIMSTYLE/DDIM)
- Add DimStyleDialogOpen/Close/Apply/Select/Tab/New/SetCurrent/Delete
  messages and DsEdit/DsToggle with DsField enum for fine-grained edits
- Store active dialog state (selected style, current tab, edit buffers)
  directly on H7CAD for all 28 most-used DimStyle properties
- dimstyle_overlay: 5-tab modal panel (Lines, Arrows, Text,
  Scale/Units, Tolerances) with style list, Apply and Close buttons
- DIMSTYLE / DDIM with no sub-command now opens the dialog;
  DIMSTYLE LIST / NEW / SET sub-commands remain available

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:25:13 +03:00
Hakan SevenandClaude Sonnet 4.6 20629d587a Feat: implement WCS↔UCS coordinate transform pipeline
- Add `active_ucs: Option<Ucs>` per-tab state to DocumentTab
- Add `ucs_to_wcs`, `wcs_to_ucs`, `ucs_z_axis`, `ucs_rotated_z` helpers
- Add `Camera::pick_on_plane` for ray–plane intersection against any plane
- Mouse picks project onto the active UCS XY plane instead of world XY
- Typed coordinates are converted from UCS space to WCS before dispatch
- UCS command now really activates/deactivates a UCS:
  - `UCS W` resets to WCS (clears active_ucs)
  - `UCS <name>` activates a named UCS
  - `UCS SAVE <name>` saves the current active UCS
  - `UCS ORIGIN x,y,z` shifts origin (in current UCS space)
  - `UCS X/Y/Z <angle>` rotates the UCS around its own axes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 14:16:06 +03:00
Hakan Seven 98578cc5c0 Chore: bump version to 0.1.3 v0.1.3 2026-04-03 22:03:26 +03:00
Hakan Seven 3b9cbd90a1 Remove ROADMAP.md from tracking (was in .gitignore) 2026-04-03 21:56:18 +03:00
Hakan SevenandClaude Sonnet 4.6 b6c2b1130e Fix: guard UCS icon drawing against zero-size viewport and non-finite projections
Before layout completes the viewport bounds are 0×0, causing project_point3
to produce NaN/Inf coordinates which panicked in lyon_path assertions.
Added early-return when bounds < 10px, and finite checks on all projected
and derived coordinates before calling any canvas drawing functions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 21:53:19 +03:00
Hakan Seven 6f62a6eb6f acadrust update 2026-04-03 21:52:00 +03:00
Hakan SevenandClaude Sonnet 4.6 39346146c7 Docs: mark completed ROADMAP items — dim grips, hatch grips, solid entity, UCS icon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 19:26:39 +03:00
Hakan SevenandClaude Sonnet 4.6 6a4813ce42 Feat: UCS icon — animated XYZ axis tripod in viewport bottom-left corner
Screen-space UCS icon drawn on the existing selection canvas overlay.
Axes are projected from world space so the icon rotates with the camera,
always showing the correct X/Y/Z orientation relative to the drawing plane.
Each axis has its canonical color (X=red, Y=green, Z=blue) with arrowheads.
Icon visibility controlled by show_ucs_icon flag (default on); toggled by
UCSICON ON/OFF command which also updates paper-space viewport entities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 19:25:55 +03:00