]> OCCT Git - occt.git/commitdiff
0028687: Offset for open wire is built with incorrect direction
authorakaftasev <akaftasev@opencascade.com>
Thu, 26 Aug 2021 11:33:56 +0000 (14:33 +0300)
committersmoskvin <stanislav.moskvin.ext@opencascade.com>
Mon, 30 Aug 2021 06:47:33 +0000 (09:47 +0300)
Added new condition to exclude offsetting non closed part of circle as complete circle

src/BRepFill/BRepFill_OffsetWire.cxx
tests/bugs/modalg_5/bug25334_1
tests/bugs/modalg_5/bug25334_2
tests/bugs/modalg_5/bug25334_3
tests/bugs/modalg_5/bug25334_4

index be82150111d91aeb40dde6a1bb2f474c61500aab..a1a16992117fede85f2a36322d3a6411ac318dfc 100644 (file)
@@ -283,6 +283,10 @@ static Standard_Boolean KPartCircle
     {
       if (E.Orientation() == TopAbs_FORWARD)
         anOffset *= -1;
+      if (!BRep_Tool::IsClosed(E))
+      {
+        anOffset *= -1;
+      }
       gp_Circ2d theCirc = AHC->Circle();
       if (anOffset > 0. || Abs(anOffset) < theCirc.Radius())
         OC = new Geom2d_Circle (theCirc.Position(), theCirc.Radius() + anOffset);
index 550317e322d4b6dd272f75e273e9413e7b20ba59..f4d7734dcdd3ee3bf0e4339fd526090b6f591912 100644 (file)
@@ -23,7 +23,7 @@ vori result
 
 fit
 
-checkprops result -l 613.3
+checkprops result -l 644.50
 checkshape result 
 checksection result
 
index 3f16c789c7f620ba75b278761e9d849b26631bd8..b5f90d7539e409561d9f1cc852b06b152368520a 100644 (file)
@@ -23,7 +23,7 @@ vori result
 
 fit
 
-checkprops result -l 644.50
+checkprops result -l 613.3
 checkshape result 
 checksection result
 
index 8659654edeef8765b41526bbbe8abadf633b6f42..e045bc1b6afd3ceaf138538a7b2c40000e5d49d6 100644 (file)
@@ -23,7 +23,7 @@ vori result
 
 fit
 
-checkprops result -l 354.958 
+checkprops result -l 386.077 
 checkshape result 
 checksection result
 
index d22bb01edc594221572fc8709b57d45b250accca..40b13eb67e4ff5d95cdfe1efee81a24dc01a51d5 100644 (file)
@@ -23,7 +23,7 @@ vori result
 
 fit
 
-checkprops result -l 386.077 
+checkprops result -l 354.958 
 checkshape result 
 checksection result