IGLAssembly
Module: geometry
The assembly manages a set of geometric bodies indexed by their unique IDs.
__init__
method
__init__(self, asm_id: int, name: str)
Initializes the assembly with an identifier and a display name.
Args
| Name | Type | Description |
|---|---|---|
| asm_id | The unique assembly identifier. | |
| name | The human-readable assembly name. |
GetName
method
GetName(self)
Returns the assembly name.
Returns
The assembly display name.
Numbodies
method
Numbodies(self)
Returns the number of bodies in the assembly.
Returns
The count of mesh bodies currently stored.
AddBody
method
AddBody(self, wglbody: Any)
Adds a mesh body to the assembly.
The body is stored in the assembly dictionary by its unique ID.
The body is stored in the assembly dictionary by its unique ID.
Args
| Name | Type | Description |
|---|---|---|
| wglbody | A mesh or geometry body object implementing GetID(). |
GetBodies
method
GetBodies(self)
Gets the list of bodies contained in the assembly.
Returns
A list of mesh body objects in the assembly.