getBoxPointsForBodies

Overview

This utility is used to extract the box points enclosing all bodies in a model or specific body.

Syntax

PositiveBuff= [500,500,500]
NegativeBuff= [500,500,500]
EntityInfo=[]
BoxPoints=simlab.getBoxPointsForBodies("sample.gda",EntityInfo,PositiveBuff, NegativeBuff)

User Case

  • To create bounding body in scripting for acoustic meshing

Why we need this utility?

For above case, we will use region mesh control with plane body break option to break the bodies, but when we recorded this operation using Project > Record, the defined plane points will be hardcoded in script. When we use this script for different models, it will fail due to difference in model coordinates. In order to overcome this, we can make use of this utility to extract the plane points from groups and utilize it for plane definition.

Utility Input/output