Subject: CGAL users discussion list
List archive
- From: Manuel Caroli <>
- To:
- Subject: Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3.
- Date: Wed, 05 Aug 2009 17:01:51 +0200
Hi Juliano,
Juliano Costa wrote:
Hello again Manuel,Note that you can use
Yes. By "surface" I was refearring to the convex hull (the outter side of the envelop points).
incident_cells(infinite_vertex(), output_iterator) to get the cells that have the triangles of the convex hull as a facet.
This new package for "Surface reconstruction" seems just GREAT.It should be possible to use them in a nested way, i.e.
It looks exactlly what I need to do.
I'm going to download the beta version to test it now!
Just one more thing:
I was trying to to integrate the alpha shape with my current example.
Right now I have CGAL::Triangulation_vertex_base_with_info_3 in order to set the ->info() with my
index.
For the alpha shape, If I really understood it, I must use CGAL::Alpha_shape_vertex_base_3 but this does not contain
the "info" field.
Is there any other way for me to set the "info"?
There should be an CGAL::Alpha_shape_vertex_base_with_info_3 file to do so, right?!
Alpha_shape_vertex_base_3<Traits,Triangulation_vertex_base_with_info_3>
Maybe with the above mentioned approach to extract the convex hull you don't need the info anymore...
best
Manuel
Thanks a lot again,
Best regards,
Juliano.
2009/8/5 Manuel Caroli < <mailto:>>
Hi Juliano,
Juliano Costa wrote:
Hello Manuel,
[...]
The *interior* of the (smallest) sphere passing through the two
vertices of the diagonal of a cube (or cuboid) does not contain any
other vertices of the cube (or cuboid). This is a degenerate case
though. The CGAL::Triangulation_3 partitions the convex hull of the
point set into tetrahedra even in degenerate cases. So the result
you get is fine.
Well, I ignored this issue and proceed with my intend so I used
the DelaunayTriangleHierarchy::Finite_facets_iterator like this:
I don't actually get what you mean by "surface" in the code below.
Are you talking about the convex hull?
//On inserting points I'm setting the Vertex_hanlde->info with
an "unsigned long" value as index. //I need to get the
triangles points indexes:
CPUInt64_t _indexA,_indexB,_indexC;
CPUInt64_t* _iPointsIndexes[3];
_iPointsIndexes[0] = &_indexA;
_iPointsIndexes[1] = &_indexB;
_iPointsIndexes[2] = &_indexC;
//having DelaunayTriangleHierarchy _delaunayTrianguleHierarchy;
DelaunayTriangleHierarchy::Finite_facets_iterator _fit =
_delaunayTriangule.finite_facets_begin(); while(_fit !=
_delaunayTriangule.finite_facets_end())
{
//typedef CGAL::Delaunay_triangulation_3<K,Tds>
DelaunayTriangle;
DelaunayTriangle::Facet _facet = *_fIt;
unsigned long _facetIndex = _facet.second;
//typedef DelaunayTriangle::Cell_handle CGALCellHandle;
CGALCellHandle facetCell = _facet.first;
char _isInfiniteCell =
_delaunayTriangule->is_infinite(_facetCell);
//neighbor cell
CGALCellHandle neigborCell = _cell->neighbor(_facetIndex );
char _isInfiniteNeigbor =
_delaunayTriangule.is_infinite(neigborCell);
if( (!_isInfiniteCell) && (!isInfiniteNeigbor) )
{
//I only want the surface right?!?!!
continue;
} char _iTriVrr=0;
for(char _iPointsLoop=0;_iPointsLoop<4;_iPointsLoop++)
{
if( _iPointsLoop != _facetIndex )
{
*_iPointsIndexes[_iTriVrr++] = (unsigned
long)(_fIt->first->vertex(_iPointsLoop)->info());
}
}
//Here I got _indexA,_indexB,_indexC which I'm saving on the
OBJ file.
_fit++;
} With this code, when I provide an ordinary box or even a
sphere the result is just wonderful.
But when I try this with a small points cloud (10000 3d points
of a tunnel for example) the result is a mess.
I got triangles coming from a side to the another and from the
top to the ground.
I want just the surface.
I used this tunnel points cloud as example, but my intention is
to use the same algorith providing points cloud of any
3d object or place (e.g.: an office room).
Now I was about to try to integrate the my current source code
with the CGAL "alpha shape" example...
But you've come with a different "light": "use a surface
mesher". But a surface mesher wouldn't interpolate "new created
points"?
Yes the surface mesher creates its own points so it does not seem
adapted to your problem.
So, to make this "surface mesher" what I've be doing so far is
useless?
On the CGAL examples for surface mesher (like
examples/Surface_mesher/mesh_an_implicit_function.cpp)
<http://www.cgal.org/Manual/3.3/examples/Surface_mesher/mesh_an_implicit_function.cpp>the
input points comes from a generator surface function //
defining the surface
// Surface_3
<http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Surface_mesher_ref/Concept_Surface_3.html#Cross_link_anchor_1083>
surface
Can I insert points of an unknown shape?
You might want to have a look at the new Surface reconstruction
package:
http://www.cgal.org/Manual/beta/doc_html/cgal_manual/Surface_reconstruction_points_3/Chapter_main.html
Note that this is only a beta release. The final release will be
available by mid September.
best
Manuel
I really appreciate your help!
Thanks once again!
Juliano Costa
Brazil.
2009/8/5 Manuel Caroli
<
<mailto:>
<mailto:
<mailto:>>>
Hi Juliano,
the Triangulation_3 package computes a triangulation of R^3
with the
input points as vertices. If you want to compute a triangular
mesh
approximating a surface you should use a surface mesher.
Maybe you
could be more specific about your problem.
best
Manuel
-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/01/2009
- [cgal-discuss] Re: Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/02/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Mariette Yvinec, 08/03/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/03/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/07/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/10/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Manuel Caroli, 08/05/2009
- Re: [cgal-discuss] Newbie question about CGAL Hierarchy Triangulation 3., Juliano Costa, 08/03/2009
Archive powered by MHonArc 2.6.16.