A design gave another body when opened from its model cache: the rounds a body was made of
lived only in memory, so a later round at their mitre was built sequentially (or refused, as
too large) after opening and blended with them when evaluated anew. The saved model now
records, per kernel body made by rounds, the body they were made on (a place in the bodies,
stored once though no state holds it) and the edges with their radii; reading it attaches
them back down each chain, and a thinned model keeps those bodies with the bodies made from
them. Model cache format 7.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Design preference metric_tap_drill_major_less_pitch, which gave new
metric tapped holes the major diameter less the pitch (M8: 6.75 mm), is
removed with its Holes section, its session field and its labels. A new
tapped hole given no diameter drills the tap maker's drill (M8: 6.8 mm);
a custom metric size the table lacks still takes the major less the pitch.
A saved preferences file that carries the key loads as before: serde
ignores keys Prefs doesn't have, and the key is not written back.
The preference's UI test becomes an engine test of the default drill
(M8, 1/4-20 UNC, a given diameter) and a prefs test that a saved file
with the removed key still loads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the body check mode became part of the evaluation context (9acbcf924),
evaluate digests the context with the mode, but Model::adopt still took the
context without it and the default mode: the first evaluation after opening a
design from its saved model saw another context and recomputed every feature
(undoing_an_edit_after_opening_reuses_the_saved_results,
rolling_the_marker_back_keeps_results_after_cache_eviction). The saved model
now records the mode it was evaluated under (thinned ones too), adopt takes
it and digests the context as evaluate does, and a session opening a design
under another mode evaluates it again rather than showing that mode's results.
Model cache format 6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Face and edge names stored before format 14 were worked out from geometry and
open marked `?`. They were found among the names geometry gives today, as the
builds that saved them found them, pieces by the one nearest the pick. They
find nothing now: the feature holding one fails, asking for its reference to be
picked again, which stores its exact name. The legacy face and edge names a
body worked out for them are gone.
The tests that found such names as saved now assert the request to reselect:
a saved strip projection, a version 9 emboss on an annulus, a format 10 face
sketch and the corpus design named with numbered pieces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A side drawn in collinear sketch pieces is one face the extrude made from each
piece (#1788): its first role is its name, and the others were kept as aliases,
like the names of faces merged into it by a later join. They are names of that
very face, not of faces merged into it: the face keeps them as synonyms, which
a stored name matches as exactly as the face's name (a piece of it, once it is
split), through copies and later features, and the face whose name a merge
keeps keeps its synonyms too. An extrude-side certificate made on one of the
pieces finds the joined face the same way, and the saved model records the
synonyms (model cache format 5).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A colliding pair past the 16 pairs whose volumes are worked out, or past
the check's 256 body intersections, or whose intersection could not be
made, fell back to the sampled mesh depth for its deepest step. That
changed what deepest_step means without saying so. Such a collision now
answers deepest_step and volume_mm3 null and not_measured naming the
budget it ran past (or the intersection that failed), as compare does
since #9132; first_step, last_step and steps are exact and stay.
B pushed through A at 1000 samples overlaps it at about 330 samples, past
the 256 intersections: not measured, "the check's 256 body intersections
ran out". At the study's 16 samples it is measured, deepest at step 15.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
motion.interference picked a collision's deepest step by the depth sampled
on the contact meshes (vertices, edge midpoints, triangle centres), and
worked out the exact shared volume only there. That depth depends on where
the mesh puts its points: since planes mesh as their boundary's triangles,
the arm turning into a block (rig case
assemblies/cov-motion-interference-arm-into-the-block) sampled 4.64 mm at 60
degrees and 2.0 mm at 90, and the check answered step 6 with 536 mm3. The
exact depth is 5 mm at every step from 60 to 90 degrees (both slabs are
10 mm thick), so depth cannot tell those steps apart.
The exact shared volume is now worked out at each sample a pair overlaps,
and the deepest step is the first with the most (a tie keeps the earlier
sample). The arm and block share 536, 807, 952 and 1000 mm3 at 60 to 90
degrees, so it is step 9 with 1000 mm3, at 10 samples or 19. depth_mm is
reported as before and documented as an estimate from the contact meshes.
volume_mm3 is null, and the step falls back to the sampled depth, when the
volume was not worked out at every sample (more than 16 pairs, or past the
boolean budget, raised from 64 to 256 now that it covers every sample).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The portable record's 4,000,000-item budget refused a real result: the join of a level-4
Menger sponge's level-3 sponges ended with "SMLib export: the mapped B-rep does not validate:
portable B-rep: item budget". The budget guards records from outside the kernel, and a body
the kernel built in memory from inputs already bounded where they came in isn't hostile.
Brep::validate keeps the budget for records read from outside: native design caches
(decode_native_body, behind its own 256 MiB, 1M-per-array and 20M-value caps) and STEP import.
The new Brep::validate_built runs every other check, without the cap, on what the kernel
builds: SMLib's export of an operation's result, a body's record (Body::from_record, after
the decoder has checked a file's), a part of a validated record, the record handed back to
SMLib, and the validity check. Its checks are linear in a record already in memory.
SMLib's export bounded its counts by the same budget; a count is now bounded by SMLib's own
longest array (flat::MAX_LEN, checked on entry), which keeps every offset worked out from
the counts from overflowing, and the redundant topology-length cap goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a − b or b − a cannot be made (a kernel error, or a body that encloses no volume), the
region's volume and centre are null, measured_by is "not measured" and not_measured gives the
cut's error; its deviation, area, faces and box are still given, the side's total is null and
the verdict says the volume is not measured. The integrated-along-lines estimate is no longer
reported as a volume.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
inspect.compare integrated a region's volume along sampling lines: the
40 x 30 x 5 slab between a box and one 5 mm taller came out at 5976.49 mm3
against 6000. The regions are still found from the two surfaces; each one's
volume, centre and box now come from the pieces of the exact cut a - b (or
b - a) that lie there, measured as inspect.measure measures a body
(measured_by: boolean). Where a cut cannot be made the region keeps the line
integral, marked measured_by: lines, with a warning. The rig case
cov-compare-taller-box passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
167/168: every new case passes against its hand answer but 06/023 (1/2-14 NPT external), whose
groove stops 0.015 mm past the crest at its section's middle, under the crest cone on the section's
deeper side, so a sliver of each tooth's flank stays (0.94 mm3, 1.1e-4). The 139 cases before keep
their statuses and counts; their volumes and areas re-measure within 2e-6 on this SMLib.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds before format 14 named the pieces a cut splits a body into in truck's shell order, and
the later features of such a design name the piece they work on by that name. SMLib orders the
pieces otherwise, so split-body-pieces' fillet and chamfer landed on the wrong piece, its
reference "no longer exists" (design_corpus body_names_saved_before_exact_history_keep_their_pieces,
old_designs_open_and_evaluate_as_saved). For a feature saved so (`shell_piece_order`), each
name its pieces are known by goes to the piece the points the later features naming it picked
lie on; a name no later feature uses keeps SMLib's order, and so do all of them where the picks
do not tell the pieces apart. docs/compatibility.md says so.
That makes the feature's result depend on features after it, which neither its fingerprint nor
its cache key cover: a script replays the design one feature at a time, so the split was
evaluated before the fillet and chamfer existed, kept SMLib's order, and was reused once they
came (script_roundtrip corpus_designs_replay_from_their_scripts: 'Body1 (1)' 4765.663706234679
opened against 4765.663706134907 replayed). The state now keeps a digest of the picks it named
the pieces by (`ModelState::legacy_picks`), and every reuse (the last results, the cache, the
kept, rolled-back and primed results) takes a state for such a feature only while the design's
later features pick the same, so the replay names the pieces again as the file does when it
opens. A saved model's states carry no lineage and are taken as saved.
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>
An open or an import lists its three steps (a STEP or IGES file: reading the file, checking
and repairing the parts, building the model; a design: reading, rebuilding the features,
preparing the view), the ones done ticked, the current one with a spinner the height of its
text and how far it is, and the bar for that step. The other file operations keep their one
line, led by the same small spinner. New kit control: ui_kit::steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Setback field reached the command and the kernel used it: on a box corner
with r 2 rounds a 3 mm setback built, while 1.5 and 2 mm failed inside SMLib
(status 1001), shown as "could not be built" with nothing saying why. A setback
must reach past where the rounds meet without one (the radius on square faces).
The kernel now refuses such a setback before SMLib runs, naming the least
(the pre-check of aa2b09bc2 on fillet-kernel-cases), and exposes that least
(fillet_least_setback). The field shows the default, 1.5 x the radius, as an
editable length that follows the radius until the user types one, and outlines
a value at or below the least in the warning colour with "More than 2 mm"
under it (ui_kit::checked_row, warning_caption). Its hover text says what a
setback does, the default and the least.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5Lzv2n8fyKqD61NCHSF
New metric tapped holes drill the tap maker's drill (M8 6.8 mm). The Design preference "Metric
tapped holes drill the major diameter less the pitch" (`metric_tap_drill_major_less_pitch`, off
by default) gives them the drill every metric size took before (M8 6.75 mm): the Hole dialog
shows and sends it, and `solid.hole` given a thread and no `diameter` drills it, through the
session as `auto_project` is (kept when a design is opened or started, and across tabs). Unified,
pipe and taper sizes keep their tabulated drills; a given diameter is unchanged. Saved designs
keep the drill they stored either way.
Labels in en, ar, he, ja, zh, de and ko.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
Every tapped hole now drills the tap maker's tabulated drill. ISO metric takes Yamawa YEU23's
drill size column for cutting taps (printed p.704, M coarse; pp.704 to 706, MF fine): M8 drills
6.8 mm and M12 10.3 mm, where the major less the pitch gave 6.75 and 10.25. A custom metric size
the table lacks keeps the major less the pitch. UNC/UNF (Guhring), G, Rp, Rc and NPT (Yamawa)
were tabulated already. The Thread command's suggested hole for a metric size follows.
The Hole dialog's Tap drill diameter is now a field, the tap maker's drill by default, and the
command's `diameter` with a thread is checked the same way: a drill is accepted from the
internal thread's standard minor diameter (or the tap maker's drill where that lies below it:
Rp, Rc, NPT) to 5% over the tap maker's drill. Outside that the command names the range and
why. The field's tooltip gives the drill, the minor diameter and the range. Presets keep a
chosen drill.
A saved design keeps the diameter it stored, so it builds as before, and editing such a hole
keeps its drill: no preference and no format change. Scripts that give a thread without a
diameter drill the new default; ladder 05/007, 11/003 and rig case threads/2115 follow
analytically, and their golden entries are re-measured from runs (tier 05 re-sorted by time).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
The Rc and NPT drills were rounded to a drill series from a third-party reproduction of DIN 345
and a fractional/letter inch series cited from memory. They now come from the same tap maker's
catalogue the G and Rp drills do: Yamawa YEU23, printed p.709 (Rc, the maximum straight bored
hole with non-full threads, Rc 1/16 to 4) and p.710 (NPT, the maximum straight bored hole, 1/16
to 3). A size its tables lack (Rc 5 and 6, NPT 3 1/2 to 12) is refused as a tapped hole, naming
the range. The dialog's tooltip keeps the standard's minor diameter where the thread ends.
Rc 1/2 drills 17.6 mm (minor 17.807), 1/2 NPT 17.60 mm (minor 17.473).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
An Rc or NPT hole was drilled to the exact minor diameter where the thread ends, a size no shop
stocks. It now takes the largest stocked drill not larger than that: metric drills of the DIN 345
series for Rc (to 100 mm), letter and fractional inch drills by 64ths (to 1 1/2 in, ASME B94.11M)
for NPT; past the series it is bored to the exact value. The Hole dialog's drill shows the inch
size for NPT, and its tooltip the exact standard value. Rc 1/2: 17.807 mm, drilled 17.75 mm;
1/2 NPT: 17.473 mm, drilled 11/16 in (17.4625 mm).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
The tapped-hole catalogue takes ISO 7-1's Rc and ASME B1.20.1's NPT internal taper threads,
every size of the tables a modelled thread cuts. Their drill is the internal minor diameter where
the thread ends (the reference plane's minor at the face less the 1 in 16 taper over the useful
or effective thread length), derived from the standards rather than a tap maker's table. An
external R is still no hole's.
A tapped hole's options mirror the thread's: `modeled` cuts its thread into the wall, from the
entry, by the same cut as `solid.thread` (now one function both call), and `ease_out` fades its
inner end out before the bottom (ISO 3508); without it the groove stops square at the thread
depth, clear of a blind hole's bottom. The Hole dialog's Tapped rows add Rc and NPT, Modeled
and the End choice (Square, Fade, Fade Length). The format notes in pending/thread-ends.rs and
pending/pipe-threads.rs record the new keys and sizes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The thread dialog offers the pipe threads: G (ISO 228-1), Rp (ISO 7-1), R and Rc (ISO 7-1) and
NPT (ASME B1.20.1). Their sizes are listed by designation without a pitch, one start and a hand
of right or left; a size picked for a hole the dialog sized Rc stays Rc.
Rp, ISO 7-1's parallel internal thread an R screws into, is a form of its own (`rp`): the
parallel profile (H = 0.960491 P) at ISO 7-1's gauge diameters, refused on a shaft. Its cut
meets the analytic material of its profile within 1e-5, as G does.
A taper thread takes a chamfered tip: each end's cone is measured from the major diameter the
taper has at that end. Pipe threads are not ISO metric, so they give chamfer_depth.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread's start runs off its free end, plain or chamfered; only its inner end fades out
(ease_out) or stops square. The `ease_in` field, the command parameter (refused now, naming
ease_out), the dialog's Ease In row and their docs are removed; `pending/thread-ends.rs`
drops a saved `ease_in` as the design opens. The runout test covers the short, standard and a
sub-turn fade at the inner end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three forms: `bspp` (G, ISO 228-1, 55° parallel), `bspt` (R external, Rc internal, ISO 7-1,
55° taper 1 in 16) and `npt` (ASME B1.20.1, 60° taper 1 in 16). Their sizes are tabulated
from the public sources: ISO 7-1:1978 Table 1 (its gauge-plane diameters are the G sizes)
and NBS Handbook H28 (1957) Table VII.2; tests check every row against the standards' own
relations.
A taper thread starts at its free end with its standard diameter there (external: the gauge
diameter its gauge length in, internal: at the face). Its groove is the screw sweep with the
section moved 1/32 of the axial travel off the axis (the radial law the runouts use, added to
it), its section reaching just past the crest, and the material beyond the major cone (or
inside the minor cone) is cut with it, as a die or tap cuts the crests. An external one runs
its standard length by default.
The volumes are checked against the profile's material fraction integrated over the tapered
radii: G 1/2 to 2e-6, R 1/2, Rc 1/2 and 1/2-14 NPT within 0.2 % of the cut.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tip` was none|chamfer, chamfer cutting every free end. It is now none|start|both: `start`
chamfers the end the thread starts from, refused when that end is not free (a shoulder, or a
stop inside the face), and `both` every free end as `chamfer` did. The dialog's Tip pick offers
None, Start and Both; `tip: chamfer` in a command names its replacements.
The thread's end options (runouts, tip, chamfer angle and depth) came without a format
change file; `pending/thread-ends.rs` records them and rewrites a saved `tip: chamfer` to
`both`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ISO 4753's chamfered end bounds the end's diameter by the minor diameter. The default took the
modelled root (the basic d1) for it, so the cone's small circle lay on the root cylinder and
the chamfer ring pinched to nothing wherever the groove reached the end. The default is now
the external minor diameter d3 = d - 1.226869 P of ISO 724, below d1: the cone crosses the
root, each end is a whole disk of d3 inside a whole conical ring. ISO 4753 is for ISO metric
threads; the other forms, whose root is already their design minor, give chamfer_depth.
Ladder 06/017's analytic volume follows (1945.354522563); its golden entry re-measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Curvature continuous is the Type entry's name; Corners (Ball, Smooth patch) and Setback are
described with the command words they write. The codes (G1, G2) stay in the text, where they
explain the words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
What each category records, self and total time, the table and the Chrome
trace; the CLI's --profile and --profile-out on scripts, designs and STEP
files; diagnostics.profile over the control channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUXeKMoxpM7Vuv8Rb6E3K2
The reworked thread has its own direction, `hand: right|left|both`, on SMLib's
exact screw sweep. Main's #4414 added a second one, `handedness: right|left`, on
Hole and Thread, for the faceted groove this branch replaces. It is taken out: the
field, its pending format change (never released), the hole dialog's direction row,
its hole-preset option, its strings and its tests, which measured the faceted
groove. A tapped hole is right-handed, as before #4414.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoZgkCdAVrscuw2kjQTWDs
Recorded on SMLib replay 2c5baae (screw sweep walls exact and within their
tolerance, the radial sweep, the point solve on long rational surfaces) with
the thread rework: 06/008 (two starts) and 06/009 (runout) now graded and
passing, 06/011-017 new (Tr, Acme, S, ASME buttress, an internal Tr nut,
left hand, the chamfered tip), and 06/003, 004 and 007 grading the extent and
the collar. 132/135 pass; left: 07/013 corner setback, 07/015 G2 corners
(unsupported) and 07/016 three sequential corner rounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ladder 06/009 had no way to ask for one: "solid.thread has no runout (vanishing thread)
length". With SMLib's smlib_screw_sweep_radial (replay e7acea1):
- smlib: the FFI binding and Brep::screw_sweep_radial, the profile moved off the axis by a
piecewise linear law of the turn; crate test: a tooth moved out 1 mm over three turns has
A 2π (c turns + ∫ offset dt).
- kernel: sweep_helix_radial, sharing sweep_helix's checks (helix_profile).
- doc: `ease_in`, `ease_out` (a length, or ISO 3508's standard 2.5 P or short 1.25 P) fade the
groove over that length, its section moving out of the material as it turns (outward for a
shaft, inward for a nut). ease_in is at the end the thread starts from. The runout lies past
the full-form length: beyond a square stop, before a shoulder up to its clearance; at a free
end inside the face. Runouts longer than the thread are refused. No end gets one by default,
so saved threads keep their geometry.
The cut is the integral over the turn of the clipped section's 2π∫ r dA: engine test (2.5 P
and 1.25 P between two collars) within the sweep's wall tolerance times the runouts' wall area
(0.029 against a 0.036 mm³ bound), ladder 06/009 (004's shaft, a 2 P runout before the
shoulder) graded in closed form (measured 1.7e-6 off).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the ISO metric 60° thread existed. Forms now (crates/doc/src/thread_forms.rs, values and
sources in docs/threads.md): ISO metric (ISO 68-1), trapezoidal (ISO 2904 design profile, ISO
2902 sizes), general purpose Acme (ASME B1.5), metric buttress 3°/30° (DIN 513), buttress inch
7°/45° (ASME B1.9 basic profile). Each has its groove as a straight-flanked polygon, its standard
sizes (none for ASME buttress), its designations (M10, M16xPh3P1.5, Tr40x14(P7), S20x4,
1/2-10 ACME, 2.5-8 BUTT) and the size that fits a face. The square thread is refused: no current
standard defines it.
`hand: right | left | both`: a left-handed groove is the screw motion about the reversed axis
rising along it; both cuts the two grooves, crossing, in one boolean. `steep_flank` turns a
buttress. The design diameters are checked against the published tables (ISO 2904/DIN 103,
DIN 513 via IS 4696-3); every form's cut against 2π∫ r w(r) dr per turn to 1e-4 in engine tests
and to 1e-4 in ladder 06/011 to 016 (they measure within 5e-7).
FeatureKind::Thread holds every option the command has (form, hand, starts, ease_in, ease_out,
tip, chamfer_angle, chamfer_depth, steep_flank, all defaulted so saved threads load unchanged);
starts, runouts and the chamfered tip are refused as not built yet. suggested_thread_in takes the
form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three new cases in closed form: two through holes touching at a point
(02/021), the stock shelled with no face open (09/012, a sealed void, two
shells) and a dome shelled from its flat base (09/013, its rim the circle
r18). Nine rig cases copied into their tiers: a cylinder grazing a hole's
edge (1279), lips 1e-4 off a base's walls (2928), wall halves merged into a
flange (494), flush chord layers (5197), the horn torus revolve (4007),
crossing pleated loft skins (4623), loft ribs joined to a rounded pad (4092),
a drafted box with rounds shelled (3576) and a shelled dome with its ring
joined back (4847). Golden recorded on SMLib replay 8017df9: 123/128 pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The edge mirror of a face's NURBS form: Edge::nurbs keeps the NURBS SMLib holds a conic as, and
the edge's interval and its pcurves' parameter are its. Edge::parameters is the curve every
evaluation at a parameter uses; curve says what the edge is. Nothing writes the form yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every SMLib analytic surface is a B-spline surface, and its trims are in that NURBS's
parameters. Face::nurbs keeps that NURBS: the face's domain and pcurves are its (u, v), and
`surface` says what the face is. Face::parameters is the surface every (u, v) evaluation uses.
The SMLib conversion reads and writes it (fork FACE_NURBS_FORM, SMLIB_REV c4483f6); the STEP
writer writes the analytic surface and the face's edges without pcurves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
doc's FeatureResult has no boolean_diagnostics any more (truck's Boolean
retry reports, gone with truck; SMLib's boolean has no retries). The
timeline.inspect and doc.inspect replies drop the key.
Tests of the removed reports: tests/boolean_diagnostics.rs is deleted (it
checked truck's retry events and their survival through the cache, undo and
reopen); the assertions that a feature's report had no events go from
features_more_tests, patterns_tests, hole_face_tests and tests/rim_cut (the
rest of each test stays). The CLI corpus's expected replies
(move-bodies, issue-489-stacked-join, issue-616-lid-ribs) drop the key; the
issue-616 one listed a planar_fallback event. docs/robustness.md: its
section on retries becomes one on SMLib's booleans, which have none.
Left to the blends work: engine fuzz.rs (its retry-event counts) and
clearance/interference (capture_boolean_diagnostics, coaxial_overlap,
with_attempt_budget).
Not built: base in progress (kernel-smlib/no-truck 66ab6b7f does not build).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
SMLib is the only kernel now. cargo xtask kernel-cases ran every case once
per kernel asked for (--kernel default|smlib|both), setting
SOLIDCRAFT_KERNEL per run, and wrote a column per kernel; solidcraft-cli no
longer reads that variable.
The rig and the ladder run each case once, through solidcraft-cli built with
--features smlib (cargo run passes it), and report one result per case:
--kernel and the env var are gone. Each run has an output folder (--out,
default target/kernel-cases, target/kernel-ladder for the ladder) holding
results.json (every case's full result, which --results used to write on
request) and dumps/<area>-<case>/: every case runs with
solidcraft-cli kernel-cases --dumps=<out>/dumps, so a failed SMLib call
leaves its inputs for replay.
The ladder's golden holds one entry per case: golden.json is the last
recording's smlib entries, which predate SMLib running every case (its
reason says so); record it again after the first SMLib-only run.
docs/kernel-cases.md (until the next run regenerates it),
tests/kernel-cases/README.md, docs/kernel-smlib-sweeps-shell.md (its truck
column and comparisons dropped), xtask's and solidcraft-cli's usage text:
one kernel. Nothing was run.
clippy -p xtask --all-targets: clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
On a B-spline face the export now takes each edgeuse's UV trim exactly as
SMLib holds it (EDGEUSE_NURBS_*): the face's parameters are SMLib's, so the
trim is the pcurve, reversed exactly (knots t -> a + b - t) where the
edgeuse runs against its edge, its knots mapped onto the edge record's
parameter where that is an affine image of SMLib's (identity for spline
edges, as_line's map for NURBS lines, the C side's map for lines), and its
end knots set to the edge interval where they differ by rounding (within
the schema's 1e-9 slack, else an error). Changed: export.rs `curves`
(per-edge TrimMap), new `trims`, `mapped`, `Face::given`,
`Edge::trim_map`, the face loop in `native_ordered`, `pcurves`,
`outer_area`.
Analytic faces and circle/ellipse edges keep brep::pcurve: SMLib keeps an
analytic face's trims on its internal rational B-spline (SmCylinder.h:
"the map from one to the other is not linear") and a circle's on its NURBS
parameter, neither an exact B-spline in the record's angle parameters.
brep::pcurve::EdgeUse gains `given`, a producer's exact pcurve taken as it
is (structure and interval checked, moved by whole periods with its loop,
never refitted). Existing construction sites (STEP reader, tests, truck
adapter) pass `given: None`; the existing tests change only for the new
field.
Built, clippy-clean and tested on 4b2c0eaf before the rebase onto
kernel-smlib/no-truck (not built: base in progress).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
cargo xtask kernel-cases --kernel both, solidcraft-cli built with smlib
at c65fc91a (fork bf7c272), SMLib through SOLIDCRAFT_KERNEL=smlib. 372
cases: default 235 pass, smlib 269. SMLib's gains are booleans (50 to
66), fillets (32 to 41), shell (5 to 11) and STEP import (13 to 17, its
solids now SMLib bodies); its losses are sweeps (54 to 51 pass, 15 not
supported yet on SMLib) and threads (17 fail, of which the default kernel
hangs on 4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
169 rig and ladder cases on both kernels, graded against each case's own answer: where SMLib
fails, grouped by what goes wrong (wrong geometry, a crash, the thread groove's boolean failing
SMLib's check, shell refusals, sweeps with no SMLib path yet).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
372 cases. The default kernel passes 232. smlib reports "not supported yet" for every case
until the SMLib boolean switch lands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
truck lists some planar faces' hole loops before the outer loop, so the
rule that loops[0] is the outer loop never held for truck's records; moving
it in the adapter would renumber those faces' edges, which history and
names stand on. The outer loop is the one that runs counter-clockwise about
the natural normal (what check_geometry checks); the order is the
producer's, and SMLib's import puts the outer loop first, as SMLib needs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT
check_geometry compared pcurve ends with edge points only, so a loop whose
pcurves enclose nothing passed whenever its uses lift onto the same 3D points:
SMLib's hole-rim fillet with both seam uses on u = 0, or a whole sphere whose
pole-to-pole seam has both uses on one line (the continuity check skips the
pole). Such a face has no surface and meshes to nothing.
Each edge loop's signed (u, v) area is now taken over 16 points of each use's
pcurve: a loop within 1e-9 of the square of its extent of zero is refused
(Problem::Empty), and each face must have exactly one counter-clockwise loop
about the natural normal, the rest clockwise (Problem::Turn). Outer and inner
are told apart by area rather than position, because the truck adapter writes a
face's wires in truck's order, which puts a hole first on some planar faces of
the sample designs (the model cache test caught it).
Fixtures: the pole-to-pole seam on one line, and a sheet whose plane axes are
swapped so its loop runs clockwise; a seamed sphere passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT
A spline surface whose first and last control rows coincide in a direction
(points and weights, knots clamped there) closes on itself, but the display
evaluator's domain gave NURBS no period. The pcurve routine therefore never
moved a seam's second use by a period: SMLib's fillet round a hole's rim (a
rational spline closed in u) got both seam pcurves on u = 0, its outer loop
enclosed no (u, v) area, the decoded face tessellated to nothing and the body
measured 6839.73 mm3 against SMLib's 6989.00.
tess::uv::closed detects the closure from the record, within 1e-9 of the
control net's extent; the domain then has period = the active knot interval's
width, and the evaluator wraps a parameter outside that interval back inside
it, so pcurves, projection, sizing and the display plan all treat the direction
as periodic. The record stays as it is. The display plan hands both evaluators
wrapped parameters (the GPU does not wrap).
Tests: a rational torus band, a NURBS cylinder and a NURBS dome with a pole,
each bounded by a seam used twice, get seam pcurves one period apart; a record
of the band passes check_geometry and its seam uses on one line are refused;
SMLib's hole-rim fillet decodes with every face meshed and SMLib's volume
within 1e-3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT
Schema 4 counts every pcurve's control points as items, which schema 3 had
none of, so a body that fitted the old 1,000,000 no longer does (a STEP
plate of 50k faces). The binary envelope's own caps on bytes, values and
entries per collection still bound a body.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT
SMLib makes narrowing cones with a negative half angle; schema 4 now takes
them as they are (r(v) = r0 + v tan a already covers them), with the
natural v range below the apex. The check that no region lists a shell
twice was quadratic per region (about 1e9 comparisons at the caps); it now
remembers the last region that listed each shell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT