Skip to Content.
Sympa Menu

Subject: CGAL users discussion list

List archive


Chronological Thread 
  • From: "gre6" <>
  • To:
  • Subject: Chapter 35 3D Surface Mesh Generation
  • Date: Wed, 7 May 2008 08:38:56 +0800 (CST)

hello all!
I'm do some work about the Chapter 35 3D Surface Mesh Generation in the CGAL manual. I want to mesh a torus surface, which just like a life buoy. Could any on give me some suggestions a bout how to implement it.

I did some test as below, but failed.
a torus surface and the equation is (x^2+y^2+z^2+10^2-5^2)^2=4*10^2*(x^2+y^2), which is the equation (y-10)^2+z^2=5^2&&x=0 spin around the z axis. I revised the example code /examples/Surface_mesher/mesh_an_implicit_function.cpp as below:

FT sphere_function (Point_3 p) {
const FT x2=p.x()*p.x(), y2=p.y()*p.y(), z2=p.z()*p.z();
FT a = x2+y2+z2+100.0-25.0;
return a*a-400.0*(x2+y2);
}

Surface_3 surface(sphere_function, // pointer to function
Sphere_3(Point_3(0,10.0,0), 100.0)); // bounding sphere

CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30.0, // angular bound
0.8, // radius bound
0.8); // distance bound


But when I run the program it abort with the below information:
CGAL error: assertion violation!
Expr: false
File: /usr/include/CGAL/Delaunay_triangulation_3.h
Line: 1068
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted
I don't konw how to handle it.

Give me any suggestions about it is very helpful.
Thank you!

gre




===============================================
快来和我一起享受TOM免费邮箱吧! 看看除了1.5G,还有什么?
===============================================


  • Chapter 35 3D Surface Mesh Generation, gre6, 05/07/2008

Archive powered by MHonArc 2.6.16.

Top of Page