--- /dev/null
+--- OCCT-6.7.1_SRC/inc/BRepFill_PipeShell.hxx 2014-04-30 14:16:07.000000000 +0400
++++ cr24985/inc/BRepFill_PipeShell.hxx 2014-06-30 14:46:17.000000000 +0400
+@@ -31,6 +31,9 @@
+ #ifndef _Standard_Real_HeaderFile
+ #include <Standard_Real.hxx>
+ #endif
++#ifndef _Standard_Integer_HeaderFile
++#include <Standard_Integer.hxx>
++#endif
+ #ifndef _Standard_Boolean_HeaderFile
+ #include <Standard_Boolean.hxx>
+ #endif
+@@ -61,9 +64,6 @@
+ #ifndef _BRepFill_TypeOfContact_HeaderFile
+ #include <BRepFill_TypeOfContact.hxx>
+ #endif
+-#ifndef _Standard_Integer_HeaderFile
+-#include <Standard_Integer.hxx>
+-#endif
+ class Law_Function;
+ class BRepFill_LocationLaw;
+ class BRepFill_SectionLaw;
+@@ -127,6 +127,11 @@
+ //! becomes a boundary of the swept surface and the width of section varies <br>
+ //! along the path. <br>
+ Standard_EXPORT void Set(const TopoDS_Wire& AuxiliarySpine,const Standard_Boolean CurvilinearEquivalence = Standard_True,const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact) ;
++ //! Define the maximum V degree of resulting surface <br>
++ Standard_EXPORT void SetMaxDegree(const Standard_Integer NewMaxDegree) ;
++ //! Define the maximum number of spans in V-direction <br>
++//! on resulting surface <br>
++ Standard_EXPORT void SetMaxSegments(const Standard_Integer NewMaxSegments) ;
+ //! Set the flag that indicates attempt to approximate <br>
+ //! a C1-continuous surface if a swept surface proved <br>
+ //! to be C0. <br>//! Give section to sweep. <br>
+@@ -212,6 +217,8 @@
+ Standard_Real myTolAngular;
+ Standard_Real angmin;
+ Standard_Real angmax;
++Standard_Integer myMaxDegree;
++Standard_Integer myMaxSegments;
+ Standard_Boolean myForceApproxC1;
+ Handle_Law_Function myLaw;
+ Standard_Boolean myIsAutomaticLaw;
+--- OCCT-6.7.1_SRC/inc/BRepOffsetAPI_MakePipeShell.hxx 2014-04-30 14:16:14.000000000 +0400
++++ cr24985/inc/BRepOffsetAPI_MakePipeShell.hxx 2014-06-30 14:46:24.000000000 +0400
+@@ -37,12 +37,12 @@
+ #ifndef _Standard_Real_HeaderFile
+ #include <Standard_Real.hxx>
+ #endif
+-#ifndef _BRepBuilderAPI_TransitionMode_HeaderFile
+-#include <BRepBuilderAPI_TransitionMode.hxx>
+-#endif
+ #ifndef _Standard_Integer_HeaderFile
+ #include <Standard_Integer.hxx>
+ #endif
++#ifndef _BRepBuilderAPI_TransitionMode_HeaderFile
++#include <BRepBuilderAPI_TransitionMode.hxx>
++#endif
+ class BRepFill_PipeShell;
+ class Standard_DomainError;
+ class StdFail_NotDone;
+@@ -177,6 +177,11 @@
+ //! - boundary tolerance BoundTol <br>
+ //! - angular tolerance TolAngular. <br>
+ Standard_EXPORT void SetTolerance(const Standard_Real Tol3d = 1.0e-4,const Standard_Real BoundTol = 1.0e-4,const Standard_Real TolAngular = 1.0e-2) ;
++ //! Define the maximum V degree of resulting surface <br>
++ Standard_EXPORT void SetMaxDegree(const Standard_Integer NewMaxDegree) ;
++ //! Define the maximum number of spans in V-direction <br>
++//! on resulting surface <br>
++ Standard_EXPORT void SetMaxSegments(const Standard_Integer NewMaxSegments) ;
+ //! Set the flag that indicates attempt to approximate <br>
+ //! a C1-continuous surface if a swept surface proved <br>
+ //! to be C0. <br>
+--- OCCT-6.7.1_SRC/src/BRepFill/BRepFill_PipeShell.cdl 2014-04-30 14:10:12.000000000 +0400
++++ cr24985/src/BRepFill/BRepFill_PipeShell.cdl 2014-06-30 14:35:15.000000000 +0400
+@@ -115,6 +115,19 @@
+
+ ---Level: Public
+
++
++-- ============================================
++-- Methods to set parameters for approximation
++-- ============================================
++ SetMaxDegree(me : mutable;
++ NewMaxDegree : Integer from Standard);
++ ---Purpose: Define the maximum V degree of resulting surface
++
++ SetMaxSegments(me : mutable;
++ NewMaxSegments : Integer from Standard);
++ ---Purpose: Define the maximum number of spans in V-direction
++ -- on resulting surface
++
+ SetForceApproxC1(me : mutable;
+ ForceApproxC1 : Boolean from Standard);
+ ---Purpose: Set the flag that indicates attempt to approximate
+@@ -289,6 +302,8 @@
+ myBoundTol : Real;
+ myTolAngular : Real;
+ angmin, angmax : Real;
++ myMaxDegree : Integer;
++ myMaxSegments : Integer;
+ myForceApproxC1 : Boolean;
+
+ myLaw : Function from Law;
+--- OCCT-6.7.1_SRC/src/BRepFill/BRepFill_PipeShell.cxx 2014-04-30 14:10:12.000000000 +0400
++++ cr24985/src/BRepFill/BRepFill_PipeShell.cxx 2014-06-30 14:35:15.000000000 +0400
+@@ -226,6 +226,9 @@
+ myLaw.Nullify();
+ SetTolerance();
+
++ myMaxDegree = 11;
++ myMaxSegments = 30;
++
+ // Attention to closed non-declared wire !
+ if (!mySpine.Closed()) {
+ TopoDS_Vertex Vf, Vl;
+@@ -414,6 +417,25 @@
+ mySection.Nullify(); //It is required to relocalize the sections.
+ }
+
++
++//=======================================================================
++//function : SetMaxDegree
++//purpose :
++//=======================================================================
++void BRepFill_PipeShell::SetMaxDegree(const Standard_Integer NewMaxDegree)
++{
++ myMaxDegree = NewMaxDegree;
++}
++
++//=======================================================================
++//function : SetMaxSegments
++//purpose :
++//=======================================================================
++void BRepFill_PipeShell::SetMaxSegments(const Standard_Integer NewMaxSegments)
++{
++ myMaxSegments = NewMaxSegments;
++}
++
+ //=======================================================================
+ //function : SetForceApproxC1
+ //purpose : Set the flag that indicates attempt to approximate
+@@ -742,7 +764,8 @@
+ theContinuity = GeomAbs_C0;
+ TopTools_MapOfShape Dummy;
+ BRepFill_DataMapOfShapeHArray2OfShape Dummy2;
+- MkSw.Build(Dummy, Dummy2, myTransition, theContinuity);
++ MkSw.Build(Dummy, Dummy2, myTransition, theContinuity,
++ GeomFill_Location, myMaxDegree, myMaxSegments);
+
+ myStatus = myLocation->GetStatus();
+ Ok = (MkSw.IsDone() && (myStatus == GeomFill_PipeOk));
+--- OCCT-6.7.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cdl 2014-04-30 14:10:13.000000000 +0400
++++ cr24985/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cdl 2014-06-30 14:35:15.000000000 +0400
+@@ -221,6 +221,20 @@
+ -- - boundary tolerance BoundTol
+ -- - angular tolerance TolAngular.
+
++
++
++-- ============================================
++-- Methods to set parameters for approximation
++-- ============================================
++ SetMaxDegree(me : in out;
++ NewMaxDegree : Integer from Standard);
++ ---Purpose: Define the maximum V degree of resulting surface
++
++ SetMaxSegments(me : in out;
++ NewMaxSegments : Integer from Standard);
++ ---Purpose: Define the maximum number of spans in V-direction
++ -- on resulting surface
++
+ SetForceApproxC1(me : in out;
+ ForceApproxC1 : Boolean from Standard);
+ ---Purpose: Set the flag that indicates attempt to approximate
+--- OCCT-6.7.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx 2014-04-30 14:10:13.000000000 +0400
++++ cr24985/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx 2014-06-30 14:35:15.000000000 +0400
+@@ -201,6 +201,24 @@
+ }
+
+ //=======================================================================
++//function : SetMaxDegree
++//purpose :
++//=======================================================================
++void BRepOffsetAPI_MakePipeShell::SetMaxDegree(const Standard_Integer NewMaxDegree)
++{
++ myPipe->SetMaxDegree(NewMaxDegree);
++}
++
++//=======================================================================
++//function : SetMaxSegments
++//purpose :
++//=======================================================================
++void BRepOffsetAPI_MakePipeShell::SetMaxSegments(const Standard_Integer NewMaxSegments)
++{
++ myPipe->SetMaxSegments(NewMaxSegments);
++}
++
++//=======================================================================
+ //function : SetForceApproxC1
+ //purpose : Set the flag that indicates attempt to approximate
+ // a C1-continuous surface if a swept surface proved