← Back to team overview

yade-users team mailing list archive

[Question #705031]: Poly import core dumped

 

New question #705031 on Yade:
https://answers.launchpad.net/yade/+question/705031

Hi there,
I am trying to import large number of polyhedra in my model by importing vertices of each poly.
Following script works until ~17k of polys is imported, then I receive Segmentation fault. Any thoughts?
Here is link for poly file, where vertex coordinates are written in each line; last point of each file line is polys centroid:  https://drive.google.com/file/d/13lm7qvKHbHxteFKUB5tZejohU7jAjgCj/view?usp=share_link

model script:

from yade import polyhedra_utils
import ast

m = PolyhedraMat()
m.density = 2700 
m.Ks = 10E8
m.Kn = 10E8
m.frictionAngle = radians(30) 

file = open("Fragments")

for line in file:
    vertex=[]
    vertex.append(ast.literal_eval(line))
    t = polyhedra_utils.polyhedra(material=m, size=0, seed=0, color= polyhedra_utils.randomColor(), v=vertex[0][0:(len(vertex)-3)])
    t.state.pos=vertex[0][len(vertex)-2]
    O.bodies.append(t)
    del vertex[:]


Thanks
Veljko

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