Subject: CGAL users discussion list
List archive
- From: Priyank Jain <>
- To:
- Subject: [cgal-discuss] Always a degenerate plane, why ???
- Date: Mon, 19 Oct 2009 12:11:39 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=cEBrkJyEclWmbT/wAqPbmMQ75tSRE6dlqrUz1s/uAZGZpnGtquusnpqIijW6n5Ci1t EiZvGdhmOnj24Mn4BPF51hK5U8zIbaz7evI5VjDR+i6HeYHtPWBRpFjDg51sB5RGJnQ+ MeRJWODifDZYA8NqrCqwosbWfyT+fWXh3kObw=
I am always getting a degenerate plane, when I try to find out the plane from the given half-edge in Polyhedron data structure. Any guesses why ???
for(Halfedge_iterator hedge_it = model.halfedges_begin() ; hedge_it !=
model.halfedges_end(); hedge_it++)
{
// proceed for boundary edges
if( hedge_it->is_border() == false) // boundary(hedge_it)
continue;
// find x_proj by:
// "projecting_distance" perpendicular to "hedge_it" from the midpoint
of hedge_it
// in the plane of the model at hedge_it
// Finding the midpoint: midPt
Point_3& point1 = hedge_it->vertex()->point();
Point_3& point2 = hedge_it->opposite()->vertex()->point();
Point_3& midPt = midpoint(point1, point2);
Plane& plane = hedge_it->opposite()->face()->plane(); //opposite
half-edge since this gives the plane of the model at that edge
Vector3& direction = plane.orthogonal_vector();
//debugging purposes
Point_3 pt = plane.point();
bool waste = false;
waste = plane.is_degenerate();
//Vertex_3 x_proj = hedge_it.project(midpoint, projecting_distance);
Point_3& x_proj = midPt + (direction * projecting_distance);
}
waste (degenerate plane) always becomes true, why ? I tried different values
of
vertices, but still..
Polyhedron model is made up of:
Point_3 p( 1.0, 0.0, 0.0);
Point_3 q( 0.0, 1.0, 0.0);
Point_3 r( 0.0, 0.0, 0.0);
model.make_triangle(p, q, r);
Can someone please help me with this?
Thanks
- [cgal-discuss] Always a degenerate plane, why ???, Priyank Jain, 10/19/2009
- Re: [cgal-discuss] Always a degenerate plane, why ???, Andreas Fabri, 10/19/2009
- Re: [cgal-discuss] Always a degenerate plane, why ???, Priyank Jain, 10/19/2009
- Re: [cgal-discuss] Always a degenerate plane, why ???, Andreas Fabri, 10/19/2009
Archive powered by MHonArc 2.6.16.