[vtkusers] How to triangulate two non-intersecting polylines (in 2D)
normanius
juch at zhaw.ch
Fri Feb 23 14:22:50 EST 2018
Let's be given two polylines in a plane as shown in the figure below. I
assume that these two lines are not intersecting, but can have a generic
shape (so they may be non-convex). Note that the number of points varies
between the two lines. (In my example, the objects have been created using
vtkRegularPolygonSource)
Do you have an idea how I can triangulate the ring that is defined by the
inner and outer polyline in vtk? (See second image, for an idea)
Combining the polylines with vtkAppendPolyData does not work, because
vtkTriangleFilter then would triangulate the two polylines separately. I
guess the right way would be to create a polygon object that is composed of
the two lines in a "clever way" and then to call vtkTriangleFilter on this
data, but I could not manage.
Many thanks for your inputs!
<http://vtk.1045678.n5.nabble.com/file/t341102/Screen_Shot_2018-02-23_at_19.png>
<http://vtk.1045678.n5.nabble.com/file/t341102/triangulated.png>
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list