Box (cuboid) particle geometry.

Asked by Jessica Soares da Rocha on 2019-07-07

Hello everybody,

I'm trying to use this function in Yade:

geom.Box((0,0,0.442672+0.03/2),(1.01*1*0.003,0.06,0.03/2),color=(1,0,0))

But i'm having this error:

Zero (not 2) non-keyword constructor arguments required [in Serializable_ctor_kwAttrs; Serializable::pyHandleCustomCtorArgs might had changed it after your call].

I Known this function is deprecated but i need to represent an cuboid like a big particle. Does anybody help me with this???

Thank!!

Best regards.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jessica Soares da Rocha
Solved:
2019-07-08
Last query:
2019-07-08
Last reply:
2019-07-08
Jérôme Duriez (jduriez) said : #1

Hi,

The error says you need to specify what are the (keywords of the) first two attributes you passed to your function, in the same way you did for the last attribute, with "color = (1,0,0)", indicating the "color" keyword.

That is, YADE waits for something like
geom.Box(center=(0,0,0.442672+0.03/2),extents=(1.01*1*0.003,0.06,0.03/2),color=(1,0,0))

In the above, I'm actually just guessing random keywords for these 2 first attributes, because I could not find a meaningful doc for this function (it's embarrassing..)

If your goal is to have cuboid-shaped particle, note that there also is utils.box(), with a doc I can point towards, at https://yade-dem.org/doc/yade.utils.html?highlight=box#yade.utils.box

Thank Jérôme!!

I found an script with this function that solved my doubts. The function box was described:

O.bodies.append(box((0,0,0.445377+AlturaBloco/2),(1.01*1*maxElementRadus,0.06,AlturaBloco/2), material=MatBloco,color=(1,0,0)))

Best Regards!!!