move_objects#

dlubal.api.rsection.Application.move_objects(self, objects, direction_through, displacement_vector=None, axis=None, create_copy=False, number_of_steps=None, spacing=None, model_id=None)#

Moves or copies the specified objects in defined direction.

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

  • direction_through (DirectionThrough) – Specifies the type of direction through which the objects will be moved.

  • displacement_vector (Vector2d | None) – Specifies the displacement vector for vector-based movement.

  • axis (CoordinateAxis | None) – Specifies the axis for parallel movement.

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

  • number_of_steps (int | None) – Specifies the number of copies to create.

  • spacing (double | None) – Specifies the spacing between copies for parallel movement.

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

Returns:

None


Usage

objs = [
    rsection.structure_core.Line(
        no=1
    )
]
rsection_app.move_objects(
    objects=objs,
    direction_through=rsection.manipulation.DIRECTION_THROUGH_DISPLACEMENT_VECTOR,
    displacement_vector=common.Vector2d(y=0.2, z=0.0),
    create_copy=True,
    number_of_steps=2,
)