Dear All,
I would appreciate to be enlightened why I can't get "Surface3D" to mesh my .off file. It seems like the polyhedron is not valid inside CSGCGALDomain3D.cpp but as far as I can tell there should be no mistakes with the .off file. With Matlab functions triangulation, trisurf and faceNormal the correct geometry is displayed. I have tried both left- and right-handed systems for the definitions of triangular facets. The geometry is a box with an inverted smaller box extending the from bottom face, for wind-field calculations over a city with a single building. Anything that might put me on the right direction is appreciated.
Thank you,
Christian
FEniCS:
from fenics import *
from dolfin import *
from mshr import *
mesh = Mesh() #empty mesh
domain = Surface3D("oklahoma_single_building_lh.off")
mesh = generate_mesh(domain,10)
plot(mesh, interactive=True)
*** Error: Unable to read surface from file.
*** Reason: Polyhedron is not valid. If you are sure your file is valid, please file a bug report.
*** Where: This error was encountered inside CSGCGALDomain3D.cpp.
*** Process: 0
Below I paste the .off file I am working with:
OFF
16 28 24
634614.3 3926117 0
634614.6 3926148 0
634690.9 3926147 0
634690.5 3926116 0
634614.3 3926117 55
634614.6 3926148 55
634690.9 3926147 55
634690.5 3926116 55
634578 3926062 0
634578 3926437 0
634953 3926437 0
634953 3926062 0
634578 3926062 146.5000
634953 3926062 146.5000
634953 3926437 146.5000
634578 3926437 146.5000
3 0 4 7
3 0 7 3
3 3 7 6
3 2 3 6
3 2 6 5
3 1 2 5
3 1 5 4
3 0 1 4
3 4 5 7
3 5 6 7
3 0 3 8
3 3 11 8
3 2 11 3
3 2 10 11
3 1 10 2
3 1 9 10
3 0 9 1
3 0 8 9
3 8 11 13
3 8 13 12
3 11 14 13
3 11 10 14
3 10 15 14
3 9 15 10
3 9 12 15
3 8 12 9
3 12 13 15
3 13 14 15