mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-15 13:10:45 +00:00
3453963cf3
* STEP export: write each face from outside the material (#15168) brep_to_model wrote each face from the faceuse in the material region's shell, which faces into the material, so every exported solid read as inside out under ISO 10303-42 (box -6000). It now writes each face from that faceuse's mate, the outer side. Two more defects surfaced once the files were measured face by face: - A UV trim curve runs along the edge use that holds it, but when an edge use held none (it reads its mate's) the pcurve was reversed by the use's own orientation, so a seam's two pcurves ran opposite ways and the loops did not join in (u, v). - same_sense was corrected for swapped and inside-out cones only; a swapped sphere, torus, surface of revolution or extrusion, and an inside-out sphere or torus, turn the normal over the same way. The new tests compute the ISO signed volume from the written file's entities alone (planar faces by their loops' moment, curved faces by Green's theorem over their PCURVEs) and check each face's same_sense against its loops and against the kernel's normal geometrically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtwSrdwZxqTQp5MfnU * STEP export: write a region's inner shells as BREP_WITH_VOIDS voids (#15168) brep_to_model wrote one MANIFOLD_SOLID_BREP per distinct shell, so a solid with a cavity came out as two solids (the cavity a separate -27 solid once faces point out of the material). It now writes a solid per material region: its first shell (the kernel keeps the outer one first) as the outer shell, and each other shell as a void, its faces pointing out of the void's own volume under an ORIENTED_CLOSED_SHELL of orientation .F. The writer emits BREP_WITH_VOIDS for such a body. The tests now join each curved face's pcurves along its edges (a seam used twice takes both its pcurves; a step across a pole lifts to one point; a periodic wrap is refused) instead of by the smallest gap, move every solid off the origin so each face's p.n counts, and add a cavity (973), a sphere, a cone, a torus and a lofted B-spline solid, each measured from the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtwSrdwZxqTQp5MfnU * STEP export: find a region's outer shell by its mates, not list order (#15168) A region's shell list puts the outer shell first only with the opt-in boolean_outer_shell_first fix; on the default kernel a union that seals a void leaves the cavity's shell first, and the file's outer shell was the cavity, inside out, with the cube as its void. brep_to_model now walks the region tree from the infinite region through the shells' mates: a region's outer shell is the one mated to the region it was reached from. The tests now check each shell's own signed volume (outer positive, each void negative after its turn) and add the cup and lid on the default kernel, in both operand orders (488000). 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>