Hide menu
ModelData_Body

Table of Contents

Defines a root topological shape that can be owned by B-Rep representation.

Depending on its type, a body can hold either:

Extends

Members

bodyType: ModelData_BodyType readonly

Body type.


prs: ModelData_BodyPrs | null readonly

Body poly presentation.

Methods

create(theShape)ModelData_Body | nullstatic

Creates a body from an arbitrary shape. If theShape is already a body then just returns it. If theShape is a body list then returns its first body or empty, if the list is empty. Otherwise creates a body wrapping theShape.

Parameters:

Param Type Description
theShape ModelData_Shape

append(theShape) ⇒ boolean

Adds a shape to the body. Returns true if the shape has been successfully added and false otherwise. Result depends upon the existing body contents and the shape being added. The check are applied in the following order:

  • if the body is either solid or acorn then returns false;
  • if theShape is simple (i.e. from vertex to solid) and the body is either wireframe or sheet then either appends the shape and returns true (if the types of the shape and body are compatible) or returns false (if the types are incompatible).
  • if theShape is a body of the same type as this body then adds its components. Returns true, and returns false if the types are incompatible.
  • if theShape is a body list then tries to add its bodies using the above approach. Returns true if at least one body succeeded.

Parameters:

Param Type Description
theShape ModelData_Shape