Overview
The Merged CAD Library is named stpcad and follows the same conventions as ST-Developer single AP libraries. Header files are installed in the stpcad subdirectory under the ST-Developer include directory. The stp_schema.h header file brings in the class definitions for the library as well as additional functions for switching between schemas when reading and writing STEP files. The details are:
- Include File: stp_schema.h
- Include Path: $(ROSE_INCLUDE)/stpcad
- Library Path: $(ROSE_LIB) with stpcad.lib or -lstpcad
- Using Windows DLLs
Setup and Conventions
You must call the stplib_init() function once at the start of your application to initialize handling of STEP files with the merged schema. If you are porting an application that previously used a single AP library, stplib_init() eliminates the need to call stp_schema_force_load().
#include <stp_schema.h>
int main(int argc, char* argv[])
{
stplib_init();
// body of program
}
The "stp_" prefix is used for all C++ classes generated from the EXPRESS definitions. So the class for a STEP "product" instance is stp_product, the class for "cartesian_point" is stp_cartesian_point, and so on. This prefix makes it easy to identify classes in your code and avoids symbol conflicts on common names like "point" or "curve". A list of all classes is available with links to the EXPRESS definitions.
The "stplib_" prefix is used for the utility functions provided by the library.
Distributing Applications
Applications built with the merged library do not need any additional support files. Calling the stplib_init() function initializes all of the run-time support data previously supplied by the ST-Runtime package.
Since the merged library provides this run-time support data internally, you do not need to include ST-Runtime in your packaging, or call any of the following functions:
- rose_get/setenv registry_key()
- rose_get/setenv search_path()
- rose_get/setenv system_schema_path()