cad-editor/src/scene/convert
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 188d1a9ccb fix(dim): draw a dimension from the picture it carries
A DIMENSION references the block "that contains the entities that make up
the dimension picture", and that block is the picture: AutoCAD requires
it and draws it, BricsCAD draws it when present and only renders from the
dimension variables when it is missing. OCS re-derived the picture from
DIMVARS every time and ignored the block entirely.

That works while a style agrees with what the drawing actually drew. A
Revit-exported schedule here does not: its style stores DIMTXT already in
drawing units beside a DIMSCALE meant to scale it, so the text came out
three hundred times too tall, and each dimension carries a DIMFXL
override that is likewise already in drawing units, so the extension
lines ran nearly a million units past the points they measure.

Neither is guesswork about units now. The block holds the geometry the
drawing was authored with, so it is drawn: the contents are already in
world space and the block's base point is the origin, and the identity
instance that carries them exists only to reuse the scene graph's
ByBlock / layer-0 colour resolution. Every wire answers to the dimension,
so a pick still selects the dimension rather than one of its pieces.
Re-deriving stays as the fallback for a dimension with no block.

Annotative dimensions keep the old path: their several representations
are separate blocks and choosing between them is what the annotation
machinery already does, while the doctrine above assumes one picture.

A picture is only good while its inputs hold, so it is dropped when they
change: editing a dimension's properties, and saving the dimension style
it is drawn with. Entity edits already dropped it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 02:44:30 +03:00
..
acad_to_truck.rs feat(polyline): smooth per-segment taper for varying-width wide polylines 2026-07-20 16:36:06 +03:00
acis_export.rs feat(export): exact ACIS geometry for planar solids on save 2026-07-03 15:43:37 +03:00
acis_to_truck.rs fix(solid3d): close torn cylinder walls from truck revolutions 2026-08-06 22:29:41 +03:00
dgn_linestyle.rs feat(annotation): integrate object contexts 2026-08-02 12:00:15 +03:00
mod.rs feat(render): draw a proxy entity's cached preview instead of nothing 2026-07-17 12:53:42 +03:00
proxy_graphics.rs feat(proxy): decode shell, transformed geometry and text previews 2026-07-18 21:34:15 +03:00
solid3d_tess.rs fix(solid3d): close torn cylinder walls from truck revolutions 2026-08-06 22:29:41 +03:00
spline_tess.rs fix(acis): render complex solid surfaces 2026-08-03 19:03:59 +03:00
tess.rs fix(dim): draw a dimension from the picture it carries 2026-08-08 02:44:30 +03:00
tess_util.rs refactor(solid3d): drive curved-face sampling from one chord tolerance 2026-07-18 01:31:46 +03:00
tessellate.rs Fix linetype refresh and circle rendering 2026-08-06 23:35:16 +03:00
truck_tess.rs fix(render): preserve shared curve endpoints 2026-07-29 21:01:40 +03:00