create clump using gts
Hi! I try to mimic the example named 'gts-horse.py' with my own .gts file. But the spheres seem to be not generated with the facets but outside. My code is presented as follows:
# -*- encoding=utf-8 -*-
# © 2009 Václav Šmilauer <email address hidden>
from __future__ import print_function
from yade import pack
import gts, os.path, locale
locale.setlocale(
) #gts is locale-dependend. If, for example, german locale is used, gts.read()-function does not import floats normally
'''
if you get "Error: unsupported locale setting"
-> type as root: "dpkg-reconfigure locales"
-> choose "en_US.UTF-8" (press space to choose)
'''
# coarsen the original horse if we have it
# do nothing if we have the coarsened horse already
surf = gts.read(
if surf.is_closed():
pred = pack.inGtsSurfa
aabb = pred.aabb()
dim0 = aabb[1][0] - aabb[0][0]
radius = dim0 / 40. # get some characteristic dimension, use it for radius
O.bodies.
O.bodies.
O.engines = [
),
]
O.dt = .7 * PWaveTimeStep()
O.saveTmp()
O.timingEnabled = True
O.trackEnergy = True
from yade import plot
plot.plots = {
'i': (
)
}
def addPlotData():
plot.addData(
plot.plot(
from yade import timing
from yade import qt
qt.View()
The download link for the '.gts' file is shown below:
https:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ruidong LI
- Solved:
- Last query:
- Last reply: