Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Simplification: stay in place cost strategy
- Date: Mon, 24 Mar 2014 08:57:08 +0100
- Organization: GeometryFactory
The vertex is not removed if the placement returns an
an "empty" optional.
Sebastien.
On 03/15/2014 03:38 AM, Zohar wrote:
Hi,
I'm using the placement strategy below that leaves the surviving vertex v1
(no border) in place (v0 is deleted). I was wondering what cost scheme would
make sense here (and why). For example, when I used LindstromTurk_cost, I
tend to get nasty slivers.
BTW, the following sentence in the doc is confusing:
http://doc.cgal.org/latest/Surface_mesh_simplification/index.html#title3
"The GetPlacement policy is called to compute the new position for the
remaining vertex after the halfedge-collapse. It returns an optional value,
which can be absent, in which case the remaining vertex is kept in its
place."
It says that the placement of v1 would be the same, while actually it means
that the edge won't be collapsed and both v1 and v0 would stay in place.
---------------
template<class ECM_>
struct MyPlacement {
typedef ECM_ ECM;
typedef SMS::Edge_profile<ECM> Profile;
typedef typename CGAL::halfedge_graph_traits<ECM>::Point Point;
typedef SMS::optional<Point> result_type;
MyPlacement(vector<bool> &supp_) : supp(supp_) {}
result_type operator()(Profile const& ap) const {
int i = ap.v0()->id(), j = ap.v1()->id();
result_type r = ap.p1(); // optional - if left unassigned,
then vertex
isn't removed?
return r;
}
vector<bool> &supp;
};
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Simplification-stay-in-place-cost-strategy-tp4658964.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Simplification: stay in place cost strategy, Zohar, 03/15/2014
- Re: [cgal-discuss] Simplification: stay in place cost strategy, Sebastien Loriot (GeometryFactory), 03/24/2014
Archive powered by MHonArc 2.6.18.