<HTML><BODY><pre style="white-space: pre-wrap;" data-mce-style="white-space: pre-wrap;"><em> Hi,
</em><em>I am trying to wrap a custom class derived from vtkImplicitFunction in python. Wrapping was done with a similar to <a href="http://public.kitware.com/pipermail/vtkusers/2016-August/096019.html">http://public.kitware.com/pipermail/vtkusers/2016-August/096019.html</a>  CMakeLists.txt .All methods are accessed and work fine within python. But when I try to pass this class variable to vtkSampleFunction as ImplicitFunction, I receive an error:<br><br>>m=myClassPython.myClass()<br>>s=vtk.vtkSampleFunction()<br>>s.SetImplicitFunction(m)</em></pre>TypeError:SetImplicitFunction argument 1: methond requires a VTK Object.<br><br>I'm launching this code with vtkpython.exe.<br><br>.h file of wrapped class looks like:<br><br><p>class myClass : public vtkImplicitFunction {<br>public:<br>static myClass *New();<br>vtkTypeMacro(myClass, vtkImplicitFunction);<br>void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;<br>vtkMTimeType GetMTime() VTK_OVERRIDE;</p><p>// Description<br>// Evaluate function<br>double EvaluateFunction(double x[3]) VTK_OVERRIDE;<br>double EvaluateFunction(double x, double y, double z) {<br>return this->vtkImplicitFunction::EvaluateFunction(x, y, z);<br>}<br>.....<br>myClass();<br>~myClass() VTK_OVERRIDE;</p><p>private:<br>myClass(const myClass&) VTK_DELETE_FUNCTION;<br>void operator=(const myClass&)VTK_DELETE_FUNCTION;<br>};</p><pre style="white-space: pre-wrap;" data-mce-style="white-space: pre-wrap;"><em>I don't have much experience in vtk to python wrapping and I guess there is something very simple, but I don't have any idea what it can be. Any help would be appreciated.
</em>Thank you in advance,<br>Best regards,<br>Evgeniya</pre></BODY></HTML>