From: nbv Date: Thu, 21 May 2015 10:47:55 +0000 (+0300) Subject: 0026197: Incomplete intersection curve X-Git-Tag: V7_0_0_beta~557 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=4753a6fc1f0f13f6a1c4d716fae28aa1ece7574a 0026197: Incomplete intersection curve Correct the algorithm to get right Start point for extension of the walking line. Test case for issue CR26197 Correction of test case bugs/modalg_6/bug26197 --- diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index 3d99d5342e..af1f28bfdc 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2278,7 +2278,6 @@ PutToBoundary(const Handle(Adaptor3d_HSurface)& theASurf1, IsParallel(line, Standard_True, aTol, isU1parallel, isV1parallel); IsParallel(line, Standard_False, aTol, isU2parallel, isV2parallel); - const Standard_Integer aNbPnts = line->NbPoints(); Standard_Real u1, v1, u2, v2; line->Value(1).Parameters(u1, v1, u2, v2); Standard_Real aDelta = 0.0; @@ -2366,6 +2365,7 @@ PutToBoundary(const Handle(Adaptor3d_HSurface)& theASurf1, v1, u2, v2, Standard_True); } + const Standard_Integer aNbPnts = line->NbPoints(); isNeedAdding = Standard_False; line->Value(aNbPnts).Parameters(u1, v1, u2, v2); diff --git a/tests/bugs/modalg_6/bug26197 b/tests/bugs/modalg_6/bug26197 new file mode 100644 index 0000000000..08e60899ca --- /dev/null +++ b/tests/bugs/modalg_6/bug26197 @@ -0,0 +1,44 @@ +puts "==========" +puts "OCC26197" +puts "==========" +puts "" +############################################################ +# Incomplete intersection curve +############################################################ + +restore [locate_data_file bug26197_profile_1093.brep] b1 +restore [locate_data_file bug26197_endcut1_1093.brep] b2 + +explode b1 f +copy b1_107 f1 + +explode b2 f +copy b2_2 f2 + +bsection result f1 f2 + +explode result e +mk2dcurve c2d2 result_1 f2 + +bounds c2d2 u1 u2 +puts [dval u1] +puts [dval u2] + +2dcvalue c2d2 u1 x y1 +2dcvalue c2d2 u2 x y2 + +set y1_ [dval y1] +set y2_ [dval y2] + +set tol_abs 1.e-7 +set tol_rel 1.e-7 + +#V-last of the surface of f2 face +set expected_y 1.1883793591414735 + +checkreal "extension the section line to the surface boundary?" ${y2_} ${expected_y} ${tol_abs} ${tol_rel} + +smallview +donly result f1 f2 +fit +set only_screen_axo 1 \ No newline at end of file