Commit d35fa0c2 authored by Jan Möbius's avatar Jan Möbius

Renamed to remesher, tooltips, scriptinfo, indentation

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12768 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c04fe637
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,10 @@
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh> #include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh> #include <ObjectTypes/PolyMesh/PolyMesh.hh>
#include "AdvancedRemesherToolbox.hh" #include "RemesherToolbox.hh"
#include "ProgressEmitter.hh" #include "ProgressEmitter.hh"
class AdvancedRemesherPlugin : public QObject, BaseInterface, BackupInterface, ToolboxInterface, LoggingInterface, RPCInterface, ProcessInterface, ScriptInterface class RemesherPlugin : public QObject, BaseInterface, BackupInterface, ToolboxInterface, LoggingInterface, RPCInterface, ProcessInterface, ScriptInterface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(BaseInterface) Q_INTERFACES(BaseInterface)
...@@ -73,102 +73,102 @@ Q_INTERFACES(ScriptInterface) ...@@ -73,102 +73,102 @@ Q_INTERFACES(ScriptInterface)
signals: signals:
//BaseInterface //BaseInterface
void updateView(); void updateView();
void updatedObject(int _id, const UpdateType _type); void updatedObject(int _id, const UpdateType _type);
void setSlotDescription(QString _slotName, QString _slotDescription, void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions); QStringList _parameters, QStringList _descriptions);
//LoggingInterface: //LoggingInterface:
void log( Logtype _type, QString _message ); void log( Logtype _type, QString _message );
void log( QString _message ); void log( QString _message );
// RPC Interface // RPC Interface
void pluginExists( QString _pluginName , bool& _exists ) ; void pluginExists( QString _pluginName , bool& _exists ) ;
void functionExists( QString _pluginName , QString _functionName , bool& _exists ); void functionExists( QString _pluginName , QString _functionName , bool& _exists );
// ToolboxInterface // ToolboxInterface
void addToolbox( QString _name , QWidget* _widget, QIcon* _icon ); void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
// ProcessInterface // ProcessInterface
void startJob( QString _jobId, QString _description, int _min, int _max, bool _blocking = false); void startJob( QString _jobId, QString _description, int _min, int _max, bool _blocking = false);
void setJobState(QString _jobId, int _value); void setJobState(QString _jobId, int _value);
void setJobName(QString _jobId, QString _name); void setJobName(QString _jobId, QString _name);
void finishJob(QString _jobId); void finishJob(QString _jobId);
void setJobDescription(QString _jobId, QString _description); void setJobDescription(QString _jobId, QString _description);
// BackupInterface // BackupInterface
void createBackup(int _id , QString _name, UpdateType _type = UPDATE_ALL); void createBackup(int _id , QString _name, UpdateType _type = UPDATE_ALL);
// ScriptInterface // ScriptInterface
void scriptInfo(QString _functionName); void scriptInfo(QString _functionName);
private slots: private slots:
// BaseInterface // BaseInterface
void initializePlugin(); void initializePlugin();
void pluginsInitialized(); // BaseInterface void pluginsInitialized(); // BaseInterface
public : public :
AdvancedRemesherPlugin(); RemesherPlugin();
~AdvancedRemesherPlugin(); ~RemesherPlugin();
QString name() { return (QString("AdvancedRemesher")); }; QString name() { return (QString("Remesher")); };
QString description( ) { return (QString("An advanced remesher plugin.")); }; QString description( ) { return (QString("Remeshing plugin with isotropic and adaptive remesher.")); };
//GUI //GUI
private : private :
AdvancedRemesherToolBox* tool_; RemesherToolBox* tool_;
ProgressEmitter* progress_; ProgressEmitter* progress_;
QIcon* toolIcon_; QIcon* toolIcon_;
private slots: private slots:
//---- Adaptive Remeshing ------------ //---- Adaptive Remeshing ------------
void adaptiveRemeshingButtonClicked(); void adaptiveRemeshingButtonClicked();
void adaptiveRemeshing(); void adaptiveRemeshing();
//---- Adaptive Remeshing ------------ //---- Adaptive Remeshing ------------
void uniformRemeshingButtonClicked(); void uniformRemeshingButtonClicked();
void uniformRemeshing(); void uniformRemeshing();
//------------------------------------ //------------------------------------
void threadFinished(QString _jobId); void threadFinished(QString _jobId);
//------------------------------------ //------------------------------------
/// Compute mean edge length and set values /// Compute mean edge length and set values
void computeInitValues(); void computeInitValues();
//scripting functions //scripting functions
public slots: public slots:
void adaptiveRemeshing(int _objectId, void adaptiveRemeshing(int _objectId,
double _error, double _error,
double _min_edge_length, double _min_edge_length,
double _max_edge_length, double _max_edge_length,
unsigned int _iters, unsigned int _iters,
bool _use_projection = true); bool _use_projection = true);
void uniformRemeshing(int _objectId, void uniformRemeshing(int _objectId,
double _edge_length, double _edge_length,
unsigned int _iters, unsigned int _iters,
unsigned int _area_iters, unsigned int _area_iters,
bool _use_projection = true); bool _use_projection = true);
public slots: public slots:
QString version() { return QString("1.0"); }; QString version() { return QString("1.0"); };
}; };
#endif //ADVANCEDREMESHERPLUGIN_HH #endif //ADVANCEDREMESHERPLUGIN_HH
...@@ -40,16 +40,16 @@ ...@@ -40,16 +40,16 @@
* * * *
\*===========================================================================*/ \*===========================================================================*/
#include "AdvancedRemesherToolbox.hh" #include "RemesherToolbox.hh"
#include <QtGui> #include <QtGui>
AdvancedRemesherToolBox::AdvancedRemesherToolBox(QWidget *parent) RemesherToolBox::RemesherToolBox(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
setupUi(this); setupUi(this);
} }
void AdvancedRemesherToolBox::showEvent ( QShowEvent * _event ) void RemesherToolBox::showEvent ( QShowEvent * _event )
{ {
QWidget::showEvent ( _event ); QWidget::showEvent ( _event );
emit showing(); emit showing();
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include <QtGui> #include <QtGui>
#include <iostream> #include <iostream>
class AdvancedRemesherToolBox : public QWidget, public Ui::AdvancedRemesherTool class RemesherToolBox : public QWidget, public Ui::RemesherTool
{ {
Q_OBJECT Q_OBJECT
...@@ -53,7 +53,7 @@ class AdvancedRemesherToolBox : public QWidget, public Ui::AdvancedRemesherTool ...@@ -53,7 +53,7 @@ class AdvancedRemesherToolBox : public QWidget, public Ui::AdvancedRemesherTool
void showing(); void showing();
public: public:
AdvancedRemesherToolBox(QWidget *parent = 0); RemesherToolBox(QWidget *parent = 0);
protected: protected:
void showEvent ( QShowEvent * _event ); void showEvent ( QShowEvent * _event );
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>AdvancedRemesherTool</class> <class>RemesherTool</class>
<widget class="QWidget" name="AdvancedRemesherTool"> <widget class="QWidget" name="RemesherTool">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>303</width> <width>377</width>
<height>331</height> <height>257</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -74,6 +74,15 @@ ...@@ -74,6 +74,15 @@
</item> </item>
<item row="6" column="1"> <item row="6" column="1">
<widget class="QPushButton" name="adaptive_button"> <widget class="QPushButton" name="adaptive_button">
<property name="toolTip">
<string>Start remeshing</string>
</property>
<property name="statusTip">
<string>Start remeshing</string>
</property>
<property name="whatsThis">
<string>Start remeshing</string>
</property>
<property name="text"> <property name="text">
<string>Remesh</string> <string>Remesh</string>
</property> </property>
...@@ -87,6 +96,15 @@ ...@@ -87,6 +96,15 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Number of iterations</string>
</property>
<property name="statusTip">
<string>Number of iterations</string>
</property>
<property name="whatsThis">
<string>Number of iterations</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -103,6 +121,15 @@ ...@@ -103,6 +121,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QDoubleSpinBox" name="adaptive_error"> <widget class="QDoubleSpinBox" name="adaptive_error">
<property name="toolTip">
<string>Maximal allowedd deviation from the original surface</string>
</property>
<property name="statusTip">
<string>Maximal allowedd deviation from the original surface</string>
</property>
<property name="whatsThis">
<string>Maximal allowedd deviation from the original surface</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -122,6 +149,15 @@ ...@@ -122,6 +149,15 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QDoubleSpinBox" name="adaptive_min_edge"> <widget class="QDoubleSpinBox" name="adaptive_min_edge">
<property name="toolTip">
<string>Minimal ede length of the resulting mesh</string>
</property>
<property name="statusTip">
<string>Minimal ede length of the resulting mesh</string>
</property>
<property name="whatsThis">
<string>Minimal ede length of the resulting mesh</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -141,6 +177,15 @@ ...@@ -141,6 +177,15 @@
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QDoubleSpinBox" name="adaptive_max_edge"> <widget class="QDoubleSpinBox" name="adaptive_max_edge">
<property name="toolTip">
<string>Maximum ede length of the resulting mesh</string>
</property>
<property name="statusTip">
<string>Maximum ede length of the resulting mesh</string>
</property>
<property name="whatsThis">
<string>Maximum ede length of the resulting mesh</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -160,13 +205,31 @@ ...@@ -160,13 +205,31 @@
</item> </item>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QPushButton" name="adaptive_initial_values"> <widget class="QPushButton" name="adaptive_initial_values">
<property name="toolTip">
<string>Estimate good parameters for error and edge lengths</string>
</property>
<property name="statusTip">
<string>Estimate good parameters for error and edge lengths</string>
</property>
<property name="whatsThis">
<string>Estimate good parameters for error and edge lengths</string>
</property>
<property name="text"> <property name="text">
<string>Estimate Initial Values</string> <string>Estimate parameters</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="5" column="1">
<widget class="QCheckBox" name="adaptive_projection"> <widget class="QCheckBox" name="adaptive_projection">
<property name="toolTip">
<string>Project new vertices onto surface</string>
</property>
<property name="statusTip">
<string>Project new vertices onto surface</string>
</property>
<property name="whatsThis">
<string>Project new vertices onto surface</string>
</property>
<property name="layoutDirection"> <property name="layoutDirection">
<enum>Qt::RightToLeft</enum> <enum>Qt::RightToLeft</enum>
</property> </property>
...@@ -221,6 +284,15 @@ ...@@ -221,6 +284,15 @@
</item> </item>
<item row="5" column="1"> <item row="5" column="1">
<widget class="QPushButton" name="uniform_button"> <widget class="QPushButton" name="uniform_button">
<property name="toolTip">
<string>Start remeshing</string>
</property>
<property name="statusTip">
<string>Start remeshing</string>
</property>
<property name="whatsThis">
<string>Start remeshing</string>
</property>
<property name="text"> <property name="text">
<string>Remesh</string> <string>Remesh</string>
</property> </property>
...@@ -256,6 +328,15 @@ ...@@ -256,6 +328,15 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Number of iterations for the algorithm</string>
</property>
<property name="statusTip">
<string>Number of iterations for the algorithm</string>
</property>
<property name="whatsThis">
<string>Number of iterations for the algorithm</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -272,6 +353,15 @@ ...@@ -272,6 +353,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QDoubleSpinBox" name="uniform_edge_length"> <widget class="QDoubleSpinBox" name="uniform_edge_length">
<property name="toolTip">
<string>Average edge length of the resulting mesh</string>
</property>
<property name="statusTip">
<string>Average edge length of the resulting mesh</string>
</property>
<property name="whatsThis">
<string>Average edge length of the resulting mesh</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
...@@ -291,13 +381,31 @@ ...@@ -291,13 +381,31 @@
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QPushButton" name="uniform_initial_values"> <widget class="QPushButton" name="uniform_initial_values">
<property name="toolTip">
<string>Estimate good parameters for edge lengths</string>
</property>
<property name="statusTip">
<string>Estimate good parameters for edge lengths</string>
</property>
<property name="whatsThis">
<string>Estimate good parameters for edge lengths</string>
</property>
<property name="text"> <property name="text">
<string>Estimate Initial Values</string> <string>Estimate Parameters</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QCheckBox" name="uniform_projection"> <widget class="QCheckBox" name="uniform_projection">
<property name="toolTip">
<string>Project new vertices onto surface</string>
</property>
<property name="statusTip">
<string>Project new vertices onto surface</string>
</property>
<property name="whatsThis">
<string>Project new vertices onto surface</string>
</property>
<property name="layoutDirection"> <property name="layoutDirection">
<enum>Qt::RightToLeft</enum> <enum>Qt::RightToLeft</enum>
</property> </property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment