Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9323329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:19:01+00:00 2026-06-19T04:19:01+00:00

I am storing points in a custom container and I would like to build

  • 0

I am storing points in a custom container and I would like to build the Delaunay triangulation on a subset of these points.

As the points already exist in the container I don’t want the Delaunay triangulation to store copies of these points.

My point class is derived from Point_3 and contains several informations (booleans and ints).

In order to do that, I created a custom triangulation_vertex class :

template < typename GT, typename Pt, typename DSVb = Triangulation_ds_vertex_base_3<> >
class Convection_vertex : public DSVb
{
public:

  typedef typename DSVb::Cell_handle Cell_handle;

  typedef GT Geom_traits;
  typedef typename GT::Point_3 Point;
  typedef typename Pt::Point_handle Point_handle;    

template < typename TDS2 >
struct Rebind_TDS {
  typedef typename DSVb::template Rebind_TDS<TDS2>::Other DSVb2;
  typedef Convection_vertex<GT, Pt, DSVb2> Other;
};

private:
  static int rank_id;
  int number_id;
  bool discovered;

  Point_handle _ph;

public:
  Convection_vertex() : DSVb(), number_id(rank_id++), discovered(false) {}

  Convection_vertex(const Point_handle& p) : DSVb(), _ph(p), number_id(rank_id++),   discovered(false) {}

  Convection_vertex(const Point_handle& p, const Cell_handle& c) : DSVb(c), _ph(p), number_id(rank_id++), discovered(false) {}

  Convection_vertex(const Cell_handle& c) : DSVb(c), number_id(rank_id++), discovered(false) {}

  const Point& point() const
  { return (*_ph); }

  Point& point()
  { return (*_ph); }

  void set_point(const Point& p){ }

  void set_point(const Point_handle& ph)
  { _ph = ph; }

   void set_point_handle(Point_handle ph)
  { _ph = ph; }

  const Point_handle& point_handle() const
  { return _ph; }

  Point_handle& point_handle()
  { return _ph; }
};

To insert a point in the Delaunay triangulation I do:

DVertex_handle dvh = dt.insert(*p);
dvh->set_point_handle(p);

Where p is a point_handle (ie My_point*).

To delete a point in the Delaunay triangulation I do:

dt.remove(dvh);

where dvh is a vertex_handle.

Inserting points in the triangulation is working fine, but I’m having issues removing points. Is my custom vertex class incorrect ?

Is there a better way to do that ?

–edit—–

dt is the Delaunay triangulation:

typedef CGAL::Convection_vertex<K,Point> Conv_Vb3d;
typedef CGAL::Convection_cell<K> Ce3d;
typedef CGAL::Triangulation_data_structure_3<Conv_Vb3d,Ce3d > Tds3d;
typedef CGAL::Delaunay_triangulation_3<K,Tds3d > Dh;

Dh dt;

—

@sloriot: Is this a good start ?

template < typename CK, bool UseStaticFilters, typename Pt >
struct Convection_traits
  : public Filtered_kernel_adaptor<
           Type_equality_wrapper<
               typename CK:: template Base< Convection_traits<CK, UseStaticFilters,Pt> >::Type,
               Convection_traits<CK, UseStaticFilters,Pt> >,
           UseStaticFilters >
{
    typedef Pt Point_3;

    [...] // functors

};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T04:19:02+00:00Added an answer on June 19, 2026 at 4:19 am

    Here is what I have done to use my point_handle as point in the Delaunay_triangulation:

    template < typename K_, typename Pt >   
    class My_traits
    {
    
      K_ K;  
    
     public:
      typedef Pt Point_3;
      typedef My_traits<K_, Pt> Self;
    
    //triangulation traits
    
    typedef typename K_::Segment_3 Segment_3;
    typedef typename K_::Tetrahedron_3 Tetrahedron_3;
    typedef typename K_::Triangle_3 Triangle_3;
    
    typedef typename K_::Construct_segment_3 Construct_segment_3;
    typedef typename K_::Construct_triangle_3 Construct_triangle_3;
    typedef typename K_::Construct_tetrahedron_3 Construct_tetrahedron_3;
    
    typedef typename K_::Compare_xyz_3 Compare_xyz_3;
    typedef typename K_::Coplanar_orientation_3 Coplanar_orientation_3;
    typedef typename K_::Orientation_3 Orientation_3;
    
    Construct_tetrahedron_3 construct_tetrahedron_3_object () const{
        return K.construct_tetrahedron_3_object ();
    }
    Construct_triangle_3 construct_triangle_3_object () const{
        return K.construct_triangle_3_object ();
    }
    Construct_segment_3 construct_segment_3_object () const{
        return K.construct_segment_3_object ();
    }
    Compare_xyz_3 compare_xyz_3_object () const{
        return K.compare_xyz_3_object ();
    }
    Coplanar_orientation_3 coplanar_orientation_3_object () const{
        return K.coplanar_orientation_3_object ();
    }
    Orientation_3 orientation_3_object () const{
        return K.orientation_3_object ();
    }
    
    //delaunay triangulation traits
    
    typedef typename K_::Line_3 Line_3;
    typedef typename K_::Object_3 Object_3;
    typedef typename K_::Ray_3 Ray_3;
    
    typedef typename K_::Coplanar_side_of_bounded_circle_3 Coplanar_side_of_bounded_circle_3;
    typedef typename K_::Side_of_oriented_sphere_3 Side_of_oriented_sphere_3;
    typedef typename K_::Compare_distance_3 Compare_distance_3;
    
    Coplanar_side_of_bounded_circle_3 coplanar_side_of_bounded_circle_3_object() const{
        return K.coplanar_side_of_bounded_circle_3_object();
    }
    Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const{
        return K.side_of_oriented_sphere_3_object();
    }
    Compare_distance_3 compare_distance_3_object() const{
        return K.compare_distance_3_object();
    }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm storing Points Of Interest (POI) in PostgreSQL database, and retrieve them via PHP
I'm trying to build a custom activity for SharePoint 2010 to be used in
I'm using the tooltipManager as described HERE . I want to display a custom
I've created my own custom map to show my current location and multiple points
I have a list of files I would like to sort based on the
I'd like to leverage the built-in intent chooser to display a custom filtered list
I'd like to create a custom attribute to apply to any method within a
Possible Duplicate: Insert string between two points with PHP How can I replace everything
This is my string: $a = RSS here: Your result: 3 points form 50
What's the difference between char* name which points to a constant string literal, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.