fixes #0001906: add Parameters isRelative, theAngDeflection of BRepMesh_IncrementalMesh in MeshFromShape Gui command
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "ui_Tessellation.h"
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <Gui/Application.h>
|
||||
@@ -248,9 +249,17 @@ bool Tessellation::accept()
|
||||
QString cmd;
|
||||
if (method == 0) { // Standard
|
||||
double devFace = ui->spinSurfaceDeviation->value().getValue();
|
||||
QString param = QString::fromLatin1("Shape=__doc__.getObject(\"%1\").Shape,LinearDeflection=%2")
|
||||
double devAngle = ui->spinAngularDeviation->value().getValue();
|
||||
devAngle = Base::toRadians<double>(devAngle);
|
||||
bool relative = ui->relativeDeviation->isChecked();
|
||||
QString param = QString::fromLatin1("Shape=__doc__.getObject(\"%1\").Shape, "
|
||||
"LinearDeflection=%2, "
|
||||
"AngularDeflection=%3, "
|
||||
"Relative=%4")
|
||||
.arg(shape)
|
||||
.arg(devFace);
|
||||
.arg(devFace)
|
||||
.arg(devAngle)
|
||||
.arg(relative ? QString::fromLatin1("True") : QString::fromLatin1("False"));
|
||||
if (ui->meshShapeColors->isChecked())
|
||||
param += QString::fromLatin1(",Segments=True");
|
||||
if (ui->groupsFaceColors->isChecked())
|
||||
|
||||
@@ -59,30 +59,17 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageStandard">
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>189</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelSurfaceDeviation">
|
||||
<property name="text">
|
||||
<string>Surface deviation:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="spinSurfaceDeviation">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
@@ -98,21 +85,67 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelAngularDeviation">
|
||||
<property name="text">
|
||||
<string>Angular deviation:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="spinAngularDeviation">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">deg</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>180.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>30.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="relativeDeviation">
|
||||
<property name="text">
|
||||
<string>Relative surface deviation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="meshShapeColors">
|
||||
<property name="text">
|
||||
<string>Apply face colors to mesh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="groupsFaceColors">
|
||||
<property name="text">
|
||||
<string>Define segments by face colors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="meshShapeColors">
|
||||
<property name="text">
|
||||
<string>Apply face colors to mesh</string>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>189</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user