]> OCCT Git - occt-copy.git/commitdiff
refs #0024985: control of parameters for Pipe Shell algo HYDRO V6_7_1p1
authorasl <alexander.solovyov@opencascade.com>
Thu, 5 Jun 2014 05:47:17 +0000 (09:47 +0400)
committerasl <alexander.solovyov@opencascade.com>
Thu, 5 Jun 2014 05:47:17 +0000 (09:47 +0400)
src/BRepFill/BRepFill_PipeShell.cdl
src/BRepFill/BRepFill_PipeShell.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cdl
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx

index d477c57b3514bfc84bdb10f49e6811eeae02fd3b..c079236ef5596441c31b949bf2b909c523df4680 100644 (file)
@@ -115,6 +115,19 @@ is
 
         ---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 @@ fields
   myBoundTol    :  Real;  
   myTolAngular  :  Real;
   angmin,  angmax  :  Real; 
+  myMaxDegree   :  Integer;
+  myMaxSegments :  Integer;
   myForceApproxC1 : Boolean;
   
   myLaw         :  Function         from  Law;    
index b1c92ee81a1a9cf8468518bfcc0db19828bed138..2880c145ca191e65efa487a2b0653c62a23ac76d 100644 (file)
@@ -226,6 +226,9 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
   myLaw.Nullify();
   SetTolerance();
 
+  myMaxDegree = 11;
+  myMaxSegments = 30;
+
   // Attention to closed non-declared wire !
   if (!mySpine.Closed()) {
     TopoDS_Vertex Vf, Vl;
@@ -414,6 +417,25 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
   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 @@ void BRepFill_PipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1)
     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));
index 3e9423476b4761adb0be64ec3c7a5933411b330a..738fdfdafa7ddeeea907440e2be797eff352ccc1 100644 (file)
@@ -221,6 +221,20 @@ is
        -- - 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
index 9171f281c22af1ab90f4a3619619c8eb82ac4299..7ca936527f03377ce53cbdddeb327ea2beebbc3b 100644 (file)
@@ -200,6 +200,24 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
  myPipe->SetTolerance(Tol3d, BoundTol, TolAngular);
 }
 
+//=======================================================================
+//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