Developer Documentation
MeshRepairPlugin Class Reference
Inheritance diagram for MeshRepairPlugin:
PythonInterface RPCInterface ScriptInterface LoggingInterface BackupInterface ToolboxInterface BaseInterface

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 Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

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 Member Functions inherited from PythonInterface
virtual ~PythonInterface ()
 Destructor.
 

Private Attributes

MeshRepairToolbarWidgettool_
 Widget for Toolbox.
 
QIcon * toolIcon_
 

Detailed Description

Definition at line 63 of file MeshRepairPlugin.hh.

Member Function Documentation

◆ description()

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 116 of file MeshRepairPlugin.hh.

◆ detectFlatValence3Vertices

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 51 of file VertexFunctions.cc.

◆ detectFoldover

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 252 of file EdgeFunctions.cc.

◆ detectSkinnyTriangleByAngle

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 189 of file EdgeFunctions.cc.

◆ detectTriangleAspect

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 52 of file FaceFunctions.cc.

◆ fixMesh

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 107 of file GeneralMeshFixing.cc.

◆ fixNonManifoldVertices

void MeshRepairPlugin::fixNonManifoldVertices ( int  _objectId)
slot

remove non-manifold vertices by duplicating them

Parameters
_objectIdId of the mesh to fix

Definition at line 79 of file GeneralMeshFixing.cc.

◆ flipOrientation [1/2]

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 98 of file FaceFunctions.cc.

◆ flipOrientation() [2/2]

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 51 of file MeshRepairPluginT_impl.hh.

◆ name()

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 113 of file MeshRepairPlugin.hh.

◆ pluginsInitialized

void MeshRepairPlugin::pluginsInitialized ( )
privateslot

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

Definition at line 290 of file MeshRepairPlugin.cc.

◆ removeSelectedEdges

void MeshRepairPlugin::removeSelectedEdges ( int  _objectId)
slot

Removes all selected edges.

Parameters
_objectIdId of the object

Definition at line 136 of file EdgeFunctions.cc.

◆ selectEdgesLongerThan

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 56 of file EdgeFunctions.cc.

◆ selectEdgesShorterThan

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 48 of file EdgeFunctions.cc.

◆ selectionEdgeLength()

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 65 of file EdgeFunctions.cc.

◆ snapBoundary

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 52 of file GeneralMeshFixing.cc.

◆ updateFaceNormals

void MeshRepairPlugin::updateFaceNormals ( int  _objectId)
slot

Recomputes the face normals of an object.

Parameters
_objectIdId of the object

Definition at line 53 of file NormalFixing.cc.

◆ updateHalfedgeNormals

void MeshRepairPlugin::updateHalfedgeNormals ( int  _objectId)
slot

Recomputes the halfedge normals of an object.

Parameters
_objectIdId of the object

Definition at line 82 of file NormalFixing.cc.

◆ updateNormals

void MeshRepairPlugin::updateNormals ( int  _objectId)
slot

Recomputes the face and vertex normals of an object.

Parameters
_objectIdId of the object

Definition at line 141 of file NormalFixing.cc.

◆ updateVertexNormals

void MeshRepairPlugin::updateVertexNormals ( int  _objectId)
slot

Recomputes the vertex normals of an object.

Parameters
_objectIdId of the object

Definition at line 114 of file NormalFixing.cc.


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