Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Polygon skeleton
- Date: Fri, 04 Apr 2008 18:12:03 +0200
Hi Antonino,
I still insist that you better first read the manual.
It is organized in a user manual coming with examples,
and a reference manual listing the classes and functions.
A function called is_bisector() sounds and is a function
returning a boolean value, not a vertex.
best regards,
andreas
Antonino Mistretta wrote:
Hi Andreas,
in attachment is a jpeg with original polygon and skeleton nodes(in red).
This is the code that make this result:
//! create cgal polygon by my polygon.
Base::PolygonPtr _poly;
_poly = Base::PolygonPtr( new Base::Polygon2D() );
int startVertex = currPolygon->nVertices-2;
int end = 0;
for(int i=startVertex; i>=end; i--)
(*_poly).push_back( Base::Point( currPolygon->padfX[i],
currPolygon->padfY[i]) );
cgalPoly.push_back(_poly);
//! make skeleton
//! Insert vertex in skeleton_builder
for( RegIt bit = cgalPoly.begin(), ebit = cgalPoly.end() ; bit !=
ebit ; ++ bit )
{
builder.enter_contour((*bit)->begin(),(*bit)->end());
}
//! build skeleton
if ( !( skeleton = builder.construct_skeleton() ) )//!// Proceed only
if the skeleton was correctly constructed.
throw string("Impossibile creare lo skeleton per questo
poligono.");
//!get skeleton points
for (Base::Halfedge_iterator i = (*skeleton).halfedges_begin(); i !=
(*skeleton).halfedges_end(); ++ i )
{
//il punto fa parte dello skeleton??
if (i->is_bisector())
{
outX.push_back(i->vertex()->point().x());
outY.push_back(i->vertex()->point().y());
}
}
Why is_bisector() method returns not skeleton node?
I don't understant how I must do to use StraightSkeletonVertex class.
Thanks and excuse me to my english...
2008/4/4, Andreas Fabri
<>:
Hi Antonino,
Did you read the manual already. I think this is covered.
andreas
Antonino Mistretta wrote:
Can you show me a little example?<>:
How I obtain StraightSkeletonVertex_2 object by Skeleton_Builder?
Thanks
2008/4/4, Fernando Cacciola
points.
wrote:
Hi All,
I am using Straight Skeleton concept to find the skeleton polygon
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Straight_skeleton_2_ref/Concept_StraightSkeletonVertex_2.html#Cross_link_anchor_783I call a construct_skeleton() method on istance of skeleton builder toYes.
compute this(It's correct?).
My question is - how can I get the coordinates of the skeleton vertex?Using the 'point()' function as stated in the manual:
--HTH
Fernando Cacciola
GeometryFactory
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
------------------------------------------------------------------------
- Polygon skeleton, mistrett, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Fernando Cacciola, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Andreas Fabri, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Andreas Fabri, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/07/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/07/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Andreas Fabri, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Andreas Fabri, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Antonino Mistretta, 04/04/2008
- Re: [cgal-discuss] Polygon skeleton, Fernando Cacciola, 04/04/2008
Archive powered by MHonArc 2.6.16.