Record a region profile as its boundary curve and step

A swept, extruded or revolved surface made from a region records the
region as the curve round it, as the reference does: a lone circle or
whole ellipse as itself, a loop of lines and arcs as a closed polyline in
the region's plane. A region recorded as a region made the reference
refuse to open the drawing (modeling error 58000).

A region read by an associative action carries the step its edge names
belong to (ACAD_STEPID), so the reference finds the edges again and the
surface follows the region.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-09 18:54:52 +03:00
1 parent 65910d1cad
commit c227de26c5
3 files changed
+97 -1

No files matched your search

+5
View File
@@ -2851,6 +2851,11 @@ fn source_reads(
};
let sizes = loops.iter().map(Vec::len).collect::<Vec<_>>();
let ids = register_region_subents(document, &sizes)?;
// The region carries the step its edge names belong to; without it (and
// without named edges in its modeler data) the reference cannot find
// the edges again.
crate::scene::view::dispatch::set_entity_xdata(document, source, "ACAD_STEPID",
Some(vec![codec::xdata::XDataValue::Integer32(ids.first()? - 1)]));
let curves = loops.into_iter().flatten().collect::<Vec<_>>();
let pairs = curves.iter().map(|_| (document.allocate_handle(), document.allocate_handle())).collect::<Vec<_>>();
for (index, (curve, (edge, read))) in curves.into_iter().zip(pairs.iter().copied()).enumerate() {