← Back to team overview

yade-users team mailing list archive

Re: [Question #691976]: gtsPFacet

 

Question #691976 on Yade changed:
https://answers.launchpad.net/yade/+question/691976

Jan Stránský posted a new comment:
> I don't understand the numbers in the 'octahedron.gts' file

reverse engineering:

> 258 768 512
258 vertices, each line given the coordinates
768 edges, each line indices of connected vertices
512 faces, each line indices of face-forming edges

Example of "bi-tetrahedron":
###
5 9 6
0 0 -1
1 0 0
-1 -1 0
-1 1 0
0 0 2
1 2
1 3
1 4
2 3
3 4
4 2
2 5
3 5
4 5
1 4 2
2 5 3
3 6 1
4 7 8
5 8 9
6 9 7
###

test in yade:
###
import gts
from yade import pack
with open("test.gts") as f:
	surf = gts.read(f)
print(surf.is_closed(),surf.is_ok(),surf.is_orientable())
O.bodies.append(pack.gtsSurface2Facets(surf,wire=False))
###

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.