mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0025408: Wrong result obtained by General Fuse operator.
Changes: class BOPTools_AlgoTools2D method: void BOPTools_AlgoTools2D::AdjustPCurveOnFace (const TopoDS_Face& aF, const Standard_Real aFirst, const Standard_Real aLast, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA) The location of 2D-curve is adjusted to face boubaries if necessary using the precision value in parametric space Unnecessary comments are removed Test case for issue CR25408
This commit is contained in:
parent
1c9d151726
commit
67e36f0c7a
@ -323,21 +323,17 @@ void BOPTools_AlgoTools2D::AdjustPCurveOnFace
|
|||||||
// du
|
// du
|
||||||
du = 0.;
|
du = 0.;
|
||||||
if (aBAS.IsUPeriodic()) {
|
if (aBAS.IsUPeriodic()) {
|
||||||
Standard_Real u2x;
|
|
||||||
aUPeriod = aBAS.UPeriod();
|
aUPeriod = aBAS.UPeriod();
|
||||||
//
|
//
|
||||||
// A. drive u2 into the stall [Umin, Umin+aUPeriod] -> u2x
|
// a. try to clarify u2 using the precision (aDelta)
|
||||||
GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, u2x, du, 0.);
|
if (fabs(u2-UMin) < aDelta) {
|
||||||
//
|
|
||||||
// b. try to clarify u2 using the precision (aDelta)
|
|
||||||
if (fabs(u2x-UMin) < aDelta) {
|
|
||||||
u2=UMin;
|
u2=UMin;
|
||||||
}
|
}
|
||||||
else if (fabs(u2x-UMin-aUPeriod) < aDelta) {
|
else if (fabs(u2-UMin-aUPeriod) < aDelta) {
|
||||||
u2=UMin+aUPeriod;
|
u2=UMin+aUPeriod;
|
||||||
}
|
}
|
||||||
// C. compute du again using clarified value of u2
|
// b. compute du again using clarified value of u2
|
||||||
GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, u2x, du, 0.);
|
GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, u2, du, 0.);
|
||||||
//
|
//
|
||||||
if (du==0.) {
|
if (du==0.) {
|
||||||
if (aBAS.GetType()==GeomAbs_Cylinder) {
|
if (aBAS.GetType()==GeomAbs_Cylinder) {
|
||||||
|
40
tests/bugs/modalg_5/bug25408
Executable file
40
tests/bugs/modalg_5/bug25408
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
puts "================"
|
||||||
|
puts "OCC25408"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Wrong result obtained by General Fuse operator.
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug25408_bride_cut.brep] b1
|
||||||
|
restore [locate_data_file bug25408_goujon_part_tool2_cut.brep] b4
|
||||||
|
restore [locate_data_file bug25408_RevolPart.brep] b5
|
||||||
|
|
||||||
|
#
|
||||||
|
explode b4 f
|
||||||
|
copy b4_1 b4
|
||||||
|
#
|
||||||
|
explode b5 f
|
||||||
|
copy b5_1 b5
|
||||||
|
#
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
baddobjects b1 b4 b5
|
||||||
|
|
||||||
|
bfillds
|
||||||
|
bbuild result
|
||||||
|
|
||||||
|
set square 57200.9
|
||||||
|
|
||||||
|
set nb_v_good 54
|
||||||
|
set nb_e_good 129
|
||||||
|
set nb_w_good 95
|
||||||
|
set nb_f_good 95
|
||||||
|
set nb_sh_good 22
|
||||||
|
set nb_sol_good 22
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 2
|
||||||
|
set nb_shape_good 419
|
||||||
|
|
||||||
|
set 3dviewer 1
|
Loading…
x
Reference in New Issue
Block a user