# getroundness

In the name of God

Hi All.

I want to get the roundness of on clump body . first i generate the clump:

O.bodies.append(utils.sphere((0,.1,0),0.4,color=Vector3(1,.9,.15)))
O.bodies.append(utils.sphere((0,-.17,-0.05),0.33,color=Vector3(1,.9,.15)))

O.bodies.clump(range(0,len(O.bodies)))

Then i enter in terminal:

O.bodies.getroundness()

Any help?

## Question information

Language:
English Edit question
Status:
For:
Assignee:
No assignee Edit question
Last query:
2017-06-26
2017-06-28
 mohsen (agha-mohsena) said on 2017-06-26: #1

sorry; the getRoundness doe not work for this clump:

for z in ([-0.1,.1]):
for y in ([-0.18,-.07,.07,.18]):
pos =Vector3(-.14,y,z)
O.bodies.append(utils.sphere(pos,.24,color=Vector3(1,.9,.15)))

for x,y in [(0,.18),(.15,.18),(.08,.07),(.01,-.07),(-0.07,-.18)]:
for z in ([-0.1,.1]):

pos =Vector3(x,y,z)
O.bodies.append(utils.sphere(pos,0.24,color=Vector3(1,.9,.15)))
O.bodies.clump(range(0,len(O.bodies)))

Regards

 Jan Stránský (honzik) said on 2017-06-28: #2

Hi Mohsen,
I don't know the method, but have a look at the source code. Maybe the method does not work for overlapping spheres?
cheers
Jan

 mohsen (agha-mohsena) said on 2017-07-04: #3

Thanks Jan

Regards

 Christian Jakob (jakob-ifgt) said on 2017-07-04: #4

Hi,

I developed the code for getRoundness function. It should work for any mixed clump-sphere-packing. You can have a look at the source code [1]. I dont know why it is not working in your case. Can you provide a minimal working example [2]?

 Jan Stránský (honzik) said on 2017-07-04: #5

@Christian: for MWE, see #1 (1st answer, actually Mohsen's comment) of this thread.
After a quick look, the only suspicious circumstance I saw was that the spheres were overlapping
Jan

 mohsen (agha-mohsena) said on 2017-07-08: #6

Hi Christian:

Thank you, as Jan said, you can run the clump in #1.
An other point is that, these days i am working on roundness very much; the getRoundness sometimes give no answer!