MyPolyhedron_items_with_id_3 and the plane() function

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

MyPolyhedron_items_with_id_3 and the plane() function

antoineL
Hello,

I'm trying to use MyPolyhedron_items_with_id_3 and the plane() function.

Here the code :

class MyPolyhedron_items_with_id_3 {
public:
    template < class Refs, class Traits>
    struct Vertex_wrapper {
        typedef typename Traits::Point_3 Point;
        typedef CGAL::HalfedgeDS_vertex_max_base_with_id< Refs,
Point,std::size_t> Vertex;
    };
    template < class Refs, class Traits>
    struct Halfedge_wrapper {
        typedef CGAL::HalfedgeDS_halfedge_max_base_with_id<Refs,
std::size_t> Halfedge;
    };
    template < class Refs, class Traits>
    struct Face_wrapper {
        typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,
CGAL::Tag_true, std::size_t>  Face;
    };
};

typedef CGAL::Exact_predicates_exact_constructions_kernel                          
KE;
typedef CGAL::Polyhedron_3<KE,MyPolyhedron_items_with_id_3>                
CgalPolyhedron;
typedef CgalPolyhedron::Halfedge_iterator                                  
Halfedge_iterator;
typedef CgalPolyhedron::Traits::Vector_3                                  
Vector3;

int main(int argc, char**argv)
{
    CgalPolyhedron polyhedron;
    for (Halfedge_iterator hit = polyhedron.halfedges_begin(); hit !=
polyhedron.halfedges_end(); ++hit)
    {
        Vector3 normal1 = hit->face()->plane().orthogonal_vector();
    }
}

I've got the compilation error : "No member named 'orthogonal_vector' in
'CGAL::Boolean_tag<true>'"

Any idea ?
Thanks
Antoine



--
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: MyPolyhedron_items_with_id_3 and the plane() function

Sebastien Loriot (GeometryFactory)
Try replacing

typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,CGAL::Tag_true,
std::size_t>  Face;

by

typdef CGAL::Exact_predicates_exact_constructions_kernel::Plane_3 Plane;
typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,Plane, std::size_t>
  Face;

Sebastien.

On 01/31/2019 04:46 PM, antoineL wrote:

> Hello,
>
> I'm trying to use MyPolyhedron_items_with_id_3 and the plane() function.
>
> Here the code :
>
> class MyPolyhedron_items_with_id_3 {
> public:
>      template < class Refs, class Traits>
>      struct Vertex_wrapper {
>          typedef typename Traits::Point_3 Point;
>          typedef CGAL::HalfedgeDS_vertex_max_base_with_id< Refs,
> Point,std::size_t> Vertex;
>      };
>      template < class Refs, class Traits>
>      struct Halfedge_wrapper {
>          typedef CGAL::HalfedgeDS_halfedge_max_base_with_id<Refs,
> std::size_t> Halfedge;
>      };
>      template < class Refs, class Traits>
>      struct Face_wrapper {
>          typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,
> CGAL::Tag_true, std::size_t>  Face;
>      };
> };
>
> typedef CGAL::Exact_predicates_exact_constructions_kernel
> KE;
> typedef CGAL::Polyhedron_3<KE,MyPolyhedron_items_with_id_3>
> CgalPolyhedron;
> typedef CgalPolyhedron::Halfedge_iterator
> Halfedge_iterator;
> typedef CgalPolyhedron::Traits::Vector_3
> Vector3;
>
> int main(int argc, char**argv)
> {
>      CgalPolyhedron polyhedron;
>      for (Halfedge_iterator hit = polyhedron.halfedges_begin(); hit !=
> polyhedron.halfedges_end(); ++hit)
>      {
>          Vector3 normal1 = hit->face()->plane().orthogonal_vector();
>      }
> }
>
> I've got the compilation error : "No member named 'orthogonal_vector' in
> 'CGAL::Boolean_tag<true>'"
>
> Any idea ?
> Thanks
> Antoine
>
>
>
> --
> 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: MyPolyhedron_items_with_id_3 and the plane() function

antoineL
It’s work !

Thanks,
Antoine

> Le 5 févr. 2019 à 10:44, Sebastien Loriot (GeometryFactory) <[hidden email]> a écrit :
>
> Try replacing
>
> typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,CGAL::Tag_true, std::size_t>  Face;
>
> by
>
> typdef CGAL::Exact_predicates_exact_constructions_kernel::Plane_3 Plane;
> typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,Plane, std::size_t>  Face;
>
> Sebastien.
>
> On 01/31/2019 04:46 PM, antoineL wrote:
>> Hello,
>> I'm trying to use MyPolyhedron_items_with_id_3 and the plane() function.
>> Here the code :
>> class MyPolyhedron_items_with_id_3 {
>> public:
>>     template < class Refs, class Traits>
>>     struct Vertex_wrapper {
>>         typedef typename Traits::Point_3 Point;
>>         typedef CGAL::HalfedgeDS_vertex_max_base_with_id< Refs,
>> Point,std::size_t> Vertex;
>>     };
>>     template < class Refs, class Traits>
>>     struct Halfedge_wrapper {
>>         typedef CGAL::HalfedgeDS_halfedge_max_base_with_id<Refs,
>> std::size_t> Halfedge;
>>     };
>>     template < class Refs, class Traits>
>>     struct Face_wrapper {
>>         typedef CGAL::HalfedgeDS_face_max_base_with_id< Refs,
>> CGAL::Tag_true, std::size_t>  Face;
>>     };
>> };
>> typedef CGAL::Exact_predicates_exact_constructions_kernel
>> KE;
>> typedef CGAL::Polyhedron_3<KE,MyPolyhedron_items_with_id_3>
>> CgalPolyhedron;
>> typedef CgalPolyhedron::Halfedge_iterator
>> Halfedge_iterator;
>> typedef CgalPolyhedron::Traits::Vector_3
>> Vector3;
>> int main(int argc, char**argv)
>> {
>>     CgalPolyhedron polyhedron;
>>     for (Halfedge_iterator hit = polyhedron.halfedges_begin(); hit !=
>> polyhedron.halfedges_end(); ++hit)
>>     {
>>         Vector3 normal1 = hit->face()->plane().orthogonal_vector();
>>     }
>> }
>> I've got the compilation error : "No member named 'orthogonal_vector' in
>> 'CGAL::Boolean_tag<true>'"
>> Any idea ?
>> Thanks
>> Antoine
>> --
>> 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
>
>


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