from_arrays refused a bounded region of several shells (a sealed void),
as solidcore had no SmShell::IsInnerShellOf. solidcore#1473 ports it, so
the conversion now runs the capi's PutEnclosingShellsFirst (fork 41e7dca)
on top of it: candidates are the closed face-use shells whose box can be
computed, largest box first (stable), and the first that every other
shell is SM_TRUE inside becomes the head of the region's list. SM_FALSE
and SM_UNSURE rule a candidate out, as the capi's `== TRUE`; a region
where none is shown enclosing keeps its order. solidcore errors with no
C++ counterpart refuse the conversion, and containment tests are capped.
Tests: a 20 mm box minus a centred 10 mm box crosses the arrays both ways
with its outer shell first, from arrays listing it inner first too, at
7000 mm³ to 1e-9 and the C++ kernel's volume; C++ reads solidcore's
arrays (either order) as a body passing its level-2 check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk
Op::Primitive moves to Backend::Solidcore. Rig (cargo xtask kernel-cases, 479 cases):
- SMLib only (--kernel smlib, which sets SOLIDCRAFT_KERNEL=smlib, so primitives on C++): 445/479
- primitives on solidcore (--kernel solidcore --route primitive=solidcore, the new default
table): 449/479; no case worse, 4 better (1107, 114, 1140, 1195)
- earlier, routed alone: 469/469 agree (solidcore 3546c9bc)
What the flip showed:
- core::make_box checked only finiteness; smlib_make_box also refuses a non-positive size.
A bad box is Error::Argument on either kernel again (bad_arguments_are_errors checks both).
- Tests that mean the C++ kernel's own body (measure and convert parity, the C-API profiler
span, the no-SMLib build) build it with the C API (ffi::make_*), whatever the route.
- tess: a plan's node one ulp past a closed spline's interval was wrapped a whole period to the
other end, and its triangles spanned the period in (u, v). A body that reaches SMLib through
the flat import (every solidcore primitive) gets such a pcurve end on a cylinder's seam
(the M10 thread run-out test). wrap_into now takes a rounding past an end as that end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk
The flat arrays carry each edge's and vertex's own tolerance, but
to_arrays wrote the largest tolerance as TOLERANCE, and both imports take
TOLERANCE as the B-rep's, which MakeTopologyFromData raises every entity
to. Each crossing gave the whole body its largest tolerance, and a
solidcore chamfer makes its edges at 4x the B-rep's, so a chain of
mixed-route chamfers grew every tolerance fourfold per blend until one
failed (fillets/2341, 1e-5 to 0.164 mm by the 8th chamfer).
- to_arrays writes the B-rep's own tolerance as TOLERANCE (curves are
still approximated to the largest), so the C++ import keeps each edge's
and vertex's own.
- from_arrays takes the B-rep's tolerance as the least of the edges' and
vertices' and each face's as the least of its edges' and loop
vertices', when the arrays carry them (the C++ export still writes the
largest as TOLERANCE).
fillets/2341 with blend on solidcore now passes; no other fillets or
booleans case changes status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
run_case read stdout and stderr only after the child exited. A child that
writes more than the pipe buffer blocked in write and was killed at the
timeout as a hang (booleans/4623 with boolean routed to solidcore prints
65.9 KB). Two reader threads now drain the pipes while the rig waits; the
timeout still kills the child and reports a hang.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
The C++ boolean of two tagged overlapping cubes gives 12 faces with one origin
each, six per operand. The same boolean routed to solidcore loses every tag:
solidcore's boolean takes no caller attributes and its merge keys are private.
That test is ignored until solidcore offers a way to carry attributes through
an operation (scratchpad bug boolean-operand-attributes-lost.md).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
Conflicts in xtask/src/kernel_cases.rs and xtask/src/main.rs: both the
multi-backend runs (--kernel, --route) and develop's --known-failing
regression gate are kept. The gate grades the SMLib side: --known-failing
needs --kernel smlib (the default) or both, and is refused with
--kernel solidcore. A gate run saves every backend's results.json and
writes no report or side by side. Both report texts are merged; all tests
from both sides are kept, plus one for the gate's option rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
SOLIDCRAFT_KERNEL_ROUTES=<op>=<smlib|solidcore>[,...] applies on top of SOLIDCRAFT_KERNEL or the
preference, read once; bad, empty, overlong or surplus items are logged and ignored, and `file`
stays on SMLib. diagnostics.kernel reports it as `overrides`.
`cargo xtask kernel-cases --kernel both --route <op>=solidcore[,...]` runs the solidcore side as
SMLib with those families on solidcore, labelled solidcore[ops], into <out>/solidcore-<ops>/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
From f020a066: trim_boundary_seam_wrap keeps the gap lines along a singular
side (#1446, fixes#1437), so a sphere's area, volume and inertia are no
longer 0; they now miss 1e-9 by about 2e-9 (solidcore#1435). And
BrepIdentity::of_brep honours a copy's geometry_owner_keys (#1445, after
#1440): the identity test uses its new form. No new UpstreamFixes flags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
from_arrays now runs SMLib's own tests where the capi's flat import does
(capi/src/smlib_flat.cpp):
- MakeEdgeCurve: a circle edge given with its NURBS form must pass
SmCircle::IsNurbCurveCircle (Ellipse::is_nurb_curve_circle); the circle kept
is the one of its canonical entry's frame and radius, its domain from
ConicDomainOfNurbs, holding that NURBS (SameNurbsCurve, ported); any failure
is SM_ERR_INVALID_INPUT.
- AnalyticOfNurbs: SmCylinder::IsNurbSurfaceCylinder and
SmTorus::IsNurbSurfaceTorus, kept only when their NURBS is the face's.
The cylinder, frustum and torus now round-trip (same record within 1e-12,
volume exact). The cone and sphere records come back the same, but their
volumes still miss: the cone's on solidcore#1435 (1.4e-9 at 1e-8), the
sphere's on #1437 (0); those stay ignored on those issues.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
From 4cd55082: the ports of SmCylinder::IsNurbSurfaceCylinder and
SmTorus::IsNurbSurfaceTorus (#1448), with the new opt-in fix
found_torus_sphere_keep_tested_nurb (fork 7ea6a96, WR-493), turned on like
every other flag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
allow_errors_writes_anyway_and_a_saved_design_keeps_failing compared the box's volume
with 4000.0 to the bit, which the old kernel's closed-form planar volume gave. SMLib
integrates mass properties numerically (relative accuracy 1e-4 asked for) and gives
the 20 x 20 x 10 box within a unit or two in the last place (3999.999999999999), the
correct answer to the precision the measure has. The test now checks 4000 mm³ to a
relative 1e-9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a_combine_tool_stays_where_it_is_placed makes a part and then moves its occurrence
to check that a combine tool stays where it is placed. Since #2804 the design's first
part is grounded when it is made, so the occurrence.move refused and the test never
reached its question. The part is now made with grounded: false, as a part that is
meant to be moved is; the checks are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A body made by an SMLib operation kept that SMLib body beside its record (SMLib's
export). The export is not exact to the bit, so the kept body measured and operated a
little differently from the record's import, which is what a body read back from a
file has: a box measured 24000.000000000004 mm³ live and 24000.0 reopened, a drilled
box 21989.38056 against 21989.38013. A cut ring's volume therefore changed when it
was moved, the moved ring being measured on the SMLib body the move made
(measure_centre_tests::combine_cut_volume_does_not_depend_on_placement). Every body
now imports its record when an operation first needs it, so evaluated and reopened
bodies are the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GPU path tests (and the Windows FXC job, cargo test -p solidcraft-gpu) build real
designs through solidcraft-engine, a dev-dependency without its smlib feature. Run on
their own (-p solidcraft-gpu), nothing in the build turns SMLib on, so every geometric
step answered "this build has no SMLib" (10 path::* tests on develop). The
dev-dependency now asks for engine/smlib, as the apps do, and both jobs fetch SMLib
before building.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fillet_into_an_earlier_round picked the box's upright after rounding its top edge
and expected only that edge rounded. Since solid.fillet rounds each picked edge's
tangent chain by default (84bd2daad), the upright runs on through the first round's
end arc into the top right edge, and that is rounded too. The two-radius checks now
ask for exactly the picked edges (tangent_chain: false), and a new check rounds the
chain and expects what a round of the 38 mm top right edge takes off as well.
ribs_flush_with_a_window_change_nothing_away_from_them compared the lid with
6703.5222 mm³, the old kernel's chorded volume. The lid's closed form (the plate
with its rounded corners, the skirt, less the window, the slot and the notch) is
6703.5344 mm³, which SMLib gives; the test computes it, and the script's
description says it. Each rib's volume and area are checked to SMLib's mass
property accuracy (2e-7 relative) instead of 1e-6 absolute.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three expectations encoded the old truck planar booleans' incidental output;
each is replaced by the exact answer:
- a_base_trimmed_for_a_flange_keeps_its_arcs: the flat outline has 10 edges,
not 12. The flange's bend zone and panel meet in line, and the union of
the two is one line along each side (a region's boundary has no vertex in
the middle of a straight run). Lengths and areas are unchanged and still
checked to 1e-9.
- a_base_trimmed_through_a_free_form_curve_follows_it_with_arcs, renamed
..._keeps_it_exact: the trim cuts the parabola exactly, so the base keeps
one conic and three lines instead of tangent arcs within 0.001 mm. The
strip (183.564 = ∫ y from 197 to 200, or 600) and the bend's length
(62.364) are now checked to 1e-6 and 1e-9 instead of 0.22 and 2e-3; the
chorded comparison stays.
- pockets_with_free_form_outlines_are_machined_beside_free_form_cut_outs:
the machining record holds the pocket's four exact conics in their order,
started at another of them; the check is for the same closed loop, not
the same first segment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading a planar sheet back from SMLib split each loop where two of its
segments started within ten times the record's tolerance (2e-5 mm), so
the two ends of an edge shorter than 2e-4 mm counted as one point and the
edge came out as a loop of its own, which the next planar boolean refused
("needs closed loops"). A loop passes a point twice where it passes one of
the record's vertices twice; the split now reads the vertices, not their
places. The sheet built from our own regions still splits by place, at ten
times the caller's tolerance.
Fixes sheet::tests::a_ledge_beside_an_edge_as_tall_as_the_setback_goes_with_the_strip
(the ledge 1e-4 above the bend line); new kernel test
a_ledge_shorter_than_the_record_tolerance_reads_back_as_one_region.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SMLib planar sheet united every region's material and then cut every
region's holes from it, so a region lying in another's hole (the island
inside a ring cut) was cut away with that hole. Each region is now its own
material less its own holes, and the sheet is the regions united.
Fixes sheet::tests::ring_cut_retains_exact_central_material_island (the
flat solid lost the island's π·25·2.5 mm³) and the kernel's
compound_planar_extrusion_normalizes_overlap_and_retains_islands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two tests rebuilt the old kernel's raw strips (a shell's wall split along its
opening, a stepped tab's -x wall split by the Join and the Cut) with today's
kernel and took the saved piece's name and projection from them. SMLib leaves
those walls one face, so there is no strip to rebuild: the tests now say so (the
wall is one face) and give the saved link as what an older file holds, its piece
name and its rectangle (y 10..20 x z 0..20 on the -x wall, the same 4-line
projection the strip had), and keep every check of what the model does with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SMLib port of shell dropped with_shell_planar_sources (then deleted it as dead
code), so a shelled body's kept walls and their inner linings had no ShellPlanar
certificate: a sketch or press-pull on a shell's floor lost its attachment (the Pi
case's Sketch2 and everything after it, press_pull_on_the_pi_case_floor) and the
shell certificate tests found no inner/outer face. The roles come from the input's
exact planar supports, so they apply to SMLib's result unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mesh::ray_crossings and InsideIndex counted a triangle crossed by a
Möller-Trumbore test with half-open barycentric bounds (u in [0, 1), u + v < 1).
Those bounds depend on each triangle's own vertex order, so on an edge two
triangles share the ray was in both or in neither: the bracket example's hole
centre lies on a diagonal of the base's top triangulation and was counted 0 or 2
times instead of once (bracket_example_cuts_two_through_holes_and_reopens).
Both now use ray_crosses, a watertight test: each edge's side of the ray is the
signed volume dir · ((p - o) × (q - o)), which is exactly antisymmetric in
floating point, so the two triangles of an edge see it with opposite signs, and a
ray exactly on an edge's line is put on one side by the edge's endpoints in
lexicographic order. New geom test ray_crossings_count_a_shared_edge_once crosses
a grid at every inner edge, straight down and obliquely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The seeded robustness goldens (tests/robustness/goldens.json, tests::robustness_goldens) recorded
what truck built for seeds 0-95, so they now fail on every seed SMLib builds differently. The
kernel-cases ladder (tests/kernel-cases/ladder, cargo xtask kernel-cases --ladder), whose cases
each carry their own right answer, supersedes them.
Gone with them: fuzz::golden, the CI goldens lane (the goldens output, SLOW_SEEDS, the re-record
hint), their nextest filter and priority entries, the mutants sample and the tests/robustness/
test-data mapping in affected.py. The robustness seeds and tests::robustness stay. The docs point
at the ladder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tess.wgsl sized its basis arrays for degree 7 by hand. It now holds 17 slots, degree 16 as the
CPU evaluator, and a test fails when the two drift apart again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A G4 blend curve is one Bezier of degree 9, and the face extruded from it a spline surface of
degree (9, 1). The record accepts splines up to degree 16 (Brep::validate), but the evaluators
behind pcurves, tessellation and Continuity Analysis capped the degree at 7
(MAX_SPLINE_DEGREE), so the SMLib export refused the face with "pcurve: not supported yet: a
spline surface of degree (9, 1)". The cap was not an algorithmic limit: every routine under it
is the general NURBS Book algorithm, sized by fixed arrays of MAX_SPLINE_DEGREE + 1 slots.
MAX_SPLINE_DEGREE is now the record's own bound, 16, and Brep::validate reads the same
constant. The display evaluator's first-derivative basis (tess::basis_ders) works on two
one-dimensional tables (A2.2 at degree p and p - 1, eq. 2.7) instead of a square one, as its
GPU twin does, so the larger bound costs a low-degree surface nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The solidcore backend's solid_count now returns the solids of
brep_material_census, as smlib_brep_solid_count does with
SmApiBrepMaterialCensus (voids dropped, errors through the same mapping
as the other measure calls). The #1436 ignores are gone; only check
stays unported (solidcore#1419). Boolean cases now count solids:
two disjoint boxes unioned give 2, a box with an inner void gives 1,
with C++ parity under native.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
From b1b95955: the census port (#1447), the fast-drop face filters
reading the trimmed cache in its pre-GetTree state during booleans (#1371),
and difftest-only changes. No new UpstreamFixes flags. crates/smlib's tests
are unchanged: 130 passed, 37 ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
cargo xtask kernel-cases --known-failing FILE grades a set against its
baseline: it fails on a case that fails and is not listed (a regression)
and on a listed case that passes (fixed: its line goes, so the list only
shrinks). The Fillet rig workflow runs the fillet set that way on pull
requests touching the blend, fillet, corner and continuity kernel files,
crates/smlib, eval*.rs, engine features.rs or the cases: one release
build of solidcraft-cli on a Blacksmith runner, SMLib prebuilt, sccache
on a sticky disk that main and develop commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New: an r5 curvature corner at a box corner (its patch must seam G2), an
edge running tangentially into a round left out (refused: continues
tangentially), a convex r10.01 round 0.01 past a 10 mm face (built by
subtraction: V = 7139.875, A = 2585.140). The bar and boss arc rounded
together say their crease (15.6 deg r2, 13.1 deg r1); 1390 expects SMLib's
unsupported-corner refusal, the honest reason today; past a full round
the exact fit's refusal names the largest radius that fits, 7.5 mm.
KNOWN_FAILING lists the 18 of 89 fillet cases failing today, each with
its cause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new `continuity` area: seams whose order is certain by construction, each graded
`exact` (reads its order and not the next) at picked edges with Continuity Analysis's
default stations and tolerances: a box's crease (g0), a chamfer in place of a round (g0),
an r5 round on planes (g1), and a profile closed by a g1, g2, g3 or g4 blend curve between
lines, extruded (g1 … g4). `continuity.edges` may now be a list of points, picked as
`inspect.continuity` picks them, and `continuity.exact` asks for the order and no more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
expected.json may give `continuity: {order: g0…g4, edges?: "blend" | "corner"}`: the
seams of each round, chamfer face or corner patch with the faces either side of the edge it
replaced, and of each corner patch with its rounds, are measured as Continuity Analysis
measures them (seam_diagnostics at its default 33 stations and default tolerances), and the
case fails naming the worst seam, its faces, the order it reaches and the next order's worst
value. The seams come from the faces' persistent names (doc::naming::blend_seams). The older
`{near, within_mm, …}` form is kept.
Every fillet-area case with a body gets its order: constant rounds and rolling corners g1,
curvature rounds g2, chamfers g0, the corner: g2 patch g2 at its seams.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A torus face covering most of its tube off the tube's quarter lines (an
exhaust collector's bend: 326° of the tube from −113.8°) needed a fifth
quarter along the tube, which STEP counts from the outer equator: its form
ran past a full turn of the tube and SMLib refused the solid. #8496 turns
frames about the axis only, and the torus label had no tube reference.
The torus label gets a tube start (`tube_start`, radians; 0 and left out
of the record by default, so older records mean what they did): v counts
from there, in every evaluator, form, pcurve, iso curve, tessellation,
placement, SSI and SMLib transfer. A spilling torus face's tube start moves
to where its tube begins, or a turn before where it ends, whichever puts
its tube circles on the grid of a round face they are about the axis of
(a pipe's cylinder meeting the bend); circles round the tube are labelled
from the tube start (brep::form::on_tube), so their forms and pcurves lie
on the face's quarter grid exactly. The saved-format change is one file,
crates/doc/src/format/pending/torus-tube-start.rs.
Engine assembly: COLLECTOR_EXHAUST_VER_1 now comes in as a closed solid
(refused 3 -> 2); Poppy Humanoid unchanged (4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>