Skip to content

Conversation

@eino
Copy link

@eino eino commented Mar 9, 2022

Description

Fix parsing of VTP, currently failing when a data item contains multiple
components.
In that case, ele['#text'] is not the compressed data but
an array of 1 element (this data). This makes the parsing fail as Base64toByteArray expects a string.
Use the array's content for parsing.

Fixed #23683

Eino Gourdin and others added 3 commits March 9, 2022 11:00
Fix parsing of VTP, currently failing when a data item contains multiple
components.
In that case, ele['#text'] is not the compressed data but
an array of 1 element (this data). This makes the parsing fail as Base64toByteArray expects a string.
Use the array's content for parsing.
Copy link
Collaborator

@Mugen87 Mugen87 left a comment

Choose a reason for hiding this comment

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

I can confirm that the test asset from #23683 loads now correctly.

@Mugen87 Mugen87 changed the title Fix parsing of VTP data with multiple components VTKLoader: Fix parsing of VTP data with multiple components. Mar 9, 2022
@mrdoob mrdoob added this to the r139 milestone Mar 9, 2022
@mrdoob mrdoob merged commit e30e515 into mrdoob:dev Mar 9, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 9, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
…23684)

* Fix parsing of VTP data with multiple components

Fix parsing of VTP, currently failing when a data item contains multiple
components.
In that case, ele['#text'] is not the compressed data but
an array of 1 element (this data). This makes the parsing fail as Base64toByteArray expects a string.
Use the array's content for parsing.

* Update VTKLoader.js

* Update VTKLoader.js

* Update VTKLoader.js

* Update VTKLoader.js

Co-authored-by: Michael Herzog <[email protected]>
Co-authored-by: mrdoob <[email protected]>
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.

VTP parsing fails for DataArray with multiple components

3 participants