[vtkusers] Polylines intersect circle
Jérôme
jerome.velut at gmail.com
Tue Mar 29 09:57:21 EDT 2011
Hi,
You can use a simple pipeline :
- First, generate ids from your set of polylines (vtkIdFilter)
- Then cut this Ids' enrich polydata with vtkCutter by setting the
cutting plane equal to your circle plane (center and normal)
- the latter will give a set of points : just compute the distance of
each point to the center of the circle. If it is less than "circle
radius", then the corresponding polyline (the Ids will help you to
find it back) passes through the circle.
Note that you don't need a PolyData representing the circle. If you
prefer to use an intersection algorithm, you will have to use a disc
explicitly.
HTH,
Jerome
2011/3/29 Reicht Ignaz <i.reicht at dkfz-heidelberg.de>:
> Hi guys,
>
> Could somebody give me some advise how to manage a task containing vtkPolyLines and a Circle (vtkPolygonSource).
> I have several polylines and a circle and my aim is to figure out which polylines are going through the circle.
>
> As far as I could see there exist many approaches for that, ie vtkcollissiondetection, vtkcutting, vtkSpatialRepresentationFilter. In my case I am dealing with 30.000 polylines therefore a fast "intersection-detection" would be appreciated. Any suggestions doing that?
>
> In addition to identify which polyline goes through the circle probably each polyline has to be labeled somehow?
>
> thanks in advise
> iggy
>
>
>
> _______________________________________________
> 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
>
More information about the vtkusers
mailing list