Overview

The STEP Faceter library is called stixmesh, and it converts STEP geometric descriptions into triangular mesh structures provided by the ROSE Math library. The STEP classes are provided by the STEP Merged AP library.

Getting Started

The stixmesh.h master header brings in all of the definitions from the stixmesh library. All functions are prefixed with "stixmesh_" and all classes and defined types are prefixed with "StixMesh".

You must call stixmesh_init() at the start of your application to initialize some faceter data. For example, the code fragment below shows the basic shell of a program:

#include <stp_schema.h>
#include <stix.h>
#include <stixmesh.h>

int main (int argc, char ** argv)
{
    stplib_init();	// initialize step ap library
    stixmesh_init();    // initialize faceter

    if (!srcfile) usage(argv[0]);

    RoseDesign * d = ROSE.findDesign(argv[0]);
    if (!d) {
	printf ("Could not open STEP file %s\n", srcfile);
	exit (1);
    }

    [ ... traverse products, facet shapes ... ]

    return 0;
}

Compiling and Linking

Add the following paths and link settings to your C++ project settings. The examples below also include things used by the ROSE, ROSE Math, STEP AP Helper, and STEP EXPRESS class libraries.

The example below shows what the include paths on your compile line would look like with entries for all header files.

/I"$(ROSE_INCLUDE)"
/I"$(ROSE_INCLUDE)/stp_aim"
/I"$(ROSE_INCLUDE)/stix"
/I"$(ROSE_INCLUDE)/stixmesh" 	==> Windows

-I$(ROSE_INCLUDE)
-I$(ROSE_INCLUDE)/stp_aim
-I$(ROSE_INCLUDE)/stix
-I$(ROSE_INCLUDE)/stixmesh  	==> Unix

The examples below shows what the libraries on your link line would look like for different static and DLL link configurations. This list includes some support math libraries required by the mesher.

stixmesh.lib stix.lib stp_aim.lib \
rosemath.lib rose.lib dtnurbsc.lib vcf2c.lib 		==> Windows static


stixmeshdll.lib stixdll.lib stp_aimdll.lib \
rosemathdll.lib rosedll.lib  				==> Windows DLL


stixmeshdlld.lib stixdlld.lib stp_aimdlld.lib \
rosemathdlld.lib rosedlld.lib				==> Windows DLL debug

-lstixmesh -lstix -lstp_aim \
-lrosemath -lrose -ldtnurbsc -lf2c 	  		==> Unix (see below)

When building on Linux, you must also include the -lpthread library.