[vtkusers] question about vtkPolygon -- what happens with degenerate polygons?
kent williams
nkwmailinglists at gmail.com
Thu Dec 20 13:02:47 EST 2007
According to the VTK Doxygen web page for vtkPolygon:
"vtkPolygon is a concrete implementation of vtkCell to represent a 2D
n-sided polygon. The polygons cannot have any internal holes, and
cannot self-intersect. Define the polygon with n-points ordered in the
counter- clockwise direction; do not repeat the last point."
I understand some of the restrictions -- define your polygon backwards
point order (clockwise) your polygon's normal faces the wrong way.
vtkPolygon doesn't give you a way to add holes to a polygon.
But the 'cannot self-intersect' rule -- this isn't actually enforced
is it? If an application allows users (who obviously can't be trusted)
a way to draw polygons, it's up to the application to check for
self-intersecting polygons?
Is there any code in VTK that can do this test?
More information about the vtkusers
mailing list