Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Make mesh with features: feature lines duplicated, overlapping or very close

Subject: CGAL users discussion list

List archive

[cgal-discuss] Make mesh with features: feature lines duplicated, overlapping or very close


Chronological Thread 
  • From: Bryn Lloyd <>
  • To:
  • Subject: [cgal-discuss] Make mesh with features: feature lines duplicated, overlapping or very close
  • Date: Thu, 20 Aug 2015 16:55:48 +0200

Hi CGAL users and devs

I am trying to use make_mesh_3 with feature lines enabled.

I am creating multi-domain meshes with domains defined via surface meshes (I derive from CGAL::Labeled_mesh_domain_3, see below).

Using angle and length criteria I extract feature edges from each surface and add these via

    CGAL::Bbox_3 box = ...;
    domain_wrapper_type domain_wrapper(my_domains, progress);

    Mesh_domain_with_features domain(domain_wrapper, box);

    if( m_EnablePolylineFeatures ) {
        domain.add_features(polylines.begin(), polylines.end());
    }

    Mesh_criteria criteria(edge_size=m_EdgeSize,
        facet_angle=m_FacetAngle, facet_size=sizing_wrapper, facet_distance=m_FacetDistance,
        cell_radius_edge=m_CellRatio, cell_size=m_CellSize );

    auto c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, no_lloyd(), no_odt(), perturb(), exude());

Sometimes the mesh generation fails when edges are too close, e.g. if they are (partially) overlapping or closer than the chosen 'edge_size'.
How can I robustly detect (nearly) overlapping edges/feature lines in order to remove/cleanup these lines?


Thanks for any ideas,
Bryn



    template< class BGT,class Wrapper=CLabelFunction<BGT> >
    class CLabeledMeshDomain : public CGAL::Labeled_mesh_domain_3<Wrapper, BGT>
    {
    public:
        typedef CGAL::Labeled_mesh_domain_3<Wrapper, BGT> Base;

        typedef typename Base::Sphere_3 Sphere_3;
        typedef typename BGT::FT FT;
        typedef BGT Geom_traits;
        typedef CGAL::Bbox_3 Bbox_3;

        CLabeledMeshDomain(const Wrapper& wrapper, const Bbox_3& bbox, const FT& error_bound = FT(1e-3))
            : Base(wrapper,bbox,error_bound) {}
        virtual ~CLabeledMeshDomain() {}


    private:
        // Disabled copy constructor & assignment operator
        typedef CLabeledMeshDomain<BGT> Self;
        CLabeledMeshDomain(const Self& src);
        Self& operator=(const Self& src);
    };




Archive powered by MHonArc 2.6.18.

Top of Page