]> OCCT Git - occt-copy.git/commitdiff
Method BRepBuilderAPI_MakeShape::EnsureToleranceRule was made slightly
authorabk <abk@opencascade.com>
Fri, 28 Dec 2012 15:52:02 +0000 (19:52 +0400)
committerabk <abk@opencascade.com>
Wed, 13 Feb 2013 13:25:26 +0000 (17:25 +0400)
simpler.

Tolerance post Build (Perform) fix was made for:
- BRepAlgoAPI_BooleanOperation,
- BRepFeat_MakePrism,
- BRepOffsetAPI_MakePipeShell.

Draw command getsourcefile now returns result for:
- buildsweep,
- simulsweep,
- geompipe.

src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx
src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx
src/BRepFeat/BRepFeat_MakePrism.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx
src/BRepTest/BRepTest_SweepCommands.cxx

index 80ded2c509f4b61badffd5c6b5ef73bfd2c89c7b..0364420fcb087dab3dfeb0434d2a9463ad0c3ce4 100755 (executable)
@@ -325,6 +325,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
          myErrorStatus=0;
          myBuilderCanWork=Standard_True;
          myShape=myBuilder->Result();
+         EnsureToleranceRule(myShape);
          Done(); 
        }
        else {
@@ -400,6 +401,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
     myErrorStatus=0;
     myBuilderCanWork=Standard_True;
     myShape=myBuilder->Result();
+    EnsureToleranceRule(myShape);
     Done(); 
   }
   else {
index 8c8cfe85c8222d81c4c1ab240c7dc671458600e6..bd64f1aef8f165cbfd50215337581ba7032b32ce 100755 (executable)
@@ -135,12 +135,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
   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();
+    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();
+      Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
       Standard_Real anET = anEG->Tolerance();
       if (anET < aFT)
       {
@@ -150,7 +150,7 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
       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();
+        Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
         aVG->UpdateTolerance(anET);
       }
     }
@@ -159,7 +159,7 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
       aVE.More(); aVE.Next())
     {
       TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
-      Handle_BRep_TVertex & aVG = *(Handle_BRep_TVertex *)&aVS.TShape();
+      Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
       aVG->UpdateTolerance(aFT);
     }
   }
@@ -168,12 +168,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
     anEE.More(); anEE.Next())
   {
     TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
-    Handle_BRep_TEdge & anEG = *(Handle_BRep_TEdge *)&anES.TShape();
+    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();
+      Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
       aVG->UpdateTolerance(anET);
     }
   }
index 1b3340c77058561fba24d60289927f834587bde1..398bf0c184a7976ae6975784796a6d4656fb1004 100755 (executable)
@@ -463,6 +463,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
       }
     }         
   }
+  EnsureToleranceRule(myShape);
 /*   // loop of control of descendance
 
   TopExp_Explorer expr(mySbase, TopAbs_FACE);
index f1189fa3ecac13f105e930cf96c38a9214719fca..e0f58cb9e301146f16f19d6b4322d401a5627388 100755 (executable)
@@ -225,6 +225,7 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
   Ok = myPipe->Build();
   if (Ok) {
     myShape = myPipe->Shape();
+    EnsureToleranceRule(myShape);
     Done();
   }
   else NotDone(); 
index dc75ab1e0543f42ad56b1bce88453b7cbadfda74..dbfa792c7a906800a4d792c30c4a29dd9d7c5abb 100755 (executable)
@@ -859,12 +859,12 @@ void  BRepTest::SweepCommands(Draw_Interpretor& theCommands)
                  "deletesweep wire, To delete a section",
                  __FILE__,deletesweep,g);
 
-  theCommands.Add("buildsweep", "builsweep [r] [option] [Tol] , no args to get help"
+  theCommands.Add("buildsweep", "buildsweep [r] [option] [Tol] , no args to get help",
                  __FILE__,buildsweep,g);
 
-  theCommands.Add("simulsweep", "simulsweep r [n] [option]"
+  theCommands.Add("simulsweep", "simulsweep r [n] [option]",
                  __FILE__,simulsweep,g);
-  theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
+  theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]",
                  __FILE__,geompipe,g);
   
   theCommands.Add("middlepath", "middlepath res shape startshape endshape",