[vtk-developers] Python and the function GetParametricCoords()
Andrew Maclean
andrew.amaclean at gmail.com
Sun Feb 18 17:20:30 EST 2018
I was looking at converting Bill's excellent example:
https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/IsoparametricCellsDemo/
into Python but I have run into a problem with respect to
GetParametricCoords()
It seems to return a void pointer not an expected tuple even though the
example below is a primary cell.
There are no tests in the Python tests for GetParametricCoords() yet it is
wrapped Ok as far as I can see. Does anyone have a solution?
Here is some test code that illustrates the problem:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import vtk
def main():
xx = vtk.vtkQuadraticEdge()
print('Is it a primary cell?', xx.IsPrimaryCell())
# help(vtk.vtkQuadraticEdge.GetBounds)
# help(vtk.vtkQuadraticEdge.GetParametricCoords)
# print(dir(vtk.vtkQuadraticEdge))
pcoords = xx.GetParametricCoords()
# Here we expect a tuple of nine floats.
print('pcoords:', pcoords)
# GetBounds() works.
bounds = xx.GetBounds()
print('bounds:', bounds)
if __name__ == '__main__':
main()
--
___________________________________________
Andrew J. P. Maclean
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtk-developers/attachments/20180219/c25fa9a4/attachment.html>
More information about the vtk-developers
mailing list