|
|
CMB provides a mechanism for accessing new meshing technology using the [Remus](https://gitlab.kitware.com/cmb/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:
|
|
|
|
|
|
1. Describing its requirements in terms of what types of models it takes in and the type of meshes it produces
|
|
|
|
|
|
2. Describing the attribute specifications for meshing controls and sizing requirements
|
|
|
|
|
|
3. 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](https://gitlab.kitware.com/cmb/smtk). It is a simple project for discretizing 2-dimensional surfaces. It consists of the following core components:
|
|
|
|
|
|
- [DelaunayMeshingDefs.sbt](/cmb/smtk/blob/release/smtk/extension/delaunay/worker/DelaunayMeshingDefs.sbt): an SMTK attribute template file describing the input requirements of the mesh worker.
|
|
|
|
|
|
- [DelaunayMesh.rw](/cmb/smtk/blob/release/smtk/extension/delaunay/worker/DelaunayMesh.rw): a [Remus Worker File](https://gitlab.kitware.com/cmb/remus/blob/master/remus/worker/Readme.md#constructing-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](/cmb/smtk/blob/release/smtk/extension/delaunay/worker/DelaunayMeshWorker.h) & [DelaunayMeshWorker.cxx](/cmb/smtk/blob/release/smtk/extension/delaunay/worker/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](/cmb/smtk/blob/release/smtk/extension/delaunay/worker/DelaunayMeshWorkerMain.cxx): The main function for the mesh worker, which constructs an instance of `DelaunayMeshWorker` and starts an event loop. |
|
|
\ No newline at end of file |