mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-15 13:10:45 +00:00
6a3cc682fa
* Claim #15862: interference and booleans of a loft against a mirrored box Co-Authored-By: Claude Code <noreply@anthropic.com> * solidcore-ops: test a box mirrored into an opening of a spline loft (#15862) A box extruded from a rectangle, read back from its record and mirrored across x = 0 sits 0.2 mm clear of a loft through two cubic splines. On main the loft minus the box is nothing, the loft and the box intersect in the whole loft, and their union is refused, because the mirror turns every straight edge into the degree 1 B-spline of the whole line. Co-Authored-By: Claude Code <noreply@anthropic.com> * solidcore: a mirrored line stays a line (#15862) Mirroring a body (SmBrep::Mirror, and SmBrep::Transform with a left-handed matrix) turned each straight edge into the plain degree 1 B-spline of the line's NURB. A line read from a record is infinite, so that B-spline ran over knots -1234567..1234567 with control points some 1.8e7 mm out. A boolean of such a body with a spline face it does not touch took the wrong side: a box mirrored into an opening of a spline loft, 0.2 mm clear, cut the whole loft away, intersected it in the whole loft, and its union was refused (1001). Line::create_mirror_curve mirrors the line's point and unit vector and keeps its domain, scale and sides; an existing NURB is mirrored with it, so each parameter maps to the mirror of the same point and edge intervals stay valid. Recorded as WR-784. Golden topology.brep_mirror blessed: 147 of 341 cases move, none in status, topology (graph) or the geometry digest. - 133 mirror and mirror-matrix cases: each straight edge's curve is now a line; every record block drops by a whole multiple of 23 (the B-spline type code minus the line's), e.g. Solids_box_smb_* by 12 lines, the cylinder's seam by 1 (gen0017/0030/0033/0036/0077, mat0027/0045 within 1e-9 besides: the old samples came from control points near 1e7). - 14 matrix cases with a reflection and an unequal scale (box, cylinder and cone mirror_rotated_scaled; mat0003/0004/0009/0017/0029/0036/0049/0050/0056/0057/ 0090): the scale turns the edges into NURBS as before, now over the edge's own interval instead of the whole line, so the record is shorter and the uses keep no stored UV trims, exactly as main gives for an unequal scale without a reflection (Solids_box_smb_non_uniform_2_1_1). Measured on box, cylinder, cone, extrusion, l_shape_with_boss and OffsetBoxCylOnCorner with that matrix: valid at CheckLevel::All and the same volume to the last bit on main and with this change. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>