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_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
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
The route test in solidcraft-smlib and diagnostics_kernel_reports_and_sets_the_choice in the
engine set the process-wide choice to solidcore for an instant while the other tests in their
binaries build bodies, so any of those could land on solidcore. Op::backend_under(choice) gives
the routes a choice would have without setting it (Op::backend follows it); the tests check
solidcore's routes through it, and set through the preference or the command only a choice
that routes every family as the table does. SMLib's own behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
solidcore's own difftest wiring of api_shell_brep_full (and the test
fixture's OffsetExecutive::shell_brep) gives the same 333.0089389, 7 edges
and 5 vertices with every UpstreamFixes flag on, with none and with each
alone: MateEdges marches the offset edges on the B-spline extensions. The
fork fixed it in fddc366 and 98ab1b0, which solidcore has not ported.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
The working copy every operation makes (copy_of: api_brep_copy naming its
objects in their own key domain) has no naming scheme of its own, so
BrepIdentity::of_brep gave it the arena's identities, which name none of its
geometry owners: every face's closest-point solve failed with InvalidInput
("edge owner is not in source B-rep"). pick_faces and leaves_cavity now key
the live view by BrepQuery::of_brep(..).effective_identity(), which reads the
owners the copy records. Not a solidcore defect.
The failure stayed hidden because answer() turned every solidcore error but
Unported into "no answer". The capi skips a query only when it returns a
status other than SM_SUCCESS, so answer() (now in core.rs) skips only
SolidError::Upstream and SolidError::Nlib and fails on anything else. The
same rule replaces the swallowing in convert.rs (ClassifyEdgeCurve, the plane
map, AnalyticOfNurbs) and sweep.rs (sm_DraftHasCorner's angle).
Tests: faces_are_picked_on_the_box_and_on_its_working_copy (closed-form
distances on the body, on copy_of's copy, and by the maintainers' usage;
the copy under the arena's identities is an error) and
a_solidcore_error_in_a_pick_is_an_error. The #1440 offset and sweep cases
run; shell_cylinder_open_top waits on a stray rim vertex in the shell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
The capi's sweeps (capi/src/smlib_sweeps.cpp) ported onto solidcore in
core::sweep, routed from sweeps.rs when Op::Sweep runs there (the table
is unchanged): planar faces, straight and drafted extrusions, revolutions,
sweeps along straight and arc paths with their placements, lofts, lofts
to a point, sweeps through stations, the screw sweeps (the capi's own
walls, which solidcore leaves to it: solidcore PR #1326), curve
projection and face sections.
Fork-only SMLib code is refused as not supported where the capi reaches
it: drafted corners under the curvature and tangent rules (54148db,
e8f23e0), the curve sweep keeping the profile at the path's start
(2dd71a0, 5d3939e), and SmBrep::CreatePlanarSectionCurves.
core/sweep_tests.rs checks 19 cases against closed forms and, with
native, the C++ kernel: 14 match both; the rest name their solidcore
issue (#1435, #1440) or the missing fork code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
core::offset ports the C API's offset family from the fork's smlib_ops.cpp and
smlib_sheets.cpp: smlib_shell (with the leaves_cavity guard, which still decides
the answer: without it solidcore's inward shell of a box with no cavity fails
with 1001 where the capi says NO_ROOM), smlib_thicken, smlib_offset_sheet,
smlib_offset_faces and smlib_draft, on SmApiShellBrepFull / SmApiOffsetBrepFull
(api_shell_brep_full, api_offset_brep_full), picking faces by point as
smlib_pick.h does. Shell, offset_faces, thicken and offset_sheet route on
Op::Offset, draft on Op::Split; the table is unchanged.
What solidcore lacks is "not supported yet" where the capi first reaches it:
the face move (SmOffsetFacesExecutive, fork a96ce9f, solidcore#1060) and the
draft's SmBrep::LocalOperation (solidcore PR #1427).
core/offset_tests.rs checks each case against its closed form and, with
native, the C++ kernel. Thicken (one-sided and symmetric), the plate's sheet
offset, an outward closed shell and the argument refusals match. The rest wait
on solidcore: its topology point solve finds only vertices, so no face is
picked and leaves_cavity sees no cavity; an offset surface does not export
(no SmSurface::ApproximateSurface); walls that meet are 1027 (#1019).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
chamfer_sides on solidcore ports the capi's outer_faceuse, face_frame and
sides_offsets, and chamfer_offsets now makes the calls the fork's
SetFilletParameters makes with pOptSecondRadii (f653ac9): per edge the
blend edge use, solidcore#1426's constant-radius solver with the second
offset (approximation tolerance 4 x the edge's, 20 and 10 degrees),
load_solver and a linear generator. Equal chamfers take the same path
with the second offset equal to the first, as the capi does.
The two-distance and distance-angle cases match their closed forms and
the C++ kernel (volume 1e-9, counts, faces by kind); a centroid test
checks the first distance goes on the face leaning along `first`.
The cliff-overflow refusal is still told apart by its comment: solidcore
notes it as NoRoom with no code of its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
core/blend.rs ports the capi's composition round the fillet executive
(smlib_ops.cpp blend_call, round_edges, chamfer_offsets/chamfer_edges,
chamfer_radius, blend_failure, setbacks_fit, law_ok/law_pinches/law_along,
finish; smlib_pick.h): picking edges and corners by point with the
NoMatch/Ambiguous rule, per-edge kinds and sizes, bevelled chamfer corners,
N x N convex corner setbacks (CornerRefused otherwise), the B-spline
variable law, and the capi's errors (Argument, NoRoom, NoEffect, Empty,
NotSolid, SMLib statuses). ops.rs routes fillet, chamfer, blend,
blend_setback, blend_setback_open, fillet_variable and chamfer_sides on
Op::Blend as the boolean family is routed.
What the capi asks of fork-only SMLib that solidcore lacks is "not
supported yet", refused where the capi first reaches it: curvature blends
(fd3b6a7), two-distance and angle chamfers (f653ac9), open corners
(60af574), laws with a corner (6eecf04), and rails leaving their face, which
the fork may build over the cliff (8ba4667).
core/blend_tests.rs checks closed forms (one edge, all twelve edges, a
chamfer, Pappus on a cylinder rim, a setback corner, a linear variable
round, the errors) and, with native, C++ parity on volume, counts and
faces by kind, or the same error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
SolveApp::header (toolbar::HeaderLayout) lets the app that hosts the UI
choose where the application bar puts three things; the default is the
current desktop layout, pinned by a test:
- command search: in the ribbon's tab row (default), or in the bar
immediately left of Settings, folding to its magnifier when the bar is
short of room (the ribbon's tabs then run to its end);
- Report a bug: a labelled button (default), or an icon drawn like Settings
and Help with its name as tooltip and accessible label;
- the version: in the bar (default), or as a Help menu row after About that
opens the release notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An app that embeds the engine can install a check on the Session
(Session::set_command_check). Session::execute asks it before each command
with the command id, its parameters and the session (read only); a refusal
comes back as EngineError::Refused with the check's reason and leaves the
design unchanged. Without a check nothing changes.
The check belongs to the host: it survives opening and starting designs,
scratch copies (previews, off-thread evaluation) carry it, and the desktop
UI hands it on to every document tab and to designs opened in the
background.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edge along a face seen edge on lies within a pixel of the nearer face beside it, which hides
part of its width; its hidden copy, drawn after the visible edges, laid a light line over the
visible edge of that nearer face (some 100 px on a box at yaw 1.565). Drawn first, it is covered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv::closed tells a spline closed on itself (periodic, one knot interval per period) by
its first and last control rows and knots clamped at both ends, checked as k[0..=p] and
k[n..=n+p] all equal. Over its interval [k[p], k[n]] a spline of degree p never uses
k[0] or k[n+p]: it starts at its first control point and ends at its last when
k[1..=p] and k[n..n+p-1] repeat. A periodic quadratic circle written with knot
multiplicities 1,2,...,2,1 (as OpenCascade writes one) was taken as open, so its seam
edge's two uses got one pcurve and the face was refused as a loop across a closed
spline surface's seam without a seam edge (periodic_knot_tube_faces_import_and_mesh:
"pcurves failed on 2 of 2 faces"). The check now skips the outermost knots; the knots
the existing test calls unclamped (uniform) stay open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A SPHERICAL_SURFACE face bounded by one meridian used both ways is a whole ball, but the
file's placement need not have its poles at the meridian's ends: a sphere's frame is any
right-handed frame about its centre (the same surface, its natural normal outward). With
the poles elsewhere, the seam is a slit across the face's form, not the form's own seam;
SMLib's export refused the record ("a closed shell bounds two regions and encloses one"),
and the ball was not imported
(seam_only_sphere_whose_placement_axis_misses_its_poles_imports_as_a_whole_ball).
Before anything is measured on the frame, such a sphere's frame is put on its seam: the
axis through the seam's ends (which must be antipodes on the sphere, within the
tolerances), the x axis through the seam's middle. A seam already between the frame's
poles keeps the file's frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cylinder, cone, sphere or torus face of one whole turn has a NURBS form of the four
quarters from the one its seam starts in (brep::form::face_quarters). When the seam is
not on a quarter line of the file's frame, the seam's second use lies a period on, past
the form's end: the face's domain stopped at the form's end and SMLib measured a ball
whose seam meridian is 0.7 rad off its frame's x axis 2.2% short
(tilted_seam_only_sphere_imports_as_a_whole_ball: 32.03 vs 32.74 mm3), and a 5 mm ball
with its seam 1 rad off, holding a 2 mm void, 481.0 vs 490.1
(seam_only_sphere_void_is_turned_inside_out).
turn_quarters, which says whether turn_frames (ee4d4b5a5) turns a face's frame, counted
such a whole turn as four quarters, never a spill. It now counts the quarters the face's
angle interval needs on the grid (brep::form::quarters, as for a face of less than a
turn): five for a whole turn off the quarter lines, so the frame is turned about its
axis to put the seam on one, and the form's seam is the face's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The schema 4 reader adds a seam to a face that winds around its surface without one
(3d7e465b1) and turns over a face whose loop disagrees with its same_sense, and notes
both (the spindle torus tests assert the seam note). The tests written against truck
expected no warnings:
- step_conformance_parts_read_back_their_exact_shape: each part's seam count (the cone,
dome, cylinder parts bounded by their rims alone); volumes, boxes, faces unchanged.
- extruded_ellipse_patch_crossing_profile_seam_stays_trimmed: same_sense .F. adds the
turned-over note.
- implicit_bound_can_still_describe_the_complement_of_a_patch becomes
implicit_bound_against_its_face_sense_turns_the_face_over: the strip's one bound on a
cylinder cannot be a hole (the cylinder is unbounded along its axis, so the face would
have no outer boundary); the loop bounds the face, turned over, the 42 mm2 strip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The face-bounds limit lives in crates/step's topology (MAX_BOUNDS, 54b10b9a3) since the
truck reader that said 'boundary loops' went (ab8bc6625); it names the face and its
bound count. The test asserts that message; the time bound stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader (crates/step, f06581ca5) keeps distinct knots and their multiplicities and
never expands them; a multiplicity above degree + 1 is invalid (ISO 10303-42) and is
refused on its own as 'bad knot multiplicity' before the sum is compared. The test's
1,000,000 knots of multiplicity 64 on a degree-1 curve hit that first. Both checks are
asserted: multiplicity 64 per knot, and 1,000,000 knots of multiplicity 2 by the sum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unsupported_face_is_left_out_and_reported replaced a plane with an OFFSET_SURFACE on a
placement: the reader reads offset surfaces since d41ae8512, so the face was refused
for its basis (AXIS2_PLACEMENT_3D), not for being unsupported. It now uses
CURVE_BOUNDED_SURFACE, which the reader does not read. Since cfee4a720 and 4cb0d6ee9 a
solid with a face left out comes in as a surface body of the faces that read, warned
'imported as surfaces' and 'left out', with no 'open body' warning on top (as
a_refused_solid_comes_in_as_a_surface_body_of_the_faces_that_read asserts); the test
asserts that.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8eb93ff06 gave every cube edge its own line through two vertices, with the lines'
directions and vectors at #600 to #623. two_instance_assembly writes its occurrences
at #600 to #614, so 10 ids were defined twice, the reader kept the cube's, and the file
had no assembly: one body where hand_written_assembly,
later_instances_show_the_first_instances_mesh_placed and
repeated_items_are_shared_and_one_use_items_are_not expect two. The directions move to
#340 to #363, which no fixture uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edge that lies off its face's surface has its tolerance raised to cover the
gap before SMLib makes its trims (cover_gaps). Where such an edge runs out of
its patch, SMLib ends it where its drop onto the patch ends when that is within
the edge's cross-section tolerance of its vertex (SmEdgeuse::CreateUVTrimCurve),
and moves the edge's interval there. The moved end was checked against the
edge's tolerance before it was raised (1e-5 mm), so two faces of Poppy
Humanoid's left thigh, whose edges SMLib ended 0.08-0.1 um short with a held
tolerance of 0.77 um, were refused ("SMLib moved an edge's interval"). The end
is now checked against the tolerance SMLib held the edge at.
Poppy Humanoid: thigh_left comes in as a closed solid (refused 4 -> 3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edge on a circle or ellipse read as a full turn whenever its two vertices lay
within the file's uncertainty of each other. The engine assembly's water pump
housing has a 20.4 um arc between two vertices in a part whose uncertainty is
20.5 um: read as a turn, its cylinder face's loop wound once round the axis with
no second bound ("a face around an open surface of revolution with one bound")
and the housing came in as surfaces. A full turn is now an edge with one vertex,
or two at one point; two vertices apart bound the arc between them.
Engine assembly: HOUSING_MAIN_WATER_PUMP_01 comes in as a closed solid
(refused 5 -> 4). No other edge of the engine or Poppy Humanoid read this way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every opt-in fix of an upstream SMLib defect is a fix, so all are on; a test
fails when a solidcore bump adds a flag that is not. The face-properties
accuracy cases wait on solidcore#1435, the census on #1436, the body check on
#1419.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
core/measure.rs composes smlib_measure.cpp on solidcore's ports: mass properties through
SmBrep::ComputePreciseProperties directly (the [1e-8, 1e-1] envelope, material regions, the
face-by-face sheet fallback, moments about the box middle moved to the centroid), the area face
by face, the tight box, the edge/face gap, and IsManifoldSolid. solidcore has no
SmApiBrepMaterialCensus and no topology-level AssertValid, so solid_count and check say
"not supported yet". Each public method routes as Brep::volume does; the table is unchanged.
core/measure_tests.rs checks the primitives against the closed forms (now shared in
measure::closed) and, with SMLib built, against the C++ kernel. The cases solidcore misses are
ignored with their cause: face properties at 1e-8 (no knot-span splitting, fork 08d9a14),
solidcore#1431, the census and AssertValid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
Op::Boolean's operations get a solidcore backend (core/boolean.rs), each the
fork capi's logic round SM_API: smlib_boolean_with's operand copies
(SmApiBrepCopy), IsManifoldSolid of the inputs and finish's closed-result
check with non-manifold results allowed (closed_nonmanifold);
smlib_boolean_union_all's balanced pairwise tree; smlib_boolean2d's
SmPrimitiveCreation::Boolean2D with its no-face early return; smlib_imprint's
SmApiBooleanWithOptions(SM_BO_IMPRINT, keep tool) and its no-cut result.
ops.rs routes each like Brep::volume. The routing table is unchanged.
Tests: ten cases against analytic volumes (union, intersection, through slot,
flush notch, void, cylinder hole, 3x3 union_all, disjoint, sphere less a cap,
imprint), every result exported to a validated record; with SMLib built, the
same on C++ gives equal volume, counts and faces by surface kind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
Preferences > Design gains a Geometry kernel segmented control (Routed, SMLib,
solidcore), saved with the other preferences and applied through the
diagnostics.kernel command at startup and when it changes, so an agent's
choice in between stands. When SOLIDCRAFT_KERNEL overrides it the control is
disabled and a hint says the environment variable wins. ui.prefs refuses an
unknown geometry_kernel.
diagnostics.kernel now refuses a `choice` of the wrong type instead of
reading it as no choice. Tests cover the routing report, setting the choice
(skipped under SOLIDCRAFT_KERNEL), unknown and hostile choices, and put the
choice back to routed however they end. The command's label and the new
strings are in a pending locale file, complete for ar, he, ja and zh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt