1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0028492: Boolean common does not produce expected result

Generation of 3D-steps shorter than 3D tolerance has been allowed in the fix to build Walking-line.

Now, 3D-step is limited by Precision::Confusion value.
This commit is contained in:
nbv 2017-03-13 16:03:07 +03:00 committed by bugmaster
parent 176a795920
commit 3b6ffeaca7
9 changed files with 87 additions and 10 deletions

View File

@ -721,7 +721,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
AddAPoint(line,previousPoint);
//
IntWalk_StatusDeflection Status = IntWalk_OK;
IntWalk_StatusDeflection Status = IntWalk_OK, aPrevStatus = IntWalk_OK;
Standard_Boolean NoTestDeflection = Standard_False;
Standard_Real SvParam[4], f;
Standard_Integer LevelOfEmptyInmyIntersectionOn2S=0;
@ -736,6 +736,8 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
Arrive = Standard_False;
while(!Arrive) //010
{
aPrevStatus = Status;
LevelOfIterWithoutAppend++;
if(LevelOfIterWithoutAppend>20)
{
@ -1126,7 +1128,13 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
Param(3)=SvParam[2];
Param(4)=SvParam[3];
LevelOfIterWithoutAppend = 0;
// In order to avoid cyclic changes
// (PasTropGrand --> Decrease step -->
// StepTooSmall --> Increase step --> PasTropGrand...)
// nullify LevelOfIterWithoutAppend only if the condition
// is satisfied:
if (aPrevStatus != IntWalk_PasTropGrand)
LevelOfIterWithoutAppend = 0;
break;
}
@ -2952,7 +2960,7 @@ IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
SquareDistance(CurrentPoint.Value());
if (aSqDist < tolconf*tolconf) {
if (aSqDist < Precision::SquareConfusion()) {
pasInit[0] = Max(pasInit[0], 5.0*ResoU1);
pasInit[1] = Max(pasInit[1], 5.0*ResoV1);
pasInit[2] = Max(pasInit[2], 5.0*ResoU2);

View File

@ -1,10 +1,8 @@
puts "TODO #22911 ALL: Error : The area of result shape is"
restore [locate_data_file a350] a
restore [locate_data_file b350] b
bop a b
bopfuse result
checkprops result -s 0
checkprops result -s 120.576
checkview -display result -2d -otherwise { a b } -s -path ${imagedir}/${test_image}.png

View File

@ -14,5 +14,5 @@ bcommon result b1 b2
checkprops result -s 1690.81
checkshape result
checknbshapes result -vertex 21 -edge 32 -wire 13 -face 13 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 82
checknbshapes result -vertex 20 -edge 31 -wire 13 -face 13 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 80
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -17,5 +17,5 @@ bcommon result b1 b2
checkprops result -s 1690.81
checkshape result
checknbshapes result -vertex 21 -edge 32 -wire 13 -face 13 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 82
checknbshapes result -vertex 20 -edge 31 -wire 13 -face 13 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 80
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -26,7 +26,7 @@ regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log1} full Tolerance
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log2} full Tolerance_Reached2 NbCurv2
set expected_Tolerance_Reached1 2.2611960020325053e-007
set expected_Tolerance_Reached2 5.6963104817869286e-006
set expected_Tolerance_Reached2 7.6423429413334924e-006
checkreal "Tolerance Reached" ${Tolerance_Reached1} ${expected_Tolerance_Reached1} ${tol_abs_Tolerance_Reached} ${tol_rel_Tolerance_Reached}
checkreal "Tolerance Reached" ${Tolerance_Reached2} ${expected_Tolerance_Reached2} ${tol_abs_Tolerance_Reached} ${tol_rel_Tolerance_Reached}

View File

@ -0,0 +1,21 @@
puts "========"
puts "OCC28492"
puts "========"
puts ""
##########################################
## Boolean common does not produce expected result
##########################################
restore [locate_data_file bug28492_case1.brep] a
explode a
bcommon result a_1 a_2
checknbshapes result -wire 2 -face 1 -t
checkprops result -s 1882.29
checkshape result
if {! [regexp "to be valid for BOP" [bopargcheck result] ] } {
puts "Error: bopargcheck failed"
}
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,21 @@
puts "========"
puts "OCC28492"
puts "========"
puts ""
##########################################
## Boolean common does not produce expected result
##########################################
restore [locate_data_file bug28492_case2.brep] a
explode a
bcommon result a_1 a_2
checknbshapes result -wire 1 -face 1 -t
checkprops result -s 77.8077
checkshape result
if {! [regexp "to be valid for BOP" [bopargcheck result] ] } {
puts "Error: bopargcheck failed"
}
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,27 @@
puts "========"
puts "OCC28492"
puts "========"
puts ""
##########################################
## Boolean common does not produce expected result
##########################################
restore [locate_data_file a350] a
restore [locate_data_file b350] b
bclearobjects
bcleartools
baddobjects a
baddtools b
bfillds
bbuild result
checknbshapes result -solid 3 -shell 3 -t
checkprops result -s 253.741 -v 82.9156
checkshape result
if {! [regexp "to be valid for BOP" [bopargcheck result] ] } {
puts "Error: bopargcheck failed"
}
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -4,5 +4,7 @@ set chamf_dist_angle [list "0.01 30" "0.008 30" "0.01 60" "0.015 60"
set chamf_dist_dist [list "0.01 0.006" "0.008 0.006" "0.01 0.012" "0.015 0.012" "0.01 0.006" "0.008 0.006" "0.01 0.012" "0.008 0.012"]
set chamf_equal_dist [list "0.01 " "0.008 " "0.01 " "0.015 " "0.01 " "0.008 " "0.01 " "0.008 "]
if { [string compare $command chamf] == 0 } {
puts "TODO OCC22909 All:chamfer is not done. compute of chamfer failed"
if { [string compare $group equal_dist] != 0 } {
puts "TODO OCC22909 All:chamfer is not done. compute of chamfer failed"
}
}