<div dir="ltr"><div class="gmail_default">I was looking at converting Bill's excellent example: <a href="https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/IsoparametricCellsDemo/">https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/IsoparametricCellsDemo/</a> into Python but I have run into a problem with respect to GetParametricCoords()<br><br>It seems to return a void pointer not an expected tuple even though the example below is a primary cell.</div><div class="gmail_default"><br></div><div class="gmail_default">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?</div><div class="gmail_default"><br></div><div class="gmail_default">Here is some test code that illustrates the problem:</div><div class="gmail_default"><br></div><div class="gmail_default"><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.8pt"><span style="color:rgb(128,128,128);font-style:italic">#!/usr/bin/env python<br></span><span style="color:rgb(128,128,128);font-style:italic"># -*- coding: utf-8 -*-<br></span><span style="color:rgb(128,128,128);font-style:italic"><br></span><span style="color:rgb(0,0,128);font-weight:bold">import </span>vtk<br><br><br><span style="color:rgb(0,0,128);font-weight:bold">def </span>main():<br> xx = vtk.vtkQuadraticEdge()<br> <span style="color:rgb(0,0,128)">print</span>(<span style="color:rgb(0,128,128);font-weight:bold">'Is it a primary cell?'</span>, xx.IsPrimaryCell())<br> <span style="color:rgb(128,128,128);font-style:italic"># help(vtk.vtkQuadraticEdge.GetBounds)<br></span><span style="color:rgb(128,128,128);font-style:italic"> # help(vtk.vtkQuadraticEdge.GetParametricCoords)<br></span><span style="color:rgb(128,128,128);font-style:italic"> # print(dir(vtk.vtkQuadraticEdge))<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span>pcoords = xx.GetParametricCoords()<br> <span style="color:rgb(128,128,128);font-style:italic"># Here we expect a tuple of nine floats.<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(0,0,128)">print</span>(<span style="color:rgb(0,128,128);font-weight:bold">'pcoords:'</span>, pcoords)<br> <span style="color:rgb(128,128,128);font-style:italic"># GetBounds() works.<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span>bounds = xx.GetBounds()<br> <span style="color:rgb(0,0,128)">print</span>(<span style="color:rgb(0,128,128);font-weight:bold">'bounds:'</span>, bounds)<br><br><br><span style="color:rgb(0,0,128);font-weight:bold">if </span>__name__ == <span style="color:rgb(0,128,128);font-weight:bold">'__main__'</span>:<br> main()<br></pre><br></div><div class="gmail_default"><br><br></div>-- <br><div class="gmail_signature">___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________</div>
</div>