GeomProcess
The GeMA Geometry Process Plugin
Loading...
Searching...
No Matches
gmpGeomProcess.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_PLUGIN_GEOM_PROCESS_H_
25#define _GEMA_PLUGIN_GEOM_PROCESS_H_
26
27#include <gmProcess.h>
28#include <gmMatrix.h>
29
30class GmValueAccessor;
31class LuaFunction;
32class LuaEnv;
33
37{
38public:
40 virtual ~GmpGeomProcess();
41
42 // Comments on the base class
43 virtual const char* pluginName() const { return "GeomProcess"; }
44
45 // Comments on the base class
46 virtual const char* pluginType() const { return "geom"; }
47
48 // Comments on the base class
49 virtual void loadFunctions(LuaTable& table) { registerFunctions<GmpGeomProcess>(table, processMethodTable()); }
50
51 // Comments on the base class
52 virtual QStringList functionList() const { return buildFunctionList<GmpGeomProcess>(processMethodTable()); }
53
54private:
55
57
58 int getConvexHull (lua_State* L);
59 int pointInConvexPolygon (lua_State* L);
60 int delaunayTriangulation (lua_State* L);
61 int isMeshValid (lua_State* L);
62 int isMeshQualityGT (lua_State* L);
63 int meshQualityHistogram (lua_State* L);
64 int extractMeshFromMeshBorders (lua_State* L);
65 int extractMeshFromMeshBoundary (lua_State* L);
66 int extractProjectedMeshFromMesh(lua_State* L);
67 int releaseExtractedMesh (lua_State* L);
68 int burialDepth (lua_State* L);
69 int createSimpleMesh (lua_State* L);
70 int fillEmptyMesh (lua_State* L);
71 int createEmptyDiscSet (lua_State* L);
72
73 void parseExtractParameters(int start, LuaEnv* env, const char* fname, QString& newMeshName,
74 QVariantMap& attributes, QString& plugin, bool& addToModel,
75 bool* projected, bool* saveSrc, LuaFunction* filter,
76 int* borderCellOrIndex, int* borderSide) const;
77
78 bool parseExtractIndexParameters(LuaEnv* env, const char* fname, QString newMeshName, QString& newIndexName,
79 QVariantMap& attributes, QString& plugin) const;
80};
81#endif
82
virtual const GmLogCategory & logger() const
QString description() const
void registerFunctions(LuaTable &table, typename GmProcessMethodRedirector< T >::MethodRegistry *methods, bool noProgressStats=false)
QStringList buildFunctionList(typename GmProcessMethodRedirector< T >::MethodRegistry *methods) const
Basic class for the Geometry Utils process plugin object.
Definition gmpGeomProcess.h:37
int createSimpleMesh(lua_State *L)
Creates a new mesh with nodes and cells provided by the given Lua tables.
Definition gmpGeomProcess.cpp:702
int isMeshValid(lua_State *L)
The geom.isMeshValid process implementation.
Definition gmpGeomProcess.cpp:229
void parseExtractParameters(int start, LuaEnv *env, const char *fname, QString &newMeshName, QVariantMap &attributes, QString &plugin, bool &addToModel, bool *projected, bool *saveSrc, LuaFunction *filter, int *borderCellOrIndex, int *borderSide) const
Parses and validates the mesh name and option parameters from the calls to the extract functions....
Definition gmpGeomProcess.cpp:808
int extractProjectedMeshFromMesh(lua_State *L)
Creates a new mesh that projects the given src mesh cells on the XY plane. The src mesh should be com...
Definition gmpGeomProcess.cpp:545
int releaseExtractedMesh(lua_State *L)
Releases the extracted mesh object received as parameter. The given mesh should be a mesh returned by...
Definition gmpGeomProcess.cpp:596
int extractMeshFromMeshBorders(lua_State *L)
Creates a new mesh with cells extracted from a src mesh border and filtered by an optional user filte...
Definition gmpGeomProcess.cpp:354
int meshQualityHistogram(lua_State *L)
The geom.MeshQualityHistogram process implementation.
Definition gmpGeomProcess.cpp:294
bool parseExtractIndexParameters(LuaEnv *env, const char *fname, QString newMeshName, QString &newIndexName, QVariantMap &attributes, QString &plugin) const
Parses and validates option parameters related to spatial index creation from the calls to the extrac...
Definition gmpGeomProcess.cpp:893
int fillEmptyMesh(lua_State *L)
Fills an EMPTY mesh with nodes and cells provided by the given Lua tables.
Definition gmpGeomProcess.cpp:758
int extractMeshFromMeshBoundary(lua_State *L)
Creates a new mesh with cells extracted from the given boundary group. If the group is an edge group,...
Definition gmpGeomProcess.cpp:473
int getConvexHull(lua_State *L)
The geom.getConvexHull() process implementation.
Definition gmpGeomProcess.cpp:95
GmProcessMethodRedirector< GmpGeomProcess >::MethodRegistry * processMethodTable() const
Returns the table storing the process exported function names / methods.
Definition gmpGeomProcess.cpp:68
int delaunayTriangulation(lua_State *L)
The geom.delaunayTriangulation() process implementation.
Definition gmpGeomProcess.cpp:170
GmpGeomProcess(GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
Constructor. Will be called by the plugin loading code.
Definition gmpGeomProcess.cpp:57
int isMeshQualityGT(lua_State *L)
The geom.isMeshQualityGT process implementation.
Definition gmpGeomProcess.cpp:268
int pointInConvexPolygon(lua_State *L)
The geom.pointInConvexPolygon() process implementation.
Definition gmpGeomProcess.cpp:124
int createEmptyDiscSet(lua_State *L)
Creates a new empty discontinuitySet.
Definition gmpGeomProcess.cpp:943
int burialDepth(lua_State *L)
Given a 3d point coordinate, returns its burial depth by finding the point projection on the sea floo...
Definition gmpGeomProcess.cpp:625
virtual ~GmpGeomProcess()
Destructor.
Definition gmpGeomProcess.cpp:63