]> OCCT Git - occt-copy.git/commitdiff
BRepBuilderAPI_MakeShape::EnsureToleranceRule was replaced by
authorabk <abk@opencascade.com>
Wed, 13 Feb 2013 15:02:19 +0000 (19:02 +0400)
committerabk <abk@opencascade.com>
Wed, 6 Mar 2013 11:04:04 +0000 (15:04 +0400)
BRepLib::UpdateTolerances.

BRepBuilderAPI_MakeShape::EnsureToleranceRule was removed.

12 files changed:
src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cdl
src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepFeat/BRepFeat_MakePrism.cxx
src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx
src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx
src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx
src/BRepTest/BRepTest_BasicCommands.cxx
src/ShapeFix/ShapeFix_Shape.cxx
src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.cxx

index 9a31f831d09f76023a05ee11a74c31e2d0cdfd50..f68da8030449d266505912791faed45e28440061 100755 (executable)
@@ -92,11 +92,6 @@ is
     is virtual;
        ---Purpose: Returns true if the shape S has been deleted.
 
-    EnsureToleranceRule (myclass; theS : Shape from TopoDS);
-    ---Purpose: Fixes all tolerances of shape theS and it's subshapes by the tolerance
-    -- rule: vertex tolerance >= edge tolerance >= face tolerance.
-    -- Edge or vertex tolerance which does not satisfy the tolerance rule will
-    -- be increased.
     
 fields
  
index bd64f1aef8f165cbfd50215337581ba7032b32ce..66839abceafaea8884c1628293f3adf6b15602ba 100755 (executable)
@@ -117,66 +117,3 @@ Standard_Boolean BRepBuilderAPI_MakeShape::IsDeleted (const TopoDS_Shape& S)
 {
   return Standard_False;
 }
-
-
-
-//=======================================================================
-//function : EnsureToleranceRule
-//purpose  : 
-//=======================================================================
-
-void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
-{
-  if (theS.IsNull())
-  {
-    return;
-  }
-  //
-  for (TopExp_Explorer aFE(theS, TopAbs_FACE); aFE.More(); aFE.Next())
-  {
-    TopoDS_Face aF = TopoDS::Face(aFE.Current());
-    Standard_Real aFT = ((Handle_BRep_TFace &)aF.TShape())->Tolerance();
-    //
-    for (TopExp_Explorer anEE(aF, TopAbs_EDGE); anEE.More(); anEE.Next())
-    {
-      TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
-      Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
-      Standard_Real anET = anEG->Tolerance();
-      if (anET < aFT)
-      {
-        anET = aFT;
-        anEG->Tolerance(anET);
-      }
-      for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
-      {
-        TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
-        Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
-        aVG->UpdateTolerance(anET);
-      }
-    }
-    //
-    for (TopExp_Explorer aVE(aF, TopAbs_VERTEX, TopAbs_EDGE);
-      aVE.More(); aVE.Next())
-    {
-      TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
-      Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
-      aVG->UpdateTolerance(aFT);
-    }
-  }
-  //
-  for (TopExp_Explorer anEE(theS, TopAbs_EDGE, TopAbs_FACE);
-    anEE.More(); anEE.Next())
-  {
-    TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
-    Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
-    Standard_Real anET = anEG->Tolerance();
-    for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
-    {
-      TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
-      Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
-      aVG->UpdateTolerance(anET);
-    }
-  }
-}
-
-
index 2e6b2de6322d8cb211cb2d8a1b4d3c489f1934e8..b2b021201769bb782f9a2b75a4f9ad36c7f93a35 100755 (executable)
 #include <BRepBuilderAPI_VertexInspector.hxx>
 #include <BRepBuilderAPI_CellFilter.hxx>
 #include <BRepBuilderAPI_BndBoxTreeSelector.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
 #include <NCollection_UBTreeFiller.hxx>
 
 static void SortBox (const Handle(Bnd_HArray1OfBox) hSetBoxes,
@@ -1910,7 +1909,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
       mySewedShape.Nullify();
       return;
     }
-    BRepBuilderAPI_MakeShape::EnsureToleranceRule(mySewedShape);
+    BRepLib::UpdateTolerances(mySewedShape);
   }
 #if DEB
   chr_total.Stop();
index c95badcf425735ef6a8ae231e42f049f2c6ace76..a45776467556334a4bf231d79890c4164eeede45 100755 (executable)
@@ -45,6 +45,8 @@
 
 #include <BRep_Tool.hxx>
 
+#include <BRepLib.hxx>
+
 #include <BRepTools.hxx>
 
 
@@ -463,7 +465,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
       }
     }         
   }
-  EnsureToleranceRule(myShape);
+  BRepLib::UpdateTolerances(myShape);
 /*   // loop of control of descendance
 
   TopExp_Explorer expr(mySbase, TopAbs_FACE);
index 3ec82c9a1b134faae58f4a959f9233e15dd9f671..a6da6c646394a747bbc70c4f3b2f6a1194d89006 100755 (executable)
@@ -25,6 +25,7 @@
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <ChFiDS_Spine.hxx>
 #include <TopExp_Explorer.hxx>
+#include <BRepLib.hxx>
 
 
 
@@ -391,7 +392,7 @@ void BRepFilletAPI_MakeChamfer::Build()
   if (myBuilder.IsDone()){
     Done();
     myShape = myBuilder.Shape();
-    EnsureToleranceRule(myShape);
+    BRepLib::UpdateTolerances(myShape);
       
       //creation of the Map.
     TopExp_Explorer ex;
index 5c7c465e189a9a35a3cf9ac80ea72ff9f902ab4a..b8ccc2f031be606160bc698cbed92b39eba4d2f1 100755 (executable)
@@ -30,6 +30,7 @@
 #include <Law_Linear.hxx>
 #include <Law_S.hxx>
 #include <Law_Interpol.hxx>
+#include <BRepLib.hxx>
 
 //=======================================================================
 //function : BRepFilletAPI_MakeFillet
@@ -532,7 +533,7 @@ void BRepFilletAPI_MakeFillet::Build()
   if(myBuilder.IsDone()) {
     Done();
     myShape = myBuilder.Shape();
-    EnsureToleranceRule(myShape);
+    BRepLib::UpdateTolerances(myShape);
 
     // creation of the Map.
     TopExp_Explorer ex;
index 9c1f484cbb2d5c909b7fd682c16b3aa175630b0b..8b06baa3d7f46fadc0623adfdb02d17a777d9b94 100755 (executable)
@@ -21,6 +21,7 @@
 
 #include <BRepOffsetAPI_MakePipe.ixx>
 
+#include <BRepLib.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Edge.hxx>
@@ -59,7 +60,7 @@ const BRepFill_Pipe& BRepOffsetAPI_MakePipe::Pipe() const
 void BRepOffsetAPI_MakePipe::Build() 
 {
   myShape = myPipe.Shape();
-  BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
+  BRepLib::UpdateTolerances(myShape);
   Done();
 }
 
index e0f58cb9e301146f16f19d6b4322d401a5627388..de3fb850058c306e834b71a3af323222fd8316f0 100755 (executable)
@@ -22,6 +22,7 @@
 
 #include <BRepOffsetAPI_MakePipeShell.ixx>
 
+#include <BRepLib.hxx>
 #include <GeomFill_PipeError.hxx>
 #include <Standard_NotImplemented.hxx>
 #include <StdFail_NotDone.hxx>
@@ -225,7 +226,7 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
   Ok = myPipe->Build();
   if (Ok) {
     myShape = myPipe->Shape();
-    EnsureToleranceRule(myShape);
+    BRepLib::UpdateTolerances(myShape);
     Done();
   }
   else NotDone(); 
index 80771ecc064fd30b609db9672dc295c8b3b84ab9..e8e9749b93cb2c3b134c88fce5db05de6cb09ffa 100755 (executable)
@@ -20,6 +20,7 @@
 
 
 #include <BRepOffsetAPI_NormalProjection.ixx>
+#include <BRepLib.hxx>
 
 BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
 {
@@ -64,7 +65,7 @@ BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
 {
   myNormalProjector.Build();
   myShape = myNormalProjector.Projection();
-  BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
+  BRepLib::UpdateTolerances(myShape);
   Done();
 }
 
index 033cb56e5d334e13d18cc6d0891816dcab3b07b3..a2c57d2deb2e6f5346ea07d998162f7d87ccfbae 100755 (executable)
@@ -815,7 +815,7 @@ static Standard_Integer EnsureTolRule(
   }
   //
   TopoDS_Shape aRes = BRepBuilderAPI_Copy(aS);
-  BRepBuilderAPI_MakeShape::EnsureToleranceRule(aRes);
+  BRepLib::UpdateTolerances(aRes);
   //
   DBRep::Set(theAs[1], aRes);
   return 0;
index cb2cfeab6f85649b418328fb9f0a42992d5fb84f..fbe2d5ec01b8fc7fa172fb61345fd4a573703d42 100755 (executable)
@@ -33,7 +33,7 @@
 #include <TopAbs_ShapeEnum.hxx>
 #include <BRepTools.hxx>
 #include <BRep_Builder.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
+#include <BRepLib.hxx>
 
 #include <ShapeFix.hxx>
 #include <ShapeBuild_ReShape.hxx>
@@ -103,7 +103,7 @@ void ShapeFix_Shape::Init(const TopoDS_Shape& shape)
 Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
 {
   Standard_Boolean aR = PerformR(theProgress);
-  BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+  BRepLib::UpdateTolerances(myResult);
   return aR;
 }
 
index fafad096331a55900fb2ab86e8d07fa4f3c305bb..254e0c35728113f279c0b9988b1dbe6bc023deb8 100755 (executable)
@@ -37,7 +37,7 @@
 #include <ShapeUpgrade_WireDivide.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_Failure.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
+#include <BRepLib.hxx>
 
 //=======================================================================
 //function : ShapeUpgrade_ShapeDivide
@@ -175,7 +175,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
     if ( Status ( ShapeExtend_DONE ) ) {
       myResult = myContext->Apply ( C, TopAbs_SHAPE );
       myContext->Replace ( myShape, myResult );
-      BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+      BRepLib::UpdateTolerances(myResult);
       return Standard_True;
     }
     myResult = myShape;
@@ -284,7 +284,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
     }
   }
   myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
-  BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+  BRepLib::UpdateTolerances(myResult);
   return ! myResult.IsSame ( myShape );
 }