Skip to content

Update Foxtrot to load bounded surface STEP files - #11

Draft
Jassy930 wants to merge 1 commit into
johnboiles:mainfrom
Jassy930:codex/foxtrot-gbssr-support
Draft

Jassy930 wants to merge 1 commit into
johnboiles:mainfrom
Jassy930:codex/foxtrot-gbssr-support

Conversation

@Jassy930

Copy link
Copy Markdown

Summary

QuickLookStep currently reports Failed to load STEP file for files that contain
an auxiliary GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION, even when the
same file also contains supported B-Rep geometry.

The root cause is a Foxtrot panic while traversing that representation. The FFI
panic guard converts the panic to false, so QuickLookStep can only surface the
generic load error.

This draft updates the bundled Foxtrot revision to the narrow fix proposed in
Formlabs/foxtrot#25 and rebuilds
the tracked universal static library from that exact source revision.

Changes

  • pin the Foxtrot submodule to
    de733262627f8a48ae882966325e144497d805a4;
  • temporarily use the public HTTPS fork containing that commit so a fresh clone
    can fetch the pinned gitlink;
  • rebuild libfoxtrot_universal.a for both Apple Silicon and Intel Macs;
  • keep the existing FFI header unchanged because this fix does not change the
    C ABI.

Dependency / merge note

This PR is intentionally a draft while Formlabs/foxtrot#25 is under review.

It should not merge with the contributor fork URL. After the Foxtrot change is
merged, this branch should restore .gitmodules to the Formlabs HTTPS URL, pin
the submodule to the upstream merge commit, and rebuild the static library once
more from that final revision.

User impact

STEP files with supported solid geometry plus auxiliary bounded curve
representations can load instead of failing the entire preview. The change does
not add tessellation support for the auxiliary curve representation itself; it
only prevents that unsupported, non-solid representation from aborting supported
B-Rep triangulation.

Verification

  • Confirmed the pinned Foxtrot SHA is publicly fetchable over HTTPS.
  • Ran Foxtrot's step tests and the new sanitized triangulation regression test.
  • Built foxtrot_ffi with the repository lockfile for both
    aarch64-apple-darwin and x86_64-apple-darwin.
  • Verified the rebuilt archive contains both architectures and exports
    _foxtrot_load_step and _foxtrot_free_mesh.
  • Loaded the public fixtures through the FFI:
    • cuboid.step: 24 vertices / 12 triangles;
    • cube_hole.step: 276 vertices / 268 triangles;
    • the sanitized regression fixture: 278 vertices / 260 triangles.
  • Reproduced the original load_failed behavior with the previous library, then
    loaded the same private real-world file successfully with the rebuilt library:
    3,950,886 vertices / 3,042,400 triangles, with finite positions, valid bounds,
    and in-range indices. The private file is not included in this PR.
  • Completed an unsigned Release Xcode build; the app, preview extension, and
    thumbnail extension all link as universal x86_64 + arm64 binaries.

Known limitation

The private stress model still produces 36 non-finite normal components among
approximately 11.9 million normal components. Positions, bounds, and indices are
valid. This is an existing Foxtrot geometry-quality limitation outside the
panic fix and is not represented by the sanitized regression fixture.

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