[vtkusers] CW and CCW filtering
John Biddiscombe
biddisco at cscs.ch
Wed May 9 03:07:07 EDT 2007
Many years ago I wrote a CW and CCW orientation filter. You provide a
reference point and it uses that to determine back/front orientation. If
you are looking at Map data from above for example, the just specifying
the default of {0,0,1} is enough and it reorients everything
I do not know where the code is right now, but I'll dig it out if
reminded. (which means email me off list once per day until I find it).
JB
> 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
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
--
John Biddiscombe, email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the vtkusers
mailing list