cad-editor/src/entities
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 6cbec232bb feat(units): read back every form the drawing writes
The readout learned to write lengths as 5'-6 1/2" and angles as
N 45d0'0" E, but typed input was still a bare parse::<f64>() — a
coordinate could be displayed and not entered. Give the formatters
their inverses.

parse_length takes feet and inches separated by a dash, a space, or
nothing, with the closing quote optional, and whole-plus-fraction in
any of those forms: 5', 60", 5'-9", 5'9-1/2, 9-1/2, 1/2. A leading
minus is a sign; the one inside 5'-9" is a separator, since after feet
there is nothing left to subtract from.

parse_angle reads the mark that says which convention an angle is in —
g for grads, r for radians, d/'/" for degrees-minutes-seconds, compass
letters for a surveyor's bearing — and reads a bare number in whichever
convention the drawing is set to.

ANGBASE and ANGDIR now apply, but only where they mean something. Which
way a thing points is measured from the drawing's zero and runs the way
it says; how wide an arc opens is the same number whatever zero is
counted from. format_direction and parse_direction are the pair for
directions, and the polar readout and polar input both go through them,
so the bearing shown is the bearing accepted. format_angle stays for
sizes, where applying a base angle would corrupt the value.

The command prompts follow the same rule, each classified rather than
swept: OFFSET distance, FILLET radius, CHAMFER distances, ARRAY and
MINSERT spacing, TRACE width, HELIX, and EXTRUDE height read lengths;
the four dimension text-rotation prompts, ARRAY's total angle and
INSERT's rotation read angles. MLINE's scale and INSERT's scale factor
are left alone — a multiplier has no unit to be written in. INSERT read
both through one parse; they are now separate.

The typed variants also take a decimal comma, which a single-value
prompt has no other use for. parse_length itself does not: inside a
coordinate the comma separates the axes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 23:46:49 +03:00
..
arc.rs feat(grips): improve direct editing 2026-08-04 16:27:03 +03:00
attribute.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
circle.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
common.rs feat(units): read back every form the drawing writes 2026-08-07 23:46:49 +03:00
dim_override.rs feat(styles): overhaul style managers 2026-08-03 02:01:47 +03:00
dimension.rs refactor(render): unify scene rendering paths 2026-08-05 21:44:59 +03:00
ellipse.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
extended.rs feat(ucs): integrate coordinate systems 2026-08-04 23:17:54 +03:00
field.rs feat(scene): integrate standard DWG data 2026-07-26 22:30:14 +03:00
hatch.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
helix.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
insert.rs feat(annotation): integrate object contexts 2026-08-02 12:00:15 +03:00
leader.rs feat(view): add visual style previews 2026-08-04 21:23:25 +03:00
light.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
line.rs feat(ucs): integrate coordinate systems 2026-08-04 23:17:54 +03:00
lwpolyline.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
mesh.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
mline.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
mod.rs feat(scene): integrate DWG object data 2026-07-26 23:38:38 +03:00
mtext.rs refactor(text): let acadrust carry the rotation through a transform 2026-08-07 11:48:53 +03:00
multileader.rs refactor(render): unify scene rendering paths 2026-08-05 21:44:59 +03:00
names.rs feat(cad): integrate standard codec coverage 2026-07-26 19:30:43 +03:00
object_data.rs fix(ui): refine empty drawing state 2026-07-27 17:37:17 +03:00
ole2frame.rs fix(blocks): preserve UCS transformations 2026-07-30 19:50:33 +03:00
point.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
polyline.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
raster_image.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
ray.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
shape.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
solid.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
solid3d.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
spline.rs feat(area): add object and aggregate modes 2026-08-03 22:31:20 +03:00
table.rs feat(view): add visual style previews 2026-08-04 21:23:25 +03:00
text.rs refactor(text): let acadrust carry the rotation through a transform 2026-08-07 11:48:53 +03:00
text_support.rs style: clear two build warnings 2026-07-23 11:39:23 +03:00
tolerance.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
traits.rs feat(grips): improve direct editing 2026-08-04 16:27:03 +03:00
underlay.rs feat(ucs): integrate coordinate systems 2026-08-04 23:17:54 +03:00
view_symbol.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
viewport.rs feat(mview): add viewport creation options 2026-07-27 19:28:51 +03:00