+ implement 'Reverse orientation' of sketch dialog
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5033 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
60e103c962
commit
445b981760
|
@ -57,16 +57,26 @@ int SketchOrientationDialog::exec()
|
|||
int res;
|
||||
if (res=dlg.exec()) {
|
||||
double offset = ui_SketchOrientationDialog.Offset_doubleSpinBox->value();
|
||||
if (ui_SketchOrientationDialog.XY_radioButton->isChecked() ){
|
||||
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation());
|
||||
bool reverse = ui_SketchOrientationDialog.Reverse_checkBox->isChecked();
|
||||
if (ui_SketchOrientationDialog.XY_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation(1.0,0.0,0.0,0.0));
|
||||
else
|
||||
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation());
|
||||
DirType = 0;
|
||||
}
|
||||
else if (ui_SketchOrientationDialog.XZ_radioButton->isChecked() ){
|
||||
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(Base::Vector3d(-1,0,0),1.5*M_PI));
|
||||
else if (ui_SketchOrientationDialog.XZ_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(Base::Vector3d(-1,0,0),0.5*M_PI));
|
||||
else
|
||||
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(Base::Vector3d(-1,0,0),1.5*M_PI));
|
||||
DirType = 1;
|
||||
}
|
||||
else if (ui_SketchOrientationDialog.YZ_radioButton->isChecked() ){
|
||||
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(0.5,0.5,0.5,0.5));
|
||||
else if (ui_SketchOrientationDialog.YZ_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(-0.5,0.5,0.5,-0.5));
|
||||
else
|
||||
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(0.5,0.5,0.5,0.5));
|
||||
DirType = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,9 +49,6 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="Reverse_checkBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reverse direction</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue
Block a user