Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Error in compiling example code after some modification

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Error in compiling example code after some modification


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Error in compiling example code after some modification
  • Date: Wed, 15 Jan 2014 06:04:35 +0100
  • Organization: GeometryFactory

The Lindstrom_Turk placement is using a square root so it does not compile.
I think you can try the midpoint placement which should not have the problem. If you really want to use the default placement, here is a hack:


--- a/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
+++ b/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Detail/Lindstrom_Turk_core_impl.h
@@ -419,7 +419,7 @@ void LindstromTurkCore<ECM,K>::Add_constraint_if_alpha_compatible( Vector const&

if ( is_finite(slai) )
{
- FT l = CGAL_NTS sqrt( slai ) ;
+ FT l = CGAL_NTS sqrt( to_double(slai) ) ;



Note that I do not recommend to use this algorithm using this kernel.

Sebastien.


On 01/14/2014 11:31 AM, tang wrote:
Dear all,

I am trying to do some modification to the example code:
http://doc.cgal.org/latest/Surface_mesh_simplification/Surface_mesh_simplification_2edge_collapse_constrained_polyhedron_8cpp-example.html

I try to change the Kernel from
CGAL::Simple_cartesian<double>
to
CGAL::Exact_predicates_exact_constructions_kernel

As a result, I have the following modification in the example code:
1) line 4, changed
#include <CGAL/Simple_cartesian.h>
to
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

2) line 20, changed
typedef CGAL::Simple_cartesian<double> Kernel;
to
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;

However, after modification, the following errors displayed:
error C2440: 'initializing' : cannot convert from
'CGAL::Null_functor::result_type' to 'CGAL::Lazy_exact_nt<ET_>'


Could anyone tell me how to modify the code to let it pass the compling and
building?

Thanks




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Error-in-compiling-example-code-after-some-modification-tp4658641.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page