Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Using Nef polyhedra with builtin 'double' number type

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Using Nef polyhedra with builtin 'double' number type


Chronological Thread 
  • From: sander <>
  • To:
  • Subject: [cgal-discuss] Re: Using Nef polyhedra with builtin 'double' number type
  • Date: Wed, 16 Mar 2011 13:56:44 -0700 (PDT)

Thanks for the hint. It may help, unfortunately non-triangular faces are not
uncommon in that application.

I tried, but the code didn't compile. The following snippet

typedef
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
> Kernel;
typedef CGAL::Polyhedron_3 Polyhedron_3;
typedef CGAL::Nef_polyhedron_3 Nef_Polyhedron_3;

Polyhedron_3 P;
Nef_Polyhedron_3 NP(P);

gave me a compiler error (below). The problem is apparently a missing gdc
specialization. As mentioned this is with cgal 3.6.1 on Debian squeeze,
using gcc 4.4.5.

Thanks,
Oliver


make[2]: Entering directory `/home/sander/dune-china/dune-grid-glue/lib'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -std=c++0x
-DHAVE_CONFIG_H -I. -I.. -I/home/sander/dune-china/dune-common
-I/home/sander/dune-china/dune-grid -I/home/sander/dune-china/dune-istl -I..
-I/home/sander/libpsurface-1.2beta-rc2/include -frounding-math
-DCGAL_DISABLE_ROUNDING_MATH_CHECK -g -MT
libdunegridglue_la-cgalmergeimp.lo -MD -MP -MF
.deps/libdunegridglue_la-cgalmergeimp.Tpo -c -o
libdunegridglue_la-cgalmergeimp.lo `test -f
'../dune/grid-glue/merging/cgalmergeimp.cc' || echo
'./'`../dune/grid-glue/merging/cgalmergeimp.cc
libtool: compile: g++ -std=c++0x -DHAVE_CONFIG_H -I. -I..
-I/home/sander/dune-china/dune-common -I/home/sander/dune-china/dune-grid
-I/home/sander/dune-china/dune-istl -I..
-I/home/sander/libpsurface-1.2beta-rc2/include -frounding-math
-DCGAL_DISABLE_ROUNDING_MATH_CHECK -g -MT libdunegridglue_la-cgalmergeimp.lo
-MD -MP -MF .deps/libdunegridglue_la-cgalmergeimp.Tpo -c
../dune/grid-glue/merging/cgalmergeimp.cc -o
libdunegridglue_la-cgalmergeimp.o
In file included from /usr/include/CGAL/Nef_3/SNC_decorator.h:27,
from /usr/include/CGAL/Nef_polyhedron_3.h:31,
from ../dune/grid-glue/merging/cgalmergeimp.hh:34,
from ../dune/grid-glue/merging/cgalmergeimp.cc:7:
/usr/include/CGAL/Nef_S2/Normalizing.h: In static member function ‘static
void CGAL::Normalizing::normalized(iterator, iterator) [with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]’:
/usr/include/CGAL/Nef_S2/Normalizing.h:322: instantiated from ‘static
CGAL::Plane_3 CGAL::Normalizing::normalized(const CGAL::Plane_3&) [with R =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>]’
/usr/include/CGAL/Nef_S2/Normalizing.h:365: instantiated from
‘CGAL::Plane_3 CGAL::normalized(const CGAL::Plane_3&) [with R =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>]’
/usr/include/CGAL/Nef_3/SNC_FM_decorator.h:449: instantiated from ‘void
CGAL::SNC_FM_decorator::create_facet_objects(const typename
SNC_structure_::Plane_3&, typename std::list >::iterator, typename std::list
>::iterator) const [with SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_3/SNC_external_structure.h:1216: instantiated from
‘void CGAL::SNC_external_structure&lt;CGAL::SNC_indexed_items,
SNC_structure_&gt;::categorize_facet_cycles_and_create_facets() const [with
SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_3/SNC_external_structure.h:1279: instantiated from
‘void CGAL::SNC_external_structure&lt;CGAL::SNC_indexed_items,
SNC_structure_&gt;::build_external_structure() [with SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_polyhedron_3.h:346: instantiated from ‘void
CGAL::Nef_polyhedron_3&lt;K, I, Mk&gt;::build_external_structure() [with
Kernel_ =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>, Items_ = CGAL::SNC_indexed_items, Mark_ = bool]’
/usr/include/CGAL/Nef_polyhedron_3.h:556: instantiated from
‘CGAL::Nef_polyhedron_3&lt;K, I,
Mk&gt;::Nef_polyhedron_3(CGAL::Polyhedron_3&lt;T1, T2, T3, T4&gt;&) [with T1
= CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, T2 = CGAL::Polyhedron_items_3, T3 = CGAL::HalfedgeDS_default, T4 =
std::allocator, Kernel_ =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>, Items_ = CGAL::SNC_indexed_items, Mark_ = bool]’
../dune/grid-glue/merging/cgalmergeimp.cc:395: instantiated from ‘static
void CGALMergeImp&lt;dim, Dune_number_type,
CGAL_number_type&gt;::compute3dIntersection(const Dune::GeometryType&, const
Dune::GenericGeometry::BasicGeometry&lt;dim,
Dune::GenericGeometry::DefaultGeometryTraits&lt;Dune_number_type, dim, dim,
false&gt; >&, const std::vector&lt;Dune::FieldVector&lt;K, dim&gt;,
std::allocator&lt;Dune::FieldVector&lt;K, dim&gt; > >&, unsigned int,
std::bitset<(1 << dim)>&, const Dune::GeometryType&, const
Dune::GenericGeometry::BasicGeometry&lt;dim,
Dune::GenericGeometry::DefaultGeometryTraits&lt;Dune_number_type, dim, dim,
false&gt; >&, const std::vector&lt;Dune::FieldVector&lt;K, dim&gt;,
std::allocator&lt;Dune::FieldVector&lt;K, dim&gt; > >&, unsigned int,
std::bitset<(1 << dim)>&,
std::vector&lt;RemoteSimplicialIntersection&lt;Dune_number_type, dim, dim,
dim&gt;, std::allocator&lt;RemoteSimplicialIntersection&lt;Dune_number_type,
dim, dim, dim&gt; > >&) [with int dim = 1, Dune_number_type = double,
CGAL_number_type = CGAL::Gmpq]’
../dune/grid-glue/merging/cgalmergeimp.cc:403: instantiated from here
/usr/include/CGAL/Nef_S2/Normalizing.h:57: error: no match for ternary
‘operator?:’ in ‘CGAL::operator== [with bool Protected = true](((const
CGAL::Interval_nt&)((const
CGAL::Interval_nt*)j.__gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator* [with _Iterator = CGAL::Interval_nt*, _Container =
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > >]())),
0).CGAL::Uncertain::operator T [with T = bool]() ? g : CGAL::gcd [with A =
CGAL::Normalizing::normalized(iterator, iterator) [with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]::RT, B =
CGAL::Interval_nt](((const CGAL::Normalizing::normalized(iterator, iterator)
[with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]::RT&)((const
CGAL::Normalizing::normalized(iterator, iterator) [with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]::RT*)(& g))), ((const
CGAL::Interval_nt&)((const
CGAL::Interval_nt*)j.__gnu_cxx::__normal_iterator<_Iterator,
_Container>::operator* [with _Iterator = CGAL::Interval_nt*, _Container =
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > >]())))’
In file included from /usr/include/CGAL/number_type_basic.h:70,
from /usr/include/CGAL/basic.h:35,
from /usr/include/CGAL/Cartesian/Cartesian_base.h:27,
from /usr/include/CGAL/Cartesian.h:27,
from ../dune/grid-glue/merging/cgalmergeimp.hh:26,
from ../dune/grid-glue/merging/cgalmergeimp.cc:7:
/usr/include/CGAL/number_utils.h: In function ‘typename
CGAL::Algebraic_structure_traits::Type>::Gcd::result_type CGAL::gcd(const
A&, const B&) [with A = CGAL::Normalizing::normalized(iterator, iterator)
[with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]::RT, B =
CGAL::Interval_nt]’:
/usr/include/CGAL/Nef_S2/Normalizing.h:57: instantiated from ‘static void
CGAL::Normalizing::normalized(iterator, iterator) [with iterator =
__gnu_cxx::__normal_iterator&lt;CGAL::Interval_nt&lt;true&gt;*,
std::vector&lt;CGAL::Interval_nt&lt;true&gt;,
std::allocator&lt;CGAL::Interval_nt&lt;true&gt; > > >]’
/usr/include/CGAL/Nef_S2/Normalizing.h:322: instantiated from ‘static
CGAL::Plane_3 CGAL::Normalizing::normalized(const CGAL::Plane_3&) [with R =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>]’
/usr/include/CGAL/Nef_S2/Normalizing.h:365: instantiated from
‘CGAL::Plane_3 CGAL::normalized(const CGAL::Plane_3&) [with R =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>]’
/usr/include/CGAL/Nef_3/SNC_FM_decorator.h:449: instantiated from ‘void
CGAL::SNC_FM_decorator::create_facet_objects(const typename
SNC_structure_::Plane_3&, typename std::list >::iterator, typename std::list
>::iterator) const [with SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_3/SNC_external_structure.h:1216: instantiated from
‘void CGAL::SNC_external_structure&lt;CGAL::SNC_indexed_items,
SNC_structure_&gt;::categorize_facet_cycles_and_create_facets() const [with
SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_3/SNC_external_structure.h:1279: instantiated from
‘void CGAL::SNC_external_structure&lt;CGAL::SNC_indexed_items,
SNC_structure_&gt;::build_external_structure() [with SNC_structure_ =
CGAL::SNC_structure&lt;CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, CGAL::SNC_indexed_items, bool>]’
/usr/include/CGAL/Nef_polyhedron_3.h:346: instantiated from ‘void
CGAL::Nef_polyhedron_3&lt;K, I, Mk&gt;::build_external_structure() [with
Kernel_ =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>, Items_ = CGAL::SNC_indexed_items, Mark_ = bool]’
/usr/include/CGAL/Nef_polyhedron_3.h:556: instantiated from
‘CGAL::Nef_polyhedron_3&lt;K, I,
Mk&gt;::Nef_polyhedron_3(CGAL::Polyhedron_3&lt;T1, T2, T3, T4&gt;&) [with T1
= CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt;
> >, T2 = CGAL::Polyhedron_items_3, T3 = CGAL::HalfedgeDS_default, T4 =
std::allocator, Kernel_ =
CGAL::Simple_cartesian&lt;CGAL::Quotient&lt;CGAL::Interval_nt&lt;true&gt; >
>, Items_ = CGAL::SNC_indexed_items, Mark_ = bool]’
../dune/grid-glue/merging/cgalmergeimp.cc:395: instantiated from ‘static
void CGALMergeImp&lt;dim, Dune_number_type,
CGAL_number_type&gt;::compute3dIntersection(const Dune::GeometryType&, const
Dune::GenericGeometry::BasicGeometry&lt;dim,
Dune::GenericGeometry::DefaultGeometryTraits&lt;Dune_number_type, dim, dim,
false&gt; >&, const std::vector&lt;Dune::FieldVector&lt;K, dim&gt;,
std::allocator&lt;Dune::FieldVector&lt;K, dim&gt; > >&, unsigned int,
std::bitset<(1 << dim)>&, const Dune::GeometryType&, const
Dune::GenericGeometry::BasicGeometry&lt;dim,
Dune::GenericGeometry::DefaultGeometryTraits&lt;Dune_number_type, dim, dim,
false&gt; >&, const std::vector&lt;Dune::FieldVector&lt;K, dim&gt;,
std::allocator&lt;Dune::FieldVector&lt;K, dim&gt; > >&, unsigned int,
std::bitset<(1 << dim)>&,
std::vector&lt;RemoteSimplicialIntersection&lt;Dune_number_type, dim, dim,
dim&gt;, std::allocator&lt;RemoteSimplicialIntersection&lt;Dune_number_type,
dim, dim, dim&gt; > >&) [with int dim = 1, Dune_number_type = double,
CGAL_number_type = CGAL::Gmpq]’
../dune/grid-glue/merging/cgalmergeimp.cc:403: instantiated from here
/usr/include/CGAL/number_utils.h:133: error: no match for call to
‘(CGAL::Null_functor) (const CGAL::Interval_nt&, const CGAL::Interval_nt&)’
make[2]: *** [libdunegridglue_la-cgalmergeimp.lo] Fehler 1
make[2]: Leaving directory `/home/sander/dune-china/dune-grid-glue/lib'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/sander/dune-china/dune-grid-glue'
make: *** [all] Fehler 2


--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Using-Nef-polyhedra-with-builtin-double-number-type-tp3382392p3383016.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page