Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Triangulation -> mesh, strange result

Subject: CGAL users discussion list

List archive

[cgal-discuss] Triangulation -> mesh, strange result


Chronological Thread 
  • From: Per Zetterlund <>
  • To:
  • Subject: [cgal-discuss] Triangulation -> mesh, strange result
  • Date: Fri, 27 Jun 2014 15:53:16 +0200

Hi all,

I'm extracting triangles from a triangulation
to create a Polyhedron.

(EPIC kernel)

Triangulation tri;

//(Build triangulation)
//...

typedef Surface_mesh_complex_2_in_triangulation_3<Triangulation> Smc2t3;
Smc2t3 smc2t3(tri);

for(auto fit = tri.all_facets_begin(); fit != tri.all_facets_end(); ++fit) {
if(shouldBeInMesh(fit)) {
smc2t3.add_to_complex(*fit);
}
}

Polyhedron polyhedron;
Complex_2_in_triangulation_3_polyhedron_builder<Smc2t3, Polyhedron>
builder(smc2t3);
polyhedron.delegate(builder);


When I run it on different data I often get these kinds of error:

CGAL::Polyhedron_incremental_builder_3<HDS>::
lookup_halfedge(): input error: facet 19061 shares a halfedge from
vertex 12328 to vertex 8026 with facet 19034.
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 1
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 225
Aborted (core dumped)


And also, when it does succeed, if I run
Face.plane().orthogonal_vector() I sometimes
get very strange result, such as (0, 0, 0). I suspect this is related
to the other
problems. Am I doing something obvious wrong?

/Per


  • [cgal-discuss] Triangulation -> mesh, strange result, Per Zetterlund, 06/27/2014

Archive powered by MHonArc 2.6.18.

Top of Page