mirror_objects#

dlubal.api.rfem.Application.mirror_objects(self, objs, mirroring_type=None, coordinate_system=1, point_1=None, point_2=None, point_3=None, plane=None, create_copy=False, copy_including_loading=False, copy_including_imperfections=False, connect_lines_members_surfaces=False, rotate_local_coordinate_systems_of_lines_members=False, adjust_loading_nodal_loads=False, model_id=None, skip_invalid_attributes=None, numbering_increments=None)#

Mirrors or copies the specified objects about defined plane.

Parameters:
  • objs (list) – The list of specified model objects.

  • mirroring_type (MirroringPlaneSpecificationType) – Specifies the type of mirroring plane.

  • coordinate_system (int | 1) – Specifies the coordination system to use.

  • point_1 (Vector3d | None) – Specifies point 1 for plane definition.

  • point_2 (Vector3d | None) – Specifies point 2 for plane definition.

  • point_3 (Vector3d | None) – Specifies point 3 for plane definition.

  • plane (Plane | None) – Specifies the plane for parallel plane definition.

  • create_copy (bool | False) – Specifies whether copies of the specified objects should be created.

  • copy_including_loading (bool | False) – Specifies whether to include the loading when copying the objects.

  • copy_including_imperfections (bool | False) – Specifies whether to include imperfections when copying the objects.

  • connect_lines_members_surfaces (bool | False) – Specifies whether to connect lines, members, or surfaces when they overlap in the copy.

  • rotate_local_coordinate_systems_of_lines_members (bool | False) – Specifies whether the objects’ local coordinate systems (LCS) should be mirrored together with the lines, members.

  • adjust_loading_nodal_loads (bool | False) – Specifies whether to also update nodal loads so their force and moment vectors remain correct in world coordinates after the transform.

  • model_id (ModelId | None) – The unique identifier of the model. If None, the active model is used.

  • skip_invalid_attributes (bool | None) – If True, invalid objects are skipped and returned as warnings.

  • numbering_increments (dict[ObjectType, int] | None) –

    Numbering increments for the created copies, keyed by object type. Applied only when create_copy is True.

    The k-th copy of an object is numbered <original number> + k * <increment>, counting the first copy as k = 1. Every copy therefore gets its own block of numbers, which lets objects modelled afterwards address a copy by arithmetic instead of by counting the objects of the original.

    An object type without an entry is numbered from the next free number, as it is without this argument.

    The increment is applied strictly, there is no fallback: if a number it would produce is already taken - by another object of the same type or by an earlier copy - the whole request is refused with Object '<type> No. <n>' already exists and nothing is created. Choose the increment so that the blocks it produces stay clear of the numbers already in use.

    An increment for an object type that is not among the copied objects is rejected.

Returns:

None

Method Type: Core


Usage

rfem_app.mirror_objects(
    objs=[
        rfem.structure_core.Node(no=1),
        rfem.structure_core.Line(no=1),
        rfem.structure_core.Member(no=1),
        rfem.structure_core.Surface(no=1),
    ],
    mirroring_type=rfem.manipulation.MIRRORING_PLANE_SPECIFICATION_TYPE_POINT_AND_PARALLEL_PLANE,
    plane=rfem.manipulation.PLANE_YZ,
    point_1=common.Vector3d(x=5.5, y=0.0, z=-6.0),
    create_copy=True,
    # Optional: the k-th copy is numbered '<original number> + k * 100'
    numbering_increments={rfem.OBJECT_TYPE_NODE: 100},
)

Examples