CMB provides a mechanism for accessing new meshing technology using the Remus Meshing Infrastructure. This is done by creating a Mesh Worker that will execute the meshing algorithm and registering it with the Remus Mesh Server that is accessed by CMB's ModelBuilder application. The worker is responsible for the following information:
Describing its requirements in terms of what types of models it takes in and the type of meshes it produces
Describing the attribute specifications for meshing controls and sizing requirements
Transcribing the input model into a format that can be processed by the meshing algorithm and the output mesh into a format that can be read into SMTK Mesh
To help demonstrate how to create a new mesh worker, we have created the Delaunay Mesh Worker example which can be found in SMTK. It is a simple project for discretizing 2-dimensional surfaces. It consists of the following core components:
DelaunayMesh.rw: a Remus Worker File describing the name of the mesh worker executable, its input and output types, the SMTK attribute file describing its inputs and the file format for this attribute file.
DelaunayMeshWorker.h & DelaunayMeshWorker.cxx: a subclass of a Remus worker::Worker adapted to interface with the Delaunay project. The method DelaunayMeshWorker::meshJob() parses an input model received from a query process, constructs a mesh collection with mesh elements for each meshed face, and sends the result back to the query process.
DelaunayMeshWorkerMain.cxx: The main function for the mesh worker, which constructs an instance of DelaunayMeshWorker and starts an event loop.