[vtkusers] Intersection of cylinders

Peter peter-dpl at pre-dev.de
Wed Nov 16 12:15:50 EST 2011


Thanks for the code this was really helpful! Just one additional question: vtkCylinders have no ending - is this correct? Is there a a way to "cut" them at a specific point? (Some of my cylinders are wider than they are long.)

Peter

Am 01.11.2011 um 03:03 schrieb Quang Tran:

> Hi,
> You should use vtkImplicitBoolean and vtkClipPolyData to do this task. One of cylinder must be modeling to implicit function (you should use vtkCylinder and make any transform if necessary), set this implicit function as an input of the clipper (vtkClipPolydata), see SetClipFunction; the other cylinder is input parameter of SetInput function of clipper. After that you will have a result of this clipper as vtkPolyData. I think this result is what you need.
> 
> You should use vtkCylinder rather than vtkCylinderSource because vtkCylinder is an implicit function and can use for clipping.
> 
> /Quang
> 
> 2011/10/31 Peter <peter-dpl at pre-dev.de>
> Hello,
> 
> i would like to calculate the intersection of two cylinders. A general solution is to use vtkImplicitBoolean and vtkExtractGeometryFilter. Unfortunately vtkImplicitBoolean can't handle vtkCylinderSource. Is there an alternative or a way to convert cylinder objects to grids (at least to approximate a cylinder)?
> 
> Many thanks in advance!
> 
> Peter
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111116/f73695e3/attachment.htm>


More information about the vtkusers mailing list