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>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>