Commit Graph
3252 Commits
Author SHA1 Message Date
Brett LawsonandClaude Opus 5.5 c9aa5116d5 solidcore: move the pin to 9b76ac13 (main, with SmApiBrepMaterialCensus, solidcore#1436)
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
2026-10-29 02:55:39 +01:00
Brett LawsonandClaude Opus 5.5 ea52c12c2c Merge origin/develop into solidcore
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 01:35:28 +01:00
Brett Lawson 8ed2b2254f Merge ws/triage: kernel-choice tests no longer switch the process to solidcore 2026-10-29 01:35:27 +01:00
Brett LawsonandClaude Opus 5.5 729a247d53 Kernel routing: tests read each choice's routes without flipping the process to solidcore
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
2026-10-29 01:34:06 +01:00
Brett LawsonandClaude Opus 5.5 4f1ad5cc61 Cylinder shell case waits on solidcore#1453 (port fork fddc366 + 98ab1b0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 01:32:05 +01:00
Brett Lawson 123563717b Merge ws/shellcyl: the cylinder shell case waits on solidcore (marched offset edges) 2026-10-29 01:32:05 +01:00
Brett LawsonandClaude Opus 5.5 2473633173 smlib: shell_cylinder_open_top stays ignored as a solidcore defect (solidcore#1130)
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
2026-10-29 01:30:37 +01:00
Brett Lawson d138b169fd Merge ws/offset: face picks through the copy's effective identity, and solidcore errors no longer read as no answer 2026-10-29 01:15:26 +01:00
Brett LawsonandClaude Opus 5.5 f7c8ff94ff Offset: face picks on the working copy read its proven owners (solidcore#1440)
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
2026-10-29 01:14:52 +01:00
Brett LawsonandClaude Opus 5.5 29a1ac5a6a Sweep cases name their solidcore issues (#1449 draft corners, #1450 curve-sweep placement, #1451 planar sections)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 01:07:59 +01:00
Brett Lawson dca700c89f Merge ws/sweep: extrusions, revolves, sweeps, lofts and screw sweeps on solidcore 2026-10-29 01:05:42 +01:00
Brett LawsonandClaude Opus 5.5 d0a439299b Kernel: extrusions, revolutions, sweeps, lofts and screw sweeps on solidcore
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
2026-10-29 01:04:08 +01:00
Brett LawsonandClaude Opus 5.5 d6b3bf27b5 Shell walls-touch case waits on solidcore#1442 (port fork a759622)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 00:39:57 +01:00
Brett LawsonandClaude Opus 5.5 263f34850d Offset cases name their solidcore issues (#1440 face picks, #1441 ApproximateSurface, #1060, #1019, PR #1427)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 00:31:16 +01:00
Brett Lawson 36a4897215 Merge ws/offset: shell, thicken, sheet offset, face offset and draft on solidcore 2026-10-29 00:29:26 +01:00
Brett LawsonandClaude Opus 5.5 8582617ef2 Kernel: shells, thickening and sheet offsets on solidcore
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
2026-10-29 00:28:53 +01:00
Brett LawsonandClaude Opus 5.5 5140556c71 Blend refusals name their solidcore issues (#960, #1438, #1439, #430)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-29 00:07:03 +01:00
Brett Lawson aa77bcabb1 Merge ws/blend: two-distance and distance-angle chamfers on solidcore 2026-10-29 00:05:35 +01:00
Brett LawsonandClaude Opus 5.5 4a7b2388ed Kernel: two-distance and angle chamfers on solidcore
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
2026-10-29 00:05:09 +01:00
Brett Lawson d477d76d92 Merge ws/blend: fillets, chamfers, setbacks and variable fillets on solidcore 2026-10-28 23:55:54 +01:00
Brett LawsonandClaude Opus 5.5 525d8e1e61 Kernel: fillets and chamfers on solidcore
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
2026-10-28 23:55:16 +01:00
Brett LawsonandClaude Opus 5.5 ce5de8bcfe Sphere measurement cases wait on solidcore#1437 (trim_boundary_seam_wrap at the poles)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 23:45:12 +01:00
jyvikoandClaude Opus 5.5 bd2785717d UI: a header layout chosen by the host app
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>
2026-10-28 18:43:19 -04:00
jyvikoandClaude Opus 5.5 b3cb826ed4 Engine: an optional check before every command
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>
2026-10-28 18:43:19 -04:00
jyvikoandClaude Opus 5.5 c7373279d8 Viewport: hidden edges are drawn before the visible ones, so a visible edge is never covered by a light hidden copy
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>
2026-10-28 18:42:39 -04:00
jyvikoandClaude Opus 5.5 ce71791ece Spline surfaces: a closed spline whose outermost knots appear once is periodic
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 44b859fe6e STEP import: a whole sphere bounded by one seam has its frame on that seam
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 4688c0f20a STEP import: a whole round face whose seam is off its frame's quarter lines is turned onto one
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 fc3a13f176 step_in tests: the import's repair notes for added seams and turned faces
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 ae393fd9ce step_in tests: a face with too many bounds is refused by the reader's own limit
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 6055ce6fd3 step_in tests: knot multiplicities refused per knot, then by their sum
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 efdc245d1f step_in tests: a face the reader refuses leaves the rest of the solid as surfaces, named
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 6c355fdf72 step_in tests: the cube fixture's edge directions clear of the assembly fixtures' ids
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>
2026-10-28 18:41:57 -04:00
jyvikoandClaude Opus 5.5 8b4b4a9d6a SMLib pcurves: an end SMLib moves within the tolerance it held the edge at is mapped
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>
2026-10-28 18:41:16 -04:00
jyvikoandClaude Opus 5.5 d2858cb3d9 STEP import: a circle edge between two vertices is the arc between them, however short
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>
2026-10-28 18:41:16 -04:00
Brett LawsonandClaude Opus 5.5 86e4226ae7 solidcore backend: every UpstreamFixes flag on, and the ignored cases name their solidcore issues
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
2026-10-28 23:37:22 +01:00
Brett LawsonandClaude Opus 5.5 992a2f64c8 Merge ws/measure: mass properties, area, bounds, distances and checks on solidcore
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 23:35:26 +01:00
Brett LawsonandClaude Opus 5.5 1ba63d464f Kernel: the Measure and Check families on solidcore
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
2026-10-28 23:33:30 +01:00
Brett Lawson 567198a358 Merge ws/boolean: booleans, unions, 2D booleans and imprints on solidcore 2026-10-28 23:32:59 +01:00
Brett Lawson 3a9bed4611 Merge ws/pref: the Geometry kernel preference and diagnostics.kernel tests 2026-10-28 23:32:30 +01:00
Brett LawsonandClaude Opus 5.5 5cf4cb2121 Kernel: booleans, unions, 2D booleans and imprints on solidcore
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
2026-10-28 23:32:19 +01:00
Brett LawsonandClaude Opus 5.5 22351d84cc Preferences: a Geometry kernel setting, applied through diagnostics.kernel
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
2026-10-28 23:31:56 +01:00
Brett LawsonandClaude Opus 5.5 976acfd76c Conversion tests: each ignored case names its solidcore issue (#1431, #1432, #1433)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 23:18:10 +01:00
Brett Lawson e1be233e89 Merge ws/convert: solidcore bodies to and from the flat arrays 2026-10-28 23:17:06 +01:00
Brett LawsonandClaude Opus 5.5 3eeb83433d Kernel: solidcore bodies to and from SMLib's flat arrays, and its primitives
core::to_arrays ports FlatFromBrep (through BrepData::from_brep: same ids, face/edge/vertex
order, analytic kinds with radian ranges, NURBS forms, SMLib's own UV trims and tolerances);
core::from_arrays ports Validate, FlatToBrepData and BrepFromFlat (MakeTopologyFromData,
healing unless SOURCE says SMLib wrote the arrays). Cylinders, spheres, cones and tori are made
in solidcore when Op::Primitive routes there, like boxes. cpp_arrays copies every array, so
Brep::core gets what the import needs; flat.rs gains WIRE_EDGE_NURBS_FORM.

All six primitives export to records that validate and check, and their arrays match the C++
kernel's (ints exact, reals 1e-12). Where solidcore lacks a port the C++ calls
(SmCircle::IsNurbCurveCircle, SmCylinder::IsNurbSurfaceCylinder, SmTorus::IsNurbSurfaceTorus,
SmSurface::ApproximateSurface, SmShell::IsInnerShellOf) the conversion says "not supported
yet"; the round trips that need them, and a sphere's volume at 1e-8 (SM_ERR in solidcore), are
ignored with the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 23:16:31 +01:00
Brett LawsonandClaude Opus 5.5 12ace49736 diagnostics.kernel: read and set which kernel answers, and see the routing table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 22:53:26 +01:00
Brett Lawson ff909b58d5 Merge ws/rig: kernel-cases --kernel smlib|solidcore|both 2026-10-28 22:48:08 +01:00
Brett LawsonandClaude Opus 5.5 8c12073be7 Kernel: a solidcore backend behind crates/smlib, routed per operation
crates/smlib's Brep now holds a body of either kernel and converts it for the
other through the flat arrays the first time an operation routed there needs
it. route.rs is the routing table (every family on SMLib until the rig shows
parity), with SOLIDCRAFT_KERNEL=smlib|solidcore|routed and a preference to
override it; a failing solidcore call fails, with no fallback to C++. core.rs
runs every solidcore call on one process kernel under a panic guard, and
wires box, volume and counts. solidcore is a git dependency pinned by rev,
the web app links with an 8 MiB stack, and cargo-deny allows its git source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 22:48:08 +01:00
Brett LawsonandClaude Opus 5.5 d7224d4c65 kernel-cases: --kernel smlib|solidcore|both, each case's process on SOLIDCRAFT_KERNEL, and the two side by side
A solidcore run keeps results.json, dumps/ and report.md in <out>/solidcore/; both runs every
case on each backend in one job pool, keeps docs/kernel-cases.md as the SMLib report and writes
docs/kernel-cases-backends.md and <out>/backends.json (cases that differ first). The default
(smlib) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgExNEwfR9CX2RAzp2Pt
2026-10-28 22:46:11 +01:00
jyvikoandClaude Opus 5.5 30dc4c8601 Section hatch by part: touching cut parts never look alike
Each body a section cuts is hatched at 45 or 135 degrees in one of three
colours of one family (the cap's clay, a steel and a sage, theme tokens
`section_cap` and `section_hatch`). Bodies whose cut outlines touch or
overlap get different hatches, the angle changed first, then the colour
(solidcraft_render::hatch, a greedy map colouring of the cut); otherwise a
body keeps the hatch its name seeds, so it stays the same from frame to
frame and as the plane moves. Spacing and line width are unchanged.

The hatch rides on the palette (an Rg32Uint texel: colour, 1 + hatch), so
the viewport, headless GPU pictures and the CPU raster draw the same.

Preference Graphics > Section hatch: By part (default) or One style, the
look before this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5Lzv2n8fyKqD61NCHSF
2026-10-28 17:42:37 -04:00