Skip to content

Avoid overflow when detecting binary STL - #1583

Open
Sinkleberg wants to merge 1 commit into
nschloe:mainfrom
Sinkleberg:codex/stl-triangle-count
Open

Sinkleberg wants to merge 1 commit into
nschloe:mainfrom
Sinkleberg:codex/stl-triangle-count

Conversation

@Sinkleberg

Copy link
Copy Markdown

Reading a valid ASCII STL raised FloatingPointError with NumPy 2.2.6 when overflow checks were enabled. Converting the triangle count to a Python integer keeps the size check accurate.

All four STL round-trip tests pass, including the ASCII case that failed before.

Fixes #1523. Prepared with Codex.

This branch has not been deployed

No deployments
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.

FloatingPointError: overflow encountered in scalar multiply when reading ASCII with numpy 2.2.6

1 participant