Subject: CGAL users discussion list
List archive
- From: rychet <>
- To:
- Subject: [cgal-discuss] Meshing 3D segmented domain - small inclusion disappearance
- Date: Thu, 6 Oct 2011 06:37:21 -0700 (PDT)
Dear developers and users,
I am not able to solve the following problem.
I have created simple segmented 3D image (.inr format) with 2 subdomains:
Cube of 256x256x256 voxels with label=1,
and inside it another small cube of the size 40x40x40 with label=2.
Then I used the following program (taken from the manual, part 50.3.3) and
obtained 3D mesh. The problem is that the small cubic inclusion disappeared
in the resulting mesh. I have also tried different meshing criteria, but
without success. For the big inclusion it works fine, inclusion is present.
In the mailing list I have not found similar problem.
Is there a possibility to control this feature?
Thank you, Ivan Rychetsky.
Code used for meshing:
**********************************************************
#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/Labeled_image_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/Image_3.h>
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Labeled_image_mesh_domain_3<CGAL::Image_3,K>
Mesh_domain;
// Triangulation
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
// To avoid verbose function and named parameters call
using namespace CGAL::parameters;
int main()
{
// Loads image
CGAL::Image_3 image;
image.read("./domain.inr");
// Domain
Mesh_domain domain(image);
// Mesh criteria
Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=4,
cell_radius_edge=3, cell_size=8);
// Meshing
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
// Output
std::ofstream medit_file("out.mesh");
c3t3.output_to_medit(medit_file);
return 0;
}
**************************************
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Meshing-3D-segmented-domain-small-inclusion-disappearance-tp3878281p3878281.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Meshing 3D segmented domain - small inclusion disappearance, rychet, 10/06/2011
Archive powered by MHonArc 2.6.16.