osecore.app.shape

Exposes functions for the following topological data types or “shapes”:

  • compound

  • compsolid

  • solid

  • shell

  • face

  • wire

  • edge

  • vertex

Shape is a generic term covering all of the above.

See Also:

Topological data scripting

Name

Description

move_parts

Move parts based on placement, origin translation offset,

place_shape

Apply a placement to a given shape.

place_shapes

Apply a placement to a given list of shapes.


move_parts(parts: List[Part.Shape], placement: Base.Placement, origin_translation_offset: Base.Vector, reference_dimensions: List[float], rotation: Base.Rotation = Rotation(0.0, 0.0, 0.0, 1.0)) → None

Move parts based on placement, origin translation offset, reference dimensions, and optionally a rotation.

Parameters
  • parts (List[Part.Shape]) – List of parts to move.

  • placement (Placement) – A placement to apply to the given parts.

  • origin_translation_offset (Vector) – Offset the parts to the origin.

  • reference_dimensions (Vector) – Reference dimensions

  • rotation (Rotation, optional) – Rotation, defaults to Rotation()

place_shape(shape: Part.Shape, placement: Base.Placement) → None

Apply a placement to a given shape.

See Also:

https://www.freecadweb.org/api/db/d71/classPart_1_1TopoShapePy.html

Parameters
  • shape (Part.Shape) – A shape.

  • placement (FreeCAD.Placement) – Placement to apply to part

place_shapes(shapes: List[Part.Shape], placement: Base.Placement) → None

Apply a placement to a given list of shapes.

See Also:

https://www.freecadweb.org/api/db/d71/classPart_1_1TopoShapePy.html

Parameters
  • shapes (List[Part.Shape]) – A list of shapes

  • placement (FreeCAD.Placement) – Placement to apply to part