Subject: CGAL users discussion list
List archive
- From: noel <>
- To:
- Subject: [cgal-discuss] Re: Slhouette: From 3d to 2d
- Date: Fri, 3 Feb 2012 02:38:10 -0800 (PST)
Hi there Sebastien.
Thanks again for the prompt reply. I had a look at the boost::transform
documentation and found that my c++ skills weren't up to scratch so as to
understand it. I implemented my own little converter and it works fine.
But there is something odd with the output. A couple of faces have many
points but 0 triangles...
[Face] (683.149 462.704) (678.154 474.763) (670.208 485.118) (659.853
493.064) (647.794 498.059) (634.853 499.763) (621.912 498.059) (609.853
493.064) (599.497 485.118) (591.551 474.763) (586.556 462.704) (584.853
449.763) (586.556 436.822) (591.551 424.763) (599.497 414.407) (609.853
406.461) (621.912 401.466) (634.853 399.763) (647.794 401.466) (659.853
406.461) (670.208 414.407) (678.154 424.763) (683.149 436.822) (684.853
449.763) --> 0 triangles:
I'm guessing these are points that lie on the upper-envelope since I am
constructing the lower one. Am I right? Also, I am now unsure how to go
about reconstructing my 2D nef Polyhedron representing the silhouette of my
original polyhedron. I am thinking of building a 2d nef polyhedron for
every face and then adding them together with boolean operations. I know it
would work but it does seem very inefficient. Any advice?
PS: Just so you know, my method for creating triangles from my Nef looks
like this...
Silhouette::Silhouette(Nef_polyhedron DESIGN) {
std::list<Data_triangle_3> triangles;
Polyhedron P;
DESIGN.convert_to_Polyhedron(P);
Polyhedron::Facet_const_iterator fi = P.facets_begin();
for (fi; fi != P.facets_end(); fi++) {
Triangle_3 triangle(fi->halfedge()->vertex()->point(),
fi->halfedge()->next()->vertex()->point(),
fi->halfedge()->next()->next()->vertex()->point());
triangles.push_back(Data_triangle_3 (triangle, 'X'));
}
Envelope_diagram_2 min_diag;
CGAL::lower_envelope_3 (triangles.begin(), triangles.end(), min_diag);
print_diagram (min_diag);
}
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Slhouette-From-3d-to-2d-tp4352895p4354235.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Slhouette: From 3d to 2d, noel, 02/02/2012
- Re: [cgal-discuss] Slhouette: From 3d to 2d, Sebastien Loriot (GeometryFactory), 02/03/2012
- [cgal-discuss] Re: Slhouette: From 3d to 2d, noel, 02/03/2012
- Re: [cgal-discuss] Slhouette: From 3d to 2d, Efi Fogel, 02/04/2012
- Re: [cgal-discuss] Slhouette: From 3d to 2d, Sebastien Loriot (GeometryFactory), 02/03/2012
Archive powered by MHonArc 2.6.16.