]> 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, 6 Mar 2013 10:50:57 +0000 (14:50 +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/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx
src/BRepFeat/BRepFeat_MakePrism.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx
src/BRepTest/BRepTest_SweepCommands.cxx

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 ba3f39f5b2d9b681581bc9def8d4588a7cdd4588..c95badcf425735ef6a8ae231e42f049f2c6ace76 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 631d9f15ff8c8da6962c8dd5af02bb4734f1e9e6..bff9a2e8e63d45d37f02803752af724aed6a87f0 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",