mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-23 08:53:06 +00:00
34cbfbc668
* Loft: sections on parallel planes are skinned at their planes' distances, so the loft stays between its end planes
A loft through three or more sections on parallel planes took chord-length parameters
across the sections, from the whole motion of their control points. Where the sections
move far sideways for a small step up (a carved top's first steps: 10 to 24 mm sideways
for 0.6 mm up), the cubic interpolant of the height overshot: the side dipped below the
first section's plane and crossed its own start cap. Joining such a loft onto the body
whose face it starts on then failed ("the mapped B-rep does not validate: outer loop is
not an edge loop", or "the union would delete face ..."), or came out wrong.
The skin now takes each section's parameter as its plane's distance from the first over
the last's. Every section's height is then one linear function of the parameter, which
the interpolation reproduces exactly: the side faces' control points lie between the end
planes, so by the convex hull the loft does too. Sections that are not all parallel, or
not in order along the normal, keep the chord-length parameters.
Results that change: lofts through three or more parallel sections whose spacing differs
from their chord lengths take a slightly different shape between the sections (the same
sections, interpolated at different parameters). One golden moves:
boolean.api_brep issue1036_coincident_skins_intersection_measured, two degree-1 skins
whose ruled surfaces are the same point set under any parameters; its volume moves
26136.268243625735 -> 26136.26817288386 (2.7e-9 relative, the integrator's 1e-6
accuracy) and one face area 3788.658561467813 -> 3788.6586869951957 (3.3e-8, against
1e-4).
Tests: solidcore tests/skin_parallel_sections.rs (control points within the slab; union
with a slab under the first section adds the volumes; both fail without the change, the
first at a control point 0.24 below the first plane, the second with a negative union
volume) and the app regression examples/regressions/loft_join_carved_top_on_slab.json
(the join's volume is the slab's plus the loft's built as its own body; 0.40.0 fails it
with the error above).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Loft: plane-distance parameters only where the chord-length skin leaves its end planes
Review of the previous commit: plane-distance parameters by default reshape lofts that
build correctly today (a waist r 20/10/20 at z 0/5/40 pinches through its axis; another
four-section loft grows 29%), and the parallel test is a hard cutoff.
The skin now takes upstream's chord-length parameters as before, and checks that skin's
control points against the slab between the first and last section planes (within the
B-rep's tolerance; by the convex hull the skin is in the slab when they are). Only when
one lies outside, on parallel sections in order, is every layer skinned again at the
planes' distances, where the height is linear in the parameter and the skin stays in the
slab exactly. Every loft whose chord-length skin stays between its end planes rebuilds bit
for bit; the carved top, whose control points fall 0.24 below its first plane, is still
fixed.
The boolean.api_brep golden moved by the previous commit is back to main's (no golden
changes: 283 units unchanged). New test: the waist and the four-section loft keep the
volumes measured with main's skin (16791.357595192487 and 272283.3927004977).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>