[vtkusers] Re: calculate normal of boundary

Pierre Barbier de Reuille pbarbier at ucalgary.ca
Mon Oct 29 12:41:40 EDT 2007


Hello,

so reading the file is the easy part. For that, you want to use
vtkImageReader2 (see documentation).
As for the normal of the boundary, the first question is: how is defined
this boundary?
If this is defined as an iso-surface of some function, then you can use the
vtkMarchingContourFilter object to find it and then vtkPolyDataNormals to
get the normals of your surface it should work. If you get the mesh by any
other means, you can still use vtkPolyDataNormals to get the normals to the
mesh.

Pierre

On 10/28/07, Fabian Braennstroem <f.braennstroem at gmx.de> wrote:
>
> Hi,
>
> me again...
> it seems that noone has an idea ... or is it just a stupid question!?
> Fabian
>
>
> Fabian Braennstroem wrote:
>
> > Hi,
> >
> > I would like to use python-vtk to calculate the vector components of
> > an inlet velocity for computational fluid dynamics.
> > For this I would have to read an ensight or vtk formated mesh and
> > calculate the normal direction of a certain boundary, e.g. 'inlet'.
> > Does anyone knows, if I can do this with python-vtk, or better, does
> > anyone has such a small script already? Would be nice :-)
> >
>
>
> _______________________________________________
> 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
>
>


-- 
Barbier de Reuille Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071029/4e5508e1/attachment.htm>


More information about the vtkusers mailing list