mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-30 12:14:08 +03:00
0026202: Wrong result of chamfer on cylindrical surface: wrong value of chord
Test case for issue CR26202
This commit is contained in:
parent
56e26740b4
commit
12945d7720
@ -353,15 +353,11 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
|
|||||||
gp_Ax3 AxCyl = Cyl.Position();
|
gp_Ax3 AxCyl = Cyl.Position();
|
||||||
// OrCyl is the point on axis of cylinder in the plane normal to the
|
// OrCyl is the point on axis of cylinder in the plane normal to the
|
||||||
// axis containing OrSpine
|
// axis containing OrSpine
|
||||||
gp_Pnt Loc = AxCyl.Location();
|
// Project <OrSpine> onto <AxCyl>
|
||||||
gp_Vec LocSp(Loc, OrSpine);
|
gp_XYZ AxLoc = AxCyl.Location().XYZ(); //aLine.Location().XYZ();
|
||||||
gp_XYZ temp = AxCyl.Direction().XYZ();
|
gp_XYZ AxDir = AxCyl.Direction().XYZ();
|
||||||
temp = temp.Multiplied(LocSp.XYZ().Multiplied(temp) );
|
Standard_Real Parameter = (OrSpine.XYZ() - AxLoc) * AxDir;
|
||||||
OrCyl.SetXYZ( (Loc.XYZ()).Added(temp) );
|
OrCyl.SetXYZ( AxLoc + Parameter * AxDir );
|
||||||
// gp_XYZ temp = AxCyl.Direction().XYZ();
|
|
||||||
// temp = temp.Multiplied( OrSpine.XYZ().Multiplied(temp) );
|
|
||||||
// OrCyl.SetXYZ( (AxCyl.Location().XYZ()).Added(temp) );
|
|
||||||
|
|
||||||
|
|
||||||
//construction of POnPln
|
//construction of POnPln
|
||||||
gp_Vec VecTranslPln,tmp;
|
gp_Vec VecTranslPln,tmp;
|
||||||
|
40
tests/bugs/modalg_6/bug26202
Executable file
40
tests/bugs/modalg_6/bug26202
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC26202"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Wrong result of chamfer on cylindrical surface: wrong value of chord
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug26202_shell.brep] b
|
||||||
|
|
||||||
|
explode b
|
||||||
|
explode b_2 e
|
||||||
|
|
||||||
|
smallview
|
||||||
|
donly b b_2_1
|
||||||
|
fit
|
||||||
|
xwd $imagedir/${test_image}_1.png
|
||||||
|
|
||||||
|
chamf q b b_2_1 b_2 0.02 0.01
|
||||||
|
explode q v
|
||||||
|
explode b v
|
||||||
|
|
||||||
|
donly b_2 q_1 q_5
|
||||||
|
fit
|
||||||
|
xwd $imagedir/${test_image}_2.png
|
||||||
|
|
||||||
|
donly q b b_2 q_1 q_5
|
||||||
|
xwd $imagedir/${test_image}_3.png
|
||||||
|
|
||||||
|
distmini dd b_2 q_5
|
||||||
|
dump dd_val
|
||||||
|
#dd_val is 0.013334, but must be 0.02
|
||||||
|
|
||||||
|
set info [dump dd_val]
|
||||||
|
regexp "\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\* Dump of dd_val \\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n(\[-0-9*\.+eE\]+)" $info full Length
|
||||||
|
|
||||||
|
set expected_Length 0.02
|
||||||
|
set tol_abs_Length 1.0e-4
|
||||||
|
set tol_rel_Length 0.0001
|
||||||
|
checkreal "Length" ${Length} ${expected_Length} ${tol_abs_Length} ${tol_rel_Length}
|
Loading…
x
Reference in New Issue
Block a user