Commit Graph
100 Commits
Author SHA1 Message Date
Hakan SevenandClaude Sonnet 4.6 f470f6ebe2 chore: exclude ROADMAP.md from version control
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2026-04-06 14:16:06 +03:00
Hakan Seven 98578cc5c0 Chore: bump version to 0.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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2026-04-03 19:25:55 +03:00
Hakan SevenandClaude Sonnet 4.6 e38aa6b611 Feat: Solid entity (2D) — render, grips, properties, transform
TruckConvertible renders the 4 perimeter edges as wireframe outline.
The scene injects a solid-fill HatchModel for the filled quad using the
existing hatch GPU pipeline (DXF Z-order: p0→p1→p3→p2).
Grippable provides 4 square corner grips; grip moves rebuild the fill model.
PropertyEditable exposes all 4 corners and thickness. Transformable handles
move/rotate/scale/mirror via the standard entity transform path.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 19:22:10 +03:00
Hakan SevenandClaude Sonnet 4.6 749f3b99dc Feat: hatch boundary grip editing — all edge types supported
Polyline, Line, CircularArc, EllipticArc, and Spline boundary edges
all get diamond grips at their control vertices. Dragging a grip updates
the underlying DXF boundary vertex and immediately rebuilds the GPU
hatch model via Scene::apply_grip.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 19:16:17 +03:00
Hakan SevenandClaude Sonnet 4.6 36d51286d4 Feat: dimension grip editing — all dimension types get stretch grips
Linear/Aligned: first point, second point, definition point, text position
Radius/Diameter: center (angle_vertex), radius point, text position
Angular2Ln/Angular3Pt: vertex, two extension points, arc def point, text
Ordinate: origin, feature location, leader endpoint, text position
Text position grip shared across all types; measurement recalculated after edit.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 19:11:21 +03:00
Hakan SevenandClaude Sonnet 4.6 0aef1fc12f Feat: ROADMAP Phase 1-5 batch — trim/extend, plot scale, viewport UX, mline caps, table alignment
- TRIM/EXTEND: Ray and XLine entities supported as cutting boundaries and trim targets;
  trim results in Ray→Line/Ray, XLine→Ray/Ray or Line; hover preview added
- Plot scale override: Fit/1:1/1:2/1:5/1:10/1:20/1:50/1:100/2:1 buttons added to Page Setup
  panel; PageSetupCommit applies scale to PlotSettings
- Viewport UX: locked viewport gets orange border; selected viewport gets white border
- Named view → viewport assignment: Choice dropdown in properties panel copies
  view_target/direction/height to the viewport entity
- MLine caps: perpendicular start/end cap lines added for open (non-closed) MLines
- Wipeout polygon grips: boundary vertices become editable grips when clipping_enabled+Polygonal;
  world→pixel back-projection on drag
- Table cell alignment: CellStyle.alignment (1-9) drives left/center/right + top/middle/bottom
  text positioning; cxf::measure_text() helper added
- New commands/features: DIMCONTINUE (DCO), DIMBASELINE (DBA), TOLERANCE (TOL), TABLE,
  ATTDEF, ATTEDIT, ATTDISP, BREAKATPOINT (BAP), PLOTWINDOW (PW), MLINE (ML);
  DIMSTYLE/DIMCURRENT/CLAYER/LTSCALE/CELTSCALE/SCALETEXT/XDATA/UCSICON/REGEN/DRAWORDER extended
- PLINE arc mode: A/L/CLOSE text input, bulge computation, arc preview
- Warning cleanup: removed unused imports and unreachable patterns

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 15:31:05 +03:00
Hakan SevenandClaude Sonnet 4.6 27b5e124c7 Feat: enhanced LIST command with entity-specific geometry details
LIST (LI) now shows per-type details:
- Line: from/to coordinates + length
- Circle: center + radius + area
- Arc: center + radius + start/end angles
- LwPolyline: vertex count, closed flag, elevation
- Text/MText: content preview + height + insertion point
- Insert: block name + position + scale + rotation
- Spline: control point count + degree + closed flag
- Ellipse: center + major length + minor ratio

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:31:03 +03:00
Hakan SevenandClaude Sonnet 4.6 77327bf730 Feat: DIMALIGNED (DAL) and DIMDIAMETER (DDI) dimension commands
DIMALIGNED: 3-click flow (p1 → p2 → dim line position) → DimensionAligned.
Rubber-band preview shows extension lines and dim line offset.

DIMDIAMETER: 3-click flow (center → arc point → text position) → DimensionDiameter.
Previews the diameter chord line.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:29:11 +03:00
Hakan SevenandClaude Sonnet 4.6 a9aedb4c7c Feat: PASTEORIG command — paste clipboard at original coordinates
Pastes clipboard entities without translating to a pick point.
Useful for pasting between drawings at exact original positions.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:27:21 +03:00
Hakan SevenandClaude Sonnet 4.6 426081e8be Feat: ZOOM ALL (ZA) and ZOOM SCALE (ZS) commands
ZOOM ALL (ZA)       — fit all entities (alias for ZOOM EXTENTS)
ZOOM SCALE <n> (ZS) — set zoom factor (1/n multiplied to camera distance)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:26:15 +03:00
Hakan SevenandClaude Sonnet 4.6 7fea8bce53 Feat: LAYISO, LAYUNISO, FLATTEN, QSELECT utility commands
LAYISO    — turn off all layers except selected entities' layers
LAYUNISO  — restore all layers (turn-on all, mirrors LAYON)
FLATTEN   — move selected (or all) entities to Z=0; handles Line/Circle/Arc/
            LwPolyline/Text/MText/Insert/Point/Spline/Ellipse
QSELECT   — select entities by TYPE, LAYER, COLOR, or LINETYPE

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:25:39 +03:00
Hakan SevenandClaude Sonnet 4.6 0de21fd169 Feat: QSELECT command — quick-select entities by property
QSELECT TYPE <type>       — select all entities of given type (e.g. LINE, CIRCLE)
QSELECT LAYER <name>      — select all entities on the given layer
QSELECT COLOR <n|BYLAYER> — select all entities with given color index
QSELECT LINETYPE <name>   — select all entities with given linetype

Deselects current selection and replaces with matched entities.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:23:57 +03:00
Hakan SevenandClaude Sonnet 4.6 ec5022d725 Feat: COUNT command — entity statistics by type or layer
COUNT             — count all entities grouped by type
COUNT LAYER       — group by layer name
COUNT TYPE        — group by entity type (same as default)
COUNT <layername> — count entities on a specific layer by type

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:23:17 +03:00
Hakan SevenandClaude Sonnet 4.6 e8b749a8ac Feat: FIND / FINDALL — search and replace text in drawing entities
FIND <search>                    — list all Text/MText/Attribute containing search
FIND <search> REPLACE <rep>      — replace first occurrence
FINDALL <search> REPLACE <rep>   — replace all occurrences

Works on Text, MText, AttributeDefinition, AttributeEntity.
Case-insensitive search; replaces preserving case in replacement.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:22:27 +03:00
Hakan SevenandClaude Sonnet 4.6 330b8b58f4 Feat: PEDIT command (PE) — polyline edit (close/open/width)
Entity pick → text input subcommands:
  C / CLOSE  → set closed flag
  O / OPEN   → clear closed flag
  W <value>  → set uniform width on LwPolyline vertices
  X / EXIT   → cancel

Command stays active after each op (CmdResult::PeditOp) for multiple edits.
Supports LwPolyline and Polyline2D.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:19:36 +03:00
Hakan SevenandClaude Sonnet 4.6 05ccc80048 Feat: Phase 5.3 — MLINE command (ML) — create multiline entity
Pick vertices, Enter to finish (≥2 pts). Text input while picking:
  C / CLOSE  → close and commit (≥3 pts)
  S <value>  → set scale factor (default 1.0)
  S alone    → prompt for scale then continue

Uses acadrust MLine::from_points / closed_from_points + scale_factor field.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-03 09:17:45 +03:00
Hakan SevenandClaude Sonnet 4.6 e4a7970c3e Feat: Phase 4.4 — WIPEOUT command (WO)
Creates rectangular (2-corner pick) or polygonal (multi-pick, Enter to close)
wipeout masking entities. Uses acadrust Wipeout::from_corners / ::polygonal.

Options: WIPEOUT → rectangular; WIPEOUT P → polygonal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:54:07 +03:00
Hakan SevenandClaude Sonnet 4.6 1572d0c38f Feat: Phase 1.5 — viewport count in status bar + REVCLOUD command
Status bar: shows "N VP" pill (with tooltip) when in a paper layout that has
user viewports (id > 1). New Scene::viewport_count() method.

REVCLOUD: closed LwPolyline with arc bumps (bulge = 0.5) along each edge.
Click polygon corners, Enter to close into a revision cloud shape.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:52:35 +03:00
Hakan SevenandClaude Sonnet 4.6 c9719bacdf Feat: REVCLOUD command — revision cloud (arc-bumped closed polyline)
Pick polygon corners, Enter to close. Each edge is subdivided into arc
bumps (bulge = 0.5 ≈ 53° arcs). Result is a closed LwPolyline.
Arc bump length defaults to 1.0 drawing units.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:51:17 +03:00
Hakan SevenandClaude Sonnet 4.6 8fca75fade Feat: DONUT command (DO) — filled circular ring as LwPolyline
Creates LwPolyline with 2 vertices at (cx ± r_avg, cy), bulge=1.0,
start_width/end_width = (outer - inner) / 2, is_closed = true.

Workflow: inner diameter → outer diameter → click center points (Enter to exit).
Inner diameter 0 → filled solid circle.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:50:27 +03:00
Hakan SevenandClaude Sonnet 4.6 9a1eeab53d Feat: Phase 6.4 — Draw order render pipeline via SortEntitiesTable
wires_for_block() now looks up the SortEntitiesTable for the current block.
When found, wires are sorted by sort_handle.value() so DRAWORDER F/B results
are immediately visible in the viewport (not just written to DXF).

Entities not in the sort table default to u64::MAX/2 (middle of draw order).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:48:17 +03:00
Hakan SevenandClaude Sonnet 4.6 b27b612b5d Feat: ALIGN command (AL) — align objects using 1 or 2 point pairs
Workflow: select objects → 1st src/dst pair → 2nd src/dst pair (optional) → Enter.
- 1 pair: pure translation (src1 → dst1)
- 2 pairs: translate + rotate in XZ plane; optional uniform scale (Y/N prompt)

Transform applied as 3 sequential scene.transform_entities calls:
translate to origin → scale → rotate → translate to dst1.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:46:48 +03:00
Hakan SevenandClaude Sonnet 4.6 f6efe7a06a Feat: LENGTHEN command (LEN) — extend or trim Line/Arc
Options via text input after entity pick:
  DE <delta>   — extend by delta (negative trims)
  TO <total>   — set absolute total length / arc length
  P <percent>  — scale by percentage
  <number>     — plain number treated as DE delta

Closest end to pick point is modified. Uses CmdResult::LengthenEntity.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:45:06 +03:00
Hakan SevenandClaude Sonnet 4.6 ae0a4b12b5 Feat: DIVIDE and MEASURE commands — place points along entities
DIVIDE (DIV): entity pick → type N → places N-1 Point entities at equal spacing.
MEASURE (ME): entity pick → type distance → places points at fixed intervals.

Supported entities: Line, Arc, Circle, LwPolyline.
Uses CmdResult::DivideEntity / MeasureEntity with geometry computed in cmd_result.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:43:33 +03:00
Hakan SevenandClaude Sonnet 4.6 641cc2d70b Feat: JOIN command — merge collinear Lines or co-circular Arcs
Selection-gathering mode: select objects, press Enter to apply.
- Lines: checks collinearity + no-gap, merges into single line span
- Arcs: checks same center/radius + contiguous angles, merges to Arc or Circle
- Uses CmdResult::JoinEntities; geometry computed in cmd_result from document

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:41:53 +03:00
Hakan SevenandClaude Sonnet 4.6 4b8ae08a19 Feat: BREAK command (BR) — split Line/Arc/Circle/LwPolyline at two points
3-step interactive flow:
  1. Entity pick (first break point recorded at click location)
  2. Optional first point refinement
  3. Second break point → CmdResult::BreakEntity applied in cmd_result

Geometry:
- Line: project p1/p2 onto line parameter space → two line fragments
- Arc:  project p1/p2 to arc angles → trim CCW from p1 to p2
- Circle: same as Arc, converts Circle → Arc
- LwPolyline: nearest-vertex split → two polyline fragments

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:39:51 +03:00
Hakan SevenandClaude Sonnet 4.6 a3bb2714c1 Feat: DIST / ID / AREA inquiry commands
Add three classic CAD measurement commands:
- DIST (DI): two-point pick → distance, angle, delta XYZ
- ID: one-point pick → coordinates
- AREA: multi-point polygon pick (Enter to close) → area + perimeter

New CmdResult::Measurement(String) variant ends active command and
prints result to command line without modifying the document.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:36:53 +03:00
Hakan SevenandClaude Sonnet 4.6 db66982098 Fix: update HELP text — accurate command list, fix dim command names
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:31:36 +03:00
Hakan SevenandClaude Sonnet 4.6 bf5d083453 Feat: SELECTALL, DESELECT, LIST commands for entity selection and info
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:30:36 +03:00
Hakan SevenandClaude Sonnet 4.6 582c7c09f9 Feat: CHPROP command — change layer/color/linetype/ltscale on selected entities
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:29:24 +03:00
Hakan SevenandClaude Sonnet 4.6 70a8f5bf3f Feat: ZOOM IN/OUT/WINDOW commands; ZoomToWindow CmdResult
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:28:00 +03:00
Hakan SevenandClaude Sonnet 4.6 6f5c58612d Feat: RENAME command — rename layers, text styles, dim styles, linetypes, UCS, views
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:24:13 +03:00
Hakan SevenandClaude Sonnet 4.6 375a910e4a Feat: Update HELP command — comprehensive command reference
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:23:34 +03:00
Hakan SevenandClaude Sonnet 4.6 927e72a3c6 Feat: LINETYPE LIST, PURGE (layers/textstyles/linetypes) commands
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:23:08 +03:00
Hakan SevenandClaude Sonnet 4.6 9e8b52c55d Fix: LAYER command — remove shadowed LA alias (already bound to ToggleLayers)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:20:34 +03:00
Hakan SevenandClaude Sonnet 4.6 f918f1c0d9 Feat: DIMSTYLE command — list, new, set key dim properties (Phase 5.1 partial)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:19:57 +03:00
Hakan SevenandClaude Sonnet 4.6 2b91ec4637 Feat: LAYER command — list, new, on/off, freeze/thaw, lock, color, set current
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:18:41 +03:00
Hakan SevenandClaude Sonnet 4.6 8c360110c3 Feat: UCS command — save/list/delete named UCSs (Phase 6.1 partial)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:16:37 +03:00
Hakan SevenandClaude Sonnet 4.6 44f539c1ab Feat: STYLE/TEXTSTYLE command — list, new, font, width management
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:14:51 +03:00
Hakan SevenandClaude Sonnet 4.6 d66673a4fa Feat: VPLAYER ALL — freeze/thaw layer across all viewports in layout
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:13:09 +03:00
Hakan SevenandClaude Sonnet 4.6 313e7226d2 Feat: Phase 5.4 — Table entity render (grid wireframe + cell text)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:11:09 +03:00
Hakan SevenandClaude Sonnet 4.6 28f441b3f2 Feat: RAY and XLINE creation commands (2-point interactive draw)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:05:57 +03:00
Hakan SevenandClaude Sonnet 4.6 fa4fcf3c10 Feat: EXPLODE for Polyline, Polyline2D (bulge→Arc), Polyline3D → Lines
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 23:03:49 +03:00
Hakan SevenandClaude Sonnet 4.6 7c3cf7accc Feat: Phase 1.2 — VIEW command (save/restore/list/delete named views)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 19:19:12 +03:00
Hakan SevenandClaude Sonnet 4.6 7a5e3ed6ed Feat: Phase 6 — Face3D, PolygonMesh, PolyfaceMesh render; DRAWORDER command
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 19:13:37 +03:00
Hakan SevenandClaude Sonnet 4.6 dafa079b6a Feat: Phase 5 — MLine, Tolerance render; DimStyle Choice picker on dimensions
- mline.rs: MLine renders center spine + two parallel offset lines at
  ±scale/2 using the vertex miter directions; vertex grips; scale,
  closed and style-name properties
- tolerance.rs: Tolerance renders the GDT text string via font
  tessellation at insertion_point with rotation from direction vector;
  insertion grip and position properties
- properties.rs: Dimension entity's style_name EditText is upgraded to
  a Choice dropdown when document.dim_styles is non-empty, enabling
  point-and-click DimStyle assignment without a separate panel

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 19:06:20 +03:00
Hakan SevenandClaude Sonnet 4.6 27c0e74468 Feat: Phase 4.3/4.4/4.5 — RasterImage, Wipeout, AttributeDefinition, AttributeEntity
- raster_image.rs: RasterImage renders as border rectangle + X diagonals
  (pixel placeholder); Wipeout renders border or polygon clip boundary;
  both support insertion_point grip, brightness/contrast/fade properties,
  clipping toggle, and mirror transform (u/v vectors reflected)
- attribute.rs: AttributeDefinition renders default_value (or [TAG] if
  empty) as font-tessellated text; AttributeEntity renders the live value;
  both support insertion grip, position/height/rotation properties,
  and transform operations
- mod.rs + traits.rs: wire up all four new entity types through the full
  dispatch chain (to_truck, grips, geometry_properties, apply_geom_prop,
  apply_grip, apply_transform)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 19:00:15 +03:00
Hakan SevenandClaude Sonnet 4.6 4a93fc4949 Feat: Phase 4.1/4.2 — Polyline, Polyline2D, Polyline3D, Ray, XLine render and grips
- polyline.rs: TruckConvertible/Grippable/PropertyEditable/Transformable
  for all three polyline types; Polyline2D handles bulge arcs via the
  same truck Wire path as LwPolyline; Polyline and Polyline3D use
  TruckObject::Lines for straight-segment rendering
- ray.rs: Ray renders as base→+1e6; XLine renders as ±1e6; both have
  base-point and direction grips; mirror correctly reflects direction
  vector; base X/Y/Z and Dir X/Y/Z exposed in properties panel
- traits.rs: dispatch all five new entity types through
  to_truck_entity, grips, geometry_properties, apply_geom_prop,
  apply_grip, apply_transform

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-02 18:51:38 +03:00
Hakan SevenandClaude Sonnet 4.6 36bda2ac2b Feat: viewport UCS name picker from document UCS table
- properties.rs: inject 'UCS Name' Choice property for viewports when
  document.ucss is non-empty; resolves current handle to display name
- update.rs: intercept PropGeomChoiceChanged for 'vp_ucs_name'; clones
  UCS origin/x_axis/y_axis into viewport and sets ucs_handle — no
  trait signature change required

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-01 00:30:45 +03:00
Hakan SevenandClaude Sonnet 4.6 5ad2f4a8cb Feat: Phase 3 — perspective projection and per-viewport UCS properties
- viewport_content_wires(): conditional perspective divide using
  camera_dist = view_height * lens_length / 24.0 (35mm-film equiv.);
  points behind the camera are mapped to NaN for safe clipping
- viewport.rs: expose lens_length, ucs_per_viewport, ucs_origin,
  ucs_x_axis, ucs_y_axis as editable properties; handle all new
  fields in apply_geom_prop()

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-01 00:22:02 +03:00
Hakan SevenandClaude Sonnet 4.6 1aa44ac987 Fix: remove unused imports and suppress dead_code warnings
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-01 00:15:58 +03:00
Hakan SevenandClaude Sonnet 4.6 617d7ba56a Feat: Phase 2 — expanded PageSetup panel and PlotSettings integration
PageSetup panel:
- Paper size presets (A4/A3/A2/A1/A0 portrait+landscape, Letter)
- Plot area selector: Layout vs Extents
- Center-on-page toggle
- Plot offset X/Y fields
- Rotation picker: 0° / 90° / 180° / 270°

PlotSettings (acadrust object):
- PageSetupCommit finds or creates a PlotSettings object in the document
- Writes paper size, plot type, centering, offset, rotation to it
- DXF round-trip: PlotSettings persisted to file

PDF export:
- Reads PlotSettings for the active layout
- Applies centering (auto-computes offset from wire extents)
- Applies offset X/Y from PlotSettings
- Applies rotation via PDF CTM transformation matrix
- Swaps paper dimensions for 90°/270° rotation

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-01 00:12:07 +03:00
Hakan SevenandClaude Sonnet 4.6 73b224c191 Feat: viewport display lock, extended properties, VPLAYER and VPORTS commands
- Enforce status.locked in pan_active_viewport and zoom_active_viewport:
  locked viewports now reject pan/zoom inputs entirely
- Add perspective, render_mode, shade_plot_mode, hide_plot, ucs_icon_visible
  fields to the viewport property panel with appropriate pickers/toggles
- Add VPORTS command: lists all user viewports in the current layout
  (id, size, position, scale, on/locked state) in the command line
- Add VPLAYER command: per-viewport layer freeze/thaw from the command line
  (F <layer> to freeze, T <layer> to thaw, Enter to exit)
- Add CmdResult::VpLayerUpdate variant and its handler in apply_cmd_result

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 23:52:18 +03:00
Hakan SevenandClaude Sonnet 4.6 b013619c25 Chore: ignore ROADMAP.md from version control
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 23:43:51 +03:00
Hakan SevenandClaude Sonnet 4.6 748d90af7e Fix: disable snap during entity-pick and selection-gathering modes
Snap is now suppressed (both cursor indicator and coordinate snapping)
when a command is in entity-pick mode (needs_entity_pick) or
selection-gathering mode (is_selection_gathering), and restored
automatically when the mode ends.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 23:05:24 +03:00
Hakan SevenandClaude Sonnet 4.6 f01e4f69be Fix: viewport line weights no longer scale with viewport zoom
line_weight_px was multiplied by the viewport scale factor, making lines
near-invisible at small scales (e.g. 1:100) and overly thick at large
scales (e.g. 5:1). Line weights represent physical pen widths on the
plotted sheet and must be constant regardless of viewport scale.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 13:17:42 +03:00
Hakan SevenandClaude Sonnet 4.6 a0596a14ff Fix: MVIEW preview rectangle drawn in XZ plane instead of XY
The preview rectangle used c1.y (constant) for all four corners and
pt.z for Z instead of c1.z. Corners 3 and 4 now correctly use pt.y
(varying Y) and the constant c1.z, producing a proper XY-plane rectangle.
Fixed in both layout/mview.rs and manage/mview.rs.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 13:15:06 +03:00
Hakan SevenandClaude Sonnet 4.6 9cee12d1c7 Feat: PSPACE/MSPACE interaction isolation + paper-space drawing
Selection, snapping and editing are now mode-aware:

PSPACE (paper layout, no active viewport)
- Only paper-space entities (viewport borders, title blocks, etc.) are
  hit-testable and selectable. Viewport content wires are invisible to
  the interaction layer.
- Drawing commands add entities to the paper-space layout block so
  annotations/title blocks land on the sheet, not in model space.

MSPACE (active viewport entered)
- Only model-space entities visible through the active viewport are
  hit-testable. Other viewports' content and paper entities are ignored.
- Drawing commands add entities to model space (correct DXF block).
- Snap results from projected viewport-content wires are converted from
  paper-space back to model-space via paper_to_model so that placed
  coordinates and command previews are consistent.

Entering/exiting MSPACE clears the current selection so no stale
cross-space selection is carried over.

Implementation:
- Scene::hit_test_wires() returns mode-filtered wires for all
  hit-tests, snaps, and selections (entity_wires() still returns
  everything for rendering and PDF export).
- viewport_content_wires() gains an Option<Handle> filter to render
  only the active viewport's content for MSPACE hit-testing.
- Scene::add_entity() routes to the paper-layout block or model-space
  block depending on current_layout / active_viewport.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 13:07:25 +03:00
Hakan SevenandClaude Sonnet 4.6 0beb589f2c Fix: viewport MSPACE activation and navigation
Four bugs prevented viewports from working like AutoCAD model-space windows:

1. Dead-code double-click block: `!is_down2` was always false because
   `is_down2 = sel.left_down` is captured while the button is still held
   (before the selection block clears it). Changed to `is_down` so the
   double-click handler actually fires.

2. Inverted pan direction: pan_active_viewport used `-=` on the delta
   returned by screen_delta_to_world, which is the same delta that cam.pan
   *adds* to its target — causing reversed drag. Changed to `+=`.

3. Zoom not cursor-centered: zoom_active_viewport now accepts an optional
   paper-space cursor position and adjusts view_target so the model point
   under the cursor stays fixed (same as cam.zoom_about_point).

4. ESC did not exit MSPACE: CommandEscape now calls ExitViewport when
   active_viewport is set and no command is running.

Also added MS/MSPACE and PSPACE command aliases, and MspaceCommand /
PspaceCommand messages so MS auto-enters the first viewport.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 12:52:07 +03:00
Hakan SevenandClaude Sonnet 4.6 0b8f9bfa5b Fix: deduplicate layout tabs when opening DXF/DWG files
CadDocument::new() inserts default Layout1; DXF/DWG readers then add
the file's own Layout1 on top, producing duplicate tabs with the same
name but different handles. layout_names() now deduplicates by name,
preferring the entry with a non-null block_record (the real layout from
the file).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 12:24:49 +03:00
Hakan SevenandClaude Sonnet 4.6 a65a09c59e Fix: layout block-record resolution for DXF files
Root cause: the DXF reader never reads group code 340 (block_record
handle) inside LAYOUT objects, so layout.block_record stays Handle::NULL
after opening any DXF file.  This caused current_layout_block_handle()
to return NULL, which made belongs_to_visible_block() return true for
every entity — all entities appeared in all layouts simultaneously.

Fix in current_layout_block_handle() — three-tier lookup:
  1. Layout.block_record (non-null) — works for DWG files.
  2. Conventional DXF name ("*Model_Space", "*Paper_Space", …) derived
     from the layout's tab_order — works for standard DXF exporters.
  3. Position-based fallback: sort paper-space block records and paper
     layouts independently, then match by index — handles exporters that
     set tab_order = 0 for all layouts.

Apply the same two-tier lookup to model_space_block_handle().

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 12:08:27 +03:00
Hakan SevenandClaude Sonnet 4.6 845770938c Fix: paper limits, Cohen-Sutherland clipping, frozen layers UI, PDF improvements
Paper limits:
- Change A4 fallback from 12×9 to 297×210 mm in paper_limits()

Context menu:
- Translate layout context menu labels to English (Rename / Delete)

Viewport clipping:
- Replace AABB-only culling with proper Cohen-Sutherland line clipping
  in viewport_content_wires(); each projected segment is now clipped at
  the exact viewport boundary instead of being included or discarded whole
- Add cs_clip() and clip_polyline_to_rect() free functions in scene/mod.rs

Frozen layers per-viewport UI:
- Inject a "Frozen Layers" EditText property in the Properties panel for
  viewport entities (layer names resolved from handles at display time)
- Handle "frozen_layers" in PropGeomCommit: parse comma-separated names,
  resolve to layer handles, update vp.frozen_layers in-place

PDF export improvements:
- Add offset_x/offset_y params to export_pdf() for model-space normalization:
  coordinates are shifted so the drawing origin maps to the page origin
- Model space export computes extents via model_space_extents() (now public)
  and adds a 5 % margin; falls back to A4 landscape for empty drawings
- Skip __paper_boundary__ wire in PDF (white background covers it)
- Map yellow (active viewport border) → black and cyan (vp border) → dark
  blue for print-friendly output

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 08:18:29 +03:00
Hakan SevenandClaude Sonnet 4.6 e1d296da10 Phase 7: Plot settings and PDF export
- Add printpdf 0.9.1 dependency for native PDF generation.
- New src/io/pdf_export.rs: converts paper-space WireModels to a PDF
  page (per-wire stroke color, line weight in Pt, NaN-split segments).
  White/near-white colors are inverted to black for print output.
- Add PlotExport / PlotExportPath messages: opens a save-file dialog
  and writes a .pdf next to the drawing file.
- Add PageSetupOpen/Close/WidthEdit/HeightEdit/Commit messages: a
  centered modal panel lets the user enter paper width and height (mm);
  on commit the Layout object's min/max_limits are updated in-place.
- Register PRINT / PLOT / EXPORT and PAGESETUP (PS) commands in
  dispatch_command; fix MVIEW error message to English.
- Layout ribbon gains a "Plot" group with Page Setup and Export PDF
  ribbon buttons.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 08:05:17 +03:00
Hakan SevenandClaude Sonnet 4.6 ace83a0953 Phase 6: Auto-fit viewport and annotation scale hints
- Add model_space_extents() to Scene: collects key_vertices from all
  model-space entities to compute an AABB.
- Add auto_fit_viewport() to Scene: sets view_target to model centroid
  and derives custom_scale / view_height so the content fits the new
  viewport with a 10% margin.
- Call auto_fit_viewport() in commit_entity() after a viewport is added
  to a paper-space layout, so newly placed viewports immediately show
  model-space content at a sensible scale.
- Scale line_weight_px by the viewport scale factor when projecting
  model-space wires into paper space, so dimension arrows and annotation
  lines appear at the correct visual thickness.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:33:11 +03:00
Hakan SevenandClaude Sonnet 4.6 403264d3ab Phase 5: Viewport render improvements
- 3D view direction support: model geometry projected using view_right/
  view_up vectors derived from Viewport.view_direction — enables Front,
  Side, Isometric views inside paper-space viewports
- Proper AABB clipping: replaces centroid heuristic with bounding-box
  intersection test against the exact viewport rectangle
- Per-viewport frozen layers: Viewport.frozen_layers Vec<Handle> is
  resolved to layer handles and used to skip frozen entities
- view_target used consistently as the model-space pan origin
- Model wires collected per-viewport (inside the loop) so each viewport
  can apply its own layer-freeze set

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:28:42 +03:00
Hakan SevenandClaude Sonnet 4.6 031d2311ed Phase 4: Viewport control and properties
- Viewport ID uniqueness: commit_entity assigns max_existing_id+1
  instead of always using id=2
- Lock/On boolean toggles in Properties panel (vp_locked, vp_on)
  backed by status.locked / status.is_on fields
- Standard scale Choice picker: 1:500 to 10:1 (also syncs view_height)
- Numeric scale edit now syncs view_height when changed
- Standard view Choice picker: Top/Bottom/Front/Back/Left/Right/4×Iso
  updates view_direction vector via apply_geom_prop
- Viewport content not rendered when status.is_on is false
- current_layout_block_handle_pub() added for external access

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:27:03 +03:00
Hakan SevenandClaude Sonnet 4.6 523ba74c10 Phase 3: Active viewport MSPACE/PSPACE workflow
- Add active_viewport: Option<Handle> field to Scene
- Add EnterViewport(Handle) and ExitViewport messages
- Double-click on a user viewport (id > 1) enters MSPACE;
  double-click on empty area while in MSPACE exits to PSPACE
- MSPACE middle-drag pans the viewport's model-space view (view_target)
- MSPACE scroll zooms the viewport's view_height / custom_scale
- Drawing commands inside MSPACE receive model-space coordinates
  via paper_to_model() coordinate transform
- Active viewport rendered with yellow dashed border (vs. cyan solid)
- Camera screen_delta_to_world helper for MSPACE pan conversion
- LayoutSwitch clears active_viewport

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:24:16 +03:00
Hakan SevenandClaude Sonnet 4.6 474b38f4fb Aşama 2: Paper space görsel düzenleme
- Kağıt sınırı dikdörtgeni: paper layout'ta Layout.min/max_limits'ten
  beyaz çerçeve wire'ı oluşturulur, entity_wires()'a eklenir
- first_viewport_scale(): paper layout'taki ilk kullanıcı viewport'un ölçeğini döner
- paper_limits(): mevcut layout'un kağıt sınırlarını döner, sıfır boyutlu
  layout için varsayılan 12×9 kullanılır
- Status bar scale göstergesi: hardcoded "1:1" yerine aktif viewport ölçeği
  dinamik olarak "1:50", "2:1" vb. formatında gösterilir
- Overall viewport (ID=1) zaten gri renkte render ediliyor (tessellate_one)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:17:45 +03:00
Hakan SevenandClaude Sonnet 4.6 9b14719ec5 Aşama 1: Layout yönetim UI — yeniden adlandırma, silme, context menüsü
- Layout sekme sağ-tıklamasında context menüsü (Yeniden Adlandır / Sil)
- Inline rename: sekme metin-giriş alanına dönüşür, Enter ile commit, ✕ ile iptal
- LayoutDelete: layout ve sahip olduğu tüm entity'leri kaldırır
- LayoutRename: Layout nesnesinin adını yerinde günceller
- LayoutCreate çakışma koruması: mevcut isimler arasında benzersiz ad bulur
- Escape tuşu açık rename/context menüsünü kapatır

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 07:13:36 +03:00
Hakan SevenandClaude Sonnet 4.6 527cce8ff0 Rename workflow and job identifiers for clarity
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 01:18:29 +03:00
Hakan Seven ab2e7b508d version update 2026-03-31 00:39:03 +03:00
Hakan SevenandClaude Sonnet 4.6 a88542a69a Fix ribbon active state, polar snap, FILLET pick mode, and arc preview plane
- Deactivate ribbon tool highlight when command ends (issue #1)
- Reset last_point on new command dispatch to fix polar snap offset (issue #2)
- FILLET/CHAMFER: disable text input during entity pick so clicks reach viewport (issue #3)
- Dropdown icon buttons now use RibbonToolClick so they highlight blue when active
- FILLET/CHAMFER: AutoCAD-style sub-step UX — typing R/D + Enter prompts for value
- Fix FILLET arc preview plane: arc was rendering in XZ instead of XY
- Bump version to 0.1.1

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-31 00:31:28 +03:00
Hakan SevenandClaude Sonnet 4.6 468633c1fe Co-locate CadCommand impls with their ribbon toolbar modules
Each command implementation is now in the same file as its ribbon
tool definition. Groups moved to a dedicated groups/ toolbar folder.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-22 23:21:29 +03:00
Hakan SevenandClaude Sonnet 4.6 bdde862597 Split large files: ribbon widgets and scene render/selection
- ribbon.rs → ribbon/mod.rs + ribbon/widgets.rs
  Extracted all rendering helpers, button styles, colour constants,
  layout constants and dropdown position calculators into widgets.rs.

- scene/mod.rs → scene/mod.rs + scene/selection.rs + scene/render.rs
  Moved SelectionState into selection.rs; moved CameraState, Primitive,
  shader::Program/Primitive impls, render_style and resolve_pattern
  into render.rs, reducing mod.rs from 1323 to ~1030 lines.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-22 23:07:43 +03:00
Hakan SevenandClaude Sonnet 4.6 ed9cbc2092 Refactor src/main.rs into modular src/app/ structure
Split the 4500-line main.rs into focused submodules under src/app/:
- mod.rs: H7CAD struct, Message enum, boot/new/run
- document.rs: DocumentTab, HistorySnapshot, HistoryState
- helpers.rs: pure helper functions
- history.rs: undo/redo logic
- properties.rs: properties panel logic
- layers.rs: layer sync
- commands.rs: dispatch_command
- cmd_result.rs: apply_cmd_result
- view.rs: view, subscription, tab bar
- update.rs: update message handler

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-22 22:44:32 +03:00
Hakan Seven 854f07517e Remove redundant Flatpak README 2026-03-22 20:27:23 +03:00
Hakan Seven a8089f7c74 Rename flatpak-release.yml to release.yml 2026-03-22 18:36:48 +03:00
Hakan Seven 803f5a005c Add Windows build job to release workflow 2026-03-22 18:35:45 +03:00
Hakan Seven 55bac2a1cb Add README with installation and build instructions 2026-03-22 18:31:46 +03:00
Hakan Seven ba587e99ec Use gh release upload instead of action for flatpak bundle 2026-03-22 18:16:11 +03:00
Hakan Seven 5a3b92831f Add contents:write permission to Flatpak release workflow 2026-03-22 17:54:38 +03:00
Hakan Seven 536ae5394c Add workflow_dispatch trigger to Flatpak release workflow 2026-03-22 17:38:24 +03:00