Is class `Bo1_Cylinder_Aabb` to be actually used?

Asked by Gael Lorieul

Hi everyone!

I've got a small technical question:

Why does Bound class `Bo1_Cylinder_Aabb` exist, but at the same time examples on cylinders [1] use `Bo1_GridConnection_Aabb` and `Bo1_PFacet_Aabb` instead?

Many thanks for your answers,

Gaël

[1]
https://yade-dev.gitlab.io/trunk/tutorial-more-examples-fast.html#cylinders

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marcus Moravia (mgmoravia) said :
#1

Hi Gaël,

As far as I know, 'Bo1_Cylinder_Aabb' is used for chained cylinder. 'Bo1_GridConnection_Aabb' is used for cylindrical connections created by connecting two GridNodes.

Cheers,

Marcus.

Revision history for this message
Gael Lorieul (glorieul64) said :
#2

Hi Marcus,

Thanks for your answer!

El lun, 25-03-2019 a las 17:13 +0000, Marcus Moravia escribió:
 > As far as I know, 'Bo1_Cylinder_Aabb' is used for chained cylinder.
 > 'Bo1_GridConnection_Aabb' is used for cylindrical connections created
 > by connecting two GridNodes.

In that case, why do none of the Chained-Cylinder examples [1] make use
of `Bo1_Cylinder_Aabb`, but employ `Bo1_ChainedCylinder_Aabb` instead?
Is `Bo1_Cylinder_Aabb` meant to be used as a base abstract class? Or was
it meant to be used directly as well?

Note: in the documentation, it is not mentioned explicitly that
`Bo1_Cylinder_Aabb` is abstract, unlike other classes [3]

Note #2: Currently (Yade 2018.02b), `Bo1_ChainedCylinder_Aabb` does not
inherit from `Bo1_Cylinder_Aabb` [4], but it seems it did in the past [5].

Gaël

[1]
https://yade-dev.gitlab.io/trunk/tutorial-more-examples-fast.html#chained-cylinders

[2]
https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.Bo1_Cylinder_Aabb

[3] For instance:
https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.GlIPhysFunctor
https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.Collider

[4] ./pkg/common/Cylinder.hpp:206

     class Bo1_ChainedCylinder_Aabb : public BoundFunctor

[5] ./pkg/common/Cylinder.hpp:289
     // Keep this : Cylinders and ChainedCylinders will have different
centers maybe.
     // class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb

Revision history for this message
Gael Lorieul (glorieul64) said :
#3

Hi all,

El lun, 25-03-2019 a las 17:13 +0000, Marcus Moravia escribió:
> As far as I know, 'Bo1_Cylinder_Aabb' is used for chained cylinder.
> 'Bo1_GridConnection_Aabb' is used for cylindrical connections created
> by connecting two GridNodes.

El 25-03-19 a las 14:53, Gaël Lorieul escribió:
> In that case, why do none of the Chained-Cylinder examples [1] make use
> of `Bo1_Cylinder_Aabb`, but employ `Bo1_ChainedCylinder_Aabb` instead?
> Is `Bo1_Cylinder_Aabb` meant to be used as a base abstract class? Or was
> it meant to be used directly as well?
>
> Note: in the documentation, it is not mentioned explicitly that
> `Bo1_Cylinder_Aabb` is abstract, unlike other classes [3]
>
> Note #2:  Currently (Yade 2018.02b), `Bo1_ChainedCylinder_Aabb` does not
> inherit from `Bo1_Cylinder_Aabb` [4], but it seems it did in the past [5].
 > [...]
> [4] ./pkg/common/Cylinder.hpp:206
> class Bo1_ChainedCylinder_Aabb : public BoundFunctor
>
> [5] ./pkg/common/Cylinder.hpp:289
> // Keep this : Cylinders and ChainedCylinders will have different centers maybe.
> // class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb

I've been retracing the apparition of the `// class
Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb` code line in the
source code. It seems it was first added [1] by `bchareyre` in commit
`8ad46e4` [2] and was already in commented-out form. The same commit
also added the (uncommented) code line `class Bo1_Cylinder_Aabb : public
BoundFunctor` [3]

The commit message [4] reads (amongst other things): "cylinder : a new
shape, first step in experiments for tracking interactions jumping over
chained elements." which seems to confirm Marcus's suggestion that the
`Bo1_Cylinder_Aabb` class was added with the idea of supporting
ChainedCylinders, more than the Minkowski cylinders created by the
`gridpfacet.cylinder()` function.

Bruno Chareyre, if are reading this, could you confirm or contradict our
conjectures about the `Bo1_Cylinder_Aabb` class? And tell us what is its
purpose and how it should be used, please?

Gaël

[1]
pkg/common/DataClass/Shape/Cylinder.hpp : 135
https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1#diff-6bfc2af24b2f4af9f5bafcaacbff1ca3R135

[2]
8ad46e4a13812073aa5a079b236880bdbf65c5f1

[3]
pkg/common/DataClass/Shape/Cylinder.hpp : 146
https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1#diff-6bfc2af24b2f4af9f5bafcaacbff1ca3R146

[4]
https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Hi guys, sorry to be late.

Bo1_Cylinder_Aabb exists because the shape Cylinder (not chained) exists. Arguably there is no example script for it but I once found a paper about simulating capsules which used it (I can't find it now though).

Bruno

Revision history for this message
Gael Lorieul (glorieul64) said :
#5

Thanks for your answers!