1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0031782: Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests

ChFiKPart_ComputeData_FilPlnCyl.cxx - rewriting some code to avoid "extra" optimization
This commit is contained in:
ifv 2020-10-22 15:28:40 +03:00 committed by bugmaster
parent 692decba26
commit 7ccfd41fa2

View File

@ -124,17 +124,22 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Pln,OrFillet,UOnPln,VOnPln); ElSLib::Parameters(Pln,OrFillet,UOnPln,VOnPln);
gp_Vec XDir, OtherDir; gp_Vec XDir, OtherDir;
if (plandab)
{
XDir = NorF.Reversed(); XDir = NorF.Reversed();
OtherDir = gp_Dir(gp_Vec(OrFillet,ElSLib::Value(UOnCyl,VOnCyl,Cyl))); OtherDir = gp_Vec(OrFillet, ElSLib::Value(UOnCyl, VOnCyl, Cyl));
OtherDir.Normalize();
if (!plandab) {
gp_Vec tmp = XDir;
XDir = OtherDir;
OtherDir = tmp;
} }
else
{
OtherDir = NorF.Reversed();
XDir = gp_Vec(OrFillet, ElSLib::Value(UOnCyl, VOnCyl, Cyl));
XDir.Normalize();
}
gp_Ax3 AxFil (OrFillet, DirFillet, XDir); gp_Ax3 AxFil (OrFillet, DirFillet, XDir);
// construction YDir to go from face1 to face2. gp_Vec aProd = XDir.Crossed(OtherDir);
if ((XDir^OtherDir).Dot(DirFillet) < 0.) if (aProd.Dot(DirFillet) < 0.)
AxFil.YReverse(); AxFil.YReverse();
Handle(Geom_CylindricalSurface) Handle(Geom_CylindricalSurface)
@ -149,8 +154,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
gp_Lin2d Lin2dPln(PPln2d,VPln2d); gp_Lin2d Lin2dPln(PPln2d,VPln2d);
gp_Pnt POnPln = ElSLib::Value(UOnPln,VOnPln,Pln); gp_Pnt POnPln = ElSLib::Value(UOnPln,VOnPln,Pln);
gp_Lin C3d(POnPln,DirFillet); gp_Lin C3d(POnPln,DirFillet);
Standard_Real UOnFillet,V; Standard_Real UOnFillet,V;
ElSLib::CylinderParameters(AxFil,Radius,POnPln,UOnFillet,V); ElSLib::CylinderParameters(AxFil,Radius,POnPln,UOnFillet,V);
if(UOnFillet > M_PI) UOnFillet = 0.; if(UOnFillet > M_PI) UOnFillet = 0.;
gp_Lin2d LOnFillet(gp_Pnt2d(UOnFillet,V),gp::DY2d()); gp_Lin2d LOnFillet(gp_Pnt2d(UOnFillet,V),gp::DY2d());
Handle(Geom_Line) L3d = new Geom_Line (C3d); Handle(Geom_Line) L3d = new Geom_Line (C3d);