Skip to content

vtkOBJWriter fixes - #3755

Open
daker wants to merge 3 commits into
Kitware:masterfrom
daker:objwriter-fixes
Open

daker wants to merge 3 commits into
Kitware:masterfrom
daker:objwriter-fixes

Conversation

@daker

@daker daker commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Context

Fixes #3714
Fixes #3715
Fixes #3716

Results

Changes

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are updated to match these changes

daker added 3 commits November 6, 2026 17:49
The writer added //vn after /vt. Thus a face corner with texture
coordinates and normals was v/vt//vn. The OBJ format is v/vt/vn.

The writer now writes v/vt/vn. The PLY to OBJ test expected the
incorrect syntax, and it now expects v/vt/vn.

Fixes Kitware#3714
The writer did not write a texture coordinate when u was -1. But the
faces always use texture coordinate i + 1 for point i. Thus after the
first skipped value, all the subsequent faces referred to an incorrect
texture coordinate, or to a texture coordinate that did not exist.

The writer now writes all the texture coordinates. The face indices
stay aligned with the points.

Fixes Kitware#3715
The writer gave the vtkPoints object to decomposeStrip. decomposeStrip
expects an array of point ids. Thus it logged an error, and the writer
never wrote a strip.

The writer now reads the point ids of each strip from the strip array,
and gives them to decomposeStrip. The triangles keep the strip
orientation.

Fixes Kitware#3716

@finetjul finetjul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

It seems that some issues (e.g. -1 in uv generates some shift) are still in VTK. How easy would it be to automatically report/fix those in VTK C++ as well ?

@daker

daker commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

I will try to reproduce them with VTK C++

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

2 participants