Skip to content

Skip unsupported geometrically bounded surface representations - #25

Open
Jassy930 wants to merge 1 commit into
Formlabs:masterfrom
Jassy930:fix/skip-geometrically-bounded-representation
Open

Skip unsupported geometrically bounded surface representations#25
Jassy930 wants to merge 1 commit into
Formlabs:masterfrom
Jassy930:fix/skip-geometrically-bounded-representation

Conversation

@Jassy930

Copy link
Copy Markdown

Fixes #24.

Summary

Some STEP exports include auxiliary
GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION entities alongside supported
B-Rep representations.

Foxtrot can parse these entities, but the triangulation traversal previously
treated them as unknown root representations and panicked, aborting otherwise
usable solid geometry.

This change:

  • explicitly recognizes
    Entity::GeometricallyBoundedSurfaceShapeRepresentation;
  • logs the skipped entity ID;
  • continues traversal without attempting to tessellate its curve geometry;
  • adds a sanitized regression fixture and integration test.

Scope

This is a deliberately narrow fallback.

It does not implement tessellation for geometrically bounded surface
representations, and it does not replace the existing catch-all panic with a
blanket skip. Other unknown root representation types still fail as before.

The regression test verifies that:

  • the baseline fixture does not contain the unsupported representation;
  • the augmented fixture does contain and parse it;
  • the baseline mesh is non-empty;
  • adding the auxiliary representation does not change vertex or triangle counts.

Verification

Red/green regression test:

cargo test -p triangulate --test representation_fallback -- --nocapture

Before the source change, the new test panics when traversal reaches the
GeometricallyBoundedSurfaceShapeRepresentation. After the source change, it
passes.

Additional checks:

cargo test -p triangulate --features parallel --test representation_fallback
cargo test --workspace
rustfmt --edition 2018 --check triangulate/tests/representation_fallback.rs
git diff --check

All tests and checks pass with Rust and Cargo 1.96.0. Existing compiler and
future-compatibility warnings remain unchanged.

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.

Triangulation panics on auxiliary GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION

1 participant