Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: parametric mesh criteria for 3D mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: parametric mesh criteria for 3D mesh


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: parametric mesh criteria for 3D mesh
  • Date: Thu, 17 Dec 2009 17:45:57 +0100
  • Organization: GeometryFactory

On Wednesday 16 December 2009 18:04:56 Ramin H wrote:
> I looked at Mesh_criteria_3.h, Mesh_facet_criteria_3.h and
> Mesh_cell_criteria_3.h. As far as I understand, these are the default
> meshing criteria defined in CGAL package for Mesh_3 process.
>
> This is how Mesh_cell_criteria_3's constructor looks like:
> Mesh_cell_criteria_3(const FT& radius_edge_bound,
> const FT& radius_bound)
>
> so, we realize that radius_edge_bound and radius_bound are functors.

No they are not functors! They are a const reference to a FT (field type).
With most CGAL kernels, "FT" is equal to "double".

> Now, going back to
> CGAL-3.5/examples/Mesh_3/mesh_polyhedral_domain.cpp, is it possible to
> define the following and expect this to just work?
>
> typedef K::FT FT;
> typedef FT (Function)(const Point&);
>
> FT function_1 (const Point& p)
> {
> const FT x1=p.x();
> const FT y1=p.y();
> const FT z1=p.z();
> return x1+y1+z1+1;
> }

Be careful with that example: that size field is zero along the plane of
equation x+y+z-1=0, and is negative on the negative size of that plane!

> and then in main.cpp,
> int main()
> {
> // ...
> Cell_criteria cell_criteria(function_1, 0.2);
> // ...
> }
>
> I appreciate your feedback.

No, that is not possible as-is. You need to define your own model of the
concept MeshCriteria_3.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page