Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Surface Mesh Simplification compile issues.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Surface Mesh Simplification compile issues.


Chronological Thread 
  • From: Philipp Moeller <>
  • To: trblair <>
  • Cc:
  • Subject: Re: [cgal-discuss] Surface Mesh Simplification compile issues.
  • Date: Thu, 20 Dec 2012 19:03:02 +0100
  • Organization: GeometryFactory

trblair
<>
writes:

> Hi all,
>
> I'm trying to use the Surface Mesh Simplification algorithm but I get a huge
> list of errors when I try to compile. From all of the examples in the
> documentation and everything that I have found in the forums I think that I
> have the code set up right.
>
> I'm thinking that I may be missing something in the set up of my
> Polyhedron_3 but I'm not sure.
> I'm really at a loss here. Any help would be greatly appreciated.
>
> I've attached a link to my code as well as the log with build errors.
>
> http://pastie.org/5557921#3 <http://pastie.org/5557921#3> </
> a> simplification_error.txt
> <http://cgal-discuss.949826.n4.nabble.com/file/n4656414/simplification_error.txt>
>

You are sure this is the complete code?

I've tried compiling it and the errors start at line 40, where triangles
is not declared. I suppose this line should be

float*** triangles = ...

Those kind of missing declarations continue for a while. The first error
related to CGAL is the undeclared SMS. I suppose you want to add a line
like:

namespace SMS = CGAL::Surface_mesh_simplification;

After you add that you only need to correct the include order:
edge_collapse.h needs to be included after
HalfedgeGraph_Polyhedron_3.h. (Odd, I know).

e.g.

#include <cstdlib>
#include <stdlib.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h>
#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
#include
<CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>

After that all error are your own :)

HTH,
Philipp



Archive powered by MHonArc 2.6.18.

Top of Page