Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh...
Chronological Thread
- From: Julian Panetta <>
- To:
- Subject: Re: [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh...
- Date: Sun, 25 Sep 2016 21:47:39 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:uuVmVhV2on+C1JAg/huVeTU9+D3V8LGtZVwlr6E/grcLSJyIuqrYZRyGt8tkgFKBZ4jH8fUM07OQ6PG6HzVaqsvb+DBaKdoXCE9D0Z1X1yUbQ+e7SmTDZMbwaCI7GMkQHHRExFqcdXZvJcDlelfJqWez5zNBUj/2NA5yO/inUtWK15f/hKiO/MjYbAxMwTa8erhvNw6erAPLt8BQj5ExBLw2z07rv39JcuIe/WpuKE6Pll6o5Nq0/ZdltTxZvf8968doXqDzfqB+RrtdWmd1e1sp7dHm4EGQBTCE4WERBz0b
Creating a minimal example was difficult because I can't reproduce the problem with trivial examples of, e.g. a sphere or 3 axis-aligned cylinders clipped to box [-1, 1]^3.
I've attached an example attempting to mesh a smoothed union of a few cylinders clipped to a box. If I add feature curves at the box intersection, make_mesh_3 returns an empty mesh. (I generated the hard-coded feature curves with marching squares.)
In this particular example, slightly perturbing the degree of smoothing actually results in meshable geometry. In fact, I can use the feature curves extracted from the perturbed geometry to successfully mesh the unperturbed signed distance function. The attached program demonstrates this and can be run three ways:
$ ./self_contained original
got 0 tetrahedra
$ ./self_contained perturbed
got 106736 tetrahedra
$ ./self_contained none
got 149256 tetrahedra
The argument specifies whether to use feature curves extracted from the signed distance function I'm meshing (original), the perturbed sdf (perturbed), or no features (none). I've also attached a screenshot of the geometry successfully meshed with perturbed features.
-Julian
On Fri, Sep 23, 2016 at 6:25 PM, Julian Panetta <> wrote:
Hi everyone,I'm trying to mesh a domain with 1D features. Specifically, I've added planar feature curves lying on each face of my domain's bounding box. In many cases, make_mesh_3 returns a mesh with no tetrahedra--I just get back some points sampled from the input feature curves and a few more points on the surface (first attached image).The domain meshes properly when I omit the features, and the feature curves I'm trying to add do lie close to the surface (second attached image, zoomed in on one curve).The problem seems not to happen when the planar curves intersect at the bounding box corners to form a connected component spanning 3 dimensions. This made me suspicious of the following check in make_mesh_3.h:// If c3t3 initialization is not sufficient (may happen if there is only// a planar curve as feature for example), add some surface pointsif ( c3t3.triangulation().dimension() != 3 ){internal::Mesh_3::init_c3t3(c3t3, domain, criteria,mesh_options.number_of_initial_points);}And indeed if I make that an "if (true)," the extra surface points added by init_c3t3 seem to fix things. But I don't understand the mesher well enough to be sure that this check is causing the problem.Could someone please let me know what I'm doing wrong/if this is a bug in CGAL?Thanks,Julian
Attachment:
cylinder_arrangement.png
Description: PNG image
Attachment:
failing_example.tgz
Description: GNU Zip compressed data
- [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh..., Julian Panetta, 09/24/2016
- Re: [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh..., Julian Panetta, 09/26/2016
- Re: [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh..., Julian Panetta, 09/27/2016
- Re: [cgal-discuss] Bug in make_mesh_3 on domain with planar 1D features? Returning empty mesh..., Julian Panetta, 09/26/2016
Archive powered by MHonArc 2.6.18.