Files
bherbruck 0bb7cce47c Move SolidCraft's mesher into solidcore-tess and its evaluator into the kernel, one mesher (RFC 0003 item 1.1) (#14003)
* Move SolidCraft's mesher and its evaluator into solidcore (RFC 0003, item 1.1)

A move only, so history follows the files: SolidCraft's planner
(crates/kernel/src/tess/) becomes solidcore-tess's src/mesher/, and its plan
evaluator (crates/geom/src/tess.rs and tess/) becomes the kernel's
src/eval/plan.rs and src/eval/plan/, next to solidcore::eval. No content
changes; the next commits wire them in and remove solidcore-tess's own
planner, so one mesher remains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* solidcore-tess: remove its own planner and plan, replaced by SolidCraft's

solidcore-tess's planner (src/planner/) and plan (src/plan.rs) were a port
of SolidCraft's; SolidCraft's own moved in with the previous commit, so one
mesher remains (RFC 0003, item 1.1). The next commit wires the moved code in
behind solidcore-tess's public API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Wire in SolidCraft's mesher and evaluator; SolidCraft meshes through solidcore-tess

The moved plan evaluator is the kernel's `solidcore::eval::plan`, in the
kernel's vectors, beside `solidcore::eval` (where the two overlap, they are
unified in a later step). The moved planner is solidcore-tess's `mesher`,
behind its public API: `plan`, `TessPlan` and `FacePlan` (SolidCraft's plan
types, now in solidcore-tess's `plan`, with its `poles` field), `evaluate`
returning the mesh and the faces left out, `PlanStats` and its records,
`MeshTolerance`, `preview` and `simplify`.

- The mesher evaluates surfaces with the kernel's plan evaluator and edge
  curves and pcurves with the kernel through solidcore-convert; it works in
  the kernel's vectors and hands the plan the record's. It keeps SolidCraft's
  text (rustfmt skips it) and allows the lints it does not meet yet, with the
  reason; a panic in planning is caught at `plan` until the next step brings
  checked access.
- SolidCraft's geom re-exports the evaluator as `geom::tess`, through one line
  in xtask/solidcore-seam.txt (until RFC 0003 item 1.8 moves model-evaluation
  callers to ops and tess queries), with converters between its vectors and
  the kernel's and its partials in its own vectors; the B-spline basis
  functions it shares with geom's splines moved into `eval::plan::basis`.
- The kernel crate meshes with `solidcore_tess::plan`; its `MeshTolerance` and
  `DISPLAY_ANGLE` are solidcore-tess's, and its worker map that only the
  mesher used is gone.
- Tests move with what they test: the planner's tests that build bodies with
  SolidCraft's kernel are crates/kernel/src/display_plan_tests.rs, the plan
  types' are in solidcore-tess, the evaluator's cross-check with geom's NURBS
  surface is in geom.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Kernel rig: the shared core names the mesher's new home

tests/kernel-cases/PATHS-ALL still listed crates/kernel/src/tess/**, which the
move emptied, and the rig plan's check fails a glob that matches no file. The
mesher and its plan evaluator are now solidcore-tess's src/mesher/ and the
kernel's src/eval/plan.rs and plan/; they are inside solidcore/** already, and
are named there so the move stays visible in the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* solidcore-tess: ask the moved mesher's pole question once per node

The sag refinement and the flips ask, at every triangle corner, side and
round, whether a node is on a pole, and the self-crossing check asked it twice
per node, once for each chord the node ends. Whether a node is on a pole is a
property of its parameters: a `sag::Poles` memo, shared by refinement and the
flips of a face, asks it once per node, and `tangle::crossing` keeps each
node's answer for both its chords.

This is #13559's fix for solidcore-tess's own planner, which the move replaced,
carried over to the moved mesher with its test
(`the_pole_question_is_asked_once_per_node`: 27,452 questions for 349 nodes
without the memo, at most two per node with it). Triangle counts are unchanged
on the 1,107 kernel-case bodies and primitives, and the coil's test
(`the_spline_coil_keeps_its_triangles`) still passes.

Ported from #13559 by @bherbruck (co-authored by jyviko).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* solidcore: no panic-prone calls in the moved plan evaluator

f64::clamp panics on NaN bounds, so Domain::clamp and wrap_into take max then min. The
derivatives and starting-grid vectors grow as they are filled instead of preallocating a
product that could overflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:15:37 -05:00

64 lines
2.7 KiB
Plaintext

# The shared core: a change to any of these reruns every area of the kernel rig and the ladder
# (scripts/ci/kernel_rig_plan.py). One git pathspec glob a line, relative to the repository root:
# `*` stays within a folder, `**` crosses folders. Each area's own sources are in <area>/PATHS.
#
# The kernel: solidcore's wrapper and the schema 4 record bridge.
crates/smlib/**
# The kernel itself, vendored in this repository (SolidCore): a change to its source reruns every
# area, as a solidcore pin change did before it was vendored (#13153).
solidcore/**
# SolidCraft's mesher and its plan evaluator, moved into it (RFC 0003, item 1.1; within the line
# above, named so the move is visible here).
solidcore/crates/solidcore-tess/src/mesher/**
solidcore/crates/solidcore/src/eval/plan.rs
solidcore/crates/solidcore/src/eval/plan/**
# The geometry every body is made of: B-rep record, curves, surfaces, meshes.
crates/geom/**
# The kernel's core, which every case goes through: bodies, extrude/revolve/primitives, booleans
# and placements, the planar prisms, the sweeps and booleans, history and provenance, the
# native bridge to the kernel, tessellation, and what the grader measures (measure, validity, counts).
crates/kernel/Cargo.toml
crates/kernel/src/body.rs
crates/kernel/src/boolean_record.rs
crates/kernel/src/build.rs
crates/kernel/src/freeform.rs
crates/kernel/src/heal.rs
crates/kernel/src/history.rs
crates/kernel/src/lib.rs
crates/kernel/src/measure.rs
crates/kernel/src/native.rs
crates/kernel/src/native/**
crates/kernel/src/numbered.rs
crates/kernel/src/ops.rs
crates/kernel/src/par.rs
crates/kernel/src/planar_regularize.rs
crates/kernel/src/planar_sources.rs
crates/kernel/src/plane_fit.rs
crates/kernel/src/prism.rs
crates/kernel/src/prism_curve.rs
crates/kernel/src/prism_measure.rs
crates/kernel/src/profile.rs
crates/kernel/src/provenance.rs
crates/kernel/src/record.rs
crates/kernel/src/shell_groups.rs
crates/kernel/src/smlib_boolean.rs
crates/kernel/src/smlib_sweeps.rs
crates/kernel/src/topo.rs
crates/kernel/src/validity.rs
crates/kernel/src/watch.rs
# Timeline evaluation and the model cache, which every feature is evaluated through.
crates/doc/src/eval.rs
crates/doc/src/model_cache.rs
crates/doc/src/walk.rs
# The command registry and the solid feature commands every case starts with (sketches made
# into boxes, cylinders, extrusions, revolutions, combines, moves; fillets, holes, shells, sweeps
# and lofts live there too).
crates/engine/src/cmd/features.rs
crates/engine/src/cmd/mod.rs
# The rig itself: the grader, the runner, the selection and this gate's workflow.
.github/workflows/kernel-rig.yml
apps/solidcraft-cli/src/kernel_cases.rs
scripts/ci/kernel_rig_plan.py
xtask/src/kernel_cases.rs
xtask/src/kernel_ladder.rs