Core: Solid Body
This section describes how to access, create, or delete bodies in a model.
Introduction to Solid Body
In Creo Parametric 7.0.0.0 and later, the term “solid body” denotes a container object for solid geometry.
In earlier versions of Creo Parametric all solid geometry in a part is considered as one piece of a single material, even when the geometry has disjoint volumes. Starting in Creo Parametric 7.0.0.0, you can create parts that contain one or more geometric bodies. Each body can be handled individually, and can have different characteristics. For example, you can assign a different material to each body.
Bodies contain only solid geometry. Nonsolid entities, like datums, curves, and quilts, are not contained in any body.
When you create a new part, it has an empty body in it. This body will contain the solid geometry created by the features. If no solid geometry is created, or as long as the part contains only nonsolid geometry, this body remains empty. A part must always have at least one body in it.
When you retrieve a part that was created using a version earlier of Creo Parametric , it shows a single body in it. This body contains all the solid geometry in the part, if any exists.
Using Creo Parametric solid body feature, you can create parts with one or more geometric bodies. A body consists of solid geometry of the same material. You can assign a different material to each body and a single part can have more than one material.
Solid Body Objects
The structure ProSolidBody describes the contents of the solid body object. This object uses the same declaration as the ProModelitem object, which is as follows:
typedef struct pro_model_item
{
  ProType  type;
  int      id;
  ProMdl   owner;
} ProSolidBody;
States of bodies
When a body has geometry, it does not have a special state. A body can have a state derived from features and geometry.
•  No Contributing Features— No feature contributes geometry to the body.
•  No Geometry— Features which contribute to the body, however other features cut the entire geometry of this body. Or all the contributing features are suppressed.
•  Construction—Does not participate in mass properties calculations and is not considered in global or volume interference analysis or in collision detection. The construction state does not change the other properties of the body. Setting a body to construction state is reversible.
Creating a Body
A new part is created with a default body. This body is in the No Contributing Features state. When you add solid geometry to this part, you can add to this body, or create a new body. You can delete bodies that are in the No Contributing Features state. When you delete a body, it is removed from the part and the Bodies folder in the model tree. The parameters and relations for the body are deleted.
Functions introduced:
The function ProSolidBodyCreate() creates a new body. The input argument sld is the solid owner on which the body needs to be created. The output argument body is the body that is created.
Refer to the Creo Parametric online help for more information about body creation.
The function ProSolidBodiesCollect() collects all the bodies in the specified solid.
The function ProSolidDefaultBodyGet() returns the default body in the specified solid.
The function ProSolidDefaultBodySet() sets the specified body as default body in the specified solid. The input argument default_body is the body to be set as the default body.
Use the function ProSolidBodySurfaceVisit() to visit the surfaces that are included in the specified body.
The function ProSolidBodyDelete() deletes the body in the specified solid. When you delete a body, it is removed from the part and the Bodies folder in the model tree.
The function ProSolidBodyStateGet() returns the state of the body and is defined by the enumerated data type ProSolidBodyState and the valid values are:
•  PRO_BODY_STATE_MISSING
•  PRO_BODY_STATE_CONSUMED
•  PRO_BODY_STATE_NO_CONTR_FEAT
•  PRO_BODY_STATE_NO_GEOMETRY
•  PRO_BODY_STATE_ACTIVE
Use the function ProSolidBodyIsConstruction() to check if the specified body is a construction body.
Use the function ProSolidBodyConstructionSet() to set the specified body as a construction body. The function returns the error PRO_TK_NO_CHANGE if the body is already a construction body.
Use the function ProSolidBodyOutlineGet() to retrieve the regeneration outline of a solid body, with respect to the base coordinate system orientation. This outline defines the boundary box of the body. The function returns PRO_TK_E_NOT_FOUND if the solid body is empty.
The function ProSolidBodyIsSheetmetal() checks if the specified body is an active sheetmetal body.
In Creo Parametric 7.0, a sheetmetal part can have a single sheetmetal body and any number of solid bodies.
Use the function ProSolidBodyIsComposite() to check if the specified body is an active composite body. The function returns a ProBoolean output argument is_cmpst. The value is PRO_B_TRUE if the body is a composite body.
Listing Features
Functions Introduced:
The function ProSolidBodyFeaturesGet() lists all the features that are associated with the specified body. The output argument features is a ProArray of features.
The function returns the error PRO_TK_E_NOT_FOUND if there are no contributing features associated with the body.
Multibody Operations
Each body has its own geometry. You can perform geometric operations such as splitting a body or merging with other bodies. Bodies contribute to the mass properties of the model. You can select bodies as references for features. You can split a body into two bodies and also perform move or copy operations on bodies. The geometry of the original body is divided between the original body and the new body. For more information on body options and body operations, refer to the Element Trees: Solid Body chapter.
You can use the Boolean Operations feature to perform geometric operations such as:
•  Merge —Combines the geometry of two or more bodies into one body.
•  Intersect—Keeps the geometry that is shared by two or more bodies.
•  Subtract—Removes the geometry of one body from one or more bodies.