cad-editor/src/entities
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 7307ea3136 fix(dim): measure a two-line angle between the lines that define it
A two-line angular dimension stores two lines, not two rays:
first_point→second_point is one, angle_vertex→definition_point the other,
and the angle is the one they make where they cross. The renderer read
angle_vertex as the centre and the other two points as the rays from it,
which measures something else entirely — a ten degree angle came out as
two hundred and seventy, and a shallow one as very nearly a full circle.

The lines are now intersected for the real vertex, and the arc point
picks which of the four angles at that crossing is meant. Each line
offers its direction and its reverse, and the sweep is tried from either
line: taking only the first→second order leaves out half the angles, and
the half left out is the one wanted whenever the lines are nearly
parallel. Parallel lines cross nowhere, so only the extension lines are
drawn.

A zero sweep was also being turned into a full turn, because the wrap
that pushes a negative sweep forwards ran on zero too. Two rays pointing
the same way enclose no angle and now draw none.

Checked against the three angular dimensions in a drawing that carries
its own baked arcs: the vertex and sweep computed from the stored line
endpoints reproduce the baked centre and angle to the decimal — 7.48,
10.61 and 2.29 degrees — from entirely separate inputs.

This is the path taken when a dimension has no baked block: one OCS drew
itself, or one whose block was dropped by an edit. Both paths now agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 02:59:34 +03:00
..
arc.rs feat(grips): improve direct editing 2026-08-04 16:27:03 +03:00
attribute.rs feat(properties): stop offering a height the style has fixed 2026-08-08 02:45:46 +03:00
circle.rs feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
common.rs feat(properties): stop offering a height the style has fixed 2026-08-08 02:45:46 +03:00
dim_override.rs feat(styles): overhaul style managers 2026-08-03 02:01:47 +03:00
dimension.rs fix(dim): measure a two-line angle between the lines that define it 2026-08-08 02:59:34 +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 feat(properties): stop offering a height the style has fixed 2026-08-08 02:45:46 +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 feat(properties): stop offering a height the style has fixed 2026-08-08 02:45:46 +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