Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MeshRepairPlugin Class Reference
Inheritance diagram for MeshRepairPlugin:
BaseInterface ToolboxInterface BackupInterface LoggingInterface ScriptInterface RPCInterface

Public Slots

QString version ()
 
Scripting functions
void detectFlatValence3Vertices (int _objectId, double _angle)
 Detect valence 3 vertices with faces that lie in the plane of their adjacent triangles. More...
 
void removeSelectedVal3Vertices (int _objectId)
 Remove all selected valence 3 vertices.
 
void selectEdgesShorterThan (int _objectId, double _length)
 Selects all edges of an object which are shorter than the given length. More...
 
void selectEdgesLongerThan (int _objectId, double _length)
 Selects all edges of an object which are larger than the given length. More...
 
void removeSelectedEdges (int _objectId)
 Removes all selected edges. More...
 
void detectSkinnyTriangleByAngle (int _objectId, double _angle, bool _remove)
 Detect/Remove edges where neighboring faces form angle > _angle degrees. More...
 
void detectFoldover (int _objectId, float _angle)
 Detect folded-over configurations by the dihedral angle. More...
 
void detectTriangleAspect (int _objectId, float _aspect)
 Detect triangles with aspect ratio greater than _aspect and select them. More...
 
void flipOrientation (int _objectId)
 Flips the normals of all selected faces by changing the vertex order. More...
 
void updateFaceNormals (int _objectId)
 Recomputes the face normals of an object. More...
 
void updateHalfedgeNormals (int _objectId)
 Recomputes the halfedge normals of an object. More...
 
void updateVertexNormals (int _objectId)
 Recomputes the vertex normals of an object. More...
 
void updateNormals (int _objectId)
 Recomputes the face and vertex normals of an object. More...
 
void snapBoundary (int _objectId, double _eps)
 Snaps selected vertices at boundaries. More...
 
void fixNonManifoldVertices (int _objectId)
 remove non-manifold vertices by duplicating them More...
 
void fixMesh (int _objectId, double _epsilon)
 Fix a mesh. More...
 

Signals

void updateView ()
 
void updatedObject (int _identifier, const UpdateType &_type)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 
void pluginExists (QString _pluginName, bool &_exists)
 
void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 
void scriptInfo (QString _functionName)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name. More...
 
- Signals inherited from BackupInterface
virtual void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 Tell Backup Plugin to create a backup. More...
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen. More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- Signals inherited from ScriptInterface
virtual void scriptInfo (QString _functionWithParameters)
 Emit this signal if a scriptable function is executed. More...
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeScript (QString _script)
 
virtual void getAvailableFunctions (QStringList &_functions)
 
- Signals inherited from RPCInterface
virtual void pluginExists (QString _pluginName, bool &_exists)
 

Public Member Functions

QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 

Private Slots

void initializePlugin ()
 
void pluginsInitialized ()
 Initialization of the plugin when it is loaded by the core. More...
 
void slotRemoveSelectedVal3Vertices ()
 Button slot.
 
void slotRemoveSelectedEdges ()
 Button slot.
 
void slotDetectSkinnyTriangleByAngle ()
 Button slot.
 
void slotRemoveSkinnyTriangleByAngle ()
 Button slot.
 
void slotDetectFoldover ()
 Button slot.
 
void slotDetectTriangleAspect ()
 Button slot.
 
void slotFlipOrientation ()
 Button slot.
 
void slotFixMesh ()
 Button slot.
 
void slotUpdateVertexNormals ()
 Button slot.
 
void slotUpdateFaceNormals ()
 Button slot.
 
void slotUpdateHalfedgeNormals ()
 Button slot.
 
void slotUpdateNormals ()
 Button slot.
 
void slotDetectEdgesLonger ()
 Button Slot.
 
void slotDetectEdgesShorter ()
 Button Slot.
 
void slotDetectFlatValence3Vertices ()
 Button slot.
 
void slotSnapBoundary ()
 Button slot.
 
void slotFixNonManifoldVertices ()
 Button slot.
 

Private Member Functions

void selectionEdgeLength (int _objectId, double _length, bool _larger)
 select edges based on length More...
 
template<typename MeshT >
void flipOrientation (MeshT &_mesh)
 flip orientation of selected faces. More...
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor.
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from ToolboxInterface
virtual ~ToolboxInterface ()
 Destructor.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 Add a toolbox widget to the gui with the given name and an icon. More...
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
 Add a toolbox widget to the gui with the given name, icon and header area widget. More...
 
- Private Member Functions inherited from BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup. More...
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object. More...
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object. More...
 
virtual void undo ()
 Tell Backup Plugin to undo the last action. More...
 
virtual void redo ()
 Tell Backup Plugin to redo the last action. More...
 
virtual ~BackupInterface ()
 Destructor.
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor.
 
virtual void executeFileScript (QString _filename)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- Private Member Functions inherited from RPCInterface
virtual ~RPCInterface ()
 Destructor.
 
virtual void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 

Private Attributes

MeshRepairToolbarWidgettool_
 Widget for Toolbox.
 
QIcon * toolIcon_
 

Detailed Description

Definition at line 68 of file MeshRepairPlugin.hh.

Member Function Documentation

QString MeshRepairPlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 122 of file MeshRepairPlugin.hh.

void MeshRepairPlugin::detectFlatValence3Vertices ( int  _objectId,
double  _angle 
)
slot

Detect valence 3 vertices with faces that lie in the plane of their adjacent triangles.

Definition at line 60 of file VertexFunctions.cc.

void MeshRepairPlugin::detectFoldover ( int  _objectId,
float  _angle 
)
slot

Detect folded-over configurations by the dihedral angle.

Parameters
_objectIdId of the object
_angleMinimal dihedral angle that will be selected

Definition at line 263 of file EdgeFunctions.cc.

void MeshRepairPlugin::detectSkinnyTriangleByAngle ( int  _objectId,
double  _angle,
bool  _remove 
)
slot

Detect/Remove edges where neighboring faces form angle > _angle degrees.

Parameters
_objectIdId of the object
_angleminimal angle to detect
_removeDetect them or also remove them?

Definition at line 200 of file EdgeFunctions.cc.

void MeshRepairPlugin::detectTriangleAspect ( int  _objectId,
float  _aspect 
)
slot

Detect triangles with aspect ratio greater than _aspect and select them.

Parameters
_objectIdId of the object
_aspectMinimal aspect ratio to select

Definition at line 60 of file FaceFunctions.cc.

void MeshRepairPlugin::fixMesh ( int  _objectId,
double  _epsilon 
)
slot

Fix a mesh.

Degenerated faces will be removed and all vertices which are closer than the given distance will be collapsed. Non-manifold configurations at vertices will be removed and all faces of each component will be updated to have the same orientation.

Parameters
_objectIdId of the object to fix
_epsilonSnapping distance

Definition at line 116 of file GeneralMeshFixing.cc.

void MeshRepairPlugin::fixNonManifoldVertices ( int  _objectId)
slot

remove non-manifold vertices by duplicating them

Parameters
_objectIdId of the mesh to fix

Definition at line 88 of file GeneralMeshFixing.cc.

void MeshRepairPlugin::flipOrientation ( int  _objectId)
slot

Flips the normals of all selected faces by changing the vertex order.

Parameters
_objectIdId of the object

Definition at line 106 of file FaceFunctions.cc.

template<typename MeshT >
void MeshRepairPlugin::flipOrientation ( MeshT &  _mesh)
private

flip orientation of selected faces.

flips the orientation of selected faces or if nothing is selected, the whole mesh is flipped for correct topology, some vertices may be duplicated

Parameters
_meshtarget mesh

Definition at line 57 of file MeshRepairPluginT.cc.

QString MeshRepairPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 119 of file MeshRepairPlugin.hh.

void MeshRepairPlugin::pluginsInitialized ( )
privateslot

Initialization of the plugin when it is loaded by the core.

Definition at line 303 of file MeshRepairPlugin.cc.

void MeshRepairPlugin::removeSelectedEdges ( int  _objectId)
slot

Removes all selected edges.

Parameters
_objectIdId of the object

Definition at line 147 of file EdgeFunctions.cc.

void MeshRepairPlugin::selectEdgesLongerThan ( int  _objectId,
double  _length 
)
slot

Selects all edges of an object which are larger than the given length.

Parameters
_objectIdId of the object
_lengthMinimal edge length to select

Definition at line 67 of file EdgeFunctions.cc.

void MeshRepairPlugin::selectEdgesShorterThan ( int  _objectId,
double  _length 
)
slot

Selects all edges of an object which are shorter than the given length.

Parameters
_objectIdId of the object
_lengthmaximal edge length to select

Definition at line 59 of file EdgeFunctions.cc.

void MeshRepairPlugin::selectionEdgeLength ( int  _objectId,
double  _length,
bool  _larger 
)
private

select edges based on length

Selects edges if they are larger or shorter than a given length,

Parameters
_objectIdId of the object to select
_lengthLength
_largertrue : select larger edges, false select smaller edges

Definition at line 76 of file EdgeFunctions.cc.

void MeshRepairPlugin::snapBoundary ( int  _objectId,
double  _eps 
)
slot

Snaps selected vertices at boundaries.

Snaps selected boundary vertices together if they are closer than the given distance. No new vertices will be introduced on either edge, so they are just snapped to existing ones.

Parameters
_objectIdId of the object
_epsDistance of vertices to snap

Definition at line 61 of file GeneralMeshFixing.cc.

void MeshRepairPlugin::updateFaceNormals ( int  _objectId)
slot

Recomputes the face normals of an object.

Parameters
_objectIdId of the object

Definition at line 60 of file NormalFixing.cc.

void MeshRepairPlugin::updateHalfedgeNormals ( int  _objectId)
slot

Recomputes the halfedge normals of an object.

Parameters
_objectIdId of the object

Definition at line 89 of file NormalFixing.cc.

void MeshRepairPlugin::updateNormals ( int  _objectId)
slot

Recomputes the face and vertex normals of an object.

Parameters
_objectIdId of the object

Definition at line 148 of file NormalFixing.cc.

void MeshRepairPlugin::updateVertexNormals ( int  _objectId)
slot

Recomputes the vertex normals of an object.

Parameters
_objectIdId of the object

Definition at line 121 of file NormalFixing.cc.


The documentation for this class was generated from the following files: