Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Simplification: Borders not honored

Subject: CGAL users discussion list

List archive

[cgal-discuss] Simplification: Borders not honored


Chronological Thread 
  • From: "Lehtonen, Matti/HIIT" <>
  • To:
  • Subject: [cgal-discuss] Simplification: Borders not honored
  • Date: Wed, 01 Sep 2010 18:48:04 +0300


Codebase: plain 3.5.1

Sympton:
I have simplified surfaces extracted from C3T3 volume(s). For some reason, I
cannot get borders honored (not modified during simplification process), even
thought they should be.

See:
http://picasaweb.google.fi/mmalehtonen/SimplificationBorderNotHonored?authkey=Gv1sRgCKTirofBua60GQ&feat=directlink

Question: How to solve this problem?

Code samples:
* Simplification:
int r = CGAL::Surface_mesh_simplification::edge_collapse( P,
stop,
CGAL::vertex_index_map( boost::get( CGAL::vertex_external_index, P
) )
.edge_index_map (boost::get(CGAL::edge_external_index, P ) )
.edge_is_border_map( constrains_map )
.get_cost(
CGAL::Surface_mesh_simplification::Edge_length_cost<Polyhedron>()
)
.get_placement(
CGAL::Surface_mesh_simplification::Midpoint_placement<Polyhedron>() )
.visitor( vis ) );

* Constraint map:
reference
operator[]
(
key_type const & e
)
const
{
key_type const & oe = opposite_edge( e, polyhedron );
return e->is_border() ||
/* Without opposite edge checking, even less is honored */
oe->is_border() /* ||
is_constrained( e ) || is_constrained( oe ) */;
}

* stop predicate:
bool
operator()
(
FT const & aCurrentCost __attribute__((unused)),
Profile const& aEdgeProfile __attribute__((unused)),
size_type aInitialCount __attribute__((unused)),
size_type aCurrentCount __attribute__((unused))
)
const
{
return aCurrentCost > _aParam ;
}


Data files:
https://docs.google.com/uc?id=0B0XXln5ZRT1xMTczZWFkMmQtNTJjNy00MzA3LTg2MzgtYmIyMjNiYjJkZjU0&authkey=CMCXweAE&hl=en

Thx,
Lehtonen, Matti

Researcher, head programmer - Helsinki Institute for Information Technology
HIIT
http://www.hiit.fi/
--
Life is complex. It has real and imaginary parts.





Archive powered by MHonArc 2.6.16.

Top of Page