diff --git a/src/Mod/Part/App/PartFeatures.cpp b/src/Mod/Part/App/PartFeatures.cpp index 67e5e38c9..96014dfdd 100644 --- a/src/Mod/Part/App/PartFeatures.cpp +++ b/src/Mod/Part/App/PartFeatures.cpp @@ -189,7 +189,7 @@ App::DocumentObjectExecReturn *Loft::execute(void) profiles.Append(shape); } else { - return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge nor wire."); + return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge, wire nor face."); } } @@ -290,7 +290,11 @@ App::DocumentObjectExecReturn *Sweep::execute(void) // There is a weird behaviour of BRepOffsetAPI_MakePipeShell when trying to add the wire as is. // If we re-create the wire then everything works fine. // https://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=10&t=2673&sid=fbcd2ff4589f0b2f79ed899b0b990648#p20268 - if (shape.ShapeType() == TopAbs_WIRE) { + if (shape.ShapeType() == TopAbs_FACE) { + TopoDS_Wire faceouterWire = ShapeAnalysis::OuterWire(TopoDS::Face(shape)); + profiles.Append(faceouterWire); + } + else if (shape.ShapeType() == TopAbs_WIRE) { BRepBuilderAPI_MakeWire mkWire(TopoDS::Wire(shape)); profiles.Append(mkWire.Wire()); } @@ -302,7 +306,7 @@ App::DocumentObjectExecReturn *Sweep::execute(void) profiles.Append(shape); } else { - return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge nor wire."); + return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge, wire nor face."); } } diff --git a/src/Mod/Part/Gui/TaskLoft.cpp b/src/Mod/Part/Gui/TaskLoft.cpp index 876468a22..9fd33b247 100644 --- a/src/Mod/Part/Gui/TaskLoft.cpp +++ b/src/Mod/Part/Gui/TaskLoft.cpp @@ -69,7 +69,7 @@ LoftWidget::LoftWidget(QWidget* parent) Gui::Application::Instance->runPythonCode("import Part"); d->ui.setupUi(this); - d->ui.selector->setAvailableLabel(tr("Vertex/Wire/Face")); + d->ui.selector->setAvailableLabel(tr("Vertex/Edge/Wire/Face")); d->ui.selector->setSelectedLabel(tr("Loft")); connect(d->ui.selector->availableTreeWidget(), SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), @@ -188,7 +188,7 @@ void LoftWidget::changeEvent(QEvent *e) QWidget::changeEvent(e); if (e->type() == QEvent::LanguageChange) { d->ui.retranslateUi(this); - d->ui.selector->setAvailableLabel(tr("Vertex/Wire/Face")); + d->ui.selector->setAvailableLabel(tr("Vertex/Edge/Wire/Face")); d->ui.selector->setSelectedLabel(tr("Loft")); } } diff --git a/src/Mod/Part/Gui/TaskSweep.cpp b/src/Mod/Part/Gui/TaskSweep.cpp index 63839c514..9d0141ef3 100644 --- a/src/Mod/Part/Gui/TaskSweep.cpp +++ b/src/Mod/Part/Gui/TaskSweep.cpp @@ -70,7 +70,7 @@ SweepWidget::SweepWidget(QWidget* parent) Gui::Application::Instance->runPythonCode("import Part"); d->ui.setupUi(this); - d->ui.selector->setAvailableLabel(tr("Vertex/Wire")); + d->ui.selector->setAvailableLabel(tr("Vertex/Edge/Wire/Face")); d->ui.selector->setSelectedLabel(tr("Sweep")); connect(d->ui.selector->availableTreeWidget(), SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), @@ -99,7 +99,8 @@ void SweepWidget::findShapes() const TopoDS_Shape& shape = (*it)->Shape.getValue(); if (shape.IsNull()) continue; - if (shape.ShapeType() == TopAbs_WIRE || + if (shape.ShapeType() == TopAbs_FACE || + shape.ShapeType() == TopAbs_WIRE || shape.ShapeType() == TopAbs_EDGE || shape.ShapeType() == TopAbs_VERTEX) { QString label = QString::fromUtf8((*it)->Label.getValue());