Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: Re: [cgal-discuss] Always a degenerate plane, why ?
- Date: Thu, 15 Oct 2009 16:54:11 +0200 (CEST)
I am always getting a degenerate plane, 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;
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] Projecting perpendicular to half_edge, fly2priyank, 10/14/2009
- Re: [cgal-discuss] Always a degenerate plane, why ?, fly2priyank, 10/15/2009
Archive powered by MHonArc 2.6.16.