Skip to Content.
Sympa Menu

cgal-discuss - why derived class of Polyhedron_3 can not use mesh simplification algorithm?

Subject: CGAL users discussion list

List archive

why derived class of Polyhedron_3 can not use mesh simplification algorithm?


Chronological Thread 
  • From:
  • To:
  • Subject: why derived class of Polyhedron_3 can not use mesh simplification algorithm?
  • Date: Fri, 11 Apr 2008 05:54:17 +0200

SUBSCRIBE cgal-discuss

Hi, every one,

Recently, I am studying mesh simplification and have learned the examples --
"edge_collapse_enriched_polyhedron" and "edge_collapse_polyhedron" -- in CGAL
package. But when I try to add the simplification algorithm to the famous
project appended with "A Tutorial on CGAL Polyhedron for Subdivision
Algorithms", I found some problems.

If I declare a mesh use the Enriched_polyhedron template, then the sentence
"SMS::Count_stop_predicate<EnrichedPolyIdMesh> stop2(1000);" will can not
pass the compilation. Details list as follows:

typedef list:
typedef CGAL::Simple_cartesian<double> Kernel;
// define Surface as the example within CGAL
typedef CGAL::Polyhedron_3<Kernel> Surface;
// use Polyhedron_items_with_id_3 only
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> IdMesh;
// use Enriched_items defined in the project
typedef CGAL::Polyhedron_3<Kernel, Enriched_items> EnrichedItemMesh;
// use mesh defined in the project
typedef Enriched_polyhedron<Kernel, Enriched_items> Mesh;

// use Enriched_polyhedron and Polyhedron_items_with_id_3
typedef Enriched_polyhedron<Kernel, CGAL::Polyhedron_items_with_id_3>
EnrichedPolyIdMesh;

experiments and results:
namespace SMS = CGAL::Surface_mesh_simplification ;
SMS::Count_stop_predicate<Surface> stop(1000); // pass
SMS::Count_stop_predicate<EnrichedItemMesh> stop5(1000); // pass
SMS::Count_stop_predicate<IdMesh> stop3(1000); // pass
SMS::Count_stop_predicate<EnrichedPolyIdMesh> stop2(1000); // error
SMS::Count_stop_predicate<Mesh> stop4(1000); // error

From these experiments, we can found that the only difference between
EnrichedItemMesh and Mesh lies in the difference between CGAL::Polyhedron_3
and Enriched_polyhedron. However, Enriched_polyhedron is derived from
CGAL::Polyhedron_3, why using Enriched_polyhedron will lead to error while
using CGAL::Polyhedron_3 is correct?

Can anybody tell me some more information or advices on this problem?
Thank you in advance.

BTW, My programming environment is: Windows + VS2008 + CGAL3.3.1.

Lucida


  • why derived class of Polyhedron_3 can not use mesh simplification algorithm?, wolflock, 04/11/2008

Archive powered by MHonArc 2.6.16.

Top of Page