Dear all,
I know we can use the CSG class to generate the mesh for complicated shapes. But I ran in to trouble when i tried to construct the mesh of the union of two spheres, say centered at (0.5,0,0) and (-0.5,0,0) with both radius 1, by the following codes:
from dolfin import *
r = 1.0
x0 = 0.5
sphere1 = Sphere(Point(-x0, 0, 0), r)
sphere2 = Sphere(Point(x0, 0, 0), r)
g3d = sphere1 + sphere2
mesh3d = Mesh(g3d, 10)
then the program would run without stop and I got the following output:
Converting geometry to cgal types.
Convert to nef polyhedron
Removing degenerated facets
Number of degenerate facets: 82
Removing triangles with short edges
Number of degenerate facets: 18
Removing small triangles
Number of degenerate facets: 0
Number of vertices: 909
Number of facets: 1814
Detecting sharp features
Generating mesh
Inserting protection balls...
insert_corners() done. Nb of points in triangulation: 16
insert_balls_on_edges() done. Nb of points in triangulation: 321
Anyone knows how to solve this problem? Thanks very much
JY