Linear cell complex: compilation error calling make_triangle()

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

Linear cell complex: compilation error calling make_triangle()

Pranav
Hi,

I am trying to create a Linear cell complex with a 'LCC::Dart_handle' attribute associated with 2-cells. But it seems like I am calling make_triangle in wrong way resulting in compilation errors. For example, while compiling the following code:
https://gist.github.com/pranavkantgaur/8f90bf095a61c5d8e3b8

I get errors like:
/usr/local/include/CGAL/Combinatorial_map.h:547:7: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
       CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0,








Reply | Threaded
Open this post in threaded view
|

Re: Linear cell complex: compilation error calling make_triangle()

Guillaume Damiand
Hi Pranav,

A linear cell complex must have a cell attribute with point associated
with its 0-cells.

Thus you need to modify your dart info structure:

struct DartInfo
{
     template<class C>
     struct Dart_wrapper
     {
         typedef CGAL::Dart<3, C > Dart;

         typedef CGAL::Cell_attribute_with_point< Refs > Vertex_attribute;

         typedef Cell_attribute<C, LCC::Dart_handle> Facet_attribute;
         typedef    cpp11::tuple<Vertex_attribute, void,
Facet_attribute> Attributes;
     };
};

Guillaume


Le 12/01/2016 11:54, Pranav a écrit :

> Hi,
>
> I am trying to create a Linear cell complex with a 'LCC::Dart_handle'
> attribute associated with 2-cells. But it seems like I am calling
> make_triangle in wrong way resulting in compilation errors. For example,
> while compiling the following code:
> https://gist.github.com/pranavkantgaur/8f90bf095a61c5d8e3b8
>
> I get errors like:
> */usr/local/include/CGAL/Combinatorial_map.h:547:7: error: invalid
> application of ‘sizeof’ to incomplete type
> ‘boost::STATIC_ASSERTION_FAILURE<false>’
>         CGAL_static_assertion_msg(Helper::template
> Dimension_index/::value>=0,
> *
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Linear-cell-complex-compilation-error-calling-make-triangle-tp4661481.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>

--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Linear cell complex: compilation error calling make_triangle()

Pranav
Hi Guillaume,

Thanks it solved the problem. But I would like to know the reason why we need to explicitly attach an attribute with 0-cell if we have already declared it to be a linear cell complex which implicitly means CMap with 0-cells having points/coordinates information?


With regards,
Pranav
Reply | Threaded
Open this post in threaded view
|

Re: Linear cell complex: compilation error calling make_triangle()

Guillaume Damiand
Le 12/01/2016 12:42, Pranav a écrit :
> Hi Guillaume,
>
> Thanks it solved the problem. But I would like to know the reason why we
> need to /explicitly/ attach an attribute with 0-cell if we have already
> declared it to be a linear cell complex which implicitly means CMap with
> 0-cells having points/coordinates information?

Because Linear_cell_complex is a generic class, having an item class as
template argument, and you can use any attribute associated with 0-cells.

This item class must be a model of the LinearCellComplexItems concept,
which requires to  that 0-attributes are enabled, and associated with a
type of attribute being a model of the CellAttributeWithPoint concept.

When you define your own model of the LinearCellComplexItems concept,
you need to satisfy this requirement.





>
>
> With regards,
> Pranav
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Linear-cell-complex-compilation-error-calling-make-triangle-tp4661481p4661483.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>

--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment