From: azv Date: Sat, 29 Oct 2016 08:23:05 +0000 (+0300) Subject: 0028028: Solid becomes invalid after scaling X-Git-Tag: V7_1_0_beta~26 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9c189bd8dc04d32baa5b849953a5da6cf44c3f0e;p=occt.git 0028028: Solid becomes invalid after scaling The shape after scaling contains PCurves with incorrect parametrization, because of too large tolerance given. 1. Set Precision::PConfution() as a tolerance for GeomLib::SameRange. 2. Do not take into account tolerances of vertices while calculating tolerance of transformed PCurve for edge. 3. Test case bugs/modalg_6/bug28028 --- diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index 36e812a4e6..8aea7b8f28 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -204,9 +204,10 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d TopExp::Vertices(E,V1,V2); TopoDS_Shape initEFOR = E.Oriented(TopAbs_FORWARD); // skl TopoDS_Edge EFOR = TopoDS::Edge(initEFOR/*E.Oriented(TopAbs_FORWARD)*/); //skl - NewParameter(V1,EFOR,f,Tol); - NewParameter(V2,EFOR,l,Tol); - GeomLib::SameRange(Tol,NewC,newf,newl,f,l,C); + Standard_Real aTolV; + NewParameter(V1, EFOR, f, aTolV); + NewParameter(V2, EFOR, l, aTolV); + GeomLib::SameRange(Precision::PConfusion(), NewC, newf, newl, f, l, C); return Standard_True; } diff --git a/tests/bugs/modalg_6/bug28028 b/tests/bugs/modalg_6/bug28028 new file mode 100644 index 0000000000..8460e76bad --- /dev/null +++ b/tests/bugs/modalg_6/bug28028 @@ -0,0 +1,19 @@ +puts "========" +puts "OCC28028" +puts "========" +puts "" +################################################# +# Solid becomes invalid after scaling +################################################# + +pload XDE + +testreadstep [locate_data_file bug28028_stamp.stp] s + +tcopy s result +checkshape s + +tscale result 0 0 0 3 +checkshape result + +checkprops result -s 2197.19 -v 5026.59 \ No newline at end of file