1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-30 13:05:50 +03:00
occt/tests/bugs/modalg_5/bug25742_2
nbv d30895f5da 0023178: Intersection of cylinders fails to produce results
1. Unification of trimmed and not-trimmed cylinders processing (IntPatch_Intersection::GeomGeomPerfomTrimSurf() method has been removed).
2. Interface of IntPatch_ImpImpIntersection::Perform(...) method has been changed.
3. Now, WLine purging is forbidden for Geom-Geom-Intersection.
4. Bnd_Range class has been created. See Bnd_Range.hxx for detail information.
5. Algorithm of AddBoundaryPoint function has been improved in order to obtain intersection points in both boundaries (VFirst and VLast of every surface).
6. Earlier, method Geom2dConvert::ConcatG1(...) increased resulted B-spline degree (in case of not succession of previous iteration). Now increased value has been limited by Geom2d_BSplineCurve::MaxDegree() value (max degree = 25).
7. Algorithm of B-spline closure definition has been changed in the methods Geom2dConvert::C0BSplineToC1BSplineCurve(...) and Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(...).

Creation of test case for this issue.
Adjusting test cases according to their new behavior.

Small correction in the code according to KGV's remark.
2016-10-07 13:37:31 +03:00

90 lines
1.7 KiB
Plaintext
Executable File

puts "============"
puts "OCC25742"
puts "============"
puts ""
###############################
## A partition of 2 shapes stresses a performance issue
###############################
if { [regexp {Debug mode} [dversion]] } {
if { [regexp {Windows} [dversion]] } {
set max_time 10
set max_time2 10
} else {
set max_time 10
set max_time2 10
}
} else {
if { [regexp {Windows} [dversion]] } {
set max_time 1
set max_time2 1
} else {
set max_time 1
set max_time2 1
}
}
restore [locate_data_file bug25742_pipeFiss.brep] b1
restore [locate_data_file bug25742_shellFiss.brep] b2
explode b1 f
explode b2 f
smallview
donly b1_4
fit
display b2_1
dchrono h reset
dchrono h start
bopcurves b1_4 b2_1 -2d
dchrono h stop
checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png
set q [dchrono h show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z
puts "$z"
if { $z > ${max_time} } {
puts "Elapsed time of bopcurves is more than ${max_time} seconds - Error"
} else {
puts "Elapsed time of bopcurves is less than ${max_time} seconds - OK"
}
mksurface s1 b1_4
mksurface s2 b2_1
dchrono h2 reset
dchrono h2 start
set CurveNumb [intersect resi s1 s2]
dchrono h2 stop
set q2 [dchrono h2 show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
puts "$z2"
if { $z2 > ${max_time2} } {
puts "Elapsed time of intersect is more than ${max_time2} seconds - Faulty"
} else {
puts "Elapsed time of intersect is less than ${max_time2} seconds - OK"
}
if { [llength ${CurveNumb}] < 1 } {
puts "Error : Bad intersection"
} else {
puts "OK : Good intersection"
}
don resi*
fit
display s1 s2
checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png