Subject: CGAL users discussion list
List archive
- From: Ram <>
- To:
- Subject: [cgal-discuss] Re: Mesh generation question
- Date: Wed, 18 Jan 2012 10:26:35 -0800 (PST)
Hi Laurent,
Thanks for the answer. One last question:
If I want to replace the line:
Mesh_domain domain("data/cube.off");
with
Polyhedron polyhedron;
make_cube_3(polyhedron);
std::cout << polyhedron;
Mesh_domain(polyhedron);
This works with general domain but when I try to do it with domain with
features, it fails to compile with a long list of errors. Here is my
make_cube_3 function:
template <class Poly>
int make_cube_3( Poly& P) {
// appends a cube of size [0,1]^3 to the polyhedron P.
CGAL_precondition( P.is_valid());
typedef typename Poly::Point_3 Point;
std::vector<Point> cube_vertices;
std::vector<double> extents;
extents.push_back(5.0); extents.push_back(10.0);
extents.push_back(15.0);
cube_vertices.push_back(Point(0,0,0));
cube_vertices.push_back(Point(0,0,extents[2]));
cube_vertices.push_back(Point(0,extents[1],0));
cube_vertices.push_back(Point(0,extents[1],extents[2]));
cube_vertices.push_back(Point(extents[0],0,0));
cube_vertices.push_back(Point(extents[0],0,extents[2]));
cube_vertices.push_back(Point(extents[0],extents[1],0));
cube_vertices.push_back(Point(extents[0],extents[1],extents[2]));
// Returns triangulated polyhedron: Required for meshing
CGAL::convex_hull_3(cube_vertices.begin(), cube_vertices.end(), P);
return 0;
}
Can you please let me know how I can get the make_cube_3 can be integrated
with domain_with_features code that you posted.
Thanks a lot for all the help.
--Ram
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Mesh-generation-question-tp4300233p4307591.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Mesh generation question, Ram, 01/16/2012
- Re: [cgal-discuss] Mesh generation question, Laurent Rineau (GeometryFactory), 01/16/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/16/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/17/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/18/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/18/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/18/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/18/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/19/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/19/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/23/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/25/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/25/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/25/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/25/2012
- Re: [cgal-discuss] Re: Mesh generation question, Sebastien Loriot (GeometryFactory), 01/26/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/18/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/18/2012
- Re: [cgal-discuss] Re: Mesh generation question, Laurent Rineau (GeometryFactory), 01/18/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/17/2012
- [cgal-discuss] Re: Mesh generation question, Ram, 01/16/2012
- Re: [cgal-discuss] Mesh generation question, Laurent Rineau (GeometryFactory), 01/16/2012
Archive powered by MHonArc 2.6.16.