Subject: CGAL users discussion list
List archive
- From: Michael Hemmer <>
- To:
- Subject: Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug
- Date: Mon, 1 Aug 2011 16:05:05 +0300
The problem is that the function
template <typename R> static
CGAL::Plane_3<R> normalized(const CGAL::Plane_3<R>& h) {
in file Nef_S2/Normalizing.h
assumes that FT is decomposable into a numerator and a denominator.
This is not the case if FT is CORE::Expr.
The function should first check whether it can decompose FT using the
tag that is provided by the Fraction_traits.
If FT is not decomposable it is probably best to divide all
coefficients by the first coefficient that is not zero.
This way one also achieves a normalized, i.e. unique representation,
of the plane.
Michael Hemmer
On Mon, Aug 1, 2011 at 1:20 AM, Cody Rose
<>
wrote:
> In Visual Studio 2010, the code:
>
> #include "CGAL/CORE_Expr.h"
> #include "CGAL/Cartesian.h"
> #include "CGAL/Nef_polyhedron_3.h"
>
> typedef CGAL::Cartesian<CORE::Expr> K;
> typedef CGAL::Nef_polyhedron_3<K> nef;
>
> int main() {
> nef foo;
> }
>
> compiles in Release mode but not Debug mode. The error is
>
> cgal\nef_s2\normalizing.h(307): error C2676: binary '*=' : 'CGAL::Null_tag'
> does not define this operator or a conversion to a type acceptable to the
> predefined operator
>
> many times. Someone else on this mailing list had this problem back in 2008,
> but that was resolved by switching kernels. However, I need square roots,
> and therefore (as I understand it) the only number types I can use are
> CORE::Expr and leda_real. I'm getting vastly better performance with
> CORE::Expr so I would really like to avoid leda_real. The fact that this
> works fine in Release mode indicates to me that there must be some way to
> get it to work in Debug mode, but the earlier thread didn't discuss why that
> might be.
>
> Thanks,
> Cody
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>
- [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Cody Rose, 08/01/2011
- Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Michael Hemmer, 08/01/2011
- Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Cody Rose, 08/01/2011
- Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Michael Hemmer, 08/02/2011
- Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Cody Rose, 08/01/2011
- Re: [cgal-discuss] nef_polyhedra work with CORE::Expr in release but not debug, Michael Hemmer, 08/01/2011
Archive powered by MHonArc 2.6.16.