Shapes

Related API functions

Shapes are rigid mesh objects that are composed of triangular faces. They can be imported, exported and edited. They come in four different sub-types:

  • Simple random shape: can represent any mesh. It has one color and one set of visual attributes. Not optimised nor recommended for dynamics collision response calculation (since very slow and unstable).
  • Grouped random shape: can represent any mesh. It has several colors and sets of visual attributes. Not optimised nor recommended for dynamics collision response calculation (since very slow and unstable).
  • Simple convex shape: represents a convex mesh with one color and one set of visual attributes. Slightly optimized for dynamics collision response calculation (but pure shapes are recommended).
  • Grouped convex shape: represents a group of convex meshes with several colors and sets of visual attributes. Slightly optimized for dynamics collision response calculation (but pure grouped shapes are recommended).
  • Pure simple shape: represents a primitive shape (cuboid, cylinder or sphere (with additional variations depending on the used physics engine). A pure simple shape (or pure grouped shape) is best suited for dynamics collision response calculation, since it will perform very fast and is stable. See the dynamics module section for more information.
  • Pure grouped shape: represents a group of primitive shapes (cuboid, cylinder or sphere). A pure grouped shape (or pure simple shape) is best suited for dynamics collision response calculation, since it will perform very fast and is stable. See the dynamics module section for more information.
  • Heightfield shape: can represent a terrain as a regular grid, where only the heights change. Heightfields can also be considered as pure simple shapes, and are optimized for dynamics collision response calculation.
  • By default, all imported shapes are simple shapes. Two or more simple shapes or grouped shapes can however be grouped ([Menu bar --> Edit --> Grouping/Merging --> Group selected shapes]) or ungrouped ([Menu bar --> Edit --> Grouping/Merging --> Ungroup selected shapes]). Simple shapes can also be merged ([Menu bar --> Edit --> Grouping/Merging --> Merge selected shapes] in which case the visual properties become same for all composing elements. A shape can also be divided ([Menu bar --> Edit --> Grouping/Merging --> Divide selected shapes]), depending on its configuration: the division algorithm will extract each distinct element of a shape. Two elements are distinct if they don't share any common vertex.

    Pure shapes are mainly functional shapes. They are most of the time only used by the physics engine that performs on them much better and faster than on non-pure shapes (e.g. random or convex meshes). For that reason, pure shapes are often hidden in an invisible layer (e.g. layer 9). Refer to the layer selection dialog and the section on how to design dynamic simulations for more information.

    [(a) 5 simple shapes (e.g. after import), (b) 1 simple shape (after merging), (c) 1 grouped shape (composed by 5 simple shapes)]


    Pure simple shapes can also be grouped, the resulting grouped shape will however only be pure if all of its composing elements are also pure. Merging pure simple shapes will result in a non-pure simple shape.

    Shapes are collidable, measurable, detectable, renderable and cuttable objects. This means that shapes:

  • can be used in collision detections against other collidable objects.
  • can be used in minimum distance calculations with other measurable objects.
  • can be detected by proximity sensors.
  • can be detected by vision sensors.
  • can be cut by mills. However, only simple non-pure shapes can be cuttable.
  • The collidable, measurable, detectable, renderable and cuttable properties of a shape can be altered in the object common properties dialog. Additionally, those properties can be overridden if the shape is part of a model which overrides them. Refer to the model dialog for more information.


    Recommended topics

  • Shape reference frame orientation
  • Shape import/export operations
  • Shape primitives
  • Convex hull operation
  • Shape edit modes
  • Shape dialog
  • Object common properties dialog
  • How to design dynamic simulations
  • Model dialog