mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0029910: Porting to Debian80-64 : Regressions in Modeling Algorithms
Adjusting test cases. Creation of new test cases.
This commit is contained in:
parent
7c5f7e3e04
commit
e121dd4d58
@ -65,15 +65,17 @@ inline const gp_Dir& IntWalk_PWalking::TangentAtLine(Standard_Integer& theIndex)
|
|||||||
|
|
||||||
inline void IntWalk_PWalking::AddAPoint(const IntSurf_PntOn2S& POn2S) {
|
inline void IntWalk_PWalking::AddAPoint(const IntSurf_PntOn2S& POn2S) {
|
||||||
#if REGLAGE
|
#if REGLAGE
|
||||||
Standard_Integer n=theLine->NbPoints();
|
Standard_Integer n=line->NbPoints()+1;
|
||||||
|
if (n == 1)
|
||||||
|
{
|
||||||
|
std::cout << "Dump of WL" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if(n) {
|
if(n) {
|
||||||
gp_Vec V(POn2S.Value(),theLine->Value(n).Value());
|
|
||||||
Standard_Real u1,v1,u2,v2;
|
Standard_Real u1,v1,u2,v2;
|
||||||
Standard_Real U1,V1,U2,V2;
|
|
||||||
POn2S.Parameters(u1,v1,u2,v2);
|
POn2S.Parameters(u1,v1,u2,v2);
|
||||||
theLine->Value(n).Parameters(U1,V1,U2,V2);
|
printf("point p%d %+10.20f %+10.20f %+10.20f\n",
|
||||||
printf("\n%3d: (%10.5g)(%+12.5g %+12.5g %+12.5g) (%+12.5g %+12.5g) (%+12.5g %+12.5g)",n,
|
n, POn2S.Value().X(), POn2S.Value().Y(), POn2S.Value().Z());
|
||||||
V.Magnitude(),V.X(),V.Y(),V.Z(),U1-u1,V1-v1,U2-u2,V2-v2);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -950,56 +950,6 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <ShapeAnalysis_Edge.hxx>
|
|
||||||
|
|
||||||
static Standard_Integer OCC333bug (Draw_Interpretor& di, Standard_Integer n, const char ** a)
|
|
||||||
{
|
|
||||||
if( n < 3) {
|
|
||||||
di<<"-1\n";
|
|
||||||
di << "Usage: " << a[0] << " edge1 edge2 [toler domaindist]\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
TopoDS_Shape Sh1 = DBRep::Get(a[1]);
|
|
||||||
TopoDS_Shape Sh2 = DBRep::Get(a[2]);
|
|
||||||
if(Sh1.IsNull() || Sh2.IsNull()) {
|
|
||||||
di<<"-2\n";
|
|
||||||
di<<"Invalid arguments\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
TopoDS_Edge e1 = TopoDS::Edge(Sh1);
|
|
||||||
TopoDS_Edge e2 = TopoDS::Edge(Sh2);
|
|
||||||
if(e1.IsNull() || e2.IsNull()) {
|
|
||||||
di<<"-3\n";
|
|
||||||
di<<"Invalid type of arguments\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
Standard_Real aTol = Precision::Confusion();
|
|
||||||
Standard_Real aDistDomain = 0.0;
|
|
||||||
Standard_Integer k = 3;
|
|
||||||
if(k < n)
|
|
||||||
aTol = Draw::Atof(a[k++]);
|
|
||||||
if(k < n)
|
|
||||||
aDistDomain = Draw::Atof(a[k++]);
|
|
||||||
|
|
||||||
ShapeAnalysis_Edge sae;
|
|
||||||
if(sae.CheckOverlapping(e1,e2,aTol,aDistDomain)) {
|
|
||||||
if(aDistDomain ==0.0) {
|
|
||||||
di<<"1\n";
|
|
||||||
di<<"Edges is overlaping comletly\n";
|
|
||||||
} else {
|
|
||||||
di<<"2\n";
|
|
||||||
di<<"Edges is overlaped\n";
|
|
||||||
di<<"with tolerance = "<<aTol<<"\n";
|
|
||||||
di<<"on segment length = "<<aDistDomain<<"\n";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
di<<"3\n";
|
|
||||||
di<<"Edges is not overlaped\n";
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include <DDocStd_DrawDocument.hxx>
|
#include <DDocStd_DrawDocument.hxx>
|
||||||
#include <TDataStd_Name.hxx>
|
#include <TDataStd_Name.hxx>
|
||||||
#include <Draw.hxx>
|
#include <Draw.hxx>
|
||||||
@ -4830,8 +4780,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) {
|
|||||||
//theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group);
|
//theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group);
|
||||||
theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group);
|
theCommands.Add("OCC277","OCC277", __FILE__, OCC277bug, group);
|
||||||
|
|
||||||
theCommands.Add("OCC333","OCC333 edge1 edge2 [toler domaindist]; Check overlapping edges", __FILE__, OCC333bug, group);
|
|
||||||
|
|
||||||
theCommands.Add("OCC363", "OCC363 document filename ", __FILE__, OCC363, group);
|
theCommands.Add("OCC363", "OCC363 document filename ", __FILE__, OCC363, group);
|
||||||
// Must use OCC299
|
// Must use OCC299
|
||||||
//theCommands.Add("OCC372", "OCC372", __FILE__, OCC372, group);
|
//theCommands.Add("OCC372", "OCC372", __FILE__, OCC372, group);
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
pload QAcommands
|
|
||||||
|
|
||||||
puts "================"
|
puts "================"
|
||||||
puts "OCC251"
|
puts "OCC251: Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and section r2 f2 f1 give different results, one of result is invalid - overlapped edges."
|
||||||
puts "================"
|
puts "================"
|
||||||
puts ""
|
puts ""
|
||||||
###########################################################
|
|
||||||
## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and
|
|
||||||
## section r2 f2 f1 give different results, one of result is invalid - overlapped edges.
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
restore [locate_data_file OCC251.brep] f
|
restore [locate_data_file OCC251.brep] f
|
||||||
explode f
|
explode f
|
||||||
@ -17,19 +11,27 @@ checkshape f_2
|
|||||||
bsection result f_1 f_2
|
bsection result f_1 f_2
|
||||||
explode result
|
explode result
|
||||||
|
|
||||||
set status [OCC333 result_1 result_2]
|
foreach a [explode result e] {
|
||||||
if {[llength ${status}] < 1} {
|
foreach b [explode result e] {
|
||||||
puts "OCC251 ERROR"
|
if { ![regexp {not} [compare b_1 n_1]] } {
|
||||||
} else {
|
continue;
|
||||||
regexp {([-0-9.+eE]+)} $status full code
|
}
|
||||||
if { ${code} == 3 || ${code} == 2} {
|
|
||||||
puts "OCC251 OK (case 1) : Section command works properly"
|
set coe [checkoverlapedges e1 e2 5.0e-5]
|
||||||
} else {
|
|
||||||
puts "Faulty OCC251 (case 1): Section was made WRONGLY"
|
puts "$a <-> $b: $coe"
|
||||||
|
if { [regexp "Edges is not overlaped" $coe] != 1 } {
|
||||||
|
puts "Error: $a and $b are overlaped"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkprops result -l 1.
|
checkprops result -l 1.
|
||||||
checkshape result
|
checkshape result
|
||||||
checksection result
|
checksection result -r 2
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
|
||||||
|
smallview
|
||||||
|
don result*
|
||||||
|
fit
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
pload QAcommands
|
|
||||||
|
|
||||||
puts "================"
|
puts "================"
|
||||||
puts "OCC251"
|
puts "OCC251: Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and section r2 f2 f1 give different results, one of result is invalid - overlapped edges."
|
||||||
puts "================"
|
puts "================"
|
||||||
puts ""
|
puts ""
|
||||||
###########################################################
|
|
||||||
## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and
|
|
||||||
## section r2 f2 f1 give different results, one of result is invalid - overlapped edges.
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
restore [locate_data_file OCC251.brep] f
|
restore [locate_data_file OCC251.brep] f
|
||||||
explode f
|
explode f
|
||||||
@ -17,19 +11,27 @@ checkshape f_2
|
|||||||
bsection result f_2 f_1
|
bsection result f_2 f_1
|
||||||
explode result
|
explode result
|
||||||
|
|
||||||
set status [OCC333 result_1 result_2]
|
foreach a [explode result e] {
|
||||||
if {[llength ${status}] < 1} {
|
foreach b [explode result e] {
|
||||||
puts "OCC251 ERROR"
|
if { ![regexp {not} [compare b_1 n_1]] } {
|
||||||
} else {
|
continue;
|
||||||
regexp {([-0-9.+eE]+)} $status full code
|
}
|
||||||
if { ${code} == 3 || ${code} == 2 } {
|
|
||||||
puts "OCC251 OK (case 2) : Section command works properly"
|
set coe [checkoverlapedges e1 e2 5.0e-5]
|
||||||
} else {
|
|
||||||
puts "Faulty OCC251 (case 2): Section was made WRONGLY"
|
puts "$a <-> $b: $coe"
|
||||||
|
if { [regexp "Edges is not overlaped" $coe] != 1 } {
|
||||||
|
puts "Error: $a and $b are overlaped"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkprops result -l 1.
|
checkprops result -l 1.
|
||||||
checkshape result
|
checkshape result
|
||||||
checksection result
|
checksection result -r 2
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
|
||||||
|
smallview
|
||||||
|
don result*
|
||||||
|
fit
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
|
puts "========================"
|
||||||
|
puts " OCC600: Result of BOPCOMMON operation is unclosed shape inspite of source solids are valid"
|
||||||
|
puts "========================"
|
||||||
|
|
||||||
|
cpulimit 200
|
||||||
|
|
||||||
puts "========================"
|
|
||||||
puts " OCC600"
|
|
||||||
puts "========================"
|
|
||||||
## Result of BOPCOMMON operation is unclosed shape inspite of source solids are valid
|
|
||||||
############################################################
|
|
||||||
cpulimit 5000
|
|
||||||
restore [locate_data_file OCC600_1.brep] a
|
restore [locate_data_file OCC600_1.brep] a
|
||||||
checkshape a
|
checkshape a
|
||||||
restore [locate_data_file OCC600_2.brep] b
|
restore [locate_data_file OCC600_2.brep] b
|
||||||
checkshape b
|
checkshape b
|
||||||
bop b a
|
bop b a
|
||||||
|
|
||||||
bopcommon result
|
bopsection rs
|
||||||
|
checksection rs -r 0
|
||||||
|
checkprops rs -l 1439.11
|
||||||
|
|
||||||
set square 41970.8
|
bopcommon result
|
||||||
|
|
||||||
set nbshapes_expected "
|
set nbshapes_expected "
|
||||||
Number of shapes in shape
|
Number of shapes in shape
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
puts "TODO OCC28119 ALL: Error: Cannot find the result of BLEND-operation. The result of BOP operation will be returned."
|
|
||||||
|
|
||||||
puts "========"
|
puts "========"
|
||||||
puts "OCC28119"
|
puts "OCC28119: Blend fails on fused identical but shifted tori"
|
||||||
puts "========"
|
puts "========"
|
||||||
puts ""
|
puts ""
|
||||||
#################################################
|
|
||||||
# Blend fails on fused identical but shifted tori
|
# Different result between Debian 7 and Debian 8.
|
||||||
#################################################
|
puts "TODO ?OCC28119 ALL: Error: Cannot find the result of BLEND-operation. The result of BOP operation will be returned."
|
||||||
|
puts "TODO ?OCC29910 ALL: exception"
|
||||||
|
puts "TODO ?OCC29910 ALL: Exception"
|
||||||
|
puts "TODO ?OCC29910 ALL: Error: Exception in bfuseblend operation"
|
||||||
|
|
||||||
|
cpulimit 200
|
||||||
|
|
||||||
# identical secondary radi
|
# identical secondary radi
|
||||||
|
|
||||||
@ -14,7 +17,9 @@ ptorus t1 100 10
|
|||||||
ptorus t2 100 10
|
ptorus t2 100 10
|
||||||
ttranslate t2 100 0 0
|
ttranslate t2 100 0 0
|
||||||
|
|
||||||
bfuseblend result t1 t2 5
|
if { [ catch { bfuseblend result t1 t2 5 } catch_result ] } {
|
||||||
|
puts "Error: Exception in bfuseblend operation."
|
||||||
|
}
|
||||||
|
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
||||||
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
||||||
|
@ -16,11 +16,12 @@ don f
|
|||||||
fit
|
fit
|
||||||
|
|
||||||
# Before the fix: Exception in Debug-mode only
|
# Before the fix: Exception in Debug-mode only
|
||||||
set log [bopcurves f_1 f_2 -2d]
|
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f_1 f_2 -2d] full Toler NbCurv
|
||||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
|
||||||
|
|
||||||
regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log} full Toler
|
checkreal Tolerance $Toler 4.601149532364662e-008 1.0e-7 0.0
|
||||||
|
|
||||||
if { ${Toler} > 1.e-7} {
|
if {$NbCurv != 1} {
|
||||||
puts "Error: bad tolerance of result"
|
puts "Error: Please check NbCurves for intersector"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||||
|
46
tests/bugs/modalg_7/bug29910_1
Normal file
46
tests/bugs/modalg_7/bug29910_1
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC29910: Porting to Debian80-64 : Regressions in Modeling Algorithms"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
# Different result between Debian 7 and Debian 8.
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : is WRONG because number of EDGE entities in shape \"rs\" is 16"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : is WRONG because number of SHELL entities in shape \"result\" is 5"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : is WRONG because number of SOLID entities in shape \"result\" is 5"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : The area of result shape is"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : The volume of result shape is"
|
||||||
|
|
||||||
|
ptorus t1 100 10
|
||||||
|
ptorus t2 100 10
|
||||||
|
ttranslate t2 100 0 0
|
||||||
|
axo; fit
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
baddobjects t1
|
||||||
|
baddtools t2
|
||||||
|
bfillds
|
||||||
|
bbop rs 4
|
||||||
|
|
||||||
|
checksection rs -r 0
|
||||||
|
|
||||||
|
checkshape rs
|
||||||
|
|
||||||
|
if {[regexp "Faulties" [bopargcheck rs]]} {
|
||||||
|
puts "Error: bopargcheck has found some faulties in result"
|
||||||
|
}
|
||||||
|
|
||||||
|
checkmaxtol rs -ref 7.5e-6
|
||||||
|
checknbshapes rs -edge 14
|
||||||
|
checkprops rs -l 330.096
|
||||||
|
|
||||||
|
bbuild result
|
||||||
|
|
||||||
|
checknbshapes result -shell 6 -solid 6
|
||||||
|
checkshape result
|
||||||
|
checkprops result -v 382445 -s 82663
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don result
|
||||||
|
fit
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
37
tests/bugs/modalg_7/bug29910_2
Normal file
37
tests/bugs/modalg_7/bug29910_2
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC29910: Porting to Debian80-64 : Regressions in Modeling Algorithms"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
# Different result between Debian 7 and Debian 8 and between MSVC 2010 and 2017.
|
||||||
|
puts "TODO ?OCC29910 Windows: Error: Tolerance = 4.0169383828521568e-006 is not equal to expected"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error: Tolerance = 6.0392296447644325e-07 is not equal to expected"
|
||||||
|
puts "TODO ?OCC29910 ALL: Error : is WRONG because number of VERTEX entities in shape \"result\" is 7"
|
||||||
|
puts "TODO ?OCC29910 ALL: Error : is WRONG because number of EDGE entities in shape \"result\" is 5"
|
||||||
|
|
||||||
|
restore [locate_data_file bug29910_f1.brep] f1
|
||||||
|
restore [locate_data_file bug29910_f2.brep] f2
|
||||||
|
|
||||||
|
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f1 f2 -2d] full Toler NbCurv
|
||||||
|
|
||||||
|
checkreal Tolerance $Toler 1.0e-7 1.0e-7 0.0
|
||||||
|
|
||||||
|
if {$NbCurv != 4} {
|
||||||
|
puts "Error: Please check NbCurves for intersector"
|
||||||
|
}
|
||||||
|
|
||||||
|
bsection result f1 f2
|
||||||
|
checksection result -r 4
|
||||||
|
checkshape result
|
||||||
|
checknbshapes result -edge 4 -vertex 6
|
||||||
|
checkprops result -l 97.2011
|
||||||
|
|
||||||
|
if {[regexp "Faulties" [bopargcheck result]]} {
|
||||||
|
puts "Error: bopargcheck has found some faulties in result"
|
||||||
|
}
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don result
|
||||||
|
fit
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
@ -1,37 +1,72 @@
|
|||||||
puts "================"
|
puts "================"
|
||||||
puts "OCC333"
|
puts "OCC333: Superimposed curves during intersection two surfaces "
|
||||||
puts "================"
|
puts "================"
|
||||||
puts ""
|
puts ""
|
||||||
#######################################################
|
|
||||||
## Superimposed curves during intersection two surfaces
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
pload QAcommands
|
set GoodNbCurv 14
|
||||||
|
|
||||||
restore [locate_data_file OCC333a.draw] s12
|
restore [locate_data_file OCC333a.draw] s1
|
||||||
############### checkshape su12 # is not a topological shape
|
restore [locate_data_file OCC333b.draw] s2
|
||||||
restore [locate_data_file OCC333b.draw] s11
|
|
||||||
############### checkshape su11 # is not a topological shape
|
|
||||||
intersect result s12 s11
|
|
||||||
explode result e
|
|
||||||
clknots result_3
|
|
||||||
clknots result_13
|
|
||||||
|
|
||||||
mkedge e_1 result_3
|
intersect result s1 s2
|
||||||
mkedge e_2 result_13
|
|
||||||
|
|
||||||
set status [OCC333 e_1 e_2]
|
set che [whatis result]
|
||||||
if {[llength ${status}] < 1} {
|
set ind [string first "3d curve" $che]
|
||||||
puts "OCC333 ERROR"
|
if {${ind} >= 0} {
|
||||||
|
#Only variable "result" exists
|
||||||
|
renamevar result result_1
|
||||||
|
}
|
||||||
|
|
||||||
|
set ic 1
|
||||||
|
set AllowRepeate 1
|
||||||
|
while { $AllowRepeate != 0 } {
|
||||||
|
set che [whatis result_$ic]
|
||||||
|
set ind [string first "3d curve" $che]
|
||||||
|
if {${ind} < 0} {
|
||||||
|
set AllowRepeate 0
|
||||||
} else {
|
} else {
|
||||||
regexp {([-0-9.+eE]+)} ${status} full code
|
display result_$ic
|
||||||
if { ${code} == 3 || ${code} == 2} {
|
|
||||||
puts "OCC333 OK : Intersection command works properly"
|
bounds result_$ic U1 U2
|
||||||
} else {
|
|
||||||
puts "Faulty OCC333 : Intersection was made WRONGLY"
|
dump U1 U2
|
||||||
|
|
||||||
|
if {[dval U2-U1] < 1.0e-9} {
|
||||||
|
puts "Error: Wrong curve's range!"
|
||||||
|
}
|
||||||
|
|
||||||
|
xdistcs result_$ic s1 U1 U2 10 2.0e-7
|
||||||
|
xdistcs result_$ic s2 U1 U2 10 2.0e-7
|
||||||
|
|
||||||
|
for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } {
|
||||||
|
mkedge e1 result_$ic
|
||||||
|
mkedge e2 result_$ip
|
||||||
|
|
||||||
|
set coe [checkoverlapedges e1 e2 5.0e-5]
|
||||||
|
|
||||||
|
puts "result_$ic <-> result_$ip: $coe"
|
||||||
|
if { [regexp "Edges is not overlaped" $coe] != 1 } {
|
||||||
|
puts "Error: result_$ic and result_$ip are overlaped"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
donly i_3 i_13
|
incr ic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
incr ic -1
|
||||||
|
|
||||||
|
if {$ic == $GoodNbCurv} {
|
||||||
|
puts "OK: Number of curves is good!"
|
||||||
|
} else {
|
||||||
|
puts "Error: $GoodNbCurv curves are expected but $ic ones are found!"
|
||||||
|
}
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don result*
|
||||||
|
fit
|
||||||
|
clear
|
||||||
|
don s1 s2 result*
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||||
|
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
puts "TODO OCC12345 ALL: Faulty OCC565: function intersection works wrongly with trimmed Surfaces"
|
|
||||||
puts "TODO OCC12345 Linux: Faulty OCC565: function intersection works wrongly with infinite Surfaces"
|
|
||||||
puts "TODO OCC12345 MacOS: Faulty OCC565: function intersection works wrongly with infinite Surfaces"
|
|
||||||
|
|
||||||
puts "========"
|
|
||||||
puts "OCC567"
|
|
||||||
puts "========"
|
|
||||||
puts ""
|
|
||||||
#######################################
|
|
||||||
## Can not intersect two Rectangular Trimmed Surfaces .
|
|
||||||
#######################################
|
|
||||||
|
|
||||||
restore [locate_data_file OCC567a.draw] s1
|
|
||||||
restore [locate_data_file OCC567b.draw] s2
|
|
||||||
|
|
||||||
if { [checkplatform -windows] } {
|
|
||||||
puts "OS = Windows NT"
|
|
||||||
set N_repeat 10
|
|
||||||
} else {
|
|
||||||
puts "OS = Linux"
|
|
||||||
set N_repeat 11
|
|
||||||
}
|
|
||||||
|
|
||||||
if { [catch {intersect i s1 s2 } catch_result] } {
|
|
||||||
puts "Faulty OCC565: function intersection works wrongly with infinite Surfaces"
|
|
||||||
} else {
|
|
||||||
set j 1
|
|
||||||
repeat ${N_repeat} {
|
|
||||||
set err [lindex [whatis i_$j] 5]
|
|
||||||
if { $err != "curve"} {
|
|
||||||
puts " Faulty OCC565: function intersection works wrongly with infinite Surfaces"
|
|
||||||
break
|
|
||||||
} else {
|
|
||||||
puts [format "%s ) OCC565 OK: function intersection works with infinite Surfaces" $j]
|
|
||||||
}
|
|
||||||
incr j}
|
|
||||||
}
|
|
||||||
|
|
||||||
trim s1x s1 0 2*pi 0 2*pi/13
|
|
||||||
trim s2x s2 0 2*pi 0 2*pi/13
|
|
||||||
|
|
||||||
if { [catch {intersect result s1x s2x } catch_result] } {
|
|
||||||
puts "Faulty OCC565 exception: function intersection works wrongly with trimmed Surfaces"
|
|
||||||
} else {
|
|
||||||
set nom 0
|
|
||||||
set j 1
|
|
||||||
repeat 11 {
|
|
||||||
set err [lindex [whatis result_$j] 5]
|
|
||||||
if { $err != "curve"} {
|
|
||||||
break
|
|
||||||
} else {
|
|
||||||
set nom [expr $nom + 1]
|
|
||||||
}
|
|
||||||
incr j
|
|
||||||
}
|
|
||||||
if { $nom == 0} {
|
|
||||||
puts "Faulty OCC565: function intersection works wrongly with trimmed Surfaces"
|
|
||||||
} else {
|
|
||||||
puts " OCC565 OK: function intersection works with trimmed Surfaces"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
94
tests/bugs/moddata_2/bug567_1
Normal file
94
tests/bugs/moddata_2/bug567_1
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC567: Can not intersect two Rectangular Trimmed Surfaces ."
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
# Different result between Debian 7 and Debian 8 and between MSVC 2010 and 2017.
|
||||||
|
puts "TODO ?OCC30012 Linux: Error: 10 curves are expected but 9 ones are found."
|
||||||
|
puts "TODO ?OCC30012 Linux: Error: 10 curves are expected but 8 ones are found."
|
||||||
|
puts "TODO ?OCC29910 Windows: Error: 10 curves are expected but 11 ones are found."
|
||||||
|
puts "TODO ?OCC29910 Windows: Error : is WRONG because number of EDGE entities in shape \"rs\" is 15"
|
||||||
|
puts "TODO ?OCC29910 Linux: Error : is WRONG because number of EDGE entities in shape \"rs\" is 8"
|
||||||
|
puts "TODO ?OCC29910 Windows: Error: 0 vertices are expected but 2 are found"
|
||||||
|
|
||||||
|
set GoodNbCurves 10
|
||||||
|
|
||||||
|
foreach a [directory res*] {unset $a}
|
||||||
|
|
||||||
|
restore [locate_data_file OCC567a.draw] s1
|
||||||
|
restore [locate_data_file OCC567b.draw] s2
|
||||||
|
|
||||||
|
if { [catch {intersect res s1 s2 } catch_result] } {
|
||||||
|
puts "Faulty OCC567: function intersection works wrongly with infinite Surfaces"
|
||||||
|
} else {
|
||||||
|
set che [whatis res]
|
||||||
|
set ind [string first "3d curve" $che]
|
||||||
|
if {${ind} >= 0} {
|
||||||
|
#Only variable "res" exists
|
||||||
|
renamevar res res_1
|
||||||
|
}
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
|
||||||
|
set ic 1
|
||||||
|
set AllowRepeat 1
|
||||||
|
while { $AllowRepeat != 0 } {
|
||||||
|
set che [whatis res_$ic]
|
||||||
|
set ind [string first "3d curve" $che]
|
||||||
|
if {${ind} < 0} {
|
||||||
|
set AllowRepeat 0
|
||||||
|
} else {
|
||||||
|
|
||||||
|
bounds res_$ic U1 U2
|
||||||
|
|
||||||
|
if {[dval U2-U1] < 1.0e-9} {
|
||||||
|
puts "Error: Wrong curve's range!"
|
||||||
|
}
|
||||||
|
|
||||||
|
xdistcs res_$ic s1 U1 U2 100 2.0e-7
|
||||||
|
xdistcs res_$ic s2 U1 U2 100 2.0e-7
|
||||||
|
|
||||||
|
for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } {
|
||||||
|
mkedge e1 res_$ic
|
||||||
|
mkedge e2 res_$ip
|
||||||
|
|
||||||
|
set coe [checkoverlapedges e1 e2 5.0e-5]
|
||||||
|
|
||||||
|
puts "res_$ic <-> res_$ip: $coe"
|
||||||
|
if { [regexp "Edges is not overlaped" $coe] != 1 } {
|
||||||
|
puts "Error: res_$ic and res_$ip are overlaped"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mkedge ee res_$ic
|
||||||
|
baddobjects ee
|
||||||
|
|
||||||
|
incr ic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
incr ic -1
|
||||||
|
|
||||||
|
if {$ic != $GoodNbCurves} {
|
||||||
|
puts "Error: $GoodNbCurves curves are expected but $ic ones are found."
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$ic != 1} {
|
||||||
|
# Check of gaps between intersection curves
|
||||||
|
bfillds
|
||||||
|
bbuild rs
|
||||||
|
|
||||||
|
checknbshapes rs -edge 14
|
||||||
|
checksection rs -r 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don res_*
|
||||||
|
|
||||||
|
fit
|
||||||
|
don s1 s2
|
||||||
|
disp res_*
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
89
tests/bugs/moddata_2/bug567_2
Normal file
89
tests/bugs/moddata_2/bug567_2
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC567: Can not intersect two Rectangular Trimmed Surfaces ."
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
set GoodNbCurves 1
|
||||||
|
|
||||||
|
restore [locate_data_file OCC567a.draw] s1
|
||||||
|
restore [locate_data_file OCC567b.draw] s2
|
||||||
|
|
||||||
|
foreach a [directory res*] {unset $a}
|
||||||
|
|
||||||
|
trim s1x s1 0 2*pi 0 2*pi/13
|
||||||
|
trim s2x s2 0 2*pi 0 2*pi/13
|
||||||
|
|
||||||
|
if { [catch {intersect res s1x s2x } catch_result] } {
|
||||||
|
puts "Faulty OCC565 exception: function intersection works wrongly with trimmed Surfaces"
|
||||||
|
} else {
|
||||||
|
set che [whatis res]
|
||||||
|
set ind [string first "3d curve" $che]
|
||||||
|
if {${ind} >= 0} {
|
||||||
|
#Only variable "res" exists
|
||||||
|
renamevar res res_1
|
||||||
|
}
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
|
||||||
|
set ic 1
|
||||||
|
set AllowRepeat 1
|
||||||
|
while { $AllowRepeat != 0 } {
|
||||||
|
set che [whatis res_$ic]
|
||||||
|
set ind [string first "3d curve" $che]
|
||||||
|
if {${ind} < 0} {
|
||||||
|
set AllowRepeat 0
|
||||||
|
} else {
|
||||||
|
|
||||||
|
bounds res_$ic U1 U2
|
||||||
|
|
||||||
|
if {[dval U2-U1] < 1.0e-9} {
|
||||||
|
puts "Error: Wrong curve's range!"
|
||||||
|
}
|
||||||
|
|
||||||
|
xdistcs res_$ic s1 U1 U2 100 2.0e-7
|
||||||
|
xdistcs res_$ic s2 U1 U2 100 2.0e-7
|
||||||
|
|
||||||
|
for { set ip [expr $ic-1] } { $ip > 0 } { incr ip -1 } {
|
||||||
|
mkedge e1 res_$ic
|
||||||
|
mkedge e2 res_$ip
|
||||||
|
|
||||||
|
set coe [checkoverlapedges e1 e2 5.0e-5]
|
||||||
|
|
||||||
|
puts "res_$ic <-> res_$ip: $coe"
|
||||||
|
if { [regexp "Edges is not overlaped" $coe] != 1 } {
|
||||||
|
puts "Error: res_$ic and res_$ip are overlaped"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mkedge ee res_$ic
|
||||||
|
baddobjects ee
|
||||||
|
|
||||||
|
incr ic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
incr ic -1
|
||||||
|
|
||||||
|
if {$ic != $GoodNbCurves} {
|
||||||
|
puts "Error: $GoodNbCurves curves are expected but $ic ones are found."
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$ic != 1} {
|
||||||
|
# Check of gaps between intersection curves
|
||||||
|
bfillds
|
||||||
|
bbuild rs
|
||||||
|
|
||||||
|
checknbshapes rs -edge 1
|
||||||
|
checksection rs -r 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
smallview
|
||||||
|
don res_*
|
||||||
|
|
||||||
|
fit
|
||||||
|
don s1 s2
|
||||||
|
disp res_*
|
||||||
|
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user