simple bugfixes
This commit is contained in:
parent
68ee7f4f27
commit
620b2bb5d7
|
@ -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<SubNames.size(); ++i)
|
||||
Base::Console().Message("Subname: %s\n", SubNames[i].c_str());
|
||||
*/
|
||||
}
|
||||
|
||||
void Pipe::buildPipePath(const Part::TopoShape& shape, const std::vector< std::string >& subedge, TopoDS_Shape& path) {
|
||||
|
|
|
@ -145,13 +145,6 @@
|
|||
<item>
|
||||
<widget class="QListWidget" name="listWidgetReferences"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="tangent">
|
||||
<property name="text">
|
||||
<string>Extend to tangent edges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -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<std::string> strings = pipe->Spine.getSubValues();
|
||||
for (std::vector<std::string>::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<ViewProviderPipe*>(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<std::string> strings = pipe->AuxillerySpine.getSubValues();
|
||||
for (std::vector<std::string>::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<ViewProviderPipe*>(vp)->highlightReferences(false, true);
|
||||
|
@ -551,7 +552,7 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool newObj, QWidge
|
|||
PartDesign::Pipe* pipe = static_cast<PartDesign::Pipe*>(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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user