Subject: CGAL users discussion list
List archive
- From: "Thomas Zangl - Home" <>
- To: <>
- Subject: Triangulation_3 + facets iterator = non-deterministic output?
- Date: Wed, 10 Oct 2007 17:08:58 +0200
Hi!
I am building a regular triangulation_3 out of a set of points/radi
contained in a file.
Some code:
dbl radius;
int vIdx = 0;
while ( iFile >> p ) {
iFile >> radius;
Rt_Weighted_point newPoint(p, radius*radius);
Rt_Vertex_handle vh = t.insert(newPoint);
vh->info() = vIdx;
cout << "Sphere: " << p << " r=" << radius << " index: " << vh->info() <<
endl;
vIdx++;
}
iFile.close();
// check the triangulation
t.is_valid(true);
Quite simple :)
Now I iterate over the triangulation using the begin_facets() iterator:
Rt_Facet_iterator fIt = t.facets_begin();
Rt_Facet_iterator fEnd = t.facets_end();
if ( fIt == fEnd ) {
std::cout << "RegularTriangulation: no faces found" << std::endl;
assert(false);
}
else {
while(fIt != fEnd) {
....
}
The order how the facets are visited is different between the runs.
For debugging, I need the same order for the same set of input points at
different runs. Maybe the iterator starts at a random facet? How to
avoid this behavior?
Thank you in advance!
Best regards,
--
----------------------------------------------------------------
,yours Thomas Zangl, Bakk.rer.soc.oec. -
-
- Freelancer - IT Consulting & Software Development -
- Student of Software Development-Economy (Master) -
- Triangulation_3 + facets iterator = non-deterministic output?, Thomas Zangl - Home, 10/10/2007
- Re: [cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Sylvain Pion, 10/10/2007
- Re: [cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Andreas Fabri, 10/10/2007
- Re:[cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Thomas Zangl - Home, 10/10/2007
- Re: [cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Monique . Teillaud, 10/11/2007
- Re:[cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Thomas Zangl - Home, 10/10/2007
- Re: [cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Andreas Fabri, 10/10/2007
- Re: [cgal-discuss] Triangulation_3 + facets iterator = non-deterministic output?, Sylvain Pion, 10/10/2007
Archive powered by MHonArc 2.6.16.