Skip to content

fix: rebuild modeled-thread offsets with consistent seams and trims - #2613

Closed
bendavis wants to merge 3 commits into
tangency-labs:mainfrom
bendavis:fix/thread-offset-periodic-merge
Closed

bendavis wants to merge 3 commits into
tangency-labs:mainfrom
bendavis:fix/thread-offset-periodic-merge

Conversation

@bendavis

@bendavis bendavis commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Offset Face now rebuilds modeled thread faces without invalid seams, folded unused supports, or mismatched corner endpoints.

This fixes the kernel failures behind tangency-labs/solidcraft#11582. The app integration is tangency-labs/solidcraft#11776.

Construction changes

  • Complete periodic seams during generic face cleanup, using the existing boolean cleanup construction.
  • Remove unused support extensions after offset topology construction finishes.
  • Compare replacement-surface normals at corresponding physical points.
  • Rank retained intersection branches by closest-point distance, independent of curve parameterization.
  • Preserve valid tangent-seam constraints and classify shallow crossings using local surface curvature.
  • Preserve paired intersection UV curves across same-parameter support extension and restoration.
  • Solve isolated corners on three exact supports before trimming their fitted intersection curves.
  • Check movement against the actual retained replacement supports, including their constructed continuations.

The validity checker and its tolerances are unchanged. Existing seam behavior remains behind its existing flag. All seven new corrections are unconditional, following the current kernel policy. No compatibility flags are added.

The new regressions use native synthetic geometry in existing test files. The corner regression demonstrates shallow-cut error amplification with three planes and a deliberately imperfect fitted line. The target-membership regression exercises a finite ruled support that continues past its original bounds.

Validation

All twelve native cases pass: both offset signs for segmented external, continuous external, and continuous internal M20x2.5 threads, selecting either the flanks or all lateral faces. Every operation succeeds and every result is manifold and strict Level2 valid.

Formatting, strict workspace Clippy, and wasm checks pass. All 3,363 library tests pass, with four ignored. Two new local-operation sheet integrations exposed an interaction with the recently merged uniform-offset lamina-corner construction. The operation-semantic correction is under final verification; the app backport predates that separate upstream construction.

The app command regression passes inward/outward named-face offsets and saved-history rebuilds. Desktop before/after evidence is attached to tangency-labs/solidcraft#11776.

Historical failures and geometric evidence are recorded in the WR-599 addendum and WR-742 through WR-748. Astra independently reviewed the corner construction, target observation, and integration with the new upstream lamina-corner fix. No C++ parity result is claimed.

Scope and dependencies

Units: topology.brep_p5, topology.face_p1, boolean.merge_p1, topology.brep_local_operation, offset.offset_geometry_creation, offset.offset_executive_p1, offset.offset_executive_p2, offset.offset_faces, surface.surface_p4.

Expected edits: those Rust modules, existing native test modules, and individual defect records.

The separate thread-face consolidation change is tangency-labs/solidcraft#11737. This correction covers both the original segmented faces and consolidated multi-turn faces.

A minimal backport keeps the app integration on its current kernel API. Unrelated recent kernel constructions are not pulled into that app change.

Status: draft while the final native caller checks complete. The app pin is published in tangency-labs/solidcraft#11776.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@bendavis bendavis changed the title fix: reconstruct periodic seams after topological face merging fix: preserve seams and surface orientation through local offsets Nov 3, 2026
Benjamin Davis and others added 2 commits November 4, 2026 07:39
Co-Authored-By: Codex <noreply@openai.com>
Complete periodic cleanup and preserve exact support orientation, paired UV
curves, local trim constraints, branch selection, and three-support corners.
Recognize retained replacement supports using verified geometric inverse hints.

Native signed thread-offset cases and the app's saved named-face history pass.
Formatting, strict workspace clippy, and wasm checks pass. The final native
unit and caller rerun is in progress on this exact source tree.
No compatibility flags are added and no validity tolerance is relaxed.

Related: tangency-labs/solidcraft#11582

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
@bendavis
bendavis force-pushed the fix/thread-offset-periodic-merge branch from 61d4e92 to b6feaf2 Compare November 4, 2026 15:11
@jyviko jyviko added the urgent Needs attention first label Nov 4, 2026
@bendavis bendavis changed the title fix: preserve seams and surface orientation through local offsets fix: rebuild modeled-thread offsets with consistent seams and trims Nov 4, 2026
@jyviko jyviko removed the urgent Needs attention first label Nov 4, 2026
LocalOperation uses its executive distance to size support extensions.
It is not the normal displacement of its replacement surfaces. Keep the
uniform-offset vertex image on normal offsets and use the supplied support
constraints for local replacements.

Both affected local sheet regressions pass with the equivalent vertex-image
branch disabled. Keep that correction enabled in the regressions to cover
operation-semantic dispatch. Formatting, strict clippy, and wasm pass;
rebuilt native caller checks remain pending while app CI runs.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
@jyviko

jyviko commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Hold off until sweeped threads land as SmProceduralSweep.

@jyviko

jyviko commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

@bendavis thank you for the depth of this work. The M20 cases, the defect records and the corner analysis are exactly what we needed to see where thread offsets break.

Please close this PR and start from tangency-labs/solidcraft#13768. A thread wall is now a screw-swept ProceduralSweep (#2633), and the offset of a screw surface is again a screw surface: the screw sweep of its offset section. Two neighbouring offset walls meet along a helix you get from one 2D intersection in a half-plane through the axis. Once thread walls are offset on their definition, the seam completion, the branch ranking, the three-support corner solve and the support trimming here aren't needed.

Your 12 M20 cases (both signs, segmented and continuous, external and internal, flanks and all lateral faces) are tangency-labs/solidcraft#13768's acceptance set. Please carry them over, along with the WR-742 to WR-748 records. If any of the corrections here turn out to matter for faces that aren't screw walls, they can come back as their own small PRs.

@jyviko jyviko closed this Nov 4, 2026
bendavis pushed a commit to bendavis/solidcore that referenced this pull request Nov 4, 2026
Renumber the seven records carried from tangency-labs#2613 as WR-744 through WR-750,
using the next free range on upstream main a91e108. Update their file
names, headings, and cross-references together.

Include the already-merged ID-only correction from upstream commit
a48605d (tangency-labs#2731), so the inherited
iso-circle record collision also clears. Its Rust changes are comments
only; no geometry implementation changes.

The record-ID checker passes on this branch and on main's record set plus
our seven records. Its ten existing unit tests and git diff --check pass.

Co-Authored-By: Andrzej Błasik <andy.lbn@gmail.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants