Repository navigation
Conversation
…tight_box_searches_trim Empty claim commit for the group-B misc flag batch (part of tangency-labs#14246). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
Contributor
…rches_trim The fixed paths become the only ones: - linear_sweep_arc_is_cylinder (WR-565): CreateLinearSweep makes a circular arc short of a whole turn that is swept square to its plane an SmCylinder (arc_sweep_cylinder), not an SmSurfOfExtrusion; - face_tight_box_searches_trim (WR-588, WR-651): SmFace's tight box searches the trimmed face's own extremes inside its trim (face_directed_max); the copy of the surface's global solve over the face's domain goes. Removed: the two fields, SolidCraft's preset lines, the fixes.json and issue_2260 list entries, and every test setting of them. Tests that ran both settings keep the fixed half; the upstream halves (an extrusion for a partial arc, the global-solve box of a trimmed face) go. issue_1950's pin of the extrusion operand loses its flag line; its pinned volumes move in the expectations commit. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
…hamfer is fixed linear_sweep_arc_is_cylinder goes back to an opt-in flag; this PR now retires face_tight_box_searches_trim alone. With the arc swept as a cylinder by default, issue_880_half_arc_rim_chamfer fails: the chamfer of the first rim half (offsets (1, 2), (2, 1) or the equal 1.4437 of setbacks 1 and 1; (1, 1) passes) builds 4 faces to 7 but fails check_brep Level 2 test tangency-labs#5 ("control net doubles back"). The chamfer face's 244 x 2 Hermite net reverses on its cut-face rail at net rows 142 to 144 (x 15.67 / 15.60 / 15.70, z 10), in the run-on past the rim half's end: the station at knot 16.709 lies on a span of 0.346 whose end tangents fit the neighbouring spans of 0.985, so its handles overshoot, and its wall-rail station sits at z 8.2626 between stations at 8.1848. On the extruded wall the same chamfers pass. That is a defect of the run-on join, to be fixed before the flag retires. The issue_1950 volume move is understood and is not a blocker: both the extruded and the cylinder wall shell into a B-spline inner arc face (the certified offset net, or the B-spline extension of the offset cylinder), so the WR-545 exact-edge step leaves the cavity's cap edges marched, about 1.5e-6 inside the r 8 circle (edge tolerance 2e-5); the cap faces then lack 1.9e-5 or 3.7e-5 mm^2 of their half disc, times the 23.5 depth, which is the whole +4.2e-4 or +8.6e-4 against the closed form. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
With the trimmed-face search the only path, a face that has no vertex and no edge (made over a UV domain smaller than the tolerance, as the goldens' adv_tight_bs0/bs1_[0, 0, 1e-06, 1e-06] faces are) started the six searches from the empty box of its edges. A plane patch is monotone everywhere, so every cell was passed over as "the edges hold the extreme", and the empty box's inverted bounds came back as points: the face boxed to +-1e20 on every axis. Upstream's global solve left the box empty, which holds none of the face either. Such a face's points are the surface's over its domain, so each side is now that domain's bound as the search bounds a cell it leaves unsolved (unsolved_cell_top): the control-point hull of the subpatch over the domain plus its rounding, else the loose box. Regression test tight_box_of_a_face_without_edges_is_its_surfaces_box (fails without the change: +-1e20). Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
28 rows move: query.face_p3 (21), query.face_p1 (4), query.brep (3). Each is a face's tight box, or a union of them, and the move comes from the trimmed-face search replacing the global solve over the face's domain: - 17 boxes grow on a side, and a face point classified inside the face lies beyond the old side (a 161 x 161 grid over the face's domain, classified by point_classify); the new side holds it; - 2 faces with no edges (adv_tight_bs0/bs1 over [0, 1e-6]^2) get their subpatch's hull ([0, 1e-6]^2 x [0, 1.2e-12] to 3e-14), not an empty box; - 1 side (query.brep gen0128, z max) shrinks by 1.37e-3 to the search's bound, still above every grid point of the face; - the rest are within 8 ulps (the cone face's 0 / -5 / -5 corner) or a 4.5e-7 growth on query.face_p3 gen0133. The PR body has the row-by-row table. Adds the WR-588 addendum. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
Clippy's unused-qualifications lint: loopuse is already imported. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
…ex or a plane Review of tangency-labs#17685: the edgeless branch keyed on an empty box, so a face trimmed by a lone vertex kept a one-point box (the search's monotone rule assumes edges hold the extreme), and a plane returned its empty box early. The branch now keys on the face having no edges, unions the vertices in, and runs before the planar return. New test tight_box_of_a_planar_face_without_edges_is_its_planes_box fails under the previous gating (empty box) and passes now. The cell refusal's message names both callers. The WR-588 addendum says so. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
… its subpatch wr_660_planar_path_pose's line-then-arc sweep, posed and moved back, boxed its flat cap face to x 22.44 where the face ends at 22. The cap is a bilinear B-spline whose face domain starts at u -2.6100000000000123 and whose natural domain starts at -2.610000000000012, one ulp in. cell_patch refused every cell on that side (its subpatch is short of the cell), so those cells took the solver-only rule, and at the depth limit that rule takes the solver's greatest value: 22.44, at a corner outside the face. With the patch, the cell is monotone and passed over, as on the other side. cell_patch now clamps a side that lies past the surface's domain by no more than 16 ulps (of the larger of the bound and the domain's width) onto it; a side further out is kept and still refused. Tests: wr_660 (fails without the change), a_cell_past_its_surfaces_domain_by_rounding_is_clamped_to_it. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
…urface's domain bf7d3ba clamped a cell side lying up to 16 ulps past the surface's domain onto it. That is an acceptance threshold, not a bound. It is replaced by the exact set operation it stood in for. The surface is the image of its natural domain and has no point past it. The face's points in a cell are therefore the surface's over the cell intersected with that domain. CopySubPatch already extracts exactly that rectangle (it takes the same intersection), so cell_patch now compares the subpatch with the intersection rather than with the raw cell. The operation is min/max, with no tolerance and no size limit on the overhang. A cell disjoint from the domain has no subpatch, as before. Root cause of the overhang (probe, not committed): the planar-path sweep builds the cap face with a domain that starts one ulp past its bilinear surface's (-2.6100000000000123 against -2.610000000000012). The overhang is already present before the pose is undone, and the transform does not add it. Tests: wr_660_planar_path_pose passes (it fails without the bf7d3ba change). a_cell_past_its_surfaces_domain_is_decided_on_the_part_inside_it replaces the clamp's test. It covers a one-ulp overhang and a 3-unit overhang, both decided on the subpatch over the intersection, and a disjoint cell that gets none. The old code returns None for the first case. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
…lamps; blend hull raised by its net's bound Two fixes from review: - cell_patch intersects a cell with the natural domain only on a B-spline surface whose evaluation clamps to that domain: any form but power basis, with out-of-bounds evaluation off (evaluate_impl's clamp). An extrapolating B-spline, or a kind that is not evaluated through its base (a plane, a revolution, a blend), has points past the domain that the subpatch's hull does not hold. Those keep the raw cell, which a patch short of it does not decide, as before. - unsolved_cell_top raises a procedural blend's hull by its definition's certified bound. The base is the net, and the blend evaluates from the definition, within |B - S| <= bound, wherever the net does not answer. The edgeless-face branch reaches this. The by-patch search runs only on B-spline kinds. Tests: the domain test now also checks that an out-of-bounds-enabled surface's overhanging cell gets no subpatch. a_procedural_blends_hull_is_raised_by_its_nets_bound is new. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
…ight box Main's tangency-labs#17362 (fe89576) makes brep_mass_properties integrate about the middle of the body's tight box and scale its errors by that box's size. This branch changes that box (the trim search is the only path), so after merging main 14 blend.fillet_executive_p3 rows move, in mass_properties only: - every other field of each row (statuses, counts, topology, geometry) is bit for bit the same, so the body is the same; - on each row the new body box lies inside main's, each side moved by at most 3.6e-11 (rounding of the search against the global solve); - each moved component changes by at most 4.8e-16 of its quantity's own scale (the value for area/volume/mass, the largest inertia for inertia and products, sqrt(I_max/m) for the centroid): rounding, against the integrator's requested accuracy of 1e-4. Attribution: the same 14 rows move with 6ed041e's two changes reverted one at a time, with ba56c74 reverted, and with bf7d3ba's p3.rs; with main's p3.rs and kernel.rs no row moves. Part of tangency-labs#14246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes the trimmed-face tight box search (WR-588, WR-651, tangency-labs/smlib@95bf434) the only path of
SmFace::CalculateTightBoundingBoxand removes theface_tight_box_searches_trimflag. It also fixes the box of a face with no edge: one with no vertex either boxed to ±1e20.Part of #14246
Changes a default: no
The kernel's default moves to what SolidCraft already runs. No UX default changes.
Test change: the tests' upstream halves go:
tight_box_of_a_trimmed_face_without_the_fix_is_upstreams,trimmed_rational_cylinder_box_without_the_search_is_the_edges,rounded_corner_box_without_the_search_holds_the_octant, and the global-solve (waist) half ofwr_588_barrel_cut_below_its_waist_is_boxed_to_its_upper_bulge. Each pinned a box that misses part of its face, or one taken from points outside it. Tests that ran both settings keep the fixed half, with the same assertions. Two new tests are added:tight_box_of_a_face_without_edges_is_its_surfaces_boxandtight_box_of_a_planar_face_without_edges_is_its_planes_box. 28 golden rows move with the search (table below), and 14blend.fillet_executive_p3rows move inmass_propertiesonly, because main's #17362 now integrates mass about the tight box (class M below, commit f2dbf0b).What changes
query/face/p3.rs: the sixface_directed_maxsearches always run. The copy ofSurface::CalculateTightBoundingBox(one global solve per direction over the face's domain, keeping solutions not classifiedUNKNOWN) is gone.The field, SolidCraft's preset line (
crates/smlib/src/core.rs), thefixes.jsonandissue_2260list entries, and every test setting are removed. The WR-588 addendum names the removed flag.Face without edges (new, PROVEN by test). The search passes over a monotone cell because the face's edges hold its extreme. A face with no edge breaks that premise. Faces made over a UV domain smaller than the tolerance, or trimmed by a lone vertex, are like this. With no vertex either, the empty box's inverted bounds came back as points: ±1e20 on every axis. A plane returned that empty box early. Upstream left the box empty, which holds none of the face either. The face's points are the surface's over its domain. So, before the planar early return, each side takes the bound the search already uses for a cell it leaves unsolved (
unsolved_cell_top): the subpatch's control-point hull plus its rounding, else the loose box, unioned with any vertex.unsolved_cell_toprefuses a non-finite loose box. That is the only valid-to-refusal change: main returned Ok(±1e20) for that face. Its message now names both callers.tight_box_of_a_face_without_edges_is_its_surfaces_box(a crowned B-spline) andtight_box_of_a_planar_face_without_edges_is_its_planes_box(a flat bilinear patch) assert that the box holds the surface's corner and middle points and is under 2e-6 across.|B - S| <= bound, and its evaluation answers from the definition when the net does not. So the hull bound of an edgeless blend face is raised by that bound, on top of the hull's rounding. The by-patch search never reaches a blend, because it runs only onSurfaceKind::BSpline.a_procedural_blends_hull_is_raised_by_its_nets_boundasserts top >= hull + rounding + bound.A cell past its surface's domain (new, PROVEN by test and by construction). In
wr_660_planar_path_pose's line-then-arc sweep, posed and moved back, the flat cap face boxed to x 22.44, but the face ends at 22.cell_patchcompared the subpatch with the raw cell, so it refused every cell on that side. Those cells then fell back to the solver-only rule, which at the depth limit takes the solver's greatest value: 22.44, at a corner outside the face.evaluate_impl),cell_patchintersects the cell with that domain (Extent2d::intersect, min/max), and the subpatch must cover the intersection. This has no ulp window and no limit on how far the cell overhangs. Every other surface keeps the raw cell, and a patch short of it still decides nothing. That covers an extrapolating B-spline and a kind that is not evaluated through its base. A cell disjoint from the domain still gets no subpatch.CopySubPatchextracts, because it takes the same intersection first, so the subpatch's control-point hull bounds every face point in the cell. The patch-short check still catches knot snapping. An earlier push of this PR (bf7d3ba) clamped sides that were at most 16 ulps out. That was an acceptance window, so it is replaced.points_in_faceintersects the trim domain with the surface domain the same way), and the box is right for any producer. That makes the query-side intersection the fix that holds in general. The sweep's one-ulp domain is harmless once it is read this way. We are open to tightening the producer as well, if a maintainer prefers.wr_660fails without the change.a_cell_past_its_surfaces_domain_is_decided_on_the_part_inside_ituses a cubic patch:Left out:
linear_sweep_arc_is_cylinder(stays a flag)The first push retired it too. With an arc swept as a cylinder by default,
issue_880_half_arc_rim_chamferfails:check_brepLevel 2 test Rename Fusion-derived command ids to our own dotted ids #5, "control net doubles back"; (1, 1) passes. The same chamfers on the extruded wall pass.This is a defect of the run-on join. It is fix work for its own PR. MEASURED (probe); commit af2d80e has the numbers.
Also measured for that flag, so the follow-up does not redo it:
blend.fillet_executive_p3rows: rerunning on the cylinder body with the old offsets gives the old volumes back to within 6.6e-7 relative. With the setbacks, the runner derives the offsets at the rim edge's parameter midpoint, and the blend edge use lies on the other face, so the offsets swap.issue-880-half-arc-rim-1-setbacks-1-1goes from 1001 to a solid with the old offsets too. MEASURED.primitive.primitive_creation_p1rows: the side face is the cylinder in its own parameters. At distance 0 the sweep makes no face, as upstream's whole-circle and plane branches already do.Moved golden rows (28 + 14)
How the search decides a cell:
face_directed_max_withsays, that is no bound on the cell's greatest.So the search is not a certified enclosure in general. It is upstream's own search, which this PR makes the only path, not something it adds. That limit is the existing §7.5 gap of edge and face tight boxes; this PR does not close it.
The evidence for each row is therefore MEASURED. The witness is the extreme of a 161 × 161 grid over the face's UV domain, keeping only points that
point_classifyputs inside the face (SM_PC_FACE). Those are face points, so a side that excludes one is too small. The probe was temporary, in the runners, and is not committed.Class M: mass rows that now read the tight box (14 rows, f2dbf0b)
Cause: main's #17362 (fe89576, merged 11-16) makes
brep_mass_propertiesintegrate about the middle of the body's tight box and scale its errors by that box's size (before, the loose box). This PR changes the tight box, so after merging main these rows move. Attribution (each a fullblend.fillet_executive_p3run): the same 14 rows move, bit for bit, with 6ed041e's net bound reverted, with its clamp condition reverted, and with this branch's p3.rs at bf7d3ba (the pre-merge head, whose gate passed against the pre-#17362 mass code). With main's p3.rs and kernel.rs, no row moves.Rows:
curve-sih-box_diff_cyl-all-edges-{r0.1,r0.25,r0.5,r1.0,step2},issue920-cylinder-rim-edge2-{constant,variable-constant-law}-{r10.0,r9.99},issue_2176_tabbed_plate_{tab_top,disc_wall}_r0_5,source-file-box_diff_cyl-all-edges,source-file-brick-all-edges,stubs4-torii_unioned-e2-r0.5.mass_properties(statuses, counts,result_topology,result_geometry) is bit for bit unchanged, so the body is the same. The replay script asserts it per row.brep_mass_propertiesthat differs: it reads the body andcalculate_tight_bounding_box(its middle and size), nothing else that this PR touches. The exact mass properties do not depend on the integration point (the code's shift to the origin/centroid).Why the new values are right: same body, same integral, a new integration point within 3.6e-11 of the old; every change is at the rounding level of its tensor. #17362 accepted its own 100 moved rows on the same basis at up to 3.6e-6.
Certificate checklist (§7)
sub_patch_rounding. Without a finite rounding bound it falls back to the loose box, and a non-finite loose box is a typed refusal (unsolved_cell_top).is_empty_boxis written so that a NaN bound counts as empty.tight_box_finds_a_trimmed_faces_peak_when_the_surface_peaks_outsidestill catches a box that misses its face's peak.Overlap
leon-vv's #16572 edits the same
if k.fixes.face_tight_box_searches_trim { ... }block ofquery/face/p3.rs. This PR removes the condition and dedents the block, so whichever lands second has a mechanical conflict in that block and in the module table's "(opt-in, WR-588)" line.Checks
cargo fmt; clippy (-p solidcore -p solidcore-ops --all-targets -D warnings) clean.query::face::p3(27),wr_660_planar_path_pose,issue_1799,fork_95bf434,wr650,issue_2020,issue_2260,issue_1950,issue_880,issue_1477.🤖 Generated with Claude Code
https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV