remove linear and S-shape scaling from pipe
They worked and are nice feature, but the handling with properties must be worked out better. To avoid any incompatibility due to property changes the functionality is removed now.
This commit is contained in:
@@ -91,7 +91,6 @@ Pipe::Pipe()
|
||||
ADD_PROPERTY_TYPE(Binormal,(Base::Vector3d()),"Sweep",App::Prop_None,"Binormal vector for coresponding orientation mode");
|
||||
ADD_PROPERTY_TYPE(Transition,(long(0)),"Sweep",App::Prop_None,"Transition mode");
|
||||
ADD_PROPERTY_TYPE(Transformation,(long(0)),"Sweep",App::Prop_None,"Section transformation mode");
|
||||
ADD_PROPERTY_TYPE(ScalingData, (), "Sweep", App::Prop_None, "Data for scaling laws");
|
||||
Mode.setEnums(ModeEnums);
|
||||
Transition.setEnums(TransitionEnums);
|
||||
Transformation.setEnums(TransformEnums);
|
||||
@@ -195,7 +194,7 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
|
||||
|
||||
}
|
||||
}
|
||||
//build the law functions instead
|
||||
/*//build the law functions instead
|
||||
else if(Transformation.getValue() == 2) {
|
||||
if(ScalingData.getValues().size()<1)
|
||||
return new App::DocumentObjectExecReturn("No valid data given for liinear scaling mode");
|
||||
@@ -207,13 +206,13 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
|
||||
}
|
||||
else if(Transformation.getValue() == 3) {
|
||||
if(ScalingData.getValues().size()<1)
|
||||
return new App::DocumentObjectExecReturn("No valid data given for liinear scaling mode");
|
||||
return new App::DocumentObjectExecReturn("No valid data given for S-shape scaling mode");
|
||||
|
||||
Handle(Law_S) s = new Law_S();
|
||||
s->Set(0,1,ScalingData[0].y, 1, ScalingData[0].x, ScalingData[0].z);
|
||||
|
||||
scalinglaw = s;
|
||||
}
|
||||
}*/
|
||||
|
||||
//build all shells
|
||||
std::vector<TopoDS_Shape> shells;
|
||||
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
App::PropertyEnumeration Transition;
|
||||
App::PropertyEnumeration Transformation;
|
||||
App::PropertyLinkList Sections;
|
||||
App::PropertyVectorList ScalingData;
|
||||
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
|
||||
@@ -542,14 +542,6 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool newObj, QWidge
|
||||
this, SLOT(onButtonRefRemove(bool)));
|
||||
connect(ui->stackedWidget, SIGNAL(currentChanged(int)),
|
||||
this, SLOT(updateUI(int)));
|
||||
connect(ui->linearSpinBox, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onLinearSpinBox(double)));
|
||||
connect(ui->sshapeSpinBox, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onSshapeChanged(double)));
|
||||
connect(ui->sshapeStartDeriSpinBox, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onSshapeChanged(double)));
|
||||
connect(ui->sshapeEndDeriSpinBox, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onSshapeChanged(double)));
|
||||
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
@@ -597,11 +589,6 @@ void TaskPipeScaling::onScalingChanged(int idx) {
|
||||
|
||||
updateUI(idx);
|
||||
static_cast<PartDesign::Pipe*>(vp->getObject())->Transformation.setValue(idx);
|
||||
|
||||
if(idx==2)
|
||||
onLinearSpinBox(ui->linearSpinBox->value());
|
||||
else if(idx==3)
|
||||
onSshapeChanged(0);
|
||||
}
|
||||
|
||||
void TaskPipeScaling::onSelectionChanged(const SelectionChanges& msg) {
|
||||
@@ -691,23 +678,6 @@ void TaskPipeScaling::updateUI(int idx) {
|
||||
ui->stackedWidget->widget(idx)->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
|
||||
void TaskPipeScaling::onLinearSpinBox(double val) {
|
||||
|
||||
static_cast<PartDesign::Pipe*>(vp->getObject())->ScalingData.setValue(Base::Vector3d(val,0,0));
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskPipeScaling::onSshapeChanged(double val) {
|
||||
|
||||
double f, d0, d1;
|
||||
f = ui->sshapeSpinBox->value();
|
||||
d0 = ui->sshapeStartDeriSpinBox->value();
|
||||
d1 = ui->sshapeEndDeriSpinBox->value();
|
||||
static_cast<PartDesign::Pipe*>(vp->getObject())->ScalingData.setValue(Base::Vector3d(f, d0, d1));
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
//**************************************************************************
|
||||
|
||||
@@ -138,8 +138,6 @@ private Q_SLOTS:
|
||||
void onButtonRefAdd(bool checked);
|
||||
void onButtonRefRemove(bool checked);
|
||||
void updateUI(int idx);
|
||||
void onLinearSpinBox(double val);
|
||||
void onSshapeChanged(double val);
|
||||
|
||||
protected:
|
||||
enum selectionModes { none, refAdd, refRemove };
|
||||
|
||||
@@ -41,16 +41,6 @@
|
||||
<string>Multisection</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Linear</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>S-Shape</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -58,7 +48,7 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="constant"/>
|
||||
<widget class="QWidget" name="multisection">
|
||||
@@ -111,117 +101,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="linear">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Final scaling factor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="linearSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>99999.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="sshape">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Scaling factor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="sshapeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9999.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Derivative at start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="sshapeStartDeriSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Derivative at end</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="sshapeEndDeriSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-99.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user