yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #23614
Re: [Question #691976]: gtsPFacet
Question #691976 on Yade changed:
https://answers.launchpad.net/yade/+question/691976
Status: Open => Answered
Jan Stránský proposed the following answer:
1)
of course there are rules :-)
specifically for faces (where is your problem), the numbers are indices of edges, in counter-clockwise order (seen from the resulting normal direction).
In your case, your first face is
> 1 2 5
your 1st, 2nd and 5th edges are
> 1 2
> 1 3
> 2 4
I.e. you tell gts to create triangle from vertices number 1, 2, 3 and 4, which is the problem.
2)
there are plenty of options.
First, you need the vertices and triangles:
- "by hand" (like the simple example)
- programatically "by hand", e.g. cylinder should be ok to triangulate "manually"
- using some external meshing software
- from existing file (e.g. from STL file format you can convert to GTS using stl2gts utility from libgts-bin Ubuntu package)
Once having the data, you can:
- create the gts file "by hand"
- create the file programatically by yourself
- create the gts structure using gts.Vertex, gts.Edge, gts.Surface and finally gts.Surface.write method [3]
- save it to another format and convert it to gts (e.g. stl2gts)
cheers
Jan
[3] https://woodem.org/woo.gts.html
--
You received this question notification because your team yade-users is
an answer contact for Yade.