]> OCCT Git - occt-copy.git/commitdiff
0026967: BRepFill_OffsetWire should not copy plane if Alt == 0.0
authormsv <msv@opencascade.com>
Tue, 8 Dec 2015 13:01:26 +0000 (16:01 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Dec 2015 13:34:11 +0000 (16:34 +0300)
In the class BRepFill_OffsetWire the base plane is not copied anymore if altitude parameter is equal to zero.

src/BRepFill/BRepFill_OffsetWire.cxx

index 3e03686bd521c50e3727bf5d7fedbdd30576a657..1de233495c0a27698ccb9888223eff817df127e8 100644 (file)
@@ -299,7 +299,7 @@ static Standard_Boolean KPartCircle
     
     myShape.Orientation(E.Orientation());
     myShape.Location(L);
-    if (Alt != 0.) {
+    if (fabs(Alt) > gp::Resolution()) {
       BRepAdaptor_Surface S(mySpine,0);
       gp_Ax1 Nor = S.Plane().Axis();
       gp_Trsf T;
@@ -775,12 +775,14 @@ void BRepFill_OffsetWire::PerformWithBiLo
   TopTools_ListOfShape                      EmptyList;
   TColStd_SequenceOfReal                    EmptySeqOfReal;
 
-  Standard_Real ALT = Alt;
   Handle(Geom_Plane) RefPlane = 
     Handle(Geom_Plane)::DownCast(BRep_Tool::Surface(myWorkSpine));
-  if ( myWorkSpine.Orientation() == TopAbs_REVERSED) ALT = -Alt;
-  RefPlane = Handle(Geom_Plane)::DownCast
-    (RefPlane->Translated( ALT * gp_Vec(RefPlane->Axis().Direction() )));
+  if (fabs(Alt) > gp::Resolution()) {
+    Standard_Real anAlt = Alt;
+    if ( myWorkSpine.Orientation() == TopAbs_REVERSED) anAlt = -Alt;
+    RefPlane = Handle(Geom_Plane)::DownCast
+      (RefPlane->Translated( anAlt * gp_Vec(RefPlane->Axis().Direction() )));
+  }
 
   //---------------------------------------------------------------
   // Construction of Circles and OffsetCurves