← Back to team overview

yade-users team mailing list archive

[Question #683388]: How to clump spheres and facet obtained from stl format

 

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

Hi everyone,

I am trying to create a surface obtained from an stl file, fill the surface with spheres and clump the surface (facet) and spheres as one particle.

This is very similar to this question: https://answers.launchpad.net/yade/+question/662544

>From yade doc, triangulated surfaces can be imported from gts and stl formats. 
I have imported the surface using the 'ymport.stl' function.
However, for generating spheres within the surface, there are no commands for stl format. The example below is for gts format. 
Appreciate if someone could help me with:
[1] similar commands for generating spheres in a surface (stl format) or any conversion method for stl to gts format.
[2] command for generating spheres with multiple sizes to fill the surface. This is to ensure the sphere clump is of the same volume as the surface.

#example for sphere packing in surface
if surf.is_closed():
 O1=O.bodies.append(pack.gtsSurface2Facets(surf,fixed=False,noBound=True,material=m))
 sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=0.1,memoizeDb=memoizeDb,returnSpherePack=True)
 Otemp=sp.toSimulation()
 O3=O1+Otemp
 #O3=Otemp

Looking forward to any suggestion.
Irfaan

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