1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/bugs/moddata_3/bug24427_1
nbv 191478a581 0024427: Wrong section curves
Incorrect curve is got after Decompose method applying. This method's using should be restrict.
Decomposition is required if intersection curve contains some parts, where U-parameter on quadric surface changes too sharply.

Decompose method is called for Cone and Sphere only (it does not require for Cylinder).

Comments are changed by jgv.

Test case for issue CR24427

Added test case bugs/moddata_3/bug24427_2

Compiler warning is liquidated.
Test is corrected.
2014-01-20 14:45:31 +04:00

80 lines
1.5 KiB
Plaintext

puts "========="
puts "CR24427"
puts "========="
puts ""
###############################
## Wrong section curves
###############################
restore [locate_data_file bug24427_b1.brep] b1
restore [locate_data_file bug24427_b2.brep] b2
mksurface s1 b1
mksurface s2 b2
bop b1 b2
bopsection ressec
explode ressec e
mkcurve rr ressec_1
puts "First test"
dlog reset
dlog on
xdistcs rr s1 0 1 100
set Log1 [dlog get]
set List1 [split ${Log1} {TD= \t\n}]
set L1 [llength ${List1}]
set L2 10
set L3 5
set N [expr (${L1} - ${L2})/${L3} + 1]
set Tolerance 1.0e-7
set D_good 0.
for {set i 1} {${i} <= ${N}} {incr i} {
set j1 [expr ${L2} + (${i}-1)*${L3}]
set j2 [expr ${j1} + 2]
set T [lindex ${List1} ${j1}]
set D [lindex ${List1} ${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}"
}
}
puts "Second test"
dlog reset
dlog on
xdistcs rr s2 0 1 100
set Log2 [dlog get]
set List2 [split ${Log2} {TD= \t\n}]
set L1 [llength ${List2}]
set L2 10
set L3 5
set N [expr (${L1} - ${L2})/${L3} + 1]
set Tolerance 1.0e-7
set D_good 0.
for {set i 1} {${i} <= ${N}} {incr i} {
set j1 [expr ${L2} + (${i}-1)*${L3}]
set j2 [expr ${j1} + 2]
set T [lindex ${List2} ${j1}]
set D [lindex ${List2} ${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}"
}
}
donly rr s1t s2t
smallview
fit
set only_screen_axo 1