Tutorial Toolkit Function Descriptions > Geometry > Surface/Solid Relation
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Surface/Solid Relation
  
db_count_solids_for_surface
( id, count )
Description:
Counts all solids associated with a specified surface in the database.
Input:
INTEGER
id
The id of the surface to which the solids are associated.
Output:
INTEGER
count
The integer number of solids associated to the surface in the database.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Example:
Please see db_count_solids_for_surface (p. 535) in the MSC Acumen Toolkit - Code Example.
  
db_get_solids_for_surface
( srfid, count, solid )
Description:
Finds the ids of all solids associated with a specified surface in the database.
Input:
INTEGER
srfid
Id of the surface to which the solids are associated.
INTEGER
count
The number of solids that the calling routine expects to receive from the database. This count should be the same as the number of solids to which the surface is associated as it should have been fetched from the database prior to making this call.
Output:
INTEGER
solid()
Ids of the various solids associated with the specified surface.
Example:
Please see db_get_solids_for_surface (p. 571) in the MSC Acumen Toolkit - Code Example.
  
sgm_db_get_gen_body_face_ids
( bodyid, numberfaces, faceids, faceorients, facesense, status )
 
Description:
Gets the Face IDs for a body.
Input:
INTEGER
bodyid
The ID of the body.
INTEGER
numberfaces
The number of face for the body.
Output:
INTEGER
faceids ()
The IDs of the faces of the body.
INTEGER
faceorients ( )
The orientations of the faces of the body.
INTEGER
facesense ( )
The sense of the normal (out or in).
INTEGER
status
Success or an error code.
Example:
See example for sgm_db_get_num_loops_face, 225. See also sgm_db_get_gen_body_face_ids (p. 609) in the MSC Acumen Toolkit - Code Example.
Notes:
The faceorients () values listed above provide the following information:
The surface normal relative to position 0 (where the face exactly matches the underlying surface).
The offset according to the INDUSTRY STANDARD, not according to MSC.Patran standards. Note that the offset is always given relative to position 0 when the face exactly matches the topology of the underlying surface.
 
Value
Orientation
Face Sense
Offset
0
DB_FACE_ORIENTATION_POS0
DB_FACE_SENSE_POSITIVE
DB_GEN_FACE_POS0
1
DB_FACE_ORIENTATION_POS1
DB_FACE_SENSE_NEGATIVE
DB_GEN_FACE_POS0
2
DB_FACE_ORIENTATION_POS2
DB_FACE_SENSE_NEGATIVE
DB_GEN_FACE_POS3
3
DB_FACE_ORIENTATION_POS3
DB_FACE_SENSE_POSITIVE
DB_GEN_FACE_POS1
4
DB_FACE_ORIENTATION_POS4
DB_FACE_SENSE_NEGATIVE
DB_GEN_FACE_POS2
5
DB_FACE_ORIENTATION_POS5
DB_FACE_SENSE_POSITIVE
DB_GEN_FACE_POS2
6
DB_FACE_ORIENTATION_POS6
DB_FACE_SENSE_POSITIVE
DB_GEN_FACE_POS3
7
DB_FACE_ORIENTATION_POS7
DB_FACE_SENSE_NEGATIVE
DB_GEN_FACE_POS1
Reverse pairs (If you reverse a 4-sided surface as the orientation toggles between these two values.
 
DB_FACE_ORIENTATION_POS0
<->
DB_FACE_ORIENTATION_POS0
DB_FACE_ORIENTATION_POS2
<->
DB_FACE_ORIENTATION_POS6
DB_FACE_ORIENTATION_POS3
<->
DB_FACE_ORIENTATION_POS7
DB_FACE_ORIENTATION_POS4
<->
DB_FACE_ORIENTATION_POS8
  
sgm_db_get_gen_body_vertex_ids
( bodyid, numvert, vertexids, status )
Description:
Gets the Vertex IDs for a body.
Input:
INTEGER
bodyid
The ID of the body.
INTEGER
numvert
The number of vertices for the body.
Output:
INTEGER
vertexids ( )
The IDs of the vertices of the body.
INTEGER
status
0 if successful, error code otherwise.
Example:
Please see sgm_db_get_gen_body_vertex_ids (p. 611) in the MSC Acumen Toolkit - Code Example.
  
sgm_db_get_num_faces_body
( bodyid, numberfaces, status )
Description:
Gets the number of faces for a general body.
Input:
INTEGER
bodyid
The ID of the body.
Output:
INTEGER
numberfaces
The number of faces for the body.
INTEGER
status
0 if successful, else returns error code.
Example:
See example for sgm_db_get_num_loops_face, 225. See also sgm_db_get_num_faces_body (p. 617) in the MSC Acumen Toolkit - Code Example.