1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029694: Geom2dGcc_Circ2dTanCenGeo crash

The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.

Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.

New testgrid "lowalgos 2dgcc" has been created.
This commit is contained in:
nbv
2018-05-22 12:15:27 +03:00
committed by bugmaster
parent 638ad7f3c5
commit 894dba72a3
16 changed files with 265 additions and 272 deletions

View File

@@ -0,0 +1,12 @@
puts "======================="
puts "BUC60607"
puts "It takes visual check for this BUC"
puts "======================="
set len_ch 2513
point p 1600 300
line l 0 500 2000 500
cirtang c -p p -c l -r 400
checklength c_1 -l 2513.2741228718346
checklength c_2 -l 2513.2741228718346

View File

@@ -0,0 +1,8 @@
puts "======================="
puts "BUC60607"
puts "It takes visual check for this BUC"
puts "======================="
point p 1600 300
line l 0 500 2000 500
cirtang c1 -p p -c l -r 200

View File

@@ -0,0 +1,8 @@
puts "======================="
puts "BUC60607"
puts "It takes visual check for this BUC"
puts "======================="
point p2 1400 1400
line l2 3000 1700 1000 1550
cirtang c3 -p p2 -c l2 -r 300

View File

@@ -0,0 +1,8 @@
puts "======================="
puts "BUC60607"
puts "It takes visual check for this BUC"
puts "======================="
point p2 1400 1400
line l2 3000 1700 1000 1550
cirtang result -p p2 -c l2 -r 150

View File

@@ -0,0 +1,21 @@
puts "=================================="
puts "BUC60618"
puts "=================================="
puts "There was a problem filter of solutions. Several solutions were skipped."
puts ""
puts "It takes visual check for this BUG"
puts "=================================="
puts ""
circle c1 0 0 100
circle c2 500 -400 300
circle c3 300 200 200
cirtang result -c c1 -c c2 -c c3
checklength result_1 -l 3568.9587306060739
checklength result_2 -l 9964.7111736227271
checklength result_3 -l 2082.9371204466097
checklength result_4 -l 32696.069757517998
checklength result_5 -l 1681.9298517645602
checklength result_6 -l 3097.3731840080009
checklength result_7 -l 1545.2428620020787
checklength result_8 -l 772.26646380656518

View File

@@ -0,0 +1,14 @@
puts "=========="
puts "BUC60622"
puts "=========="
puts ""
puts "=================================="
puts "It takes visual check for this BUG"
puts "=================================="
puts ""
circle c1 2900 800 500
circle c2 2900 900 400
circle c3 2900 1000 300
catch {cirtang result -c c1 -c c2 -c c3}

View File

@@ -0,0 +1,17 @@
puts "=================================="
puts "BUC60622"
puts "=================================="
puts "There was an infinity of solutions and also c1, c2 and c3 are solutions"
puts ""
puts "It takes visual check for this BUG"
puts "=================================="
puts ""
circle c1 500 1800 500
circle c2 500 1900 400
circle c3 700 1900 200
cirtang result -c c1 -c c2 -c c3
checklength result_1 -l 2513.2741228703289
checklength result_2 -l 837.75804095727631
checklength result_3 -l 279.2526803190928

View File

@@ -0,0 +1,19 @@
puts "=================================="
puts "BUC60622"
puts "=================================="
puts "There was an infinity of solutions and also c1, c2 and c3 are solutions"
puts ""
puts "It takes visual check for this BUG"
puts "=================================="
puts ""
circle c3 500 3000 250
circle c2 375 3000 125
circle c1 625 3000 125
cirtang result -c c1 -c c2 -c c3
checklength result_1 -l 1570.7963267948965
checklength result_2 -l 785.39816339744868
checklength result_3 -l 785.39816339744823
checklength result_4 -l 523.59877559829806
checklength result_5 -l 523.59877559829806

View File

@@ -0,0 +1,20 @@
puts "========"
puts "BUC60941"
puts "========"
puts ""
############################################################
## When try to use Geom2dGcc_Circ2d2TanRad with two curves it rise exception.
############################################################
circle curve_1 1.79356127430613 -11.9148900515605 12.0491272292007
set poles { { 0 0 1 } { -2.14533906935467 4.92056269221697 1 } { -0.537398638327716 10.0937503357781 1 } { 10.3564232507092 8.73929826869582 1 } { 16.6366922939454 3.11858911810943 1 } { 16.39 -0.262 1 } }
set knots { { 0 4 } { 8.6971225126475 1 } { 16.903955884905 1 } { 28.0087167558108 4 } }
eval 2dbsplinecurve curve_2 3 [ llength $knots ] [ join $knots ] [ join $poles ]
if [catch {cirtang result -c curve_1 -c curve_2 -r 2} catch_result] {
puts "Faulty BUC60941: function cirtang works wrongly"
} else {
puts "BUC60941 OK: function cirtang works properly"
}

View File

@@ -0,0 +1,38 @@
puts "========"
puts "OCC23866"
puts "========"
puts ""
########################################
# GccAna_Circ2d3Tan does not find a circle
########################################
restore [locate_data_file bug23866_3curves.brep] 3curves
explode 3curves
mkcurve 3d_curve_1 3curves_1
mkcurve 3d_curve_2 3curves_2
mkcurve 3d_curve_3 3curves_3
to2d 2d_curve_1 3d_curve_1
to2d 2d_curve_2 3d_curve_2
to2d 2d_curve_3 3d_curve_3
foreach a [directory cir*] { unset $a }
cirtang cir -c 2d_curve_1 -c 2d_curve_2 -c 2d_curve_3
set circles_Nb [llength [directory cir*] ]
if { ${circles_Nb} != 8 } {
puts "Error: GccAna_Circ2d3Tan does not find a circle"
} else {
puts "OK: GccAna_Circ2d3Tan find a circle"
checklength cir_1 -l 9429.8727947293246
checklength cir_2 -l 888.65915068757909
checklength cir_3 -l 8.5227983514817236
checklength cir_4 -l 6.2260879234386
checklength cir_5 -l 14054.240322333564
checklength cir_6 -l 596.25725451268329
checklength cir_7 -l 7.6941358383928531
checklength cir_8 -l 6.8966408969867814
}

View File

@@ -0,0 +1,18 @@
puts "========"
puts "0029694: Geom2dGcc_Circ2dTanCenGeo crash"
puts "========"
puts ""
point pp 1 1
2dbsplinecurve cc 1 2 0 2 1 2 -10 -5 1 10 -5 1
if { ![regexp {Solution of type C-P is} [cirtang result -p pp -c cc] ] } {
puts "Error: Cannot find any solution"
}
regexp "Center\\s*:\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*" [dump result_1] full pcx pcy
checkreal CenterX $pcx 1.0 1.0e-7 0
checkreal CenterX $pcy 1.0 1.0e-7 0
checkdump result_1 -name Radius -ref 6

View File

@@ -0,0 +1,10 @@
point p 0 0
line l 10 0 -1 1
cirtang c -p p -c l -r 4
smallview -2D-
don c_1 c_2
2dfit
disp l p
checkview -screenshot -2d -path ${imagedir}/${test_image}.png