mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
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
This commit is contained in:
parent
1475265b58
commit
9c189bd8dc
@ -204,9 +204,10 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d
|
|||||||
TopExp::Vertices(E,V1,V2);
|
TopExp::Vertices(E,V1,V2);
|
||||||
TopoDS_Shape initEFOR = E.Oriented(TopAbs_FORWARD); // skl
|
TopoDS_Shape initEFOR = E.Oriented(TopAbs_FORWARD); // skl
|
||||||
TopoDS_Edge EFOR = TopoDS::Edge(initEFOR/*E.Oriented(TopAbs_FORWARD)*/); //skl
|
TopoDS_Edge EFOR = TopoDS::Edge(initEFOR/*E.Oriented(TopAbs_FORWARD)*/); //skl
|
||||||
NewParameter(V1,EFOR,f,Tol);
|
Standard_Real aTolV;
|
||||||
NewParameter(V2,EFOR,l,Tol);
|
NewParameter(V1, EFOR, f, aTolV);
|
||||||
GeomLib::SameRange(Tol,NewC,newf,newl,f,l,C);
|
NewParameter(V2, EFOR, l, aTolV);
|
||||||
|
GeomLib::SameRange(Precision::PConfusion(), NewC, newf, newl, f, l, C);
|
||||||
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
19
tests/bugs/modalg_6/bug28028
Normal file
19
tests/bugs/modalg_6/bug28028
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user