Overview

The IFC Faceter Library is called ifcmesh, and is used with the ST-Developer ROSE library, ROSE Math library, and IFC4 BIM class library.

Applications usually traverse IFC data to find geometric representations, pass these to the meshing functions to create triangles, and then use the triangles for graphics display or analysis.

Getting Started

The ifcmesh.h master header brings in all of the definitions from the ifcmesh library. The IFC-specific functions are prefixed with "ifcmesh_" while classes are prefixed with "IFCMesh". The general math functions for dealing with transform matrices and the facet data structures are prefixed with "rose_" and "Rose"

#include <ifc_schema.h>
#include <ifcmesh.h>

int main (int argc, char ** argv)
{
    ifclib_init();	// initialize merged cad library

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

    return 0;
}

Compiling and Linking

Add the following paths and link settings to your C++ project settings.

Use include paths for the ROSE library, and the IFCBIM Class library, and the faceting library:

$(ROSE_INCLUDE)
$(ROSE_INCLUDE)/ifcbim
$(ROSE_INCLUDE)/ifcmesh

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.

ifcmesh.lib ifcbim.lib \
rosemath.lib rose.lib dtnurbsc.lib vcf2c.lib 		==> Windows static


ifcmeshdll.lib ifcbimdll.lib \
rosemathdll.lib rosedll.lib  				==> Windows DLL


ifcmeshdlld.lib ifcbimdlld.lib \
rosemathdlld.lib rosedlld.lib				==> Windows DLL debug

-lifcmesh -lifcbim \
-lrosemath -lrose -ldtnurbsc -lf2c 	  		==> Unix (see below)

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

How to change project settings for different compilers.