Files
jyviko e12afd11cc Ellipse and spline extrudes make one wall; coplanar faces never lose their names to a budget (#11687)
* Planar sources: decide coplanar faces by support group, no budgets that drop sources

map_planar_sources kept two budgets, `metadata` (2 MB) and `identity_bytes`
(16 MB), charged by each face's source descriptor and by every extra
candidate on its plane. When one ran out, faces silently lost their source
and with it their persistent name: a 300-hole plate whose top a comb of
grooves cuts into 62 strips lost the cap source from strip ~47 on.

The budgets bounded the real cost: each result face looked at every
candidate on its plane, faces x candidates when many faces are coplanar.
The candidates are now grouped by support once (`same_support` against
each group's first plane, through the existing PlaneIndex), each group's
chosen source, ambiguity and inner flag decided once, and the faces
without a role together with the competing tool faces grouped the same
way. Each result face then looks up its plane's few groups. The decision
is the old one: blocked by an unknown or competing support, else the
first candidate on the plane unless another candidate there has a
different plane, source or role.

Work: grouping looks at each candidate's index window once per group
(each candidate is assigned on its group's first look), and each face
looks at the group representatives near its plane, so the planes looked
at grow with faces + candidates. A counter (`looked`) checks it: n
pieces of one cap and n faces on its plane take exactly 2n looks (n*n
before), 3n with n blocking supports.

Tests: the holed plate keeps the cap source on all 62 strips and the
bottom (fails on the old code: face 352 lost its source); the existing
planar source tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

* Extrude: an ellipse or a spline sketch curve sweeps one wall

An extruded ellipse had four side faces (`F2:side:e1#1` to `#4`), one
per conic quarter, and a spline one per span: the profile holds such a
curve as several exact segments and SMLib got each as its own curve.

The Extrude feature's builder (`extrude_whole_sides`) now takes a
`one_curve` test from the caller. Each run of free-form segments of one
degree that it says are one curve goes to SMLib as one B-spline: the
Béziers' control points in a row, knots repeated the degree times at
each joint, each span as long as keeps the speed through the joint the
same (so the curve is C1 there and SMLib makes one face over it, as it
would not over a C0 parametrisation), weights scaled to meet. Exact: the
same curve, reparametrised. A loop starts at a run's start, so no run
wraps round it. The wall's history lists every piece, and its
construction source is its first piece's (as joined collinear lines).

The document says which segments are one curve: ExactSketchCurves now
also holds each free-form sketch curve's exact segments
(`find_free_form`: a segment that is one of them, either way round), and
the profile roles use it, so the wall is named `side:<curve>` from its
history rather than by the curve nearest its mesh centre.

Saved designs rebuild with these walls renamed (`F2:side:e1#k` ->
`F2:side:e1`); accepted, no alias kept.

Tests: kernel `pieces_of_one_curve_extrude_into_one_wall` (an ellipse in
four conics is 3 faces, its volume pi a b h to 1e-6, the wall generated by
all four pieces; a 3-span spline closed by lines is one wall; the same
solid as a face per piece); doc
`an_extruded_ellipse_or_spline_is_one_wall_named_by_its_curve` (one
`F2:side:e1`, no piece names, the same names on a second build and after
reopening).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

* Tests: a tray's far rim name is checked on the exact B-rep face

The tray test took the point `sheet:...:rim.far` finds as right when it
lay within 1e-3 mm of the strip z = 30, 199 <= y <= 200: a slack sized to
the mesh. It now asserts on the face the name finds, on exact geometry:
the point's distance to that face's surface (FaceSurface::nearest) is
within rounding at the part's scale (1e-12 x its size), and the point is
inside the face's boundary, counted by crossings of its record edges
(each asserted to be a line, the rim being planar).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

* Tests: delete tests/naming/, the records no test reads since the naming corpus stopped comparing against them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

* Viewport test: smooth wall joins drawn from eight G2 spline walls

The PR extrudes each spline or ellipse sketch curve as one wall, so the
offset-ellipse ring the test built has no joins between faces any more.
The test now extrudes a circle drawn as eight cubic splines: eight walls
meeting with one curvature along eight upright edges (24 edges in all).
It still checks that those joins are left out of the shaded view, drawn
in the wireframe and selectable as edges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

* Kernel ladder: 009 and 012 record the one-wall extrude (an extruded spline or ellipse sweeps one wall)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ

---------

Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 21:27:14 +00:00
..