[vtkusers] VERY IMPORTANT QUESTION ABOUT CLIPPING
David Doria
daviddoria at gmail.com
Mon Nov 5 11:04:26 EST 2012
On Mon, Nov 5, 2012 at 11:01 AM, David Higuita
<david.higuita.75 at gmail.com>wrote:
> HI, MY NAME IS DAVID, I'M FROM COLOMBIA, I'M WORKING WITH CLIPPING
> FUNCTIONS, AND I HAVE A CODE THAT MAKE IT, BUT IN THE CODE WE NEED TWO
> OBJECTS:
>
> vtkCylinder AND vtkCylinderSource
>
> AND IN THE WORKING OF CODE WE NEED GET AN IMPLICIT FUNCTION AND THE CODE
> DO IT WITH THE OBJECT vtkCylinder
> BUT IN THE RESULT WE CAN'T CHANGE THE HEIGHT (of course)
> . THE QUESTION IS ¿CAN WE GET THE IMPLICIT FUNCTION FROM AN OBJECT
> vtkCyllinderSource? TO CHANGE THE HEIGHT
>
>
>
> THIS IS PART OF CODE:
>
>
> sphere = vtk.vtkCylinderSource()
> sphere.SetRadius(radio)
> sphere.SetCenter(F[0][0],F[0][1],F[0][2])
> sphere.SetHeight(altura)
>
> spheres = vtk.vtkCylinderSource()
> spheres.SetRadius(radio)
> spheres.SetCenter(F[0][0],F[0][1],F[0][2])
> spheres.SetHeight(altura)
> spheres.SetResolution(100)
>
> cliper = vtk.vtkClipPolyData()
> cliper.SetInput(reader.GetOutput()) # original: reader
> cliper.SetClipFunction(sphere) #tenia sphere
> cliper.GenerateClipScalarsOn()
> cliper.SetValue(0.0)
>
> WE NEED GET THE IMPLICIT FUNCTION (SetClipFunction(sphere)).
>
> ¿CAN YOU HELP US WITH LINKS AND TUTORIALS?
>
> THANKS.
>
Please do not write in all caps.
I believe what you're looking for is this new class:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ImplicitPolyDataDistance
It will create an implicit function from a polydata.
Good luck,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121105/779ca7ba/attachment.htm>
More information about the vtkusers
mailing list