ifcopenshell.api.geometry.edit_object_placement

Module Contents

class ifcopenshell.api.geometry.edit_object_placement.Usecase
convert_matrix_to_si(matrix: NPArrayOfFloats)
convert_si_to_unit(co: NPArrayOfFloats) NPArrayOfFloats
convert_unit_to_si(co: NPArrayOfFloats) NPArrayOfFloats
execute()
get_children_settings(placement: ifcopenshell.entity_instance | None) list[dict]
get_placement_rel_to() ifcopenshell.entity_instance | None
get_relative_placement(placement_rel_to: ifcopenshell.entity_instance | None) ifcopenshell.entity_instance
file: ifcopenshell.file
settings: dict[str, Any]
ifcopenshell.api.geometry.edit_object_placement.edit_object_placement(file: ifcopenshell.file, product: ifcopenshell.entity_instance, matrix: NPArrayOfFloats | None = None, is_si: bool = True, should_transform_children: bool = False) ifcopenshell.entity_instance

Changes the object placement matrix of an element

The placement matrix is a 4x4 matrix describing the location and orientation of an element in 3D. See https://docs.ifcopenshell.org/ifcopenshell-python/geometry_creation.html#object-placements for more details.

This only supports local placements. Grid and linear placements are not supported.

Parameters:
  • matrix – A 4x4 matrix in numpy. If left blank, it is the identity matrix (equivalent to np.eye(4)).

  • is_si – If True, the matrix is given in SI units. If false, in project units.

  • should_transform_children – A child element is a nested element, opening, filling, etc. If True, child elements move along with the parent; pass True when moving an assembly (roof, furniture group, etc.) and you want all children to follow. If False (default), child elements keep their current world positions; their local placements are rewritten to compensate for the parent move.

Returns:

The new or updated IfcLocalPlacement entity

ifcopenshell.api.geometry.edit_object_placement.NPArrayOfFloats