Skip to content

[codex] improve fillet tessellation handling - #6

Closed
lucia3e8 wants to merge 3 commits into
masterfrom
fillet
Closed

lucia3e8 wants to merge 3 commits into
masterfrom
fillet

Conversation

@lucia3e8

@lucia3e8 lucia3e8 commented Apr 7, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

This draft wires in the current fillet-tessellation work from fillet.

The main changes are:

  • improve torus/fillet surface lowering and winding so the QB24031121 fillet faces tessellate instead of showing holes
  • harden STEP parsing and example error handling for empty or malformed inputs
  • carry forward related triangulation, CDT, and diagnostics changes needed to support and validate the new tessellation path

Why

The immediate issue was that curved fillet faces from the OpenCascade golden-master case were not tessellating correctly in our pipeline. The torus annulus lowering path and face orientation handling needed to be fixed so the generated STL matched the intended closed surface behavior.

Impact

  • QB24031121.step now tessellates without the missing curved patches/backface-hole behavior that was present before
  • the STEP example path now fails cleanly on empty input instead of panicking
  • this branch still needs regression cleanup on part of the component dataset, so this PR is intentionally opened as a draft

Root cause

The failing fillet faces were toroidal annuli bounded by closed circular loops, but the old lowering wrapped them poorly in 2D and one recovered annulus still had incorrect winding. That caused CDT failures first, and then backface-culling artifacts even after triangles were emitted.

Validation

  • cargo run -p gui --release --example test_tessellate -- /Users/lucia/Downloads/QB24031121.step --stl /tmp/qb_downloads.stl
  • cargo run -p triangulate --release --example step_to_stl -- /Users/lucia/Downloads/QB24031121.step --out /tmp/qb_step_to_stl.stl
  • TEST_ASSETS_DIR=/Users/lucia/diode/clickable/data/component_dataset/models RUST_LOG=error cargo run -p gui --release --example regression_test -- --compare /tmp/component_master_baseline.json

Current component-dataset compare vs master:

  • total timing improved from 14751.2ms to 13978.9ms (-5.2%)
  • panic count unchanged at 1 (36907406S.step on both branches)
  • error count regressed from 4609 to 4942
  • 25 files have worse error counts, with the largest regressions on 125_3203_001_A.step, WE-LANAQ_749023310_STP.step, SRP5030CA-4R7M.step, SRP5030CA.step, IC_Texas_Instruments_LM73100RPWR_eec.step, and TCAN3404DRQ1.step

Notes

This should be reviewed as a draft/WIP branch. The QB-specific hole fix is in place, but the component-dataset regressions still need to be worked down before this is ready to merge.


Note

Low Risk
Low risk because changes are overwhelmingly formatting/reordering with no apparent algorithm or API behavior changes; main risk is accidental semantic change in a few reformatted expressions or control-flow blocks.

Overview
Mostly a formatting-only PR. It runs a broad rustfmt-style cleanup across cdt (examples and core modules like triangulate, half, hull, contour, and lib) and express (examples plus gen.rs), including import reordering, line wrapping, and consistent brace/indent style.

A few small readability refactors are included (e.g., wrapping multi-arg calls/closures and normalizing some one-line expressions), but no new functionality or algorithm changes are introduced in the diff.

Reviewed by Cursor Bugbot for commit 0dc3bda. Bugbot is set up for automated code reviews on this repo. Configure here.

@lucia3e8 lucia3e8 closed this Sep 23, 2026
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.

1 participant