mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-15 21:20:54 +00:00
137f768991
* STEP import: a revolved torus face with a spline profile imports, and a face that winds more than a turn says so (#16525) A SURFACE_OF_REVOLUTION of a rational B-spline circle comes in as a torus label over the revolution's NURBS form. The import's analytic step replaced the face's range with the torus's own angles while the face's loops and its form stay in the form's parameters, so a torus face whose tube angles lay past the profile's parameter range (0 to 1) was refused: "SMLib: invalid B-rep record: flat arrays". A face with a NURBS form now keeps its range, which is the form's. A cylinder or cone face whose boundary winds several turns round its axis (a thread's flank) had its parameter box clamped to one turn, which put its edges off the form made over the box: "an edge lies 1.9 mm off the face's surface". The box now keeps a wider range, and the face is refused for what it is: "a face that winds 4.5 turns about its axis (a thread's flank): a round face covers at most one". Importing such a face is not done here. Refs #16525 * STEP import: a face that winds several turns round its cylinder (a thread's flank) imports (#16525) A cylinder or cone face whose boundary goes round its axis more than a turn and a hundredth had no form: a cylinder's NURBS form is one turn, and the face was refused ("a face that winds 4.5 turns about its axis"). Such a face now has a form of as many quarters as it winds (up to 64 turns, not closed on itself: a turn more is four more form parameters), and is a spline face from there on, since SMLib's cylinder is one turn and the import keeps a face whose trims run further as the spline it is. Its pcurves are not SMLib's trims: a closest point on a form that overlaps itself may be on any of its sheets, and the trims hopped between them (a half-turn edge came back running the wrong way round, another three turns off). Each use's pcurve is the edge's own angle about the axis, followed continuously, and its height, as a cubic Hermite spline in the form's parameters through exact values and slopes, halved until its lift is within a tenth of the tolerance of the surface point the edge's curve is over. Each loop's uses are then moved by whole turns (four parameters) to run on from one another and to lie on the form; a loop that does not close once unwrapped is refused. A solid whose shell the file leaves open (an edge only one face uses) is read as one sheet of all its faces when the per-face stitch cannot sew them, rather than refused; the reporter's solid NONE (11) is one (two half-circle edges 5 um inside the wall's circle belong to one face each), and is now 55 faces, the flank among them. The regression is a wire of rectangular section wound two turns round Z: its outer and inner walls are two-turn strips, its top and bottom ruled B-spline surfaces, its ends planes; it imports closed with the analytic volume and area. Refs #16525 * STEP import: an open shell is sewn before it is read as a sheet, an extruded circle's turns are counted per knot span, a hole goes on the turn of the strip it is inside, and an edge's extent is sampled for its winding (#16525) * Face extent: read an edge's winding rate over a step that advances under a quarter period, and refuse an edge too wound to measure An edge of a million turns, probed over a millionth of its span, advanced a whole turn and projected back onto its start, so it read as no winding. The probe step is now halved until it advances under a quarter period, and an edge still too wound over the smallest step is refused. * Face extent: index the winding pieces without panicking * STEP import: twin edges merge only on equal curve records, a winding pcurve is accepted on a derived error bound, and tests for both and for an open shell read as a sheet (#16525) merge_twin_edges no longer samples nine points to decide two edges are one; it merges edges on the same curve record over the same interval. A wound face's Hermite pieces are accepted when an interval-arithmetic remainder bound over the whole piece is within a tenth of the tolerance, not when three probes are. Formatting follows cargo fmt. Claude-Session: https://claude.ai/code/session_01W3cp86hFEo34XPitHzNx7s * STEP import: drop the winding face's unused point lift, now that pieces are accepted on the derived bound * STEP import: drop the form angle re-export the point lift used * STEP import: the new winding code grows its vectors and bounds its angle without calls the panic-site check flags * STEP import: keep clamp for the winding angle and piece count, recorded as proven panic sites (constant bounds) * SolidCore: only a cylinder's or cone's angle may wind past a turn, and an edge's winding is read off its pole ends * SolidCore: the winding probe runs only round a cylinder's or cone's axis, and refuses an apex edge that winds * SolidCore: winding more than a turn goes through its own form::wound_surface, and "more than a turn" is derived form::surface, surface_within and surface_on_own_arcs refuse more than a turn for every form again, as on main. A cylinder or cone face that winds is made by form::wound_surface, which only solidcore-step's winding path calls. The chosen 0.01 is gone: extent keeps a box past a turn only beyond rounding (1e-9 of a turn, already used there) and twice the angle the edge tolerance makes at the face's widest circle, and only on a cylinder or cone. * STEP import test: an open shell comes in as surfaces with the 'not closed' note, all five faces kept * CI: run the cancelled test jobs again