- } else if(aBaseShapeType == GeomAPI_Shape::FACE) {
- if(aSubShape->shapeType() == GeomAPI_Shape::WIRE
- && aSubShape->orientation() != GeomAPI_Shape::INTERNAL) {
- GeomAlgoAPI_ShapeBuilder::add(aResultShape, aSubShape);
+ }
+ this->appendAlgo(aMakeShapeCustom);
+ } else if(aBaseShapeType == GeomAPI_Shape::FACE) {
+ const TopoDS_Shape& aBaseShape = theShape->impl<TopoDS_Shape>();
+ BRepBuilderAPI_Copy* aCopyBuilder = new BRepBuilderAPI_Copy(aBaseShape);
+ this->appendAlgo(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aCopyBuilder)));
+ if(!aCopyBuilder->IsDone()) {
+ return;
+ }
+ TopoDS_Shape aShape = aCopyBuilder->Shape();
+ TopoDS_Shape aShapeCopy = aShape.EmptyCopied();
+ BRep_Builder aBuilder;
+ for(TopoDS_Iterator anIt(aShape); anIt.More(); anIt.Next()) {
+ const TopoDS_Shape& aSubShape = anIt.Value();
+ if(aSubShape.ShapeType() == TopAbs_WIRE
+ && aSubShape.Orientation() != TopAbs_INTERNAL) {
+ aBuilder.Add(aShapeCopy, aSubShape);