1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026202: Wrong result of chamfer on cylindrical surface: wrong value of chord

Test case for issue CR26202
This commit is contained in:
jgv
2015-05-14 17:03:42 +03:00
committed by bugmaster
parent 56e26740b4
commit 12945d7720
2 changed files with 45 additions and 9 deletions

View File

@@ -353,15 +353,11 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
gp_Ax3 AxCyl = Cyl.Position();
// OrCyl is the point on axis of cylinder in the plane normal to the
// axis containing OrSpine
gp_Pnt Loc = AxCyl.Location();
gp_Vec LocSp(Loc, OrSpine);
gp_XYZ temp = AxCyl.Direction().XYZ();
temp = temp.Multiplied(LocSp.XYZ().Multiplied(temp) );
OrCyl.SetXYZ( (Loc.XYZ()).Added(temp) );
// gp_XYZ temp = AxCyl.Direction().XYZ();
// temp = temp.Multiplied( OrSpine.XYZ().Multiplied(temp) );
// OrCyl.SetXYZ( (AxCyl.Location().XYZ()).Added(temp) );
// Project <OrSpine> onto <AxCyl>
gp_XYZ AxLoc = AxCyl.Location().XYZ(); //aLine.Location().XYZ();
gp_XYZ AxDir = AxCyl.Direction().XYZ();
Standard_Real Parameter = (OrSpine.XYZ() - AxLoc) * AxDir;
OrCyl.SetXYZ( AxLoc + Parameter * AxDir );
//construction of POnPln
gp_Vec VecTranslPln,tmp;