+ if (aShapeBase.ShapeType() == TopAbs_EDGE ||
+ aShapeBase.ShapeType() == TopAbs_WIRE)
+ {
+ TopoDS_Wire Profile;
+ if (aShapeBase.ShapeType() == TopAbs_WIRE)
+ Profile = TopoDS::Wire(aShapeBase);
+ else
+ {
+ BRep_Builder BB;
+ BB.MakeWire(Profile);
+ BB.Add(Profile, aShapeBase);
+ }
+
+ BRepOffsetAPI_MakePipeShell Sweep (aWirePath);
+ BRepBuilderAPI_MakeFace FaceBuilder (aWirePath, Standard_True); //to find the plane of spine
+ if (FaceBuilder.IsDone())
+ Sweep.SetMode(FaceBuilder.Face());
+ Sweep.Add(Profile);
+ Sweep.Build();
+
+ if (!Sweep.IsDone())
+ {
+ if (aCI) delete aCI;
+ Standard_ConstructionError::Raise("MakePipeShell failed");
+ }
+ else
+ aShape = Sweep.Shape(); //result is good
+
+ }
+ else
+ aShape = BRepOffsetAPI_MakePipe(aWirePath, aShapeBase);