On Wed, 4 Dec 2013 11:49:23 -0800 Brian Drawert <[email protected]> wrote:
> Hello all, > I am hoping someone can help me. I am having problems when I try to > use the CSG geometry. I am following the documentation found here: > http://fenicsproject.org/documentation/dolfin/dev/python/demo/documented/csg-3D/python/documentation.html > > I modified the code for my geometry, a cylinder capped by two spheres > (an e. coli cell): > > import dolfin > # Build CSG Coli using Dolfin. > pt1 = dolfin.Point(0,0,2.0) > pt2 = dolfin.Point(0,0,-2.0) > sphere1 = dolfin.Sphere(pt1,0.5) > sphere2 = dolfin.Sphere(pt2,0.5) > cylinder = dolfin.Cylinder(pt1,pt2,0.5) > g3d = sphere1 + cylinder + sphere2 > # Generate and plot mesh > print "Starting meshing..." > mesh3d = dolfin.Mesh(g3d, 32) > print "Finished meshing" > dolfin.info(mesh3d) > dolfin.plot(mesh3d, "3D mesh") > dolfin.interactive() > > > When I run this code, it hangs after it prints "Removing triangles For me, DOLFIN 1.2.0 and dev do not hang but raises an error >>> mesh3d = dolfin.Mesh(g3d, 32) Converting geometry to cgal types. Convert to nef polyhedron Removing degenerated facets Number of degenerate facets: 343 Removing triangles with short edges Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/users/blechta/fenics/fenics-tmp/lib/python2.7/site-packages/dolfin/mesh/meshes.py", line 68, in __init__ cpp.Mesh.__cppinit__(self, *args, **kwargs) File "/usr/users/blechta/fenics/fenics-tmp/lib/python2.7/site-packages/dolfin/cpp/mesh.py", line 1572, in __init__ _mesh.Mesh_swiginit(self,_mesh.new_Mesh(*args)) StandardError: CGAL ERROR: precondition violation! Expr: circulator_size(h->vertex_begin()) >= size_type(3) File: /usr/local/pkg/cgal/4.2/gnu/include/CGAL/Polyhedron_3.h Line: 1161 Jan > with short edges". I have to force quite the process, control-c does > not terminate it. > > $ python demo_csg-3D.py > Starting meshing... > Converting geometry to cgal types. > Convert to nef polyhedron > Removing degenerated facets > Number of degenerate facets: 342 > Removing triangles with short edges > > > Can anyone help? Am I doing something wrong, or is there a bug in > the meshing code? > > Thanks in advance! > Brian Drawert _______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
