+//=======================================================================
+// middlepath
+//=======================================================================
+static Standard_Integer middlepath(Draw_Interpretor& di,
+ Standard_Integer n, const char** a)
+{
+ if (n < 5) return 1;
+
+ TopoDS_Shape aShape = DBRep::Get(a[2]);
+ if (aShape.IsNull()) return 1;
+
+ TopoDS_Shape StartShape = DBRep::Get(a[3]);
+ if (StartShape.IsNull()) return 1;
+
+ TopoDS_Shape EndShape = DBRep::Get(a[4]);
+ if (EndShape.IsNull()) return 1;
+
+ BRepOffsetAPI_MiddlePath Builder(aShape, StartShape, EndShape);
+ Builder.Build();
+
+ TopoDS_Shape Result = Builder.Shape();
+ DBRep::Set(a[1], Result);
+
+ return 0;
+}
+