[vtkusers] CW and CCW filtering
Kent Eschenberg
eschenbe at psc.edu
Tue May 8 18:16:15 EDT 2007
David.Pont at ensisjv.com wrote:
> "Meisam Aliroteh" <meisam.aliroteh at gmail.com> wrote on 08/05/2007 09:31:58:
> > I was wondering if there is a vtk filter that can fix cell
> > orientations.
In general, a triangle can be in any orientation in 3D space. The
right-hand rule applied to the vertices defines the triangle's implicit
normal. This is neither right nor wrong so there is no such thing as
"fixing" the orientation.
However, you may have additional, outside information. You may have a
"preferred" direction or vector. Each triangle's implicit normal could
be projected onto the preferred vector. Then, if the projected normal is
opposite the preferred vector, you could flip the order of the vertices
for that triangle so that its implicit normal is also flipped.
I don't know of any VTK filter that implements that algorithm. Write
one! Just don't call it "vtkOrientationFix"!
Kent
Pittsburgh Supercomputing Center
More information about the vtkusers
mailing list