29 #ifndef NEMOSYS_NUCMESHSRV_H_ 30 #define NEMOSYS_NUCMESHSRV_H_ 32 #include "nemosys_export.h" 36 #include <type_traits> 40 #include <SMESH_Gen.hxx> 68 template <
typename Shape>
69 typename std::add_lvalue_reference<Shape>::type
insertShape(Shape &&shape) {
70 geometryAndMesh.emplace_back(std::shared_ptr<NEM::NUCMESH::ShapeBase>{
71 new typename std::decay<Shape>::type(std::forward<Shape>(shape))});
72 return dynamic_cast<Shape &
>(*geometryAndMesh.back());
82 template <
typename Shape,
typename... Args>
84 geometryAndMesh.emplace_back(std::shared_ptr<NEM::NUCMESH::ShapeBase>{
85 new Shape(std::forward<Args>(args)...)});
86 return dynamic_cast<Shape &
>(*geometryAndMesh.back());
89 std::shared_ptr<SMESH_Gen> generator{
new SMESH_Gen{}};
95 void SetConfiguration(
const NucMeshConf &configuration);
100 int RequestData(vtkInformation *request, vtkInformationVector **inputVector,
101 vtkInformationVector *outputVector)
override;
102 int FillOutputPortInformation(
int port, vtkInformation *info)
override;
110 #endif // NEMOSYS_NUCMESHSRV_H_ std::vector< std::shared_ptr< NEM::NUCMESH::ShapeBase > > geometryAndMesh
Geometry and mesh.
geoMeshBase * New(MeshType meshType)
Create a new mesh object.
Shape & makeShape(Args &&...args)
Helper to construct and insert shapes into geometryAndMesh.
std::vector< double > extrudeSteps
Extrude the final 2d mesh along the z-axis.
std::add_lvalue_reference< Shape >::type insertShape(Shape &&shape)
Helper to insert shapes into geometryAndMesh.
abstract class for services acting on geoMeshBase