vtkPolyData subclass
See original GitHub issueHello, and thanks for the incredibly useful project!
I have a class called TSurf() derived from vtkPolyData. Basically it is a standard PolyData, plus some simple attributes I use to store metadata. However, when I try to show one instance of the class in vtkplotter, I get a warning and nothing is shown:
Error: cannot build mesh from type:
<class 'pzero.objects_factory.TSurf'>
This is what I get if I do a print(MY_OBJECT), so it should be OK:
vtkPolyData (000001E67BDA2420)
Debug: Off
Modified Time: 17776
Reference Count: 2
Registered Events: (none)
Information: 000001E67BA1AA40
Data Released: False
Global Release Data: Off
UpdateTime: 0
Field Data:
Debug: Off
Modified Time: 64
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 411
Number Of Cells: 632
Cell Data:
Debug: Off
Modified Time: 67
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (000001E67BD94420)
Event: 33
EventName: ModifiedEvent
Command: 000001E67BA1A7C0
Priority: 0
Tag: 1
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Point Data:
Debug: Off
Modified Time: 66
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (000001E67BD946C0)
Event: 33
EventName: ModifiedEvent
Command: 000001E67BA1A7C0
Priority: 0
Tag: 1
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Bounds:
Xmin,Xmax: (547500, 549046)
Ymin,Ymax: (5.06305e+06, 5.06477e+06)
Zmin,Zmax: (-86.6025, 2.28882e-05)
Compute Time: 53219
Number Of Points: 411
Point Coordinates: 000001E67BB609B0
Locator: 0000000000000000
Number Of Vertices: 0
Number Of Lines: 0
Number Of Polygons: 632
Number Of Triangle Strips: 0
Number Of Pieces: 1
Piece: -1
Ghost Level: 0
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (7 by maintainers)
Top Results From Across the Web
vtkPolyData Class Reference - VTK
1, vtkPolyData::ComputeBounds() used to ignore points that do not belong to any cell. That was not consistent with other vtkPointSet subclasses and thus...
Read more >vtkPolyData subclass · Issue #156 · marcomusy/vedo - GitHub
I have a class called TSurf() derived from vtkPolyData. Basically it is a standard PolyData, plus some simple attributes I use to store ......
Read more >vtkPolyDataWriter class Reference
Return 1 if this class type is the same type of (or a subclass of) the named class. ... void vtkPolyDataWriter::SetInput, (, vtkPolyData...
Read more >[vtkusers] I need to get the X, Y, Z coordinates of a point in a ...
Basically, a subclass of vtkAlgorithm allows you to access input/ouput that > could be vtkPointSet > From vtkPointSet (such as vtkPolyData, ...
Read more >vtkPolyData class Reference
To traverse cells with vtkPolyData we would retrieve the cell array ... Return 1 if this class type is the same type of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Perfect! Thanks!
Hello, I have changed line 120 of mesh.py to:
elif isinstance(inputobj, vtk.vtkPolyData):
and line 129 to:
elif isinstance(inputobj, vtk.vtkStructuredGrid) or isinstance(inputobj, vtk.vtkRectilinearGrid):
It works perfectly.
Thanks for all!