HM_ExtAPI::CreateGeomSolid()

Creates solid within existing shell of boundary faces.

Syntax

bool CreateGeomSolid(
HM_EntityGeomSolid& new_solid,
const HM_EntityGeomFace& shell_face,
int& orient_code,
HM_EntityComponent comp
);

Type

HyperMesh Ext API

Description

The shell that contains the face specified by the shell_face parameter must have closed volume. If the shell contains several faces then all face edges must be equivalenced between each other to form the closed volume.

If a solid already was created before in specified volume then the handle of this solid is returned by the parameter new_solid but the function CreateGeomSolid returns false to indicate an error.

Additional cavities within the solid can be created by using the functionHM_ExtAPI::GeomSolidInsertCavity().

If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().

Requires including hm_extapi.h.

Inputs

new_solid
[out] - Handle to new solid object.
shell_face
[in] - Handle to face object that was returned by previous calls to API functions. The solid is created within boundary shell that contains the face specified by shell_face parameter.
orient_code
[in/out] - Specifies solid orientation. This parameter can have one of following values.
1: Solid is created on the upper side of the face specified by shell_face. The normal of the face is directed inside the volume of the solid.
-1: Solid is created on the lower side of the face specified by shell_face. The normal of the face is directed outwards.
0: Solid orientation is calculated geometrically. Solid is created in the closed volume. The parameter in this case return resulted solid orientation with respect to the face specified by shell_face.
comp
[in] - If not NULL then component where the solid is created. If NULL then the solid is created in current component.
s

Errors

None.