Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Mesh generation question

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Mesh generation question


Chronological Thread 
  • 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.



Archive powered by MHonArc 2.6.16.

Top of Page