]> OCCT Git - occt-copy.git/commitdiff
0024985: Control of maximum degree and number of segment in the Pipe Shell algorithm
authorjgv <jgv@opencascade.com>
Mon, 9 Jun 2014 09:25:40 +0000 (13:25 +0400)
committerapn <apn@opencascade.com>
Wed, 11 Jun 2014 06:47:59 +0000 (10:47 +0400)
src/BRepFill/BRepFill_PipeShell.cdl
src/BRepFill/BRepFill_PipeShell.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cdl
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx

index fdb4abaf171963880b8f52428f3cc5767bb6d29f..f75a5e6ce2a1adb354e466d9296d3f167918b416 100644 (file)
@@ -117,6 +117,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
@@ -291,6 +304,8 @@ fields
   myBoundTol    :  Real;  
   myTolAngular  :  Real;
   angmin,  angmax  :  Real; 
+  myMaxDegree   :  Integer;
+  myMaxSegments :  Integer;
   myForceApproxC1 : Boolean;
   
   myLaw         :  Function         from  Law;    
index a444f9698ff34e01ca24b5aeb64d31be028f675e..08ad18b50a79e3f6662552ac92a1d2aae4939c21 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
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