mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-15 13:10:45 +00:00
a1b6fcf788
* solidcore-step: signed-volume tests for the record writer's STEP files
Ports step-export's brep_to_model orientation tests (the cases and the
ISO 10303-42 divergence measure from #15175, cb040e168) onto
solidcore-step's record writer, the writer that stays when the two merge
(RFC 0003 item 1.7). Each body goes through to_record and
write::topology::brep, and the signed volume is read from the written
file's Part 21 entities alone, by loops and by same_sense.
The measure is generalised to the record writer's entities: exact
B-spline PCURVEs, faces written without PCURVEs (edges lifted into the
analytic surface's (u, v)), Green's integral split at a B-spline
surface's knots, VERTEX_LOOPs and ORIENTED_FACEs. No expected value or
tolerance changes.
9 of 10 pass. The cup-and-lid case fails before writing: on the default
kernel to_record takes the material region's first shell (the cavity's)
as its outer shell and the record refuses the body.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtwSrdwZxqTQp5MfnU
* solidcore: one way to find a region's outer shell; to_record no longer takes the list head
A union that seals a void can leave the void's shell first in the solid
region's list (the default kernel, WR-265). step-export's brep_to_model
already walked the region tree from the infinite region through the
shells' mates to find each region's outer shell; to_record took the
kernel's first shell, so the record made the cavity's shell the outer
shell of two regions and refused the body.
The walk moves into solidcore as topology::brep::outer_shells (the shell
mated to the region enclosing it, by region; deterministic, topology
only, no kernel marks). brep_to_model and to_record both use it: to_record
lists each region's shells with that shell first. Bodies whose outer shell
was already first give the same record as before.
BrepData::from_brep's region order is now the public data_regions, so
to_record can map the data's regions back to the kernel's.
Tests: outer_shells on the cup and lid (both operand orders) and a box;
to_record round-trips the cup and lid on the default kernel with the
outer shell first, and gives the same record with the kernel's list
turned round; solidcore-step's write_signed_volume cup-and-lid case now
passes (10/10).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtwSrdwZxqTQp5MfnU
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>