Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] how to add points to C3t3 for 3D meshing
- Date: Mon, 12 Apr 2010 11:05:24 +0200
- Organization: GeometryFactory
On Sunday 11 April 2010 17:02:55 Zhonggui Chen wrote:
> Hi Laurent,
>
> Thanks for your reply!
>
> Actually I want to initialize the C3t3 as the input for the
> CGAL::perturb_mesh_3() function.
> I tried your method, but it doesn't work. The output .mesh file containts
> only the points I inserted, no facets or tetrahehra. Any other information
> I should provide to the C3t3?
>
> Here are my codes:
> ------------------------------------------
> Polyhedron polyhedron;
> Build_mesh<HalfedgeDS> builder(boundary);
> polyhedron.delegate(builder);
> Mesh_domain domain(polyhedron);
>
> C3t3 c3t3;
> for (int i=0; i<tetmesh->nb_vertices(); i++)
> {
> // insert points
> c3t3.triangulation().insert(Point(tetmesh->vertices_[i].point_[0],tetmesh-
> >vertices_[i].point_[1],tetmesh->vertices_[i].point_[2])); }
>
> CGAL::perturb_mesh_3(c3t3, domain, time_limit=300, sliver_bound=10);
>
> std::ofstream medit_file("out_1.mesh");
> c3t3.output_to_medit(medit_file);
> ------------------------------------------------------------------
>
> --zhong
You are trying to do something really curious. CGAL::perturb_mesh_3 is
designed to work on a c3t3 produced with CGAL::create_mesh_3 or
CGAL::refine_mesh_3 (in the same Mesh_3 package).
Before your call to perturb_mesh_3, you could try to call refine_mesh_3 with
special cells and facets criteria that always say "the element is good". That
way, the mesh would not be refined, but at least the c3t3 object would be
correctly filled with facets and cells. But you will probably not be happy
with the result, because the set of facets of the c3t3 will probably not
approximate your surface correctly, without any refinement (but if your
surface is equal to the set of facets of the Delaunay triangulation of its
point, restricted to itself, see the literature about "restricted Delaunay
triangulations").
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] how to add points to C3t3 for 3D meshing, Zhonggui Chen, 04/11/2010
- Re: [cgal-discuss] how to add points to C3t3 for 3D meshing, Laurent Rineau (GeometryFactory), 04/11/2010
- Re: [cgal-discuss] how to add points to C3t3 for 3D meshing, Zhonggui Chen, 04/11/2010
- Re: [cgal-discuss] how to add points to C3t3 for 3D meshing, Laurent Rineau (GeometryFactory), 04/12/2010
- Re: [cgal-discuss] how to add points to C3t3 for 3D meshing, Zhonggui Chen, 04/11/2010
- Re: [cgal-discuss] how to add points to C3t3 for 3D meshing, Laurent Rineau (GeometryFactory), 04/11/2010
Archive powered by MHonArc 2.6.16.