AppMesh.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "PreCompiled.h"
00025 #ifndef _PreComp_
00026 # include <Python.h>
00027 #endif
00028
00029 #include <Base/Console.h>
00030 #include <Base/Interpreter.h>
00031
00032 #include "Mesh.h"
00033 #include "MeshPy.h"
00034 #include "MeshPointPy.h"
00035 #include "FacetPy.h"
00036 #include "MeshFeaturePy.h"
00037 #include "FeatureMeshImport.h"
00038 #include "FeatureMeshExport.h"
00039 #include "FeatureMeshTransform.h"
00040 #include "FeatureMeshTransformDemolding.h"
00041 #include "FeatureMeshCurvature.h"
00042 #include "FeatureMeshSegmentByMesh.h"
00043 #include "FeatureMeshSetOperations.h"
00044 #include "FeatureMeshDefects.h"
00045 #include "FeatureMeshSolid.h"
00046
00047
00048 extern struct PyMethodDef Mesh_Import_methods[];
00049
00050
00051 PyDoc_STRVAR(module_doc,
00052 "The functions in this module allow working with mesh objects.\n"
00053 "A set of functions are provided that allow to read in registered mesh file formats\n"
00054 "to either an newly created or already exising document.\n"
00055 "\n"
00056 "open(string) -- Create a new document and a Mesh::Import feature to load the file into the document.\n"
00057 "insert(string, string) -- Create a Mesh::Import feature to load the file into the given document.\n"
00058 "mesh() -- Create an empty mesh object.\n"
00059 "\n");
00060
00061
00062 extern "C" {
00063 void MeshExport initMesh()
00064 {
00065 PyObject* meshModule = Py_InitModule3("Mesh", Mesh_Import_methods, module_doc);
00066 Base::Console().Log("Loading Mesh module... done\n");
00067
00068
00069
00070
00071
00072
00073 Base::Interpreter().addType(&Mesh::MeshPointPy ::Type,meshModule,"MeshPoint");
00074 Base::Interpreter().addType(&Mesh::FacetPy ::Type,meshModule,"Facet");
00075 Base::Interpreter().addType(&Mesh::MeshPy ::Type,meshModule,"Mesh");
00076 Base::Interpreter().addType(&Mesh::MeshFeaturePy::Type,meshModule,"Feature");
00077
00078
00079 Mesh::PropertyNormalList ::init();
00080 Mesh::PropertyCurvatureList ::init();
00081 Mesh::PropertyMeshKernel ::init();
00082
00083 Mesh::MeshObject ::init();
00084
00085 Mesh::Feature ::init();
00086 Mesh::FeaturePython ::init();
00087 Mesh::Import ::init();
00088 Mesh::Export ::init();
00089 Mesh::Transform ::init();
00090 Mesh::TransformDemolding ::init();
00091 Mesh::Curvature ::init();
00092 Mesh::SegmentByMesh ::init();
00093 Mesh::SetOperations ::init();
00094 Mesh::FixDefects ::init();
00095 Mesh::HarmonizeNormals ::init();
00096 Mesh::FlipNormals ::init();
00097 Mesh::FixNonManifolds ::init();
00098 Mesh::FixDuplicatedFaces ::init();
00099 Mesh::FixDuplicatedPoints ::init();
00100 Mesh::FixDegenerations ::init();
00101 Mesh::FixDeformations ::init();
00102 Mesh::FixIndices ::init();
00103 Mesh::FillHoles ::init();
00104 Mesh::RemoveComponents ::init();
00105
00106 Mesh::Sphere ::init();
00107 Mesh::Ellipsoid ::init();
00108 Mesh::Cylinder ::init();
00109 Mesh::Cone ::init();
00110 Mesh::Torus ::init();
00111 Mesh::Cube ::init();
00112 }
00113
00114
00115 }