[vtkusers] Proving a surface mesh of closeness

Marie-Gabrielle Vallet mgv.research at gmail.com
Mon Oct 6 16:02:57 EDT 2008


vtkFeatureEdges sounds better to  extract the boundary of a 2D mesh than
vtkUnstructuredGridGeometryFilter or vtkGeometryFilter that works explicitly
for 3D meshes. What Charles could do to prove closeness is to extract all 1D
edges that are used by only one surface(2D) cell (i.e., boundary edges). If
that set is empty, then the 2D mesh is close.

Regarding the formula T=2V-4 proposed by Michael, it can not prove the
closeness, because it's only a necessary condition but not  a suffisant one
(if the formula is false, then the surface is not close; if it's true, we
cannot conclude). It comes from the Euler-Poincaré statement T-E+V=2 for a
topologicaly close surface tessalation, and from 3T=2E in case cells are all
triangle.

Marie-Gabrielle

> Date: Fri, 3 Oct 2008 16:04:31 -0300
> From: pam <papereyra at gmail.com>
> Subject: Re: [vtkusers] Proving a surface mesh of closeness
> To: vtkusers at vtk.org
> Message-ID:
>        <2bcd18a00810031204g77101056w9d46bf649c21baec at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi, I 'm Pamela and I was trying to get the boundary cells, i found a
> solution to my problem that maybe could help you.
>
> I finally used vtkUnstructuredGridGeometryFilter because
> vtkFeaturedFilter only works with structured data like vtkPolyData.
> Here is the code and how to go through the cells.
>
> vtkUnstructuredGridGeometryFilter*
> filter=vtkUnstructuredGridGeometryFilter::New();
>   filter->SetInputConnection(delny->GetOutputPort());
>   filter->Update();
>  cout<<"filtro"<<endl;
>   nroceldas=filter->GetOutput()->GetNumberOfCells();
>  for(t=0;t<nroceldas;t++)
>  {   celda=filter->GetOutput()->GetCell(t);
>           list=celda->GetPointIds();
>           points=celda->GetPoints();
>           ids=list->GetNumberOfIds();
>           cout<<"celda "<<t<<endl;
>           cout<<"numero de faces "<<celda->GetNumberOfFaces()<<endl;
>           cout<<"numero de edges "<<celda->GetNumberOfEdges()<<endl;
>           for(k=0;k<ids;k++)
>           {
>                  points->GetPoint(k,punto);
>                          int verticeid=
delny->GetOurput()->FindPoint(punto); //I do this
> because this filter change the original id
>                          cout <<"vertice id numero " << verticeid <<endl ;
>                          cout<<" x "<<punto[0]<<" y "<<punto[1]<<" z
"<<punto[2]<<endl;
>           }
>   }
>
>
> Hope it helps!
>
> Pamela
>
> 2008/10/3 Michael Jackson <mike.jackson at bluequartz.net>:
> > T=2V-4
> >
> > Where T is the number of triagles and V is the number of vertices.
Something
> > about Euler's Polyhedra equation...
> >
> >
> > Mike
> >
> > On Oct 3, 2008, at 1:14 PM, Marie-Gabrielle Vallet wrote:
> >
> >>
> >> I think there is a easier way of checking the surface closeness. I mean
> >> using vtk facilities, instead of writing a (yet another) new algorithm.
> >>
> >> VTK library has algorithms to extract a mesh boundary, i.e. the set of
> >> faces (in 3D) or edges (in 2D) that are not shared by two cells. See
> >> vtkFeatureEdges. The mesh is close if and only if this set is empty. If
it
> >> not, you can visualize the holes that must still be closed.
> >>
> >> Pamela is trying to do the same thing today. Have a look at the thread
> >> "get boundary triangles from a mesh" on this mailing list.
> >>
> >> By the way, Charles, are you sure you are not re-inventing the wheel ?
> >>
> >> Marie-Gabrielle
> >>
> >> >  Date: Fri, 3 Oct 2008 08:17:31 +0200
> >> >  From: Dominik Szczerba <dominik at itis.ethz.ch>
> >> >  Subject: Re: [vtkusers] Proving a surface mesh of closeness
> >> >  To: vtkusers at vtk.org
> >> >  Message-ID: <200810030817.31796.dominik at itis.ethz.ch>
> >> >  Content-Type: text/plain;  charset="utf-8"
> >> >
> >> >  If it is manifold then pick the 1st element and make sure each one
it
> >> > has the
> >> >  proper number of neighbors (for triangles: 3). Mark the element as
> >> > 'visited'
> >> >  and visit all his neighbors, repeating the procedure. At the end, if
> >> > number
> >> >  of visited elements equals to number of elements in the mesh and all
> >> > have
> >> >  their expected neighbors the mesh is closed.
> >> >
> >> >  DS
> >> >
> >> >  On Friday 03 October 2008 02:48:59 am Charles Monty Burns wrote:
> >> >  > Hello,
> >> >  >
> >> >  > I repaired a surface mesh and want to prove whether the mesh is
> >> > totally
> >> >  > closed or not. Save is save ...
> >> >  >
> >> >  > How can I do this?
> >> >  >
> >> >  > Greetings
> >> >
> >> >
> >> >
> >> >  --
> >> >  Dominik Szczerba, Ph.D.
> >> >  Computational Physics Group
> >> >  Foundation for Research on Information Technologies in Society
> >> >  http://www.itis.ethz.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081006/393a1c79/attachment.htm>


More information about the vtkusers mailing list