misunderstanding, minimal example
Hi, I try to setup an automatic process to do a FEM on a volume definend in an .obj file. The obj files that I get, contain a list of points and a list of faces (triangles) with the point ids.
I wrote a small script to convert the obj into the geo file format as I already have a working process to do the meshing and FEM for geo files. But something is wrong with my conversation, so I wrote a minimal obj file with just 8 vertices and 12 triangles to form a cube. Even with this simple file I get errors.
The minimal .obj file
g
# 8 points of the cube
v 1 1 1
v 1 1 -1
v 1 -1 -1
v 1 -1 1
v -1 1 1
v -1 1 -1
v -1 -1 -1
v -1 -1 1
# 6 sides of the cube
# x+ side
f 1 2 3
f 1 3 4
# x- side
f 5 8 7
f 5 7 6
# y+ side
f 2 1 6
f 6 1 5
# y- side
f 4 3 7
f 4 7 8
# z+ side
f 5 1 8
f 8 1 4
# z- side
f 2 6 7
f 7 3 2
The geo file this is converted to
Point(1)={1,1,1};
Point(2)={1,1,-1};
Point(3)={1,-1,-1};
Point(4)={1,-1,1};
Point(5)={-1,1,1};
Point(6)={-1,1,-1};
Point(7)={-1,-1,-1};
Point(8)={-1,-1,1};
Line(1)={1,2};
Line(2)={2,3};
Line(3)={3,1};
Line(4)={1,3};
Line(5)={3,4};
Line(6)={4,1};
Line(7)={5,8};
Line(8)={8,7};
Line(9)={7,5};
Line(10)={5,7};
Line(11)={7,6};
Line(12)={6,5};
Line(13)={5,1};
Line(14)={1,8};
Line(15)={8,5};
Line(16)={8,1};
Line(17)={1,4};
Line(18)={4,8};
Line(19)={2,6};
Line(20)={6,7};
Line(21)={7,2};
Line(22)={7,3};
Line(23)={3,2};
Line(24)={2,7};
Line(25)={2,1};
Line(26)={1,6};
Line(27)={6,2};
Line(28)={6,1};
Line(29)={1,5};
Line(30)={5,6};
Line(31)={4,3};
Line(32)={3,7};
Line(33)={7,4};
Line(34)={4,7};
Line(35)={7,8};
Line(36)={8,4};
Curve Loop(1)={1,2,3};
Curve Loop(2)={4,5,6};
Curve Loop(3)={7,8,9};
Curve Loop(4)={10,11,12};
Curve Loop(5)={13,14,15};
Curve Loop(6)={16,17,18};
Curve Loop(7)={19,20,21};
Curve Loop(8)={22,23,24};
Curve Loop(9)={25,26,27};
Curve Loop(10)={28,29,30};
Curve Loop(11)={31,32,33};
Curve Loop(12)={34,35,36};
Plane Surface(1)={1};
Plane Surface(2)={2};
Plane Surface(3)={3};
Plane Surface(4)={4};
Plane Surface(5)={5};
Plane Surface(6)={6};
Plane Surface(7)={7};
Plane Surface(8)={8};
Plane Surface(9)={9};
Plane Surface(10)={10};
Plane Surface(11)={11};
Plane Surface(12)={12};
Surface Loop(1) = {1,2,3,4,5,6,7,8,9,10,11,12};
Volume(1) = {1};
Physical Volume("roomvol", 1) = 1;
#Coherence;
Mesh.CharacteristicLengthMin = 0.1;
Mesh.CharacteristicLengthMax = 0.2;
Mesh 3;
Save "meshFileForManualTest.msh2";
#Exit;
When I open this geo file in the GUI version of gmsh, there are problems with the 3D meshing.
- PCL Error: A segment and a facet intersect at point (-1,-1,-0.8)
- Invalid boundary mesh (segment-facet intersection) on surface 3, intersetion (-1,-1,-0.8)
- No elements in volume 1
What I checked:
- There are no intersecting volumes in my geo file (#766 (comment 8956))
- I think the mesh sizes are adequate (#766 (comment 8986))
Any idea what else I can check or what I do wrong? Thank you!
Edited by Andreas Mel