diff --git a/src/Mod/Surface/App/FeatureBSurf.cpp b/src/Mod/Surface/App/FeatureBSurf.cpp index 35f7d35fa1..b0cd9e81f3 100644 --- a/src/Mod/Surface/App/FeatureBSurf.cpp +++ b/src/Mod/Surface/App/FeatureBSurf.cpp @@ -106,7 +106,6 @@ void ShapeValidator::checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_W void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWD) { - try { // unwrap the wire if((!ts._Shape.IsNull()) && ts._Shape.ShapeType() == TopAbs_WIRE) diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index e3e9ab4373..12d9a776f9 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -198,8 +198,9 @@ void CmdSurfaceBSurf::createSurface(const char *surfaceNamePrefix, const char *c bspListCmd << "FreeCAD.ActiveDocument.ActiveObject.BoundaryList = ["; for (std::vector::iterator it = Sel.begin(); it != Sel.end(); ++it) { - Part::TopoShape ts = static_cast((*it).pObject)->Shape.getShape(); - bspListCmd << "(App.activeDocument()." << it->FeatName; + Gui::SelectionSingleton::SelObj selObj = *it; + Part::TopoShape ts = static_cast(selObj.pObject)->Shape.getShape(); + bspListCmd << "(App.activeDocument()." << selObj.FeatName; // if it is wire, add as wire if((!ts._Shape.IsNull()) && ts._Shape.ShapeType() == TopAbs_WIRE) { @@ -207,7 +208,15 @@ void CmdSurfaceBSurf::createSurface(const char *surfaceNamePrefix, const char *c } else { - bspListCmd << ", \'Edge1\'),"; + const char *subName = selObj.SubName; + if(subName != NULL && *subName != 0) + { + bspListCmd << ", \'" << subName << "\'),"; + } + else + { + bspListCmd << ", \'Edge1\'),"; + } } } bspListCmd << "]";