diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 91679d184..3f5a80f44 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -350,24 +350,22 @@ void Pipe::setupAlgorithm(BRepOffsetAPI_MakePipeShell& mkPipeShell, TopoDS_Shape break; case 3: auxillery = true; + break; case 4: mkPipeShell.SetMode(gp_Dir(bVec.x,bVec.y,bVec.z)); break; } - if(auxillery) { - - if(Transformation.getValue()!=2) + if(auxillery) { mkPipeShell.SetMode(TopoDS::Wire(auxshape), AuxilleryCurvelinear.getValue()); - else - mkPipeShell.SetMode(TopoDS::Wire(auxshape), AuxilleryCurvelinear.getValue(), BRepFill_ContactOnBorder); + //mkPipeShell.SetMode(TopoDS::Wire(auxshape), AuxilleryCurvelinear.getValue(), BRepFill_ContactOnBorder); } } void Pipe::getContiniusEdges(Part::TopoShape TopShape, std::vector< std::string >& SubNames) { - + /* TopTools_IndexedMapOfShape mapOfEdges; TopTools_IndexedDataMapOfShapeListOfShape mapEdgeEdge; TopExp::MapShapesAndAncestors(TopShape._Shape, TopAbs_EDGE, TopAbs_EDGE, mapEdgeEdge); @@ -413,6 +411,7 @@ void Pipe::getContiniusEdges(Part::TopoShape TopShape, std::vector< std::string Base::Console().Message("Final edges:\n"); for(int i=0; i& subedge, TopoDS_Shape& path) { diff --git a/src/Mod/PartDesign/Gui/TaskPipeOrientation.ui b/src/Mod/PartDesign/Gui/TaskPipeOrientation.ui index 1d42821e6..c2513d773 100644 --- a/src/Mod/PartDesign/Gui/TaskPipeOrientation.ui +++ b/src/Mod/PartDesign/Gui/TaskPipeOrientation.ui @@ -145,13 +145,6 @@ - - - - Extend to tangent edges - - - diff --git a/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp b/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp index 525d2a4e5..5964ea35b 100644 --- a/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp @@ -99,6 +99,8 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView,bool newObj, Q } //add initial values + if(pipe->Spine.getValue()) + ui->profileBaseEdit->setText(QString::fromUtf8(pipe->Spine.getValue()->getNameInDocument())); std::vector strings = pipe->Spine.getSubValues(); for (std::vector::const_iterator i = strings.begin(); i != strings.end(); i++) ui->listWidgetReferences->addItem(QString::fromStdString(*i)); @@ -131,13 +133,13 @@ void TaskPipeParameters::onSelectionChanged(const Gui::SelectionChanges& msg) else if (selectionMode == refRemove) { QString sub = QString::fromStdString(msg.pSubName); if(!sub.isEmpty()) - removeFromListWidget(ui->listWidgetReferences, QString::fromAscii(msg.pSubName)); + removeFromListWidget(ui->listWidgetReferences, QString::fromUtf8(msg.pSubName)); else { ui->profileBaseEdit->clear(); } } else if(selectionMode == refObjAdd) { ui->listWidgetReferences->clear(); - ui->profileBaseEdit->setText(QString::fromAscii(msg.pObjectName)); + ui->profileBaseEdit->setText(QString::fromUtf8(msg.pObjectName)); } clearButtons(); static_cast(vp)->highlightReferences(false, false); @@ -302,8 +304,6 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool newObj this, SLOT(onButtonRefAdd(bool))); connect(ui->buttonRefRemove, SIGNAL(toggled(bool)), this, SLOT(onButtonRefRemove(bool))); - connect(ui->tangent, SIGNAL(toggled(bool)), - this, SLOT(onTangentChanged(bool))); connect(ui->buttonProfileBase, SIGNAL(toggled(bool)), this, SLOT(onBaseButton(bool))); connect(ui->stackedWidget, SIGNAL(currentChanged(int)), @@ -331,15 +331,16 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool newObj } //add initial values + if(pipe->AuxillerySpine.getValue()) + ui->profileBaseEdit->setText(QString::fromUtf8(pipe->AuxillerySpine.getValue()->getNameInDocument())); std::vector strings = pipe->AuxillerySpine.getSubValues(); for (std::vector::const_iterator i = strings.begin(); i != strings.end(); i++) ui->listWidgetReferences->addItem(QString::fromStdString(*i)); ui->comboBoxMode->setCurrentIndex(pipe->Mode.getValue()); - ui->tangent->setChecked(pipe->AuxillerySpineTangent.getValue()); ui->curvelinear->setChecked(pipe->AuxilleryCurvelinear.getValue()); - updateUI(0); + updateUI(pipe->Mode.getValue()); } TaskPipeOrientation::~TaskPipeOrientation() { @@ -442,13 +443,13 @@ void TaskPipeOrientation::onSelectionChanged(const SelectionChanges& msg) { else if (selectionMode == refRemove) { QString sub = QString::fromStdString(msg.pSubName); if(!sub.isEmpty()) - removeFromListWidget(ui->listWidgetReferences, QString::fromAscii(msg.pSubName)); + removeFromListWidget(ui->listWidgetReferences, QString::fromUtf8(msg.pSubName)); else { ui->profileBaseEdit->clear(); } } else if(selectionMode == refObjAdd) { ui->listWidgetReferences->clear(); - ui->profileBaseEdit->setText(QString::fromAscii(msg.pObjectName)); + ui->profileBaseEdit->setText(QString::fromUtf8(msg.pObjectName)); } clearButtons(); static_cast(vp)->highlightReferences(false, true); @@ -551,7 +552,7 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool newObj, QWidge PartDesign::Pipe* pipe = static_cast(PipeView->getObject()); ui->comboBoxScaling->setCurrentIndex(pipe->Transformation.getValue()); - updateUI(0); + updateUI(pipe->Mode.getValue()); } TaskPipeScaling::~TaskPipeScaling() { @@ -735,7 +736,7 @@ bool TaskDlgPipeParameters::accept() Gui::Command::commitCommand(); } catch (const Base::Exception& e) { - QMessageBox::warning(parameter, tr("Input error"), QString::fromAscii(e.what())); + QMessageBox::warning(parameter, tr("Input error"), QString::fromUtf8(e.what())); return false; }