Hello everyone,
I need to generate a 3d mesh inside a cube, with tetrahedron sizes respecting a distance field I already have. I am new to CGAL, but I understand the best way to go is to use Mesh_triangulation_3 in a Polyhedral_mesh_domain_with_features_3 (right?). However, in my results, the size of the tetrahedrons (adaptive or not) are respected only in the most interior part of the cube, as in the image below. <http://cgal-discuss.949826.n4.nabble.com/file/t376016/cube00.png> The image is result of the following code. What can I do to have the size respected in all the cube region? Am I misusing something or is this some limitation of the implemented Delaunay method itself? typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::FT FT; typedef CGAL::Mesh_polyhedron_3<K>::type Polyhedron; typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain; typedef CGAL::Sequential_tag Concurrency_tag; typedef CGAL::Mesh_triangulation_3<Mesh_domain,CGAL::Default,Concurrency_tag>::type Tr; typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; typedef CGAL::Mesh_criteria_3 Mesh_criteria; using namespace CGAL::parameters; Polyhedron polyhedron; //I skipped the creation of the cube here but all their coords range from -1 to 1 Mesh_domain domain(polyhedron); domain.detect_features(); Mesh_criteria criteria(facet_size=0.05); //Not using the adaptive size here. C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, manifold()); //And then I iterate the resulted triangulation and save an off file. Thank you, in advance. Suellen -- Sent from: http://cgal-discuss.949826.n4.nabble.com/ -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
To reduce the size of the edges on the protected features, you need to
set the edge_size parameter to a suitable value (take for example the edge length of a equilateral triangle matching your face size criteria). In the case of the variable sizing field, you might need some manual treatment and those are probably not documented. Sebastien. On 07/26/2018 11:31 PM, suellenmotta wrote: > Hello everyone, > > I need to generate a 3d mesh inside a cube, with tetrahedron sizes > respecting a distance field I already have. > I am new to CGAL, but I understand the best way to go is to use > Mesh_triangulation_3 in a Polyhedral_mesh_domain_with_features_3 (right?). > > However, in my results, the size of the tetrahedrons (adaptive or not) are > respected only in the most interior part of the cube, as in the image below. > <http://cgal-discuss.949826.n4.nabble.com/file/t376016/cube00.png> > > The image is result of the following code. What can I do to have the size > respected in all the cube region? Am I misusing something or is this some > limitation of the implemented Delaunay method itself? > > typedef CGAL::Exact_predicates_inexact_constructions_kernel K; > typedef K::FT FT; > typedef CGAL::Mesh_polyhedron_3<K>::type Polyhedron; > typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain; > typedef CGAL::Sequential_tag Concurrency_tag; > typedef > CGAL::Mesh_triangulation_3<Mesh_domain,CGAL::Default,Concurrency_tag>::type > Tr; > typedef CGAL::Mesh_complex_3_in_triangulation_3 > C3t3; > typedef CGAL::Mesh_criteria_3 > Mesh_criteria; > > using namespace CGAL::parameters; > > Polyhedron polyhedron; //I skipped the creation of the cube here but all > their coords range from -1 to 1 > Mesh_domain domain(polyhedron); > domain.detect_features(); > > Mesh_criteria criteria(facet_size=0.05); //Not using the adaptive size here. > > C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, manifold()); > > //And then I iterate the resulted triangulation and save an off file. > > > Thank you, in advance. > Suellen > > > > > > -- > Sent from: http://cgal-discuss.949826.n4.nabble.com/ > -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
Free forum by Nabble | Edit this page |