Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of X3D IndexedLineSet nodes #5362

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

andre-schulz
Copy link
Contributor

This MR fixes the handling of IndexedLineSet nodes in X3D files. Currently, IndexedLineSet polylines with > 2 indices are mistakenly converted to triangles and polygons. Additionally, this MR adds a unit test.

Fixes #3101

…gles/polygons

Currently, when the coordIndex attribute of an IndexedLineSet contains a
polyline with > 2 indices, X3DGeoHelper::coordIdx_str2faces_arr() will
incorrectly determine the primitive type to be aiPrimitiveType_TRIANGLE or
aiPrimitiveType_POLYGON instead of aiPrimitiveType_LINE.

To fix this, this commit adds functions to explicitly handle an IndexedLineSet.

Fixes assimp#3101
Unit test for issue assimp#3101

Thanks to @mvidiassov for the X3D test file!
@kimkulling kimkulling merged commit 74af43f into assimp:master Jan 9, 2024
8 checks passed
@kimkulling
Copy link
Member

Merged, thanks a lot for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

X3D importer converts polylines into polygons
2 participants