Subject: CGAL users discussion list
List archive
- From: Benjamin Kehlet <>
- To: cgal-discuss <>
- Subject: [cgal-discuss] Problem when meshing polyhedron with sharp features
- Date: Tue, 29 Apr 2014 12:19:34 +0200
Hello
I'm trying to mesh the file demo/Polyhedron/data/couplingdown.off from
the CGAL source tree. However, the program hits an assertion in CGAL
during the insertion of protection balls.
I get this error message:
benjamik@benjamik-hp:~/tmp/cgal-meshing/build$ ./main
Point p[0.0581614 -0.0161141 0.0188679], dim=1 and q[0.0547853
-0.0329333 0.0188679], dim=1 form an edge but do not intersect !
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: minimal_size_ > 0 || c3t3_.is_valid()
File:
/home/benjamik/software/cgal-4.4-install/include/CGAL/Mesh_3/Protect_edges_sizing_field.h
Line: 370
Aborted
This code reproduces the problem (assuming the off file is in current
directory):
---
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
#include <CGAL/make_mesh_3.h>
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
typedef CGAL::Mesh_polyhedron_3<K>::type MeshPolyhedron_3;
typedef K::Point_3 Point_3;
// Triangulation
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<
Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index> C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
using namespace CGAL::parameters;
int main(int argc, char** argv)
{
MeshPolyhedron_3 P;
{
std::ifstream infile("./couplingdown.off");
infile >> P;
}
CGAL_assertion(P.is_valid());
CGAL_assertion(P.is_pure_triangle());
// Create domain
Mesh_domain domain(P);
// Get sharp features
domain.detect_features();
const double cs = 0.08;
// Mesh criteria
Mesh_criteria criteria(edge_size = cs/2.0,
facet_angle = 25,
facet_size = cs,
facet_distance = cs/10.0,
cell_radius_edge_ratio = 3,
cell_size = cs);
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
}
---
The input polyhedron is pure triangular and without self intersections
(according to the Polyhedron demo). I'm on Debian Jessie with gcc
4.8.2 and a debug build of CGAL 4.4.
I'm not familiar enough with the inner details of the mesh generator,
so I was hoping someone could take a look at this. Thanks in advance!
Best regards
Benjamin Kehlet
- [cgal-discuss] Problem when meshing polyhedron with sharp features, Benjamin Kehlet, 04/29/2014
- Re: [cgal-discuss] Problem when meshing polyhedron with sharp features, Laurent Rineau (CGAL/GeometryFactory), 04/29/2014
- Re: [cgal-discuss] Problem when meshing polyhedron with sharp features, Benjamin Kehlet, 04/29/2014
- Re: [cgal-discuss] Problem when meshing polyhedron with sharp features, Benjamin Kehlet, 04/30/2014
- Re: [cgal-discuss] Problem when meshing polyhedron with sharp features, Laurent Rineau (CGAL/GeometryFactory), 04/30/2014
- Re: [cgal-discuss] Problem when meshing polyhedron with sharp features, Laurent Rineau (CGAL/GeometryFactory), 04/29/2014
Archive powered by MHonArc 2.6.18.