Initialization and Shutdown

To start Parasolid and the HOOPS/Parasolid Integration module, call HP_Init in an application initialization routine. This function initializes the Parasolid kernel and registers the HOOPS-specific implementation of the Parasolid GO_Routines. All geometry rendered via Parasolid's PK_TOPOL_render_XXX routines will be mapped to corresponding segments and geometry in the HOOPS graphics database. (HOOPS does not need an explicit initialization routine, as it is automatically initialized during the first call of a HOOPS function.)

Note that the HP_Init function requires a Schema path and Boolean value. The Schema path instructs Parasolid where to look for some utility files necessary to read in .x_t files. The schema files are located on the CD installation in the /parasolid/schema directory.

The Boolean should be set to false, unless you are working with Tech Soft 3D to test a new automatic update feature that keeps HOOPS and Parasolid continuously in synchronization.

void MyParaHoopsAppInit()
CString SchemaPath;
SchemaPath =GetProfileString(registry,"PARASOLID_SCHEMA_PATH");
HP_Init(SchemaPath, PK_LOGICAL_false);

To shutdown Parasolid as well as the HOOPS/Parasolid module, call HP_Close. This should be called in an application cleanup routine, when Parasolid is no longer needed. This does not shutdown the HOOPS Graphics System - the HOOPS function HC_Reset_System will still need to be called to directly shutdown HOOPS:

void MyParaHoopsAppCleanup()
HP_Close();// shutdown Parasolid
HC_Reset_System();// shutdown HOOPS

top_level:2 prog_guide:6