Skip to content

vtkPLYWriter fixes - #3753

Open
daker wants to merge 6 commits into
Kitware:masterfrom
daker:plywriter-fixes
Open

daker wants to merge 6 commits into
Kitware:masterfrom
daker:plywriter-fixes

Conversation

@daker

@daker daker commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Fixes #3717
Fixes #3718
Fixes #3719
Fixes #3720
Fixes #3721
Fixes #3722

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 6 commits November 6, 2026 17:44
The writer added the generated comment and the TextureFile comment to
the headerComments option at each write. Thus each write added one more
comment to the option and to the file.

The writer now makes a new comment list for each write. The
headerComments option stays the same.

Fixes Kitware#3719
The writer replaced the withUVs and withColors values with a test for
the data. Thus a false value had no effect.

The writer now writes the texture coordinates and the colors only when
the option is true and the data has the attribute.

Fixes Kitware#3720
The withNormals option is true by default, and the writer did not
compare it with the data. Thus the header declared nx, ny and nz, but
the vertex records did not have normals. A reader then read all the
vertices incorrectly, in the ASCII and the binary formats.

The writer now declares and writes the normals only when the option is
true and the polydata has normals.

Fixes Kitware#3718
The writer read all point scalars as 3 component 8 bit colors. Thus
RGBA colors got incorrect values, and float scalars became uchar values.

The writer now writes colors only for 8 bit scalars with 3 or more
components. It reads each tuple with the number of components of the
array.

Fixes Kitware#3722
The writer accepted the transform option, but it wrote the points
without the transform.

The writer now applies the transform matrix to each point.

Fixes Kitware#3721
The writer read the cell array in steps of 4 and wrote 3 point ids for
each face. The binary face size also used 3 ids. Thus quads and larger
polygons lost points, and all the subsequent faces were incorrect.

The writer now reads the point count of each cell, and writes all the
point ids of the cell. The binary face size uses the length of the cell
array.

Fixes Kitware#3717

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