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
......@@ -42,9 +42,8 @@
#include <QtGui>
#include "AdvancedRemesherPlugin.hh"
#include "RemesherPlugin.hh"
// Flipper algorithms
#include "Algorithms/AdaptiveRemesherT.hh"
#include "Algorithms/UniformRemesherT.hh"
......@@ -60,7 +59,7 @@
// ----------------------------------------------------------------------------------------
AdvancedRemesherPlugin::AdvancedRemesherPlugin() :
RemesherPlugin::RemesherPlugin() :
progress_(0) {
progress_ = new ProgressEmitter();
......@@ -71,7 +70,7 @@ progress_(0) {
// ----------------------------------------------------------------------------------------
AdvancedRemesherPlugin::~AdvancedRemesherPlugin() {
RemesherPlugin::~RemesherPlugin() {
delete progress_;
}
......@@ -79,7 +78,7 @@ AdvancedRemesherPlugin::~AdvancedRemesherPlugin() {
// ----------------------------------------------------------------------------------------
/// Initialize the plugin
void AdvancedRemesherPlugin::pluginsInitialized(){
void RemesherPlugin::pluginsInitialized(){
emit setSlotDescription("adaptiveRemeshing(int,double,double,double,int,bool)", "Adaptive Remeshing",
QString("object_id,error,min_edge_length,max_edge_length,iterations,use_projection").split(","),
......@@ -92,9 +91,10 @@ void AdvancedRemesherPlugin::pluginsInitialized(){
// ----------------------------------------------------------------------------------------
/// init the Toolbox
void AdvancedRemesherPlugin::initializePlugin() {
void RemesherPlugin::initializePlugin() {
tool_ = new AdvancedRemesherToolBox();
if ( OpenFlipper::Options::gui() ) {
tool_ = new RemesherToolBox();
// Connect buttons
connect(tool_->adaptive_button, SIGNAL(clicked()), this, SLOT(adaptiveRemeshingButtonClicked()) );
......@@ -108,11 +108,12 @@ void AdvancedRemesherPlugin::initializePlugin() {
toolIcon_ = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"remesher.png");
emit addToolbox( tr("Remesher") , tool_ , toolIcon_);
}
}
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::threadFinished(QString _jobId) {
void RemesherPlugin::threadFinished(QString _jobId) {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS,DataType(DATA_TRIANGLE_MESH | DATA_POLY_MESH)) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) {
......@@ -126,7 +127,7 @@ void AdvancedRemesherPlugin::threadFinished(QString _jobId) {
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::computeInitValues() {
void RemesherPlugin::computeInitValues() {
if(OpenFlipper::Options::nogui()) return;
......@@ -214,7 +215,7 @@ void AdvancedRemesherPlugin::computeInitValues() {
// ----------------------- Adaptive Remeshing ---------------------------------------------
void AdvancedRemesherPlugin::adaptiveRemeshingButtonClicked() {
void RemesherPlugin::adaptiveRemeshingButtonClicked() {
QString jobId = name() + "AdaptiveRemeshing";
OpenFlipperThread* thread = new OpenFlipperThread(jobId);
......@@ -235,7 +236,7 @@ void AdvancedRemesherPlugin::adaptiveRemeshingButtonClicked() {
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::adaptiveRemeshing() {
void RemesherPlugin::adaptiveRemeshing() {
if(OpenFlipper::Options::nogui()) return;
......@@ -263,7 +264,7 @@ void AdvancedRemesherPlugin::adaptiveRemeshing() {
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::adaptiveRemeshing(int _objectID,
void RemesherPlugin::adaptiveRemeshing(int _objectID,
double _error,
double _min_edge_length,
double _max_edge_length,
......@@ -304,7 +305,7 @@ void AdvancedRemesherPlugin::adaptiveRemeshing(int _objectID,
// ----------------------- Uniform Remeshing ---------------------------------------------
void AdvancedRemesherPlugin::uniformRemeshingButtonClicked() {
void RemesherPlugin::uniformRemeshingButtonClicked() {
OpenFlipperThread* thread = new OpenFlipperThread(name() + "UniformRemeshing");
......@@ -322,7 +323,7 @@ void AdvancedRemesherPlugin::uniformRemeshingButtonClicked() {
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::uniformRemeshing(){
void RemesherPlugin::uniformRemeshing(){
if(OpenFlipper::Options::nogui()) return;
......@@ -358,7 +359,7 @@ void AdvancedRemesherPlugin::uniformRemeshing(){
// ----------------------------------------------------------------------------------------
void AdvancedRemesherPlugin::uniformRemeshing(int _objectID,
void RemesherPlugin::uniformRemeshing(int _objectID,
double _edge_length,
unsigned int _iters,
unsigned int _area_iters,
......@@ -398,5 +399,5 @@ void AdvancedRemesherPlugin::uniformRemeshing(int _objectID,
// ----------------------------------------------------------------------------------------
Q_EXPORT_PLUGIN2( advancedRemesherPlugin, AdvancedRemesherPlugin );
Q_EXPORT_PLUGIN2( remesherplugin, RemesherPlugin );
......@@ -56,10 +56,10 @@
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#include "AdvancedRemesherToolbox.hh"
#include "RemesherToolbox.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_INTERFACES(BaseInterface)
......@@ -112,16 +112,16 @@ private slots:
public :
AdvancedRemesherPlugin();
RemesherPlugin();
~AdvancedRemesherPlugin();
~RemesherPlugin();
QString name() { return (QString("AdvancedRemesher")); };
QString description( ) { return (QString("An advanced remesher plugin.")); };
QString name() { return (QString("Remesher")); };
QString description( ) { return (QString("Remeshing plugin with isotropic and adaptive remesher.")); };
//GUI
private :
AdvancedRemesherToolBox* tool_;
RemesherToolBox* tool_;
ProgressEmitter* progress_;
......
......@@ -40,16 +40,16 @@
* *
\*===========================================================================*/
#include "AdvancedRemesherToolbox.hh"
#include "RemesherToolbox.hh"
#include <QtGui>
AdvancedRemesherToolBox::AdvancedRemesherToolBox(QWidget *parent)
RemesherToolBox::RemesherToolBox(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
}
void AdvancedRemesherToolBox::showEvent ( QShowEvent * _event )
void RemesherToolBox::showEvent ( QShowEvent * _event )
{
QWidget::showEvent ( _event );
emit showing();
......
......@@ -44,7 +44,7 @@
#include <QtGui>
#include <iostream>
class AdvancedRemesherToolBox : public QWidget, public Ui::AdvancedRemesherTool
class RemesherToolBox : public QWidget, public Ui::RemesherTool
{
Q_OBJECT
......@@ -53,7 +53,7 @@ class AdvancedRemesherToolBox : public QWidget, public Ui::AdvancedRemesherTool
void showing();
public:
AdvancedRemesherToolBox(QWidget *parent = 0);
RemesherToolBox(QWidget *parent = 0);
protected:
void showEvent ( QShowEvent * _event );
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdvancedRemesherTool</class>
<widget class="QWidget" name="AdvancedRemesherTool">
<class>RemesherTool</class>
<widget class="QWidget" name="RemesherTool">
<property name="enabled">
<bool>true</bool>
</property>
......@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>303</width>
<height>331</height>
<width>377</width>
<height>257</height>
</rect>
</property>
<property name="windowTitle">
......@@ -74,6 +74,15 @@
</item>
<item row="6" column="1">
<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">
<string>Remesh</string>
</property>
......@@ -87,6 +96,15 @@
<height>16777215</height>
</size>
</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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -103,6 +121,15 @@
</item>
<item row="0" column="1">
<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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -122,6 +149,15 @@
</item>
<item row="1" column="1">
<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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -141,6 +177,15 @@
</item>
<item row="2" column="1">
<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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -160,13 +205,31 @@
</item>
<item row="4" column="1">
<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">
<string>Estimate Initial Values</string>
<string>Estimate parameters</string>
</property>
</widget>
</item>
<item row="5" column="1">
<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">
<enum>Qt::RightToLeft</enum>
</property>
......@@ -221,6 +284,15 @@
</item>
<item row="5" column="1">
<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">
<string>Remesh</string>
</property>
......@@ -256,6 +328,15 @@
<height>16777215</height>
</size>
</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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -272,6 +353,15 @@
</item>
<item row="0" column="1">
<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">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
......@@ -291,13 +381,31 @@
</item>
<item row="3" column="1">
<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">
<string>Estimate Initial Values</string>
<string>Estimate Parameters</string>
</property>
</widget>
</item>
<item row="4" column="1">
<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">
<enum>Qt::RightToLeft</enum>
</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