getPlacementChildren method

  1. @override
List<PIInstance> getPlacementChildren(
  1. InstanceHandle parent
)

Retrieves children in the placement hierarchy for the given parent placement.

This method returns all direct child instances that are linked through placement relationships (IfcLocalPlacement) to the specified parent.

The placement hierarchy represents the coordinate system relationships between objects, where child placements are relative to their parent's coordinate system.

Returns an empty list if the parent has no placement children or if the parent handle is invalid.

Example usage:

final buildingPlacement = getPlacement(building);
final placementChildren = getPlacementChildren(buildingPlacement);
for (final childPlacement in placementChildren) {
  final placements = getPlacementHierarchy(childPlacement);
  // Process child objects in global coordinate space
}

Implementation

@override
List<PIInstance> getPlacementChildren(InstanceHandle parent) {
  final retPtr = getPlacementChildrenFFI(
      projectPtr, ptr, parent.typeId, parent.instanceId);
  final vect = InstanceVector(retPtr);
  return vect.toList();
}