Commit 12ed56e4 authored by David Bommes's avatar David Bommes
Browse files

added dihedral angle threshold for edge selection

parent e55c15a8
......@@ -141,6 +141,8 @@ void SelectionBasePlugin::initializePlugin() {
connect(tool_->loadSelection, SIGNAL(clicked()), this, SLOT(slotLoadSelectionButton()));
connect(tool_->saveSelection, SIGNAL(clicked()), this, SLOT(slotSaveSelectionButton()));
connect(tool_->minDihedralAngle, SIGNAL(valueChanged(double)), this, SLOT(slotMinDihedralAngleChanged(double)));
// Add toolbox to OpenFlipper main window
toolIcon_ = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"selection_base.png");
emit addToolbox("Selections", tool_, toolIcon_ );
......@@ -727,6 +729,13 @@ void SelectionBasePlugin::updateActivePrimitiveTypes(bool _checked) {
//============================================================================================
void SelectionBasePlugin::slotMinDihedralAngleChanged(double _angle)
{
OpenFlipperQSettings().setValue("SelectionBasePlugin/MinDihedralAngle", double(_angle/180.0*M_PI));
}
//============================================================================================
void SelectionBasePlugin::setSelectionMetaphor(QString _metaphor) {
if (_metaphor == SB_TOGGLE)
toggleSelectionAction_->trigger();
......
......@@ -226,6 +226,8 @@ Q_INTERFACES(SelectionInterface)
void updateActivePrimitiveTypes(bool _checked);
void slotMinDihedralAngleChanged(double _angle);
public slots:
QString version() { return QString("1.0"); };
......
......@@ -101,6 +101,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Flood Fill</string>
......@@ -131,6 +134,39 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Edge Selection</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Select Above Dihedral Angle:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="minDihedralAngle">
<property name="toolTip">
<string>Maximum angle between faces that get flood filled</string>
</property>
<property name="statusTip">
<string>Maximum angle between faces that get flood filled</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="maximum">
<double>180.000000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
......
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