Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Unable to simplify correctly with Lindstrom-Turk placement

Subject: CGAL users discussion list

List archive

[cgal-discuss] Unable to simplify correctly with Lindstrom-Turk placement


Chronological Thread 
  • From: DemoKioussis <>
  • To:
  • Subject: [cgal-discuss] Unable to simplify correctly with Lindstrom-Turk placement
  • Date: Tue, 20 Mar 2018 09:37:13 -0700 (MST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:31n/sxRJ+phr8TnuGag4+cgyONpsv+yvbD5Q0YIujvd0So/mwa69YRyN2/xhgRfzUJnB7Loc0qyK6/umATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfb1/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/m/XhMJuj6xVvR2uqABwzYPPfIGYNuZycr/Bcd8GW2ZMWNtaWSxbAoO7aosCF+QPMvhdr4n6olUOrBy+BRS3BOP0yz9InWL90Ko03es/FAHG2xYsH9EPsHTTsdX1L7wSUeGuzKTTwjXDaulZ2Tb56ITSbh8hpvSMUKt2fMHMx0cvEAbFgU+RqYzjJz6V0P4CvHOA4OpkS+2jkXIoqwZ0ojS32sgshZPGhoYPxlDD7yV5z4A4LsC7Rk5jedOoDZpduz+AO4doQs4vTXtktDs0x7AIo5K2fjYGxZI6zBDFcfOHaZKH4hf7WeaRPzh4gHVldaq5hxu960SgzPfzWdKv31ZOsCVJiMXDtncI1xDL68iHTOVy/lu51DqS1g3f9PtILV40mKfVMZIt37A9m5QJvUnBACP6gED2g7WXdkUg9Oio8ePnYrD+q5GSKYB0jwb+Pr4tmsy+BuQ4LxMOX3Oa+eSnz7Dj8kj5T69Ljv0yiKXWrJfaJcEDqq6jHwBVypoj6wq4Dzq+zNsYkmMILFZcdB2ajojpIE3BIO3jDfekmFmsizdqx/XePrL7GJnNL37DkK3gfbln8UJcxhAznphj4MdfBbgFZf7yQUTsr8fwDxkjMgXyzfy0Js9609YyVGeIIa6eLbjJsETAss4iJu7KZ44SpS3mKuMN6PvnjHt/klgYK/r6laALYWy1S6w1a36SZmDh149YQDU6+zEmRemvs2WsFDtaZnK8RaU5v2hpB4evDIOFTYeo0ufYgHWLW6ZOb2UDMWiiVG/yftzdCfgJYSOWZMRml25cDOXze8oazRir8TTC5f9nI+7To3BKs86l0tF/7ene0xo18G4tAg==

Hello, I am trying to use mesh simplification to eventually simplify large
meshes, however I am experimenting on a relatively small mesh (about 80mb)
for now. Eventually I will probably move to make my own version of the cost
/ placement functions already defined, but I am having trouble with the
Lindstrom-Turk placement function. I have no problem using the midpoint
placement function. The error doesn't seem to be in the cost function.

The error I am having is that when I simplify with Lindstrom-Turk placement
( with default parameters) I get many spikes all over the mesh, but
simplifying with midpoint placement results in a good simplification ( with
either edge-length cost or Lindstrom-Turk cost).

Here are images describing the situation in better detail

Original mesh:
<http://cgal-discuss.949826.n4.nabble.com/file/t375925/Original.png>

Lindstrom-Turk placement with Lindstrom-Turk cost and both with default
parameters:
<http://cgal-discuss.949826.n4.nabble.com/file/t375925/LindstromTurk.png>


Midpoint placement with Edge Length cost:
<http://cgal-discuss.949826.n4.nabble.com/file/t375925/Midpoint.png>


Midpoint placement with Lindstrom-Turk cost:
<http://cgal-discuss.949826.n4.nabble.com/file/t375925/Midpoint_LindstromCost.png>


The borders of the midpoint placements are preserved which is why they were
not simplified.

Here is how i am calling the simplification


///////////////////////////////////////////////////////
Lindstrom-Turk placement with Lindstrom-Turk cost and both with default
parameters:

int iRes = SMS::edge_collapse( surfaceMesh, stop,
CGAL::parameters::vertex_index_map(
get( CGAL::vertex_external_index,
surfaceMesh) )
.halfedge_index_map( get(
CGAL::halfedge_external_index, surfaceMesh) )
.get_placement(
SMS::LindstromTurk_placement<SurfaceMesh>() )
.get_cost( SMS::LindstromTurk_cost
<SurfaceMesh>() ) );

I believe this is equivalent to:
int iRes = SMS::edge_collapse( surfaceMesh, stop,
CGAL::parameters::vertex_index_map(
get( CGAL::vertex_external_index,
surfaceMesh) )
.halfedge_index_map( get(
CGAL::halfedge_external_index, surfaceMesh) )

which results in identical errors

///////////////////////////////////////////////////////
Midpoint placement with Edge Length cost:

iRes = SMS::edge_collapse( surfaceMesh, stop,

CGAL::parameters::vertex_index_map( get(
CGAL::vertex_external_index, surfaceMesh) )
.halfedge_index_map( get(
CGAL::halfedge_external_index,
surfaceMesh) )
.edge_is_constrained_map(
constraintMap )
.get_placement(
SMS::Constrained_placement<SMS::Midpoint_placement&lt;SurfaceMesh>,
ContstrainedEdgeMap>( constraintMap ))
.get_cost(
SMS::Edge_length_cost<SurfaceMesh>() ) );

///////////////////////////////////////////////////////
ContstrainedEdgeMap is defined very similarly to how it was defined here:
https://doc.cgal.org/latest/Surface_mesh_simplification/Surface_mesh_simplification_2edge_collapse_OpenMesh_8cpp-example.html

I would assume that the surface mesh is valid because further up I call
CGAL::is_valid( surfaceMesh) && CGAL::is_triangle_mesh( surfaceMesh) before
simplification, and also the same mesh simplifies correctly with midpoint
placement.

I don't know what other details you may need, but I am willing give more



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



Archive powered by MHonArc 2.6.18.

Top of Page