← Back to team overview

yade-users team mailing list archive

Re: [Question #497350]: Export a polyhedron into a *.stl or * .gts file

 

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

    Status: Answered => Open

Tina Asia is still having a problem:
Jan,

Thanks for your patience, but the error---"Can't open file: tina.st" still exists. I guess there is something wrong with the code---"poly2stl" ,although the *.stl can be displayed in Meshlab and looks identical with polyhedron generated in Yade.
Besides, I converted *.stl to *.gts using stl2gts, and using the following code to fill this polyhedron, but it got a cuboid package.
I replaced this *.gts with horse.coarse.gts, and this one got correct result.  Thus, I guess the poly2stl outputs something wrong, please check this code---poly2stl.

Many thanks.

My code was as following:

from yade import ymport
from yade import pack
surface=gts.read(open('poly.gts'))
pred=pack.inGtsSurface(surface)
assembly=pack.randomDensePack(pred,radius=0.001,rRelFuzz=0.3,spheresInCell=500)
O.bodies.append(assembly)

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