# How to define Axis-Aligned Bounding Box more accurately in the irregular polyhedron of Potential Blocks?

Asked by weijie on 2020-05-11

Dear all,

If the Axis-Aligned Bounding Box is not accurately defined in Potential Blocks, what effect will it have on contact? How to define Axis-Aligned Bounding Box more accurately for irregular polyhedron such as regular dodecahedron?

In [1] I found that the Axis-Aligned Bounding Box of one polyhedron is defined as minAabb = 1.05 * Vector3 (0.4 * wallThickness, 0.5 * heightOfBase, 0.5 * lengthOfBase), maxAabb = 1.05 * Vector3 (0.4 * wallThickness, 0.5 * heightOfBase , 0.5 * lengthOfBase). Why is minAabb and maxAabb the same, which means that the Axis-Aligned Bounding Box is a cube of what size?

Best regards,
Jie

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Vasileios Angelidakis
Solved:
2020-05-18
Last query:
2020-05-18
2020-05-11
 Vasileios Angelidakis (vsangelidakis) said on 2020-05-11: #1

Hi Jie,

> If the Axis-Aligned Bounding Box is not accurately defined in Potential Blocks, what effect will it have on contact?

If you use an approximate Aabb which is smaller than the actual particle, you will not detect contacts that should be detected, allowing large overlaps, and if it is much larger, it will make your simulation slower, without any gains.

The Aabb of a Potential Block is calculated automatically when PotentialBlock.AabbMinMax=True. It is in the Potential Particles code that you have to define it manually for the time being.

The parameters minAabb, maxAabb are only used by the PotentialBlockVTKRecorder to visualise the particles. These parameters can be assumed to be the same when the particle is more or less symmetric. Also, as a fail-safe, when the user does not assign values for minAabb, maxAabb, the PotentialBlockVTKRecorder considers the actual Aabb of the particles, enlarged by 20%. The minAabb, maxAabb parameters are not defining the actual Aabb used for contact detection; they are used only for visualisation purposes in VTK, for the PotentialBlocks.

To recap: You can leave minAabb, maxAabb empty when defining your particles, and see if you are happy with the visual output of the PotentialBlockVTKRecorder (or else use the export.VTKExporter.exportPotentialBlocks to visualise the exact particle geometry in VTK, which does not use these parameters) and as long as AabbMinMax=True, the Aabb used for primary contact detection will be calculated automatically from the particle vertices and orientation, at each timestep.

Hope this helps,
Vasileios

 weijie (amandajoe) said on 2020-05-18: #2

Thanks Vasileios Angelidakis, that solved my question.

To post a message you must log in.