1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/bugs/modalg_5/bug24472
jgv 2a78ec6a07 0025192: Unification of LineConstructor algorithms used by GeomInt_IntSS and BOP
Small correction.

Correction of test case bug/modalg_5/bug24472
2014-09-04 13:50:37 +04:00

111 lines
1.9 KiB
Plaintext
Executable File

puts "========="
puts "CR24472"
puts "========="
puts ""
###############################
## Wrong section curves
###############################
proc checkList {List Tolerance D_good} {
set L1 [llength ${List}]
set L2 10
set L3 5
set N [expr (${L1} - ${L2})/${L3} + 1]
for {set i 1} {${i} <= ${N}} {incr i} {
set j1 [expr ${L2} + (${i}-1)*${L3}]
set j2 [expr ${j1} + 2]
set T [lindex ${List} ${j1}]
set D [lindex ${List} ${j2}]
#puts "i=${i} j1=${j1} j2=${j2} T=${T} D=${D}"
if { [expr abs(${D} - ${D_good})] > ${Tolerance} } {
puts "Error: i=${i} T=${T} D=${D}"
}
}
}
restore [locate_data_file bug24472_Pipe_1.brep] b1
explode b1 f
copy b1_2 f1
copy b1_3 f2
copy b1_6 f3
mksurface s1 f1
mksurface s2 f2
mksurface s3 f3
puts ""
puts "First test"
# 1.1 geometry
intersect i s1 s2
#donly i_22; fit
dlog reset
dlog on
xdistcs i_22 s1 0 1 10
set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}]
set Tolerance 1.0e-7
set D_good 0.
checkList ${List1} ${Tolerance} ${D_good}
puts ""
puts "Second test"
# 1.2 topology
bsection r f1 f2
bopcheck r
# r is self interfered
explode r e
mkcurve c r_1
#donly r_1; fit
dlog reset
dlog on
xdistcs c s1 0.0714822451660209 1 10
set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}]
set Tolerance 1.0e-12
set D_good 0.
checkList ${List2} ${Tolerance} ${D_good}
puts ""
puts "Third test"
# 2.1 geometry
intersect i s1 s3
#donly i_4; fit
dlog reset
dlog on
xdistcs i_4 s1 0 1 10
set Log3 [dlog get]
set List3 [split ${Log3} {TD= \t\n}]
set Tolerance 1.0e-6
set D_good 0.
checkList ${List3} ${Tolerance} ${D_good}
puts ""
puts "Fourth test"
# 2.2 topology
bsection r f1 f3
bopcheck r
#r is self interfered
explode r
mkcurve c r_1
#donly r_1; fit
dlog reset
dlog on
xdistcs c s1 0.0714822451660209 1 10
set Log4 [dlog get]
set List4 [split ${Log4} {TD= \t\n}]
set Tolerance 1.0e-12
set D_good 0.
checkList ${List4} ${Tolerance} ${D_good}