1
/***************************************************************************
2
* Copyright (c) 2006 Werner Mayer <werner.wm.mayer@gmx.de> *
4
* This file is part of the FreeCAD CAx development system. *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public *
17
* License along with this library; see the file COPYING.LIB. If not, *
18
* write to the Free Software Foundation, Inc., 59 Temple Place, *
19
* Suite 330, Boston, MA 02111-1307, USA *
21
***************************************************************************/
24
#ifndef MESH_FEATURE_MESH_DEFECTS_H
25
#define MESH_FEATURE_MESH_DEFECTS_H
27
#include <App/PropertyLinks.h>
28
#include "MeshFeature.h"
34
* The FixDefects class fixes defects in the attached mesh kernel.
35
* @author Werner Mayer
37
class MeshExport FixDefects : public Mesh::Feature
39
PROPERTY_HEADER(Mesh::FixDefects);
44
virtual ~FixDefects();
46
/** @name Properties */
48
App::PropertyLink Source;
51
/** @name methods override Feature */
53
/// recalculate the Feature
54
virtual App::DocumentObjectExecReturn *execute(void);
55
short mustExecute() const;
58
/// returns the type name of the ViewProvider
59
// virtual const char* getViewProviderName(void) const {return "MeshGui::ViewProviderDefects";}
63
* The HarmonizeNormals class harmonizes the normals of the faces.
64
* @author Werner Mayer
66
class MeshExport HarmonizeNormals : public Mesh::FixDefects
68
PROPERTY_HEADER(Mesh::HarmonizeNormals);
72
HarmonizeNormals(void);
73
virtual ~HarmonizeNormals();
75
/** @name methods override Feature */
77
/// recalculate the Feature
78
virtual App::DocumentObjectExecReturn *execute(void);
83
* The FlipNormals class flips the normals of all faces.
84
* @author Werner Mayer
86
class MeshExport FlipNormals : public Mesh::FixDefects
88
PROPERTY_HEADER(Mesh::FlipNormals);
93
virtual ~FlipNormals();
95
/** @name methods override Feature */
97
/// recalculate the Feature
98
virtual App::DocumentObjectExecReturn *execute(void);
103
* The FixNonManifolds class tries to fix edges with more than two faces attached.
104
* @author Werner Mayer
106
class MeshExport FixNonManifolds : public Mesh::FixDefects
108
PROPERTY_HEADER(Mesh::FixNonManifolds);
112
FixNonManifolds(void);
113
virtual ~FixNonManifolds();
115
/** @name methods override Feature */
117
/// recalculate the Feature
118
virtual App::DocumentObjectExecReturn *execute(void);
123
* The FixDuplicatedFaces class removes duplicated faces from the mesh.
124
* @author Werner Mayer
126
class MeshExport FixDuplicatedFaces : public Mesh::FixDefects
128
PROPERTY_HEADER(Mesh::FixDuplicatedFaces);
132
FixDuplicatedFaces(void);
133
virtual ~FixDuplicatedFaces();
135
/** @name methods override Feature */
137
/// recalculate the Feature
138
virtual App::DocumentObjectExecReturn *execute(void);
143
* The FixDuplicatedPoints class removes duplicated points from the mesh.
144
* @author Werner Mayer
146
class MeshExport FixDuplicatedPoints : public Mesh::FixDefects
148
PROPERTY_HEADER(Mesh::FixDuplicatedPoints);
152
FixDuplicatedPoints(void);
153
virtual ~FixDuplicatedPoints();
155
/** @name methods override Feature */
157
/// recalculate the Feature
158
virtual App::DocumentObjectExecReturn *execute(void);
163
* The FixDegenerations class removes degenerated faces from the mesh.
164
* @author Werner Mayer
166
class MeshExport FixDegenerations : public Mesh::FixDefects
168
PROPERTY_HEADER(Mesh::FixDegenerations);
172
FixDegenerations(void);
173
virtual ~FixDegenerations();
175
/** @name methods override Feature */
177
/// recalculate the Feature
178
virtual App::DocumentObjectExecReturn *execute(void);
183
* The FixDeformations class tries to repair deformed faces by swapping edge operations.
184
* @author Werner Mayer
186
class MeshExport FixDeformations : public Mesh::FixDefects
188
PROPERTY_HEADER(Mesh::FixDeformations);
192
FixDeformations(void);
193
virtual ~FixDeformations();
195
/** @name Properties */
197
App::PropertyFloat MaxAngle; /**< Maximum allowed angle */
199
/** @name methods override Feature */
201
/// recalculate the Feature
202
virtual App::DocumentObjectExecReturn *execute(void);
207
* The FixIndices class tries to validate invalid indices of the internal mesh data structure.
208
* @author Werner Mayer
210
class MeshExport FixIndices : public Mesh::FixDefects
212
PROPERTY_HEADER(Mesh::FixIndices);
217
virtual ~FixIndices();
219
/** @name methods override Feature */
221
/// recalculate the Feature
222
virtual App::DocumentObjectExecReturn *execute(void);
227
* The FillHoles class tries to fill up holes in the internal mesh data structure.
228
* @author Werner Mayer
230
class MeshExport FillHoles : public Mesh::FixDefects
232
PROPERTY_HEADER(Mesh::FillHoles);
237
virtual ~FillHoles();
238
App::PropertyInteger FillupHolesOfLength;
239
App::PropertyFloat MaxArea;
241
/** @name methods override Feature */
243
/// recalculate the Feature
244
virtual App::DocumentObjectExecReturn *execute(void);
249
* The RemoveComponents class removes topologic indepentent components up to a certain size from the mesh data structure.
250
* @author Werner Mayer
252
class MeshExport RemoveComponents : public Mesh::FixDefects
254
PROPERTY_HEADER(Mesh::RemoveComponents);
258
RemoveComponents(void);
259
virtual ~RemoveComponents();
260
App::PropertyInteger RemoveCompOfSize;
262
/** @name methods override Feature */
264
/// recalculate the Feature
265
virtual App::DocumentObjectExecReturn *execute(void);
272
#endif // MESH_FEATURE_MESH_DEFECTS_H