Introduction to the community

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Introduction to the community

RISHABH POKHARNA .
Hello everyone,
I am new to open source community, and would like to learn and contribute. It would be great if anyone could guide me on how to get started.

Thank and regards,
RIshabh
Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

Florian Prud'homme
Hi

Could you add a file named Delaunay_mesh_vertex_base_with_info_2.h

with the following content to CGAL ? :

/*
 * Delaunay_mesh_vertex_base_with_info_2.h
 *
 *  Created on: Nov 23, 2017
 *      Author: florian
 */

#ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
#define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_

#include <CGAL/Triangulation_vertex_base_2.h>

namespace CGAL {

template<typename Info_, typename GT, typename Vb =
Triangulation_vertex_base_2&lt;GT> >
class Delaunay_mesh_vertex_base_with_info_2: public Vb {
    Info_ _info;

public:
    typedef typename GT::FT FT;
    typedef typename Vb::Face_handle Face_handle;
    typedef typename Vb::Point Point;
    typedef Info_ Info;

    template<typename TDS2>
    struct Rebind_TDS {
        typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
        typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2> Other;
    };
protected:
    FT sizing_info_;

public:
    Delaunay_mesh_vertex_base_with_info_2() :
            Vb(), sizing_info_(0.) {
    }

    Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
            Vb(p), sizing_info_(0.) {
    }

    Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c) :
            Vb(p, c), sizing_info_(0.) {
    }

    Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
            Vb(c), sizing_info_(0.) {
    }

    void set_sizing_info(const FT& s) {
        sizing_info_ = s;
    }
    const FT& sizing_info() const {
        return sizing_info_;
    }

    const Info& info() const {
        return _info;
    }
    Info& info() {
        return _info;
    }
};

} // namespace CGAL

#endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */



thanks



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

MaelRL
Hello,

You don't need such class, you can simply template the class
Delaunay_mesh_vertex_base_2 using Triangulation_vertex_base_with_info_2
as vertex base (the second template argument of the class
Delaunay_mesh_vertex_base_2) , that is for example:

typedef CGAL::Triangulation_vertex_base_with_info_2<int, K> Vbb;
typedef CGAL::Delaunay_mesh_vertex_base_2<K, Vbb>           Vb;

and you'll then have an info() member,

Vertex_handle v = cdt.insert(Point_2(0.,0.));
v->info() = 3;
etc.

see also
https://doc.cgal.org/latest/Mesh_2/classCGAL_1_1Delaunay__mesh__vertex__base__2.html.

Mael

On 01/03/2018 19:15, Florian Prud'homme wrote:

> Hi
>
> Could you add a file named Delaunay_mesh_vertex_base_with_info_2.h
>
> with the following content to CGAL ? :
>
> /*
>  * Delaunay_mesh_vertex_base_with_info_2.h
>  *
>  *  Created on: Nov 23, 2017
>  *      Author: florian
>  */
>
> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>
> #include <CGAL/Triangulation_vertex_base_2.h>
>
> namespace CGAL {
>
> template<typename Info_, typename GT, typename Vb =
> Triangulation_vertex_base_2&lt;GT> >
> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>     Info_ _info;
>
> public:
>     typedef typename GT::FT FT;
>     typedef typename Vb::Face_handle Face_handle;
>     typedef typename Vb::Point Point;
>     typedef Info_ Info;
>
>     template<typename TDS2>
>     struct Rebind_TDS {
>         typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>         typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2> Other;
>     };
> protected:
>     FT sizing_info_;
>
> public:
>     Delaunay_mesh_vertex_base_with_info_2() :
>             Vb(), sizing_info_(0.) {
>     }
>
>     Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>             Vb(p), sizing_info_(0.) {
>     }
>
>     Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c) :
>             Vb(p, c), sizing_info_(0.) {
>     }
>
>     Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>             Vb(c), sizing_info_(0.) {
>     }
>
>     void set_sizing_info(const FT& s) {
>         sizing_info_ = s;
>     }
>     const FT& sizing_info() const {
>         return sizing_info_;
>     }
>
>     const Info& info() const {
>         return _info;
>     }
>     Info& info() {
>         return _info;
>     }
> };
>
> } // namespace CGAL
>
> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */
>
>
>
> thanks
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

Florian Prud'homme
Hi

Your solution does not seem to work for constrained Delaunay Mesh



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

Florian Prud'homme
I should add my usage :  


 
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_2.h>
#include <CGAL/Delaunay_mesh_face_base_2.h>
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
#include <CGAL/Delaunay_mesh_vertex_base_2.h>
#include "Delaunay_mesh_vertex_base_with_info_2.h"
#include <CGAL/Delaunay_mesher_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_data_structure_2.h>

 
#include "Triangule.h"

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

typedef CGAL::Delaunay_mesh_vertex_base_with_info_2<VertexInfo, K> Vb;
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> TDS;
//typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS/*, Itag*/> CDT;
typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
typedef CGAL::Delaunay_mesher_2<CDT, Criteria> Mesher;

typedef CDT::Point Point;

int mainTriangule(int argc, char *argv[]) {

    Triangule<CDT> t;

   return 0;
}



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

Florian Prud'homme
Hello again

By the way..

I'm quite frustrated By Arrangement_2, I would like to have Nurbs traits, in
order to merge bezier trait, circles and conics.

It would be quite handy to have a Polygon_set<Arrangement>   templated by a
given arrangement, in order to apply boolean operation of polygons on
arbitrary type of arrangement.

We should have hybrid point location strategies, and hybrid insert
strategies, with  a profiling tool, in order to   calibrate some scalar
parameters to enhance performances.

we should remove completely everything related to Homogeneous kernels, there
are useless.

We should add much more support for interoperability between differents
packages of CGAL, and also more uniformity between different packages. So
much fragmentation !

What do you think ? Would it take 200 men/years or 500 men/years to achieve
that ?

;-)

Cheers,
Florian



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Introduction to the community

Simon Giraudot-2
In reply to this post by Florian Prud'homme
(Why is this discussion happening in the thread "Introduction to the
community"? This does not seem related at all. Please open new threads
to start new discussions.)

> Hi
>
> Your solution does not seem to work for constrained Delaunay Mesh
It should. If you take this example:
https://doc.cgal.org/latest/Mesh_2/Mesh_2_2mesh_class_8cpp-example.html
and replace `typedef CGAL::Triangulation_vertex_base_2<K> Vb;` by
`typedef CGAL::Triangulation_vertex_base_with_info_2<int, K> Vb;` as
Mael suggested (with the corresponding include), it works perfectly well.

It is hard to help you if you don't share at least some error messages.

> We should have hybrid point location strategies, and hybrid insert
> strategies, with  a profiling tool, in order to   calibrate some scalar
> parameters to enhance performances.
>
> we should remove completely everything related to Homogeneous kernels, there
> are useless.
>
> We should add much more support for interoperability between differents
> packages of CGAL, and also more uniformity between different packages. So
> much fragmentation !
Who is "we"?
> What do you think ? Would it take 200 men/years or 500 men/years to achieve
> that ?
>
> ;-)
Feel free to contribute: https://www.cgal.org/review_process_rules.html

:-)

--
Simon Giraudot, PhD
R&D Engineer
GeometryFactory - http://geometryfactory.com/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss