When using the FEM Edition, the devDept.Eyeshot.Meshing namespace comes with plenty of meshing-dedicated classes extending the abstract Mesher class, which in turn extends the WorkUnit class:
Choosing a Mesher based on your needs
- CurveMesher does 1D meshing on instances of classes implementing ICurve;
- SurfaceMesher does 2D generic meshing on instances of (classes extending) Surface;
- PlaneMesher does 2D planar meshing on instances of Region, Point3D (when belonging to the same Plane), and PolyRegion2D. Although one could also convert these to a PlanarSurface and then use SurfaceMesher, PlaneMesher is more specialized and performant than the most generic SurfaceMesher.
- VolumeMesher does 3D meshing on instances of Brep and Mesh.
Customizing the chosen Mesher
As pictured in the previous diagram, some Meshers implement the ICurveMesherCreator and/or the IFaceMesherCreator interfaces, described below:
Whenever you want to take control of how SurfaceMesher, PlaneMesher, or VolumeMesher 1D mesh their curves, you may just override their CreateCurveMesher method, which is invoked every time a new curve needs to be meshed. For example, you may want to return:
- an instance of CurveMesher where some properties have custom values set;
- an instance of a MyCurveMesher custom child class.
Whenever you want to take control of how VolumeMesher 2D meshes its faces, you may just override its CreateFaceMesher method, which is invoked every time a new face needs to be meshed. For example, you may want to:
- adopt a custom policy to decide whether a SufaceMesher or a PlaneMesher should be returned (currently, PlaneMesher is used for planar meshing, while SurfaceMesher is used for non-planar meshing);
- return an instance of SurfaceMesher or PlaneMesher where some properties have custom values set;
- return an instance of a MySurfaceMesher/MyPlaneMesher custom child class;
- return an instance of an entirely new 2D-mesher extending the Mesher abstract base class.
Comments
Please sign in to leave a comment.