From 61c421bffac1a58c86036c89c6dfebc8cb06f3e7 Mon Sep 17 00:00:00 2001 From: apn Date: Fri, 11 Jan 2013 15:30:11 +0400 Subject: [PATCH] Adjusting bugs group for current state of OCCT --- tests/bugs/caf/bug1054_1 | 569 +++++++++++++++++++++++++++++++++ tests/bugs/caf/bug1054_2 | 318 ++++++++++++++++++ tests/bugs/caf/bug114 | 2 +- tests/bugs/caf/bug1395_1 | 64 ++++ tests/bugs/caf/bug1395_2 | 61 ++++ tests/bugs/caf/bug1454 | 34 ++ tests/bugs/caf/bug159 | 28 ++ tests/bugs/caf/bug1722 | 98 ++++++ tests/bugs/caf/bug1724 | 169 ++++++++++ tests/bugs/caf/bug1726 | 26 ++ tests/bugs/caf/bug1919 | 114 +++++++ tests/bugs/caf/bug2269 | 51 +++ tests/bugs/caf/bug267_1 | 11 + tests/bugs/caf/bug267_2 | 31 ++ tests/bugs/caf/bug2932_10 | 73 +++++ tests/bugs/caf/bug2932_11 | 70 ++++ tests/bugs/caf/bug2932_12 | 94 ++++++ tests/bugs/caf/bug2932_13 | 76 +++++ tests/bugs/caf/bug2932_14 | 73 +++++ tests/bugs/caf/bug2932_15 | 69 ++++ tests/bugs/caf/bug2932_16 | 73 +++++ tests/bugs/caf/bug2932_17 | 71 ++++ tests/bugs/caf/bug2932_18 | 115 +++++++ tests/bugs/caf/bug2932_19 | 73 +++++ tests/bugs/caf/bug2932_20 | 70 ++++ tests/bugs/caf/bug2932_21 | 71 ++++ tests/bugs/caf/bug2932_22 | 73 +++++ tests/bugs/caf/bug2932_23 | 69 ++++ tests/bugs/caf/bug2932_24 | 72 +++++ tests/bugs/caf/bug2932_3 | 75 +++++ tests/bugs/caf/bug2932_4 | 69 ++++ tests/bugs/caf/bug2932_5 | 91 ++++++ tests/bugs/caf/bug2932_6 | 71 ++++ tests/bugs/caf/bug2932_7 | 70 ++++ tests/bugs/caf/bug2932_8 | 116 +++++++ tests/bugs/caf/bug2932_9 | 69 ++++ tests/bugs/caf/bug644 | 30 ++ tests/bugs/fclasses/bug11568_3 | 18 ++ tests/bugs/fclasses/bug11568_4 | 18 ++ tests/bugs/fclasses/bug142 | 8 + tests/bugs/fclasses/bug181_1 | 36 +++ tests/bugs/fclasses/bug181_2 | 38 +++ tests/bugs/fclasses/bug216 | 7 + tests/bugs/fclasses/bug309 | 44 +++ tests/bugs/fclasses/bug310 | 35 ++ tests/bugs/fclasses/bug6143 | 31 ++ tests/bugs/fclasses/bug983 | 24 ++ tests/bugs/iges/bug5079 | 14 + tests/bugs/iges/bug6508 | 16 + tests/bugs/iges/bug663 | 23 ++ tests/bugs/modalg/bug10160_1 | 59 ++++ tests/bugs/modalg/bug10160_10 | 54 ++++ tests/bugs/modalg/bug10160_11 | 54 ++++ tests/bugs/modalg/bug10160_12 | 54 ++++ tests/bugs/modalg/bug10160_2 | 57 ++++ tests/bugs/modalg/bug10160_3 | 56 ++++ tests/bugs/modalg/bug10160_4 | 56 ++++ tests/bugs/modalg/bug10160_5 | 55 ++++ tests/bugs/modalg/bug10160_6 | 57 ++++ tests/bugs/modalg/bug10160_7 | 56 ++++ tests/bugs/modalg/bug10160_8 | 55 ++++ tests/bugs/modalg/bug10160_9 | 54 ++++ tests/bugs/modalg/bug10232 | 38 +++ tests/bugs/modalg/bug10435_1 | 38 +++ tests/bugs/modalg/bug10435_2 | 34 ++ tests/bugs/modalg/bug10605_1 | 34 ++ tests/bugs/modalg/bug10605_2 | 34 ++ tests/bugs/modalg/bug10605_3 | 34 ++ tests/bugs/modalg/bug10605_4 | 34 ++ tests/bugs/modalg/bug10605_5 | 33 ++ tests/bugs/modalg/bug10606_1 | 34 ++ tests/bugs/modalg/bug10606_2 | 34 ++ tests/bugs/modalg/bug10606_3 | 34 ++ tests/bugs/modalg/bug10606_4 | 34 ++ tests/bugs/modalg/bug10606_5 | 34 ++ tests/bugs/modalg/bug1077 | 16 + tests/bugs/modalg/bug10842_1 | 36 +++ tests/bugs/modalg/bug10842_2 | 36 +++ tests/bugs/modalg/bug10842_3 | 36 +++ tests/bugs/modalg/bug10842_4 | 36 +++ tests/bugs/modalg/bug10842_5 | 34 ++ tests/bugs/modalg/bug10846_1 | 34 ++ tests/bugs/modalg/bug10846_2 | 34 ++ tests/bugs/modalg/bug10846_3 | 34 ++ tests/bugs/modalg/bug10846_4 | 34 ++ tests/bugs/modalg/bug10846_5 | 22 ++ tests/bugs/modalg/bug12213 | 47 +++ tests/bugs/modalg/bug12257 | 37 +++ tests/bugs/modalg/bug1226 | 24 ++ tests/bugs/modalg/bug1243_1 | 26 ++ tests/bugs/modalg/bug1243_2 | 26 ++ tests/bugs/modalg/bug1255 | 16 + tests/bugs/modalg/bug1255_1 | 24 ++ tests/bugs/modalg/bug1360 | 19 ++ tests/bugs/modalg/bug1456 | 36 +++ tests/bugs/modalg/bug1477_1 | 25 ++ tests/bugs/modalg/bug1477_10 | 29 ++ tests/bugs/modalg/bug1477_11 | 31 ++ tests/bugs/modalg/bug1477_12 | 26 ++ tests/bugs/modalg/bug1477_2 | 26 ++ tests/bugs/modalg/bug1477_3 | 26 ++ tests/bugs/modalg/bug1477_4 | 26 ++ tests/bugs/modalg/bug1477_5 | 26 ++ tests/bugs/modalg/bug1477_6 | 26 ++ tests/bugs/modalg/bug1477_7 | 26 ++ tests/bugs/modalg/bug1477_8 | 26 ++ tests/bugs/modalg/bug1477_9 | 29 ++ tests/bugs/modalg/bug165_4 | 83 +++++ tests/bugs/modalg/bug165_5 | 77 +++++ tests/bugs/modalg/bug165_6 | 83 +++++ tests/bugs/modalg/bug165_7 | 77 +++++ tests/bugs/modalg/bug2083_1 | 28 ++ tests/bugs/modalg/bug2083_2 | 29 ++ tests/bugs/modalg/bug2083_3 | 29 ++ tests/bugs/modalg/bug2083_4 | 29 ++ tests/bugs/modalg/bug2172_1 | 22 ++ tests/bugs/modalg/bug2172_2 | 22 ++ tests/bugs/modalg/bug2172_3 | 24 ++ tests/bugs/modalg/bug2172_4 | 24 ++ tests/bugs/modalg/bug260 | 20 ++ tests/bugs/modalg/bug263 | 30 ++ tests/bugs/modalg/bug264_12 | 33 ++ tests/bugs/modalg/bug2785_1 | 42 +++ tests/bugs/modalg/bug2785_2 | 40 +++ tests/bugs/modalg/bug2986_1 | 30 ++ tests/bugs/modalg/bug2986_2 | 26 ++ tests/bugs/modalg/bug369 | 20 ++ tests/bugs/modalg/bug400 | 31 ++ tests/bugs/modalg/bug405 | 27 ++ tests/bugs/modalg/bug426_1 | 26 ++ tests/bugs/modalg/bug434 | 29 ++ tests/bugs/modalg/bug435 | 28 ++ tests/bugs/modalg/bug5157_1 | 27 ++ tests/bugs/modalg/bug5157_2 | 24 ++ tests/bugs/modalg/bug570 | 11 + tests/bugs/modalg/bug5729 | 41 +++ tests/bugs/modalg/bug578_1 | 25 ++ tests/bugs/modalg/bug578_2 | 27 ++ tests/bugs/modalg/bug5805_1 | 59 ++++ tests/bugs/modalg/bug5805_2 | 54 ++++ tests/bugs/modalg/bug5805_3 | 50 +++ tests/bugs/modalg/bug5805_4 | 53 +++ tests/bugs/modalg/bug5805_5 | 52 +++ tests/bugs/modalg/bug5805_6 | 47 +++ tests/bugs/modalg/bug5806 | 54 ++++ tests/bugs/modalg/bug6063 | 24 ++ tests/bugs/modalg/bug6063_1 | 19 ++ tests/bugs/modalg/bug606_1 | 14 + tests/bugs/modalg/bug606_2 | 14 + tests/bugs/modalg/bug6181 | 40 +++ tests/bugs/modalg/bug6182 | 39 +++ tests/bugs/modalg/bug6272_1 | 22 ++ tests/bugs/modalg/bug6272_2 | 22 ++ tests/bugs/modalg/bug6272_3 | 23 ++ tests/bugs/modalg/bug6272_4 | 22 ++ tests/bugs/modalg/bug6272_5 | 33 ++ tests/bugs/modalg/bug6272_6 | 35 ++ tests/bugs/modalg/bug6272_71 | 26 ++ tests/bugs/modalg/bug6272_710 | 26 ++ tests/bugs/modalg/bug6272_72 | 26 ++ tests/bugs/modalg/bug6272_73 | 26 ++ tests/bugs/modalg/bug6272_74 | 26 ++ tests/bugs/modalg/bug6272_75 | 26 ++ tests/bugs/modalg/bug6272_76 | 26 ++ tests/bugs/modalg/bug6272_77 | 26 ++ tests/bugs/modalg/bug6272_78 | 26 ++ tests/bugs/modalg/bug6272_79 | 26 ++ tests/bugs/modalg/bug6272_81 | 25 ++ tests/bugs/modalg/bug6272_810 | 25 ++ tests/bugs/modalg/bug6272_82 | 25 ++ tests/bugs/modalg/bug6272_83 | 25 ++ tests/bugs/modalg/bug6272_84 | 25 ++ tests/bugs/modalg/bug6272_85 | 25 ++ tests/bugs/modalg/bug6272_86 | 25 ++ tests/bugs/modalg/bug6272_87 | 25 ++ tests/bugs/modalg/bug6272_88 | 25 ++ tests/bugs/modalg/bug6272_89 | 25 ++ tests/bugs/modalg/bug6277 | 43 +++ tests/bugs/modalg/bug6289 | 29 ++ tests/bugs/modalg/bug6334 | 69 ++++ tests/bugs/modalg/bug6502 | 21 ++ tests/bugs/modalg/bug6538 | 42 +++ tests/bugs/modalg/bug6554 | 39 +++ tests/bugs/modalg/bug6766_1 | 38 +++ tests/bugs/modalg/bug6766_2 | 38 +++ tests/bugs/modalg/bug6766_3 | 37 +++ tests/bugs/modalg/bug6766_4 | 37 +++ tests/bugs/modalg/bug6811 | 32 ++ tests/bugs/modalg/bug697_10 | 24 ++ tests/bugs/modalg/bug697_11 | 22 ++ tests/bugs/modalg/bug697_12 | 22 ++ tests/bugs/modalg/bug697_3 | 23 ++ tests/bugs/modalg/bug697_4 | 23 ++ tests/bugs/modalg/bug697_5 | 23 ++ tests/bugs/modalg/bug697_6 | 23 ++ tests/bugs/modalg/bug697_7 | 24 ++ tests/bugs/modalg/bug697_8 | 24 ++ tests/bugs/modalg/bug697_9 | 24 ++ tests/bugs/modalg/bug7626_1 | 29 ++ tests/bugs/modalg/bug7626_2 | 30 ++ tests/bugs/modalg/bug7668 | 36 +++ tests/bugs/modalg/bug770 | 1 + tests/bugs/modalg/bug8228 | 37 +++ tests/bugs/modalg/bug8372 | 28 ++ tests/bugs/modalg/bug951_31 | 43 +++ tests/bugs/modalg/bug951_32 | 43 +++ tests/bugs/modalg/bug951_41 | 24 ++ tests/bugs/modalg/bug951_42 | 24 ++ tests/bugs/modalg/bug951_5 | 43 +++ tests/bugs/modalg/bug951_51 | 24 ++ tests/bugs/modalg/bug951_52 | 24 ++ tests/bugs/modalg/bug951_6 | 43 +++ tests/bugs/modalg/bug951_61 | 23 ++ tests/bugs/modalg/bug951_62 | 23 ++ tests/bugs/modalg/bug951_71 | 23 ++ tests/bugs/modalg/bug951_72 | 23 ++ tests/bugs/moddata/bug10603 | 47 +++ tests/bugs/moddata/bug10604_1 | 37 +++ tests/bugs/moddata/bug10604_2 | 38 +++ tests/bugs/moddata/bug10604_3 | 37 +++ tests/bugs/moddata/bug10604_4 | 38 +++ tests/bugs/moddata/bug10604_5 | 38 +++ tests/bugs/moddata/bug1416 | 41 +++ tests/bugs/moddata/bug145 | 18 ++ tests/bugs/moddata/bug157 | 27 ++ tests/bugs/moddata/bug1651 | 64 ++++ tests/bugs/moddata/bug203 | 41 +++ tests/bugs/moddata/bug2442 | 65 ++++ tests/bugs/moddata/bug2569_1 | 20 ++ tests/bugs/moddata/bug2569_2 | 20 ++ tests/bugs/moddata/bug262 | 59 ++++ tests/bugs/moddata/bug2755 | 139 ++++++++ tests/bugs/moddata/bug277 | 20 ++ tests/bugs/moddata/bug2784_1 | 35 ++ tests/bugs/moddata/bug2784_2 | 35 ++ tests/bugs/moddata/bug299 | 26 ++ tests/bugs/moddata/bug353 | 16 + tests/bugs/moddata/bug367 | 24 ++ tests/bugs/moddata/bug3721_1 | 28 ++ tests/bugs/moddata/bug3721_2 | 29 ++ tests/bugs/moddata/bug3721_3 | 28 ++ tests/bugs/moddata/bug3721_4 | 26 ++ tests/bugs/moddata/bug3721_5 | 29 ++ tests/bugs/moddata/bug3721_6 | 30 ++ tests/bugs/moddata/bug3721_7 | 27 ++ tests/bugs/moddata/bug377 | 22 ++ tests/bugs/moddata/bug3896 | 48 +++ tests/bugs/moddata/bug4426_1 | 22 ++ tests/bugs/moddata/bug4426_2 | 22 ++ tests/bugs/moddata/bug454 | 25 ++ tests/bugs/moddata/bug524 | 60 ++++ tests/bugs/moddata/bug536_11 | 25 ++ tests/bugs/moddata/bug536_12 | 25 ++ tests/bugs/moddata/bug536_13 | 25 ++ tests/bugs/moddata/bug536_14 | 25 ++ tests/bugs/moddata/bug536_21 | 24 ++ tests/bugs/moddata/bug536_22 | 24 ++ tests/bugs/moddata/bug536_23 | 24 ++ tests/bugs/moddata/bug536_24 | 24 ++ tests/bugs/moddata/bug538 | 25 ++ tests/bugs/moddata/bug5696 | 21 ++ tests/bugs/moddata/bug5698 | 25 ++ tests/bugs/moddata/bug6278 | 61 ++++ tests/bugs/moddata/bug6412 | 33 ++ tests/bugs/moddata/bug6450_1 | 24 ++ tests/bugs/moddata/bug6450_2 | 24 ++ tests/bugs/moddata/bug6474 | 22 ++ tests/bugs/moddata/bug6503 | 83 +++++ tests/bugs/moddata/bug6862_1 | 26 ++ tests/bugs/moddata/bug6862_2 | 26 ++ tests/bugs/moddata/bug6862_3 | 30 ++ tests/bugs/moddata/bug6862_4 | 28 ++ tests/bugs/moddata/bug6862_5 | 26 ++ tests/bugs/moddata/bug6862_6 | 27 ++ tests/bugs/moddata/bug6862_7 | 37 +++ tests/bugs/moddata/bug6862_8 | 30 ++ tests/bugs/moddata/bug6862_9 | 30 ++ tests/bugs/moddata/bug7372 | 37 +++ tests/bugs/moddata/bug8169 | 26 ++ tests/bugs/step/bug2368 | 18 ++ tests/bugs/step/bug5099 | 14 + tests/bugs/step/bug5215 | 14 + tests/bugs/step/bug5708 | 21 ++ tests/bugs/vis/bug10 | 16 + tests/bugs/vis/bug113 | 69 ++++ tests/bugs/vis/bug1174 | 74 +++++ tests/bugs/vis/bug1188 | 20 ++ tests/bugs/vis/bug137_10 | 34 ++ tests/bugs/vis/bug137_11 | 34 ++ tests/bugs/vis/bug137_6 | 16 + tests/bugs/vis/bug137_7 | 20 ++ tests/bugs/vis/bug137_8 | 19 ++ tests/bugs/vis/bug137_9 | 31 ++ tests/bugs/vis/bug166 | 14 + tests/bugs/vis/bug186 | 11 + tests/bugs/vis/bug200 | 23 ++ tests/bugs/vis/bug2066 | 24 ++ tests/bugs/vis/bug223 | 64 ++++ tests/bugs/vis/bug230_1 | 17 + tests/bugs/vis/bug230_2 | 18 ++ tests/bugs/vis/bug23652 | 44 ++- tests/bugs/vis/bug270_1 | 28 ++ tests/bugs/vis/bug270_2 | 28 ++ tests/bugs/vis/bug281_1 | 33 ++ tests/bugs/vis/bug281_10 | 12 + tests/bugs/vis/bug281_11 | 12 + tests/bugs/vis/bug281_12 | 12 + tests/bugs/vis/bug281_13 | 12 + tests/bugs/vis/bug281_2 | 12 + tests/bugs/vis/bug281_3 | 12 + tests/bugs/vis/bug281_4 | 12 + tests/bugs/vis/bug281_5 | 12 + tests/bugs/vis/bug281_6 | 12 + tests/bugs/vis/bug281_7 | 12 + tests/bugs/vis/bug281_8 | 12 + tests/bugs/vis/bug281_9 | 12 + tests/bugs/vis/bug294 | 29 ++ tests/bugs/vis/bug301 | 14 + tests/bugs/vis/bug349 | 103 ++++++ tests/bugs/vis/bug362 | 10 + tests/bugs/vis/bug38 | 20 ++ tests/bugs/vis/bug389 | 20 ++ tests/bugs/vis/bug402 | 25 ++ tests/bugs/vis/bug403 | 35 ++ tests/bugs/vis/bug404 | 65 ++++ tests/bugs/vis/bug543 | 30 ++ tests/bugs/vis/bug544 | 50 +++ tests/bugs/vis/bug60 | 34 ++ tests/bugs/vis/bug61 | 28 ++ tests/bugs/vis/bug6132 | 15 + tests/bugs/vis/bug627 | 27 ++ tests/bugs/vis/bug71 | 55 ++++ tests/bugs/vis/bug74 | 251 +++++++++++++++ tests/bugs/vis/bug79 | 23 ++ tests/bugs/xde/bug1055 | 18 ++ tests/bugs/xde/bug1430_1 | 19 ++ tests/bugs/xde/bug1430_2 | 19 ++ tests/bugs/xde/bug2821 | 20 ++ tests/bugs/xde/bug3926 | 16 + tests/bugs/xde/bug394 | 58 ++++ tests/bugs/xde/bug5439 | 14 + tests/bugs/xde/bug6283 | 30 ++ tests/bugs/xde/bug6542 | 200 ++++++++++++ 343 files changed, 13275 insertions(+), 13 deletions(-) create mode 100644 tests/bugs/caf/bug1054_1 create mode 100644 tests/bugs/caf/bug1054_2 create mode 100644 tests/bugs/caf/bug1395_1 create mode 100644 tests/bugs/caf/bug1395_2 create mode 100644 tests/bugs/caf/bug1454 create mode 100644 tests/bugs/caf/bug159 create mode 100644 tests/bugs/caf/bug1722 create mode 100644 tests/bugs/caf/bug1724 create mode 100644 tests/bugs/caf/bug1726 create mode 100644 tests/bugs/caf/bug1919 create mode 100644 tests/bugs/caf/bug2269 create mode 100644 tests/bugs/caf/bug267_1 create mode 100644 tests/bugs/caf/bug267_2 create mode 100644 tests/bugs/caf/bug2932_10 create mode 100644 tests/bugs/caf/bug2932_11 create mode 100644 tests/bugs/caf/bug2932_12 create mode 100644 tests/bugs/caf/bug2932_13 create mode 100644 tests/bugs/caf/bug2932_14 create mode 100644 tests/bugs/caf/bug2932_15 create mode 100644 tests/bugs/caf/bug2932_16 create mode 100644 tests/bugs/caf/bug2932_17 create mode 100644 tests/bugs/caf/bug2932_18 create mode 100644 tests/bugs/caf/bug2932_19 create mode 100644 tests/bugs/caf/bug2932_20 create mode 100644 tests/bugs/caf/bug2932_21 create mode 100644 tests/bugs/caf/bug2932_22 create mode 100644 tests/bugs/caf/bug2932_23 create mode 100644 tests/bugs/caf/bug2932_24 create mode 100644 tests/bugs/caf/bug2932_3 create mode 100644 tests/bugs/caf/bug2932_4 create mode 100644 tests/bugs/caf/bug2932_5 create mode 100644 tests/bugs/caf/bug2932_6 create mode 100644 tests/bugs/caf/bug2932_7 create mode 100644 tests/bugs/caf/bug2932_8 create mode 100644 tests/bugs/caf/bug2932_9 create mode 100644 tests/bugs/caf/bug644 create mode 100644 tests/bugs/fclasses/bug11568_3 create mode 100644 tests/bugs/fclasses/bug11568_4 create mode 100644 tests/bugs/fclasses/bug142 create mode 100644 tests/bugs/fclasses/bug181_1 create mode 100644 tests/bugs/fclasses/bug181_2 create mode 100644 tests/bugs/fclasses/bug216 create mode 100644 tests/bugs/fclasses/bug309 create mode 100644 tests/bugs/fclasses/bug310 create mode 100644 tests/bugs/fclasses/bug6143 create mode 100644 tests/bugs/fclasses/bug983 create mode 100644 tests/bugs/iges/bug5079 create mode 100644 tests/bugs/iges/bug6508 create mode 100644 tests/bugs/iges/bug663 create mode 100644 tests/bugs/modalg/bug10160_1 create mode 100644 tests/bugs/modalg/bug10160_10 create mode 100644 tests/bugs/modalg/bug10160_11 create mode 100644 tests/bugs/modalg/bug10160_12 create mode 100644 tests/bugs/modalg/bug10160_2 create mode 100644 tests/bugs/modalg/bug10160_3 create mode 100644 tests/bugs/modalg/bug10160_4 create mode 100644 tests/bugs/modalg/bug10160_5 create mode 100644 tests/bugs/modalg/bug10160_6 create mode 100644 tests/bugs/modalg/bug10160_7 create mode 100644 tests/bugs/modalg/bug10160_8 create mode 100644 tests/bugs/modalg/bug10160_9 create mode 100644 tests/bugs/modalg/bug10232 create mode 100644 tests/bugs/modalg/bug10435_1 create mode 100644 tests/bugs/modalg/bug10435_2 create mode 100644 tests/bugs/modalg/bug10605_1 create mode 100644 tests/bugs/modalg/bug10605_2 create mode 100644 tests/bugs/modalg/bug10605_3 create mode 100644 tests/bugs/modalg/bug10605_4 create mode 100644 tests/bugs/modalg/bug10605_5 create mode 100644 tests/bugs/modalg/bug10606_1 create mode 100644 tests/bugs/modalg/bug10606_2 create mode 100644 tests/bugs/modalg/bug10606_3 create mode 100644 tests/bugs/modalg/bug10606_4 create mode 100644 tests/bugs/modalg/bug10606_5 create mode 100644 tests/bugs/modalg/bug1077 create mode 100644 tests/bugs/modalg/bug10842_1 create mode 100644 tests/bugs/modalg/bug10842_2 create mode 100644 tests/bugs/modalg/bug10842_3 create mode 100644 tests/bugs/modalg/bug10842_4 create mode 100644 tests/bugs/modalg/bug10842_5 create mode 100644 tests/bugs/modalg/bug10846_1 create mode 100644 tests/bugs/modalg/bug10846_2 create mode 100644 tests/bugs/modalg/bug10846_3 create mode 100644 tests/bugs/modalg/bug10846_4 create mode 100644 tests/bugs/modalg/bug10846_5 create mode 100644 tests/bugs/modalg/bug12213 create mode 100644 tests/bugs/modalg/bug12257 create mode 100644 tests/bugs/modalg/bug1226 create mode 100644 tests/bugs/modalg/bug1243_1 create mode 100644 tests/bugs/modalg/bug1243_2 create mode 100644 tests/bugs/modalg/bug1255 create mode 100644 tests/bugs/modalg/bug1255_1 create mode 100644 tests/bugs/modalg/bug1360 create mode 100644 tests/bugs/modalg/bug1456 create mode 100644 tests/bugs/modalg/bug1477_1 create mode 100644 tests/bugs/modalg/bug1477_10 create mode 100644 tests/bugs/modalg/bug1477_11 create mode 100644 tests/bugs/modalg/bug1477_12 create mode 100644 tests/bugs/modalg/bug1477_2 create mode 100644 tests/bugs/modalg/bug1477_3 create mode 100644 tests/bugs/modalg/bug1477_4 create mode 100644 tests/bugs/modalg/bug1477_5 create mode 100644 tests/bugs/modalg/bug1477_6 create mode 100644 tests/bugs/modalg/bug1477_7 create mode 100644 tests/bugs/modalg/bug1477_8 create mode 100644 tests/bugs/modalg/bug1477_9 create mode 100644 tests/bugs/modalg/bug165_4 create mode 100644 tests/bugs/modalg/bug165_5 create mode 100644 tests/bugs/modalg/bug165_6 create mode 100644 tests/bugs/modalg/bug165_7 create mode 100644 tests/bugs/modalg/bug2083_1 create mode 100644 tests/bugs/modalg/bug2083_2 create mode 100644 tests/bugs/modalg/bug2083_3 create mode 100644 tests/bugs/modalg/bug2083_4 create mode 100644 tests/bugs/modalg/bug2172_1 create mode 100644 tests/bugs/modalg/bug2172_2 create mode 100644 tests/bugs/modalg/bug2172_3 create mode 100644 tests/bugs/modalg/bug2172_4 create mode 100644 tests/bugs/modalg/bug260 create mode 100644 tests/bugs/modalg/bug263 create mode 100644 tests/bugs/modalg/bug264_12 create mode 100644 tests/bugs/modalg/bug2785_1 create mode 100644 tests/bugs/modalg/bug2785_2 create mode 100644 tests/bugs/modalg/bug2986_1 create mode 100644 tests/bugs/modalg/bug2986_2 create mode 100644 tests/bugs/modalg/bug369 create mode 100644 tests/bugs/modalg/bug400 create mode 100644 tests/bugs/modalg/bug405 create mode 100644 tests/bugs/modalg/bug426_1 create mode 100644 tests/bugs/modalg/bug434 create mode 100644 tests/bugs/modalg/bug435 create mode 100644 tests/bugs/modalg/bug5157_1 create mode 100644 tests/bugs/modalg/bug5157_2 create mode 100644 tests/bugs/modalg/bug570 create mode 100644 tests/bugs/modalg/bug5729 create mode 100644 tests/bugs/modalg/bug578_1 create mode 100644 tests/bugs/modalg/bug578_2 create mode 100644 tests/bugs/modalg/bug5805_1 create mode 100644 tests/bugs/modalg/bug5805_2 create mode 100644 tests/bugs/modalg/bug5805_3 create mode 100644 tests/bugs/modalg/bug5805_4 create mode 100644 tests/bugs/modalg/bug5805_5 create mode 100644 tests/bugs/modalg/bug5805_6 create mode 100644 tests/bugs/modalg/bug5806 create mode 100644 tests/bugs/modalg/bug6063 create mode 100644 tests/bugs/modalg/bug6063_1 create mode 100644 tests/bugs/modalg/bug606_1 create mode 100644 tests/bugs/modalg/bug606_2 create mode 100644 tests/bugs/modalg/bug6181 create mode 100644 tests/bugs/modalg/bug6182 create mode 100644 tests/bugs/modalg/bug6272_1 create mode 100644 tests/bugs/modalg/bug6272_2 create mode 100644 tests/bugs/modalg/bug6272_3 create mode 100644 tests/bugs/modalg/bug6272_4 create mode 100644 tests/bugs/modalg/bug6272_5 create mode 100644 tests/bugs/modalg/bug6272_6 create mode 100644 tests/bugs/modalg/bug6272_71 create mode 100644 tests/bugs/modalg/bug6272_710 create mode 100644 tests/bugs/modalg/bug6272_72 create mode 100644 tests/bugs/modalg/bug6272_73 create mode 100644 tests/bugs/modalg/bug6272_74 create mode 100644 tests/bugs/modalg/bug6272_75 create mode 100644 tests/bugs/modalg/bug6272_76 create mode 100644 tests/bugs/modalg/bug6272_77 create mode 100644 tests/bugs/modalg/bug6272_78 create mode 100644 tests/bugs/modalg/bug6272_79 create mode 100644 tests/bugs/modalg/bug6272_81 create mode 100644 tests/bugs/modalg/bug6272_810 create mode 100644 tests/bugs/modalg/bug6272_82 create mode 100644 tests/bugs/modalg/bug6272_83 create mode 100644 tests/bugs/modalg/bug6272_84 create mode 100644 tests/bugs/modalg/bug6272_85 create mode 100644 tests/bugs/modalg/bug6272_86 create mode 100644 tests/bugs/modalg/bug6272_87 create mode 100644 tests/bugs/modalg/bug6272_88 create mode 100644 tests/bugs/modalg/bug6272_89 create mode 100644 tests/bugs/modalg/bug6277 create mode 100644 tests/bugs/modalg/bug6289 create mode 100644 tests/bugs/modalg/bug6334 create mode 100644 tests/bugs/modalg/bug6502 create mode 100644 tests/bugs/modalg/bug6538 create mode 100644 tests/bugs/modalg/bug6554 create mode 100644 tests/bugs/modalg/bug6766_1 create mode 100644 tests/bugs/modalg/bug6766_2 create mode 100644 tests/bugs/modalg/bug6766_3 create mode 100644 tests/bugs/modalg/bug6766_4 create mode 100644 tests/bugs/modalg/bug6811 create mode 100644 tests/bugs/modalg/bug697_10 create mode 100644 tests/bugs/modalg/bug697_11 create mode 100644 tests/bugs/modalg/bug697_12 create mode 100644 tests/bugs/modalg/bug697_3 create mode 100644 tests/bugs/modalg/bug697_4 create mode 100644 tests/bugs/modalg/bug697_5 create mode 100644 tests/bugs/modalg/bug697_6 create mode 100644 tests/bugs/modalg/bug697_7 create mode 100644 tests/bugs/modalg/bug697_8 create mode 100644 tests/bugs/modalg/bug697_9 create mode 100644 tests/bugs/modalg/bug7626_1 create mode 100644 tests/bugs/modalg/bug7626_2 create mode 100644 tests/bugs/modalg/bug7668 create mode 100644 tests/bugs/modalg/bug8228 create mode 100644 tests/bugs/modalg/bug8372 create mode 100644 tests/bugs/modalg/bug951_31 create mode 100644 tests/bugs/modalg/bug951_32 create mode 100644 tests/bugs/modalg/bug951_41 create mode 100644 tests/bugs/modalg/bug951_42 create mode 100644 tests/bugs/modalg/bug951_5 create mode 100644 tests/bugs/modalg/bug951_51 create mode 100644 tests/bugs/modalg/bug951_52 create mode 100644 tests/bugs/modalg/bug951_6 create mode 100644 tests/bugs/modalg/bug951_61 create mode 100644 tests/bugs/modalg/bug951_62 create mode 100644 tests/bugs/modalg/bug951_71 create mode 100644 tests/bugs/modalg/bug951_72 create mode 100644 tests/bugs/moddata/bug10603 create mode 100644 tests/bugs/moddata/bug10604_1 create mode 100644 tests/bugs/moddata/bug10604_2 create mode 100644 tests/bugs/moddata/bug10604_3 create mode 100644 tests/bugs/moddata/bug10604_4 create mode 100644 tests/bugs/moddata/bug10604_5 create mode 100644 tests/bugs/moddata/bug1416 create mode 100644 tests/bugs/moddata/bug145 create mode 100644 tests/bugs/moddata/bug157 create mode 100644 tests/bugs/moddata/bug1651 create mode 100644 tests/bugs/moddata/bug203 create mode 100644 tests/bugs/moddata/bug2442 create mode 100644 tests/bugs/moddata/bug2569_1 create mode 100644 tests/bugs/moddata/bug2569_2 create mode 100644 tests/bugs/moddata/bug262 create mode 100644 tests/bugs/moddata/bug2755 create mode 100644 tests/bugs/moddata/bug277 create mode 100644 tests/bugs/moddata/bug2784_1 create mode 100644 tests/bugs/moddata/bug2784_2 create mode 100644 tests/bugs/moddata/bug299 create mode 100644 tests/bugs/moddata/bug353 create mode 100644 tests/bugs/moddata/bug367 create mode 100644 tests/bugs/moddata/bug3721_1 create mode 100644 tests/bugs/moddata/bug3721_2 create mode 100644 tests/bugs/moddata/bug3721_3 create mode 100644 tests/bugs/moddata/bug3721_4 create mode 100644 tests/bugs/moddata/bug3721_5 create mode 100644 tests/bugs/moddata/bug3721_6 create mode 100644 tests/bugs/moddata/bug3721_7 create mode 100644 tests/bugs/moddata/bug377 create mode 100644 tests/bugs/moddata/bug3896 create mode 100644 tests/bugs/moddata/bug4426_1 create mode 100644 tests/bugs/moddata/bug4426_2 create mode 100644 tests/bugs/moddata/bug454 create mode 100644 tests/bugs/moddata/bug524 create mode 100644 tests/bugs/moddata/bug536_11 create mode 100644 tests/bugs/moddata/bug536_12 create mode 100644 tests/bugs/moddata/bug536_13 create mode 100644 tests/bugs/moddata/bug536_14 create mode 100644 tests/bugs/moddata/bug536_21 create mode 100644 tests/bugs/moddata/bug536_22 create mode 100644 tests/bugs/moddata/bug536_23 create mode 100644 tests/bugs/moddata/bug536_24 create mode 100644 tests/bugs/moddata/bug538 create mode 100644 tests/bugs/moddata/bug5696 create mode 100644 tests/bugs/moddata/bug5698 create mode 100644 tests/bugs/moddata/bug6278 create mode 100644 tests/bugs/moddata/bug6412 create mode 100644 tests/bugs/moddata/bug6450_1 create mode 100644 tests/bugs/moddata/bug6450_2 create mode 100644 tests/bugs/moddata/bug6474 create mode 100644 tests/bugs/moddata/bug6503 create mode 100644 tests/bugs/moddata/bug6862_1 create mode 100644 tests/bugs/moddata/bug6862_2 create mode 100644 tests/bugs/moddata/bug6862_3 create mode 100644 tests/bugs/moddata/bug6862_4 create mode 100644 tests/bugs/moddata/bug6862_5 create mode 100644 tests/bugs/moddata/bug6862_6 create mode 100644 tests/bugs/moddata/bug6862_7 create mode 100644 tests/bugs/moddata/bug6862_8 create mode 100644 tests/bugs/moddata/bug6862_9 create mode 100644 tests/bugs/moddata/bug7372 create mode 100644 tests/bugs/moddata/bug8169 create mode 100644 tests/bugs/step/bug2368 create mode 100644 tests/bugs/step/bug5099 create mode 100644 tests/bugs/step/bug5215 create mode 100644 tests/bugs/step/bug5708 create mode 100644 tests/bugs/vis/bug10 create mode 100644 tests/bugs/vis/bug113 create mode 100644 tests/bugs/vis/bug1174 create mode 100644 tests/bugs/vis/bug1188 create mode 100644 tests/bugs/vis/bug137_10 create mode 100644 tests/bugs/vis/bug137_11 create mode 100644 tests/bugs/vis/bug137_6 create mode 100644 tests/bugs/vis/bug137_7 create mode 100644 tests/bugs/vis/bug137_8 create mode 100644 tests/bugs/vis/bug137_9 create mode 100644 tests/bugs/vis/bug166 create mode 100644 tests/bugs/vis/bug186 create mode 100644 tests/bugs/vis/bug200 create mode 100644 tests/bugs/vis/bug2066 create mode 100644 tests/bugs/vis/bug223 create mode 100644 tests/bugs/vis/bug230_1 create mode 100644 tests/bugs/vis/bug230_2 create mode 100644 tests/bugs/vis/bug270_1 create mode 100644 tests/bugs/vis/bug270_2 create mode 100644 tests/bugs/vis/bug281_1 create mode 100644 tests/bugs/vis/bug281_10 create mode 100644 tests/bugs/vis/bug281_11 create mode 100644 tests/bugs/vis/bug281_12 create mode 100644 tests/bugs/vis/bug281_13 create mode 100644 tests/bugs/vis/bug281_2 create mode 100644 tests/bugs/vis/bug281_3 create mode 100644 tests/bugs/vis/bug281_4 create mode 100644 tests/bugs/vis/bug281_5 create mode 100644 tests/bugs/vis/bug281_6 create mode 100644 tests/bugs/vis/bug281_7 create mode 100644 tests/bugs/vis/bug281_8 create mode 100644 tests/bugs/vis/bug281_9 create mode 100644 tests/bugs/vis/bug294 create mode 100644 tests/bugs/vis/bug301 create mode 100644 tests/bugs/vis/bug349 create mode 100644 tests/bugs/vis/bug362 create mode 100644 tests/bugs/vis/bug38 create mode 100644 tests/bugs/vis/bug389 create mode 100644 tests/bugs/vis/bug402 create mode 100644 tests/bugs/vis/bug403 create mode 100644 tests/bugs/vis/bug404 create mode 100644 tests/bugs/vis/bug543 create mode 100644 tests/bugs/vis/bug544 create mode 100644 tests/bugs/vis/bug60 create mode 100644 tests/bugs/vis/bug61 create mode 100644 tests/bugs/vis/bug6132 create mode 100644 tests/bugs/vis/bug627 create mode 100644 tests/bugs/vis/bug71 create mode 100644 tests/bugs/vis/bug74 create mode 100644 tests/bugs/vis/bug79 create mode 100644 tests/bugs/xde/bug1055 create mode 100644 tests/bugs/xde/bug1430_1 create mode 100644 tests/bugs/xde/bug1430_2 create mode 100644 tests/bugs/xde/bug2821 create mode 100644 tests/bugs/xde/bug3926 create mode 100644 tests/bugs/xde/bug394 create mode 100644 tests/bugs/xde/bug5439 create mode 100644 tests/bugs/xde/bug6283 create mode 100644 tests/bugs/xde/bug6542 diff --git a/tests/bugs/caf/bug1054_1 b/tests/bugs/caf/bug1054_1 new file mode 100644 index 0000000000..350c3be8b2 --- /dev/null +++ b/tests/bugs/caf/bug1054_1 @@ -0,0 +1,569 @@ +puts "================" +puts "OCC1054" +puts "================" +puts "" +####################################################################################### +# Mechanism of transactions' synchronization and mechanizm of nested transactions +####################################################################################### +# Case 1 (nested mode ON) +####################################################################################### + +proc OCC1054_Check_dump {IsGood index good_index case} { + # Check dump + if { ${index} != ${good_index} } { + set IsGood 0 + puts "OCC1054 Error (case ${case} : index = ${index} good_index = ${good_index})" + } + return ${IsGood} +} + +proc OCC1054_Check_real_attribute {IsGood doc label good_real case} { + global ${doc} + # Check real attribute + set percent_max 0.1 + if [catch { set real [GetReal ${doc} ${label}] } message] { + set IsGood 0 + puts "OCC1054 Error (case ${case})" + } else { + set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.] + if {${real_percent} > ${percent_max}} { + puts "good_real = ${good_real}" + puts "real = ${real}" + puts "real_percent = ${real_percent}" + puts "OCC1054 Error (case ${case}-2)" + } + } + return ${IsGood} +} + + +set IsGood 1 +set Case 0 + +NewDocument doc1 +NewDocument doc2 +NewDocument doc3 +mtmCreate 4 + +mtmNestedMode 1 + +mtmAdd doc1 + +mtmOpen + SetReal doc1 0:1:1 1.1 + OpenCommand doc1 + SetReal doc1 0:1:1 11 + AbortCommand doc1 + + OpenCommand doc1 + SetReal doc1 0:1:3 12.1 + + OpenCommand doc1 + SetReal doc1 0:1:3 121 + AbortCommand doc1 + + SetReal doc1 0:1:4 12.2 + CommitCommand doc1 + + SetReal doc1 0:1:1 1.2 + SetReal doc1 0:1:4 1.3 +mtmCommit Transaction1 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There is one document ( "2690640" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2690640" ) < Last action +# +# *** End *** +################################################################################ +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 21 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 29 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:1 1.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:3 12.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:4 1.3 [incr Case]] + +mtmAdd doc2 +mtmAdd doc3 + +mtmOpen + SetReal doc2 0:2:1 2.1 + SetReal doc1 0:2:2 2.1 + OpenCommand doc1 + OpenCommand doc2 + SetReal doc2 0:2:1 21 + SetReal doc1 0:2:2 21 + AbortCommand doc2 + + OpenCommand doc3 + OpenCommand doc2 + SetReal doc3 0:2:3 22.1 + SetReal doc2 0:2:3 22.1 + + OpenCommand doc2 + SetReal doc2 0:2:3 221 + AbortCommand doc2 + + SetReal doc3 0:2:4 22.2 + CommitCommand doc2 + CommitCommand doc3 + AbortCommand doc1 + + SetReal doc1 0:2:1 2.2 + SetReal doc1 0:2:4 2.3 +mtmCommit Transaction2 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmOpen + SetReal doc1 0:1:1 3.1 + OpenCommand doc1 + SetReal doc1 0:1:1 31 + AbortCommand doc1 + + OpenCommand doc1 + SetReal doc1 0:1:3 32.1 + + OpenCommand doc1 + SetReal doc1 0:1:3 321 + AbortCommand doc1 + + SetReal doc1 0:1:4 32.2 + CommitCommand doc1 + + SetReal doc1 0:1:1 3.2 + SetReal doc1 0:1:4 3.3 +mtmCommit Transaction3 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) +# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmUndo + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action +# Redo: Transaction3 - 1 documents ( "2809192" ) +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set redo3 [lindex ${list} [expr ${index3} - 1]] +set index4 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 44 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${redo3} "Redo:" [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 41 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmOpen + SetReal doc1 0:1:1 4.1 + OpenCommand doc1 + SetReal doc1 0:1:1 41 + AbortCommand doc1 + + OpenCommand doc1 + SetReal doc1 0:1:3 42.1 + + OpenCommand doc1 + SetReal doc1 0:1:3 421 +mtmAbort + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action +# Redo: Transaction3 - 1 documents ( "2809192" ) +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set redo3 [lindex ${list} [expr ${index3} - 1]] +set index4 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 44 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${redo3} "Redo:" [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 41 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmRedo + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) +# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set undo3 [lindex ${list} [expr ${index3} - 1]] +set index4 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${undo3} "Undo:" [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmOpen + SetReal doc1 0:1:1 5.1 + OpenCommand doc1 + SetReal doc1 0:1:1 51 + + OpenCommand doc1 + SetReal doc1 0:1:3 52.1 + + OpenCommand doc1 + SetReal doc1 0:1:3 521 +mtmCommit Transaction5 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) +# Undo: Transaction3 - 1 documents ( "2809192" ) +# Undo: Transaction5 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "Transaction5"] +set docnum4 [lindex ${list} [expr ${index4} + 2]] +set index5 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 51 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 521 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmUndo + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "3095112" "2705536" "2809192" ) +# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action +# Redo: Transaction5 - 1 documents ( "2809192" ) +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "Transaction5"] +set docnum4 [lindex ${list} [expr ${index4} + 2]] +set redo4 [lindex ${list} [expr ${index4} - 1]] +set index5 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 52 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${redo4} "Redo:" [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 49 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +mtmOpen + SetReal doc1 0:1:1 6.1 + OpenCommand doc1 + SetReal doc1 0:1:1 61 + + OpenCommand doc1 + SetReal doc1 0:1:3 62.1 + +mtmCommit Transaction6 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is on +# +# Undo: Transaction1 - 1 documents ( "2809192" ) +# Undo: Transaction2 - 3 documents ( "3095112" "2705536" "2809192" ) +# Undo: Transaction3 - 1 documents ( "2809192" ) +# Undo: Transaction6 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ + +set index1 [lsearch -exact ${list} "Transaction1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Transaction2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Transaction3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "Transaction6"] +set docnum4 [lindex ${list} [expr ${index4} + 2]] +set index5 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]] + +# Check real attributes +# doc1 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 61 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 62.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]] +# doc2 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]] +# doc3 +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]] + +if { ${IsGood} == 1 } { + puts "OCC1054 OK" +} else { + puts "OCC1054 Error" +} diff --git a/tests/bugs/caf/bug1054_2 b/tests/bugs/caf/bug1054_2 new file mode 100644 index 0000000000..add0dc3434 --- /dev/null +++ b/tests/bugs/caf/bug1054_2 @@ -0,0 +1,318 @@ +puts "================" +puts "OCC1054" +puts "================" +puts "" +####################################################################################### +# Mechanism of transactions' synchronization and mechanizm of nested transactions +####################################################################################### +# Case 2 (nested mode OFF) +####################################################################################### + +proc OCC1054_Check_dump {IsGood index good_index case} { + # Check dump + if { ${index} != ${good_index} } { + set IsGood 0 + puts "OCC1054 Error (case ${case} : index = ${index} good_index = ${good_index})" + } + return ${IsGood} +} + +proc OCC1054_Check_real_attribute {IsGood doc label good_real case} { + global ${doc} + # Check real attribute + set percent_max 0.1 + if [catch { set real [GetReal ${doc} ${label}] } message] { + set IsGood 0 + puts "OCC1054 Error (case ${case})" + } else { + set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.] + if {${real_percent} > ${percent_max}} { + puts "good_real = ${good_real}" + puts "real = ${real}" + puts "real_percent = ${real_percent}" + puts "OCC1054 Error (case ${case}-2)" + } + } + return ${IsGood} +} + + +set IsGood 1 +set Case 0 + +NewDocument doc1 +NewDocument doc2 +NewDocument doc3 +mtmCreate 4 + +mtmAdd doc1 + +mtmOpen +SetReal doc1 0:1 1 +mtmCommit tr1 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There is one document ( "2809192" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} "one" [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 21 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 29 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] + + +mtmAdd doc2 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 2 documents ( "2809192" "2705536" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 22 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 30 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] + +mtmOpen +SetReal doc2 0:1 2 +mtmCommit tr2 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 2 documents ( "2809192" "2705536" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) +# Undo: tr2 - 1 documents ( "2705536" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "tr2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 22 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 30 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 38 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]] + +SetReal doc3 0:1 1 +mtmAdd doc3 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) +# Undo: tr2 - 1 documents ( "2705536" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "tr2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]] + +mtmOpen +SetReal doc1 0:2 2 +SetReal doc3 0:2 2 +mtmCommit tr3 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) +# Undo: tr2 - 1 documents ( "2705536" ) +# Undo: tr3 - 2 documents ( "3095112" "2809192" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "tr2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "tr3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 48 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]] + +mtmOpen +SetReal doc2 0:2 2 +SetReal doc3 0:3 3 +mtmCommit tr4 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is off +# +# Undo: tr1 - 1 documents ( "2809192" ) +# Undo: tr2 - 1 documents ( "2705536" ) +# Undo: tr3 - 2 documents ( "3095112" "2809192" ) +# Undo: tr4 - 2 documents ( "3095112" "2705536" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr1"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "tr2"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "tr3"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "tr4"] +set docnum4 [lindex ${list} [expr ${index4} + 2]] +set index5 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 48 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:3 3 [incr Case]] + +mtmOpen +SetReal doc1 0:3 3 +SetReal doc2 0:3 3 +mtmCommit tr5 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager +# Nested transaction mode is off +# +# Undo: tr2 - 1 documents ( "2705536" ) +# Undo: tr3 - 2 documents ( "3095112" "2809192" ) +# Undo: tr4 - 2 documents ( "3095112" "2705536" ) +# Undo: tr5 - 2 documents ( "2705536" "2809192" ) < Last action +# +# *** End *** +################################################################################ +set docnum0 [lindex ${list} 7] +set index1 [lsearch -exact ${list} "tr2"] +set docnum1 [lindex ${list} [expr ${index1} + 2]] +set index2 [lsearch -exact ${list} "tr3"] +set docnum2 [lindex ${list} [expr ${index2} + 2]] +set index3 [lsearch -exact ${list} "tr4"] +set docnum3 [lindex ${list} [expr ${index3} + 2]] +set index4 [lsearch -exact ${list} "tr5"] +set docnum4 [lindex ${list} [expr ${index4} + 2]] +set index5 [lsearch -exact ${list} "Last"] + +# Check dump +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 40 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 2 [incr Case]] +set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 58 [incr Case]] + +# Check real attributes +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:3 3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:3 3 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]] +set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:3 3 [incr Case]] + +if { ${IsGood} == 1 } { + puts "OCC1054 OK" +} else { + puts "OCC1054 Error" +} diff --git a/tests/bugs/caf/bug114 b/tests/bugs/caf/bug114 index c82cef86e3..9373fe9470 100755 --- a/tests/bugs/caf/bug114 +++ b/tests/bugs/caf/bug114 @@ -9,7 +9,7 @@ puts "Amount of iterations is $i_max" NewDocument D MDTV-Standard UndoLimit D 10 -restore [locate_data_file OCC114.brep] s +restore [locate_data_file OCC294.brep] s set listmem {} for {set i 1} {${i} <= ${i_max}} {incr i} { diff --git a/tests/bugs/caf/bug1395_1 b/tests/bugs/caf/bug1395_1 new file mode 100644 index 0000000000..3fa884be52 --- /dev/null +++ b/tests/bugs/caf/bug1395_1 @@ -0,0 +1,64 @@ +puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2" +puts "TODO OCC12345 ALL: OCC1395 Error" + +puts "================" +puts "OCC1395" +puts "================" +puts "" +####################################################################################### +# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document +####################################################################################### +# Case 1 (Undo) +####################################################################################### + +set IsGood 1 + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label +set aLabel 0:2 +Label D ${aLabel} + +# Open a transaction +OpenTran D + +# Set integer attribute +set anInteger 5 +SetInteger D ${aLabel} ${anInteger} + +# Commit transaction +CommitTran D 1 + +# Undo +DFUndo D 1 + +# Check integer attributes +if [catch { set Integer [GetInteger D ${aLabel}] } message] { + set IsGood 0 + puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}" +} else { + puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}" +} + +# Set real attribute +set aReal 8.8 +SetReal D ${aLabel} ${aReal} + +# Undo +DFUndo D 1 + +# Check real attributes +if [catch { set Real [GetReal D ${aLabel}] } message] { + set IsGood 0 + puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}" +} else { + puts "OCC1395 OK : There is the real attribute on the label ${aLabel}" +} + +if { ${IsGood} == 1 } { + puts "OCC1395 OK" +} else { + puts "OCC1395 Error" +} diff --git a/tests/bugs/caf/bug1395_2 b/tests/bugs/caf/bug1395_2 new file mode 100644 index 0000000000..675062b73b --- /dev/null +++ b/tests/bugs/caf/bug1395_2 @@ -0,0 +1,61 @@ +puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2" +puts "TODO OCC12345 ALL: OCC1395 Error" + +puts "================" +puts "OCC1395" +puts "================" +puts "" +####################################################################################### +# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document +####################################################################################### +# Case 3 (SetUndoLimit) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label +set aLabel 0:2 +Label D ${aLabel} + +# Open a transaction +OpenTran D + +# Set integer attribute +set anInteger 5 +SetInteger D ${aLabel} ${anInteger} + +# Commit transaction +CommitTran D 1 + +# Set UndoLimit +UndoLimit D 10 + +# Set real attribute +set aReal 8.8 +SetReal D ${aLabel} ${aReal} + +# Undo +DFUndo D 1 + +# Check integer and real attributes +set IsGood 1 +if [catch { set Integer [GetInteger D ${aLabel}] } message] { + set IsGood 0 + puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}" +} else { + puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}" +} +if [catch { set Real [GetReal D ${aLabel}] } message] { + set IsGood 0 + puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}" +} else { + puts "OCC1395 OK : There is the real attribute on the label ${aLabel}" +} + +if { ${IsGood} == 1 } { + puts "OCC1395 OK" +} else { + puts "OCC1395 Error" +} diff --git a/tests/bugs/caf/bug1454 b/tests/bugs/caf/bug1454 new file mode 100644 index 0000000000..6a898837e3 --- /dev/null +++ b/tests/bugs/caf/bug1454 @@ -0,0 +1,34 @@ +puts "TODO ?OCC12345 ALL: Elapsed time is more then 20.0 seconds - Faulty" +puts "TODO ?OCC12345 ALL: Faulty OCC1454" + +puts "===== OCC1454 =====" +####################################################################################### +# Improve performance of TDF_Label::FindChild +####################################################################################### + +puts "Info: Open the document with 80000 sublabels of the label 0:2" +chrono h reset; chrono h start +Open [locate_data_file OCC1726.std] D +chrono h stop; set TimeList [chrono h show] + +set ElapsedTime_min [lindex ${TimeList} 4] +set ElapsedTime_sec [lindex ${TimeList} 6] +set CPUusertime [lindex ${TimeList} 11] +set CPUsystemtime [lindex ${TimeList} 16] +puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}" + +if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } { + puts "Elapsed time is more then 20.0 seconds - Faulty" + puts "Faulty OCC1454" +} elseif { ${CPUusertime} > 12 } { + puts "CPUusertime is more then 12 seconds - Faulty" + puts "Faulty OCC1454" +} elseif { ${CPUsystemtime} > 0.6 } { + puts "CPUsystemtime is more then 0.6 seconds" + puts "Faulty OCC1454" +} else { + puts "Elapsed time is less then 20 seconds - OK" + puts "CPU user time is less then 12 seconds - OK" + puts "CPU system time is less then 0.6 seconds - OK" + puts "OK for OCC1454" +} diff --git a/tests/bugs/caf/bug159 b/tests/bugs/caf/bug159 new file mode 100644 index 0000000000..7a75d1753e --- /dev/null +++ b/tests/bugs/caf/bug159 @@ -0,0 +1,28 @@ +puts "===========" +puts "OCC159" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +set log [OCC159 D] + +set list [split ${log}] +set ll [llength ${list}] + +if { ${ll} < 13} then { + puts "OCC159: Error" +} else { + set DocRefCount1 [lindex ${list} 2] + set DocOwner1 [lindex ${list} 5] + set DocOwner2 [lindex ${list} 8] + set DocRefCount2 [lindex ${list} 11] + set deltaRefCount [expr ${DocRefCount1} - ${DocRefCount2}] + if { ${DocOwner2} == "NULL" && ${deltaRefCount} >= 1 } then { + puts "OCC159: OK" + } else { + puts "OCC159: Error" + } +} + diff --git a/tests/bugs/caf/bug1722 b/tests/bugs/caf/bug1722 new file mode 100644 index 0000000000..06887ddfe8 --- /dev/null +++ b/tests/bugs/caf/bug1722 @@ -0,0 +1,98 @@ +puts "================" +puts "OCC1722" +puts "================" +puts "" +####################################################################################### +# Wrong behaviour of the method CommitCommand of class TDocStd_MultiTransactionManager +####################################################################################### + +proc OCC1722_Check_real_attribute {IsGood doc label good_real case} { + global ${doc} + # Check real attribute + set percent_max 0.1 + if [catch { set real [GetReal ${doc} ${label}] } message] { + set IsGood 0 + puts "OCC1722 Error (case ${case})" + } else { + set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.] + if {${real_percent} > ${percent_max}} { + puts "good_real = ${good_real}" + puts "real = ${real}" + puts "real_percent = ${real_percent}" + puts "OCC1722 Error (case ${case}-2)" + } + } + return ${IsGood} +} + + +set IsGood 1 +set Case 0 +set aLabel 0:1:1 +set aReal1 1.1 +set aReal2 2.1 + + +NewDocument doc1 +mtmCreate 4 + +mtmAdd doc1 + +SetReal doc1 ${aLabel} ${aReal1} +set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal1} [incr Case]] + +OpenCommand doc1 +SetReal doc1 ${aLabel} ${aReal2} +set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal2} [incr Case]] + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There is one document ( "3095112" ) in the manager +# Nested transaction mode is off +# +# +# *** End *** +################################################################################ +set index1 [lsearch -exact ${list} "Undo:"] + +# Check dump +set case [incr Case] +if { ${index1} != -1 } { + set IsGood 0 + puts "OCC1722 Error (case ${case})" +} + +mtmCommit Transaction1 + +set list [mtmDump] +################################################################################ +# *** Dump of MTM *** +# There is one document ( "3095112" ) in the manager +# Nested transaction mode is off +# +# Undo: Transaction1 - 1 documents ( "3095112" ) < Last action +# +# *** End *** +################################################################################ +set index2 [lsearch -exact ${list} "Undo:"] + +# Check dump +set case [incr Case] +if { ${index2} == -1 } { + set IsGood 0 + puts "OCC1722 Error (case ${case})" +} + +Undo doc1 +set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal1} [incr Case]] + +Redo doc1 +set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal2} [incr Case]] + + +if { ${IsGood} == 1 } { + puts "OCC1722 OK" +} else { + puts "OCC1722 Error" +} diff --git a/tests/bugs/caf/bug1724 b/tests/bugs/caf/bug1724 new file mode 100644 index 0000000000..2acef5aed5 --- /dev/null +++ b/tests/bugs/caf/bug1724 @@ -0,0 +1,169 @@ +puts "================" +puts "OCC1724" +puts "OCC2707" +puts "================" +puts "" +####################################################################################### +# BinOcaf: portability of binary file between platforms +####################################################################################### +# Various improvements of RINA LH3D-3H project +####################################################################################### + +set QA_DUP 0 + +set SetIntegerAttribute 100 +set SetRealAttribute 123.45 +set aFrom1 1 +set aTo1 2 +set SetReal1 3.21 +set SetReal2 4.56 +set aFrom2 11 +set aTo2 12 +set SetInteger1 3 +set SetInteger2 4 +set aLabel 0:2 + + +#### FOR PREPARING TEST ONLY #### +#### # Create testing document +#### NewDocument Doc BinOcaf +#### UndoLimit Doc 100 +#### NewCommand Doc +#### +#### # Set an integer attribute +#### SetInteger Doc ${aLabel} ${SetIntegerAttribute} +#### +#### # Set a real attribute +#### SetReal Doc ${aLabel} ${SetRealAttribute} +#### +#### # Set a real array attribute +#### SetRealArray Doc ${aLabel} ${aFrom1} ${aTo1} ${SetReal1} ${SetReal2} +#### +#### # Set an integer array attribute +#### SetIntArray Doc ${aLabel} ${aFrom2} ${aTo2} ${SetInteger1} ${SetInteger2} +#### +#### NewCommand Doc +#### +#### # Save the document +#### set OS $tcl_platform(os) +#### if { ${OS} == "SunOS" } { +#### puts "SunOS" +#### set aFile ${WorkDirectory}/OCC1724-[file tail [info script]]-SunOS.cbf +#### } else { +#### puts "WNT" +#### set aFile ${WorkDirectory}/OCC1724-[file tail [info script]]-WNT.cbf +#### } +#### puts "aFile=${aFile}" +#### catch {exec rm -f ${aFile}} +#### catch {SaveAs Doc ${aFile}} +#### if { ![file exists ${aFile}] } { +#### puts "There is not ${aFile} file; SaveAs command: Error" +#### puts "OCC1724: ERROR (case 1)" +#### } +#### catch {exec chmod 777 ${aFile}} +#### Close Doc +#### FOR PREPARING TEST ONLY #### + +set IsGood 1 + +Open [locate_data_file OCC1724-M3-WNT.cbf] DDoc + +# Get a value of integer attribute +set GetIntegerAttribute "" +set IsDone [catch {set GetIntegerAttribute [GetInteger DDoc ${aLabel}]} message] +if { ${IsDone} != 0 || + ${SetIntegerAttribute}!=${GetIntegerAttribute} } { + puts ${message} + puts "SetIntegerAttribute=${SetIntegerAttribute} GetIntegerAttribute=${GetIntegerAttribute}" + puts "Get a value of TDataStd_Integer attribute from restoring document: Error" + puts "OCC1724: ERROR (case 3)" + set IsGood 0 +} else { + puts "Get a value of TDataStd_Integer attribute from restoring document: OK" +} + +# Get a value of real attribute +set GetRealAttribute "" +set IsDone [catch {set GetRealAttribute [GetReal DDoc ${aLabel}]} message] +if { ${IsDone} != 0 || + ${SetRealAttribute}!=${GetRealAttribute} } { + puts ${message} + puts "SetRealAttribute=${SetRealAttribute} GetRealAttribute=${GetRealAttribute}" + puts "Get a value of TDataStd_Real attribute from restoring document: Error" + puts "OCC1724: ERROR (case 4)" + set IsGood 0 +} else { + puts "Get a value of TDataStd_Real attribute from restoring document: OK" +} + +# Get a value of real array attribute +set GetRealArrayAttribute "" +set IsDone [catch {set GetRealArrayAttribute [GetRealArray DDoc ${aLabel}]} message] +if { ${IsDone} != 0 } { + puts ${message} + puts "Get a value of TDataStd_RealArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 5)" + set IsGood 0 +} +set aRealArrayLength [llength ${GetRealArrayAttribute}] +if { ${aRealArrayLength} != [expr ${aTo1} - ${aFrom1} + 1] } { + puts "aRealArrayLength=${aRealArrayLength}" + puts "Get a value of TDataStd_RealArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 6)" + set IsGood 0 +} +set GetReal1 [lindex ${GetRealArrayAttribute} 0] +if { ${SetReal1} != ${GetReal1} } { + puts "GetReal1=${GetReal1}" + puts "Get a value of TDataStd_RealArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 7)" + set IsGood 0 +} +set GetReal2 [lindex ${GetRealArrayAttribute} 1] +if { ${SetReal2} != ${GetReal2} } { + puts "GetReal2=${GetReal2}" + puts "Get a value of TDataStd_RealArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 8)" + set IsGood 0 +} else { + puts "Get a value of TDataStd_RealArray attribute from restoring document: OK" +} + +# Get a value of Integer array attribute +set GetIntegerArrayAttribute "" +set IsDone [catch {set GetIntegerArrayAttribute [GetIntArray DDoc ${aLabel}]} message] +if { ${IsDone} != 0 } { + puts ${message} + puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 9)" + set IsGood 0 +} +set aIntegerArrayLength [llength ${GetIntegerArrayAttribute}] +if { ${aIntegerArrayLength} != [expr ${aTo2} - ${aFrom2} + 1] } { + puts "aIntegerArrayLength=${aIntegerArrayLength}" + puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 10)" + set IsGood 0 +} +set GetInteger1 [lindex ${GetIntegerArrayAttribute} 0] +if { ${SetInteger1} != ${GetInteger1} } { + puts "GetInteger1=${GetInteger1}" + puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 11)" + set IsGood 0 +} +set GetInteger2 [lindex ${GetIntegerArrayAttribute} 1] +if { ${SetInteger2} != ${GetInteger2} } { + puts "GetInteger2=${GetInteger2}" + puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error" + puts "OCC1724: ERROR (case 12)" + set IsGood 0 +} else { + puts "Get a value of TDataStd_IntegerArray attribute from restoring document: OK" +} + +if { ${IsGood} == 1 } { + puts "OCC1724 OK" +} else { + puts "OCC1724 Error" +} diff --git a/tests/bugs/caf/bug1726 b/tests/bugs/caf/bug1726 new file mode 100644 index 0000000000..828829c878 --- /dev/null +++ b/tests/bugs/caf/bug1726 @@ -0,0 +1,26 @@ +puts "================" +puts "OCC1726" +puts "================" +puts "" +####################################################################################### +# TDF_LabelNode::~TDF_LabelNode causes stack overflow +####################################################################################### + +puts "Info: Open the document with 80000 sublabels of the label 0:2" +chrono h reset; chrono h start +Open [locate_data_file OCC1726.std] D +chrono h stop; chrono h show + +set IsGood 1 +puts "Info: Close the document" +chrono h reset; chrono h start +if [catch {Close D} result] { + set IsGood 0 +} +chrono h stop; chrono h show + +if { ${IsGood} == 0} { + puts "Faulty OCC1726" +} else { + puts "OK OCC1726" +} diff --git a/tests/bugs/caf/bug1919 b/tests/bugs/caf/bug1919 new file mode 100644 index 0000000000..1e4db02c74 --- /dev/null +++ b/tests/bugs/caf/bug1919 @@ -0,0 +1,114 @@ +puts "TODO OCC12345 ALL: OCC1919 Error : Italian locale not seted" +puts "TODO OCC12345 ALL: OCC1919 Error" + +puts "================" +puts "OCC1919" +puts "================" +puts "" +####################################################################################### +# Incorrect locale management in XmlDrivers_DocumentRetrievalDriver::Read() +####################################################################################### + +pload QAcommands + +set USA_Label 0:10 +set Italian_Label 0:20 +set USA_Real 123.456 +set Italian_Real 123,456 +#set aFile ${filedir}/OCC1919-[file tail [info script]].xml +set IsGood 1 + +# Create document +NewDocument D XmlOcaf +UndoLimit D 100 +NewCommand D + +Label D ${USA_Label} +Label D ${Italian_Label} + +# Set USA locale +OCC1919_set en_US +set en_US_local [lindex [OCC1919_get] 2] +if { ${en_US_local} != "en_US" } { + puts "OCC1919 Error : USA - English (ISO-8859-1) locale not seted" + set IsGood 0 +} + +SetReal D ${USA_Label} ${USA_Real} + +# Get a value of the attribute +set USA_IsDone [catch {set new_USA_Real [GetReal D ${USA_Label}]} message] +if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${USA_Real} } { + puts ${message} + puts "USA_Real=${USA_Real} new_USA_Real=${new_USA_Real} " + puts "OCC1919 Error : Get bad value of TDataStd_Real attribute" + set IsGood 0 +} + +# Set italian locale +OCC1919_set it +set it_local [lindex [OCC1919_get] 2] +if { ${it_local} != "it" } { + puts "OCC1919 Error : Italian locale not seted" + set IsGood 0 +} + +OCC1919_real D ${Italian_Label} ${Italian_Real} + +# Get a value of the attribute +set Italian_IsDone [catch {set new_Italian_Real [GetReal D ${Italian_Label}]} message] +if { ${Italian_IsDone} != 0 || ${new_Italian_Real}!=${Italian_Real} } { + puts ${message} + puts "Italian_Real=${Italian_Real} new_Italian_Real=${new_Italian_Real}" + puts "OCC1919 Error : Get bad value of TDataStd_Real attribute" + set IsGood 0 +} + +# Get a value of the attribute +set USA_IsDone [catch {set new_USA_Real [GetReal D ${USA_Label}]} message] +if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${Italian_Real} } { + puts ${message} + puts "Italian_Real=${Italian_Real} new_USA_Real=${new_USA_Real}" + puts "OCC1919 Error : Get bad value of TDataStd_Real attribute" + set IsGood 0 +} + +# Store the document +file delete ${imagedir}/OCC1919-M6.xml +SaveAs D ${imagedir}/OCC1919-M6.xml +if { ![file exists ${imagedir}/OCC1919-M6.xml] } { + puts "OCC1919 Error : There is not file" + set IsGood 0 +} +catch {exec chmod 777 ${imagedir}/OCC1919-M6.xml} +Close D + +# Set en_US locale +OCC1919_set en_US +set en_US_local [lindex [OCC1919_get] 2] +if { ${en_US_local} != "en_US" } { + puts "OCC1919 Error : USA - English (ISO-8859-1) locale not seted" + set IsGood 0 +} + +# Restore the document +Open ${imagedir}/OCC1919-M6.xml DD + +# Get a value of the attribute +set USA_IsDone [catch {set new_USA_Real [GetReal DD ${USA_Label}]} message] +set Italian_IsDone [catch {set new_Italian_Real [GetReal DD ${Italian_Label}]} message] +if { ${USA_IsDone} != 0 || ${Italian_IsDone} != 0 || ${new_USA_Real}!=${new_Italian_Real} || ${new_Italian_Real}!=${USA_Real} } { + puts ${message} + puts "USA_Real=${USA_Real} Italian_Real=${Italian_Real}" + puts "new_USA_Real=${new_USA_Real} new_Italian_Real=${new_Italian_Real}" + puts "OCC1919 Error : Get bad value of TDataStd_Real attribute from restoring document" + set IsGood 0 +} + +if { ${IsGood} == 1 } { + puts "OCC1919 OK" +} else { + puts "OCC1919 Error" +} + +set make_photo 0 diff --git a/tests/bugs/caf/bug2269 b/tests/bugs/caf/bug2269 new file mode 100644 index 0000000000..be5909134b --- /dev/null +++ b/tests/bugs/caf/bug2269 @@ -0,0 +1,51 @@ +puts "================" +puts "OCC2269" +puts "================" +puts "" +####################################################################################### +# XML persistance should be more robust +####################################################################################### +# +# Tested file is contains 3 labels with TDataStd_RealArray attributes +# 0:2 label has good TDataStd_RealArray attribute +# 0:22 label has bad TDataStd_RealArray attribute +# 0:222 label has good TDataStd_RealArray attribute +# +####################################################################################### + +#set ScriptDir $XmlDir +#source ${ScriptDir}/begin +#source ${ScriptDir}/002/begin + +#set aTestName "OCC2269" +#set WorkDirectory ${filedir} +#set aFile $WorkDirectory/${aTestName}.${FileSuffix} +#catch {Close D} + +set IsGood 1 +Open [locate_data_file OCC2269.xml] DD + +if [catch {XDumpDF DD } result] { + puts "Error during dump ${aFile} file" + set IsGood 0 +} +if [catch {CheckLabel DD 0:2} result] { + puts "Error during search 0:2 label in ${aFile} file" + set IsGood 0 +} +if [catch {CheckLabel DD 0:22} result] { + puts "Error during search 0:22 label in ${aFile} file" + set IsGood 0 +} +if [catch {CheckLabel DD 0:222} result] { + puts "Error during search 0:222 label in ${aFile} file" + set IsGood 0 +} + +Close DD + +if { ${IsGood} == 0} { + puts "Faulty OCC2269" +} else { + puts "OK OCC2269" +} diff --git a/tests/bugs/caf/bug267_1 b/tests/bugs/caf/bug267_1 new file mode 100644 index 0000000000..2317d04b44 --- /dev/null +++ b/tests/bugs/caf/bug267_1 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC267" +puts "========" + +NewDocument D MDTV-Standard + +###################################################################### + +file delete ${imagedir}/OCC267.std +SaveAs D ${imagedir}/OCC267.std + diff --git a/tests/bugs/caf/bug267_2 b/tests/bugs/caf/bug267_2 new file mode 100644 index 0000000000..7d7610a030 --- /dev/null +++ b/tests/bugs/caf/bug267_2 @@ -0,0 +1,31 @@ +puts "TODO OCC12345 ALL: OCC267: Error" + +puts "========" +puts "OCC267" +puts "========" + +###################################################################### + +pload QAcommands + +NewDocument D MDTV-Standard +file delete ${imagedir}/OCC267.std +catch { OCC267 D ${imagedir}/OCC267.std } status + +set list [split ${status}] +set index [lsearch -exact ${list} "CDF_StoreStatus"] + +if { ${index} == -1 } then { + puts "OCC267: Error" + puts ${status} +} else { + set CDF_StoreStatus [lindex ${list} [expr ${index} + 2] ] + if { ${CDF_StoreStatus} == "CDF_SS_OK" } then { + puts "OCC267: OK" + } else { + puts "OCC267: ERROR" + puts ${status} + puts "CDF_StoreStatus = ${CDF_StoreStatus}" + } +} + diff --git a/tests/bugs/caf/bug2932_10 b/tests/bugs/caf/bug2932_10 new file mode 100644 index 0000000000..1ecb6b3e98 --- /dev/null +++ b/tests/bugs/caf/bug2932_10 @@ -0,0 +1,73 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 8 (TDataStd_IntegerArray) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set From 1 +set To 2 +set IntegerArray1 3 +set IntegerArray2 4 +set isDelta 0 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_IntegerArray +SetIntArray D ${Label} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_IntegerArray +SetIntArray D ${Label} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_11 b/tests/bugs/caf/bug2932_11 new file mode 100644 index 0000000000..63cd95fb09 --- /dev/null +++ b/tests/bugs/caf/bug2932_11 @@ -0,0 +1,70 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 9 (TDataStd_Name) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Name "New Name" +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Name +Label D ${Label} +SetName D ${Label} ${Name} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Name +SetName D ${Label} ${Name} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_12 b/tests/bugs/caf/bug2932_12 new file mode 100644 index 0000000000..a10a4a4ebd --- /dev/null +++ b/tests/bugs/caf/bug2932_12 @@ -0,0 +1,94 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 10 (TDataStd_PatternStd) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a box +set X 10 +set Y 20 +set Z 30 +set DX 100 +set DY 200 +set DZ 300 +box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} + +# Set a shape to the label +set BoxLabel 0:3 +SetShape D ${BoxLabel} Box + +# Set a real attribute +set RealLabel 0:4 +set RealPattern 123.456789 +SetReal D ${RealLabel} ${RealPattern} + +# Set an integer attribute +set IntegerLabel 0:5 +set IntegerPattern 123456789 +SetInteger D ${IntegerLabel} ${IntegerPattern} + +# Set a signature +set signature 1 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_PatternStd +Label D ${Label} +SetPattern D ${Label} ${signature} ${BoxLabel} ${RealLabel} ${IntegerLabel} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_PatternStd +SetPattern D ${Label} ${signature} ${BoxLabel} ${RealLabel} ${IntegerLabel} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_13 b/tests/bugs/caf/bug2932_13 new file mode 100644 index 0000000000..9dcc0d487e --- /dev/null +++ b/tests/bugs/caf/bug2932_13 @@ -0,0 +1,76 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 11 (TDataStd_Plane) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a plane +set X 10 +set Y 20 +set Z 30 +set DX -1 +set DY 0 +set DZ 0 +plane Plane ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Plane +SetPlane D ${Label} Plane +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Plane +SetPlane D ${Label} Plane +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_14 b/tests/bugs/caf/bug2932_14 new file mode 100644 index 0000000000..12e6646509 --- /dev/null +++ b/tests/bugs/caf/bug2932_14 @@ -0,0 +1,73 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 12 (TDataStd_Point) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a point +set X 10 +set Y 20 +set Z 30 +point Point ${X} ${Y} ${Z} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Point +SetPoint D ${Label} Point +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Point +SetPoint D ${Label} Point +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_15 b/tests/bugs/caf/bug2932_15 new file mode 100644 index 0000000000..206d725050 --- /dev/null +++ b/tests/bugs/caf/bug2932_15 @@ -0,0 +1,69 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 13 (TDataStd_Real) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Real 100. +############################################ + +set Integer1 300 +set Integer2 400 +set modified_attribute TDataStd_Integer + +############################################ +# Set TDataStd_Real +SetReal D ${Label} ${Real} +############################################ + +SetInteger D ${Label} ${Integer1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Real +SetReal D ${Label} ${Real} +############################################ + +# Set new value for TDataStd_Integer +SetInteger D ${Label} ${Integer2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_16 b/tests/bugs/caf/bug2932_16 new file mode 100644 index 0000000000..9c24014ce4 --- /dev/null +++ b/tests/bugs/caf/bug2932_16 @@ -0,0 +1,73 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 14 (TDataStd_RealArray) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set From 1 +set To 2 +set RealArray1 3. +set RealArray2 4. +set isDelta 0 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_RealArray +SetRealArray D ${Label} ${isDelta} ${From} ${To} ${RealArray1} ${RealArray2} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_RealArray +SetRealArray D ${Label} ${isDelta} ${From} ${To} ${RealArray1} ${RealArray2} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_17 b/tests/bugs/caf/bug2932_17 new file mode 100644 index 0000000000..ce75699b9e --- /dev/null +++ b/tests/bugs/caf/bug2932_17 @@ -0,0 +1,71 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 15 (TDataStd_Relation) +####################################################################################### + +pload QAcommands + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Relation "New Relation" +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Relation +OCC2932_SetRelation D ${Label} ${Relation} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Relation +OCC2932_SetRelation D ${Label} ${Relation} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_18 b/tests/bugs/caf/bug2932_18 new file mode 100644 index 0000000000..56e413b92f --- /dev/null +++ b/tests/bugs/caf/bug2932_18 @@ -0,0 +1,115 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 16 (TDataStd_Shape) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a box +set X 10 +set Y 20 +set Z 30 +set DX 100 +set DY 200 +set DZ 300 +box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Shape +SetShape D ${Label} Box +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Shape +SetShape D ${Label} Box +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +if { 1 == 2 } { +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} +} + +# NEW VERSION!!!!! +set ll [llength ${list}] +set good_length 20 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute1 [lindex ${list} [expr ${good_length} - 1]] + set name_attribute2 [lindex ${list} [expr ${good_length} - 4]] + set modified_attribute2 TNaming_NamedShape + puts "name_attribute1 = ${name_attribute1}" + puts "name_attribute2 = ${name_attribute2}" + puts "modified_attribute = ${modified_attribute}" + puts "modified_attribute2 = ${modified_attribute2}" + + set Is_TDataStd_Real 0 + set Is_TNaming_NamedShape 0 + if {[string compare ${name_attribute1} ${modified_attribute}] == 0 || + [string compare ${name_attribute2} ${modified_attribute}] == 0 } { + set Is_TDataStd_Real 1 + } + if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 || + [string compare ${name_attribute2} ${modified_attribute2}] == 0 } { + set Is_TNaming_NamedShape 1 + } + + + if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } + +} diff --git a/tests/bugs/caf/bug2932_19 b/tests/bugs/caf/bug2932_19 new file mode 100644 index 0000000000..50d48f055c --- /dev/null +++ b/tests/bugs/caf/bug2932_19 @@ -0,0 +1,73 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 18 (TDataStd_Variable) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Set isConstant +set isConstant 1 + +# Set a units +set units "kg/m3" +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Variable +SetVariable D ${Label} ${isConstant} ${units} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Variable +SetVariable D ${Label} ${isConstant} ${units} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_20 b/tests/bugs/caf/bug2932_20 new file mode 100644 index 0000000000..296f68887a --- /dev/null +++ b/tests/bugs/caf/bug2932_20 @@ -0,0 +1,70 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 19 (TDF_Reference) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Reference 0:3 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDF_Reference +Label D ${Reference} +SetReference D ${Label} ${Reference} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDF_Reference +SetReference D ${Label} ${Reference} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_21 b/tests/bugs/caf/bug2932_21 new file mode 100644 index 0000000000..0b06ca5380 --- /dev/null +++ b/tests/bugs/caf/bug2932_21 @@ -0,0 +1,71 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 20 (TDF_TagSource) +####################################################################################### + +pload QAcommands + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Tag 5 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDF_TagSource +OCC2932_SetTag D ${Label} ${Tag} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDF_TagSource +OCC2932_SetTag D ${Label} ${Tag} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_22 b/tests/bugs/caf/bug2932_22 new file mode 100644 index 0000000000..bd54e650b7 --- /dev/null +++ b/tests/bugs/caf/bug2932_22 @@ -0,0 +1,73 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 21 (TFunction_Function) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Set a driver guid +set driverGuid "5b35ca00-5b78-11d1-8940-080009dc3333" + +# Set a failure +set failureNb 13 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TFunction_Function +SetFunction D ${Label} ${driverGuid} ${failureNb} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TFunction_Function +SetFunction D ${Label} ${driverGuid} ${failureNb} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_23 b/tests/bugs/caf/bug2932_23 new file mode 100644 index 0000000000..c8d7c80270 --- /dev/null +++ b/tests/bugs/caf/bug2932_23 @@ -0,0 +1,69 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 22 (TPrsStd_AISPresentation) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +Label D ${Label} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TPrsStd_AISPresentation +AISSet D ${Label} NS +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TPrsStd_AISPresentation +AISSet D ${Label} NS +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_24 b/tests/bugs/caf/bug2932_24 new file mode 100644 index 0000000000..cfff758a76 --- /dev/null +++ b/tests/bugs/caf/bug2932_24 @@ -0,0 +1,72 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 23 (TPrsStd_Position) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Set a coordinates +set X 123.456 +set Y 789.012 +set Z 345.678 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TPrsStd_Position +SetPosition D ${Label} ${X} ${Y} ${Z} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TPrsStd_Position +SetPosition D ${Label} ${X} ${Y} ${Z} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_3 b/tests/bugs/caf/bug2932_3 new file mode 100644 index 0000000000..4a34df92f4 --- /dev/null +++ b/tests/bugs/caf/bug2932_3 @@ -0,0 +1,75 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 1 (TDataStd_Axis) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set X 10 +set Y 20 +set Z 30 +set DX 100 +set DY 200 +set DZ 300 +line Line ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Axis +SetAxis D ${Label} Line +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Axis +SetAxis D ${Label} Line +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_4 b/tests/bugs/caf/bug2932_4 new file mode 100644 index 0000000000..ebae92cebc --- /dev/null +++ b/tests/bugs/caf/bug2932_4 @@ -0,0 +1,69 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 2 (TDataStd_Comment) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Comment "New Comment" +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Comment +SetComment D ${Label} ${Comment} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Comment +SetComment D ${Label} ${Comment} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_5 b/tests/bugs/caf/bug2932_5 new file mode 100644 index 0000000000..5f0d918013 --- /dev/null +++ b/tests/bugs/caf/bug2932_5 @@ -0,0 +1,91 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 3 (TDataStd_Constraint) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a box +set X 10 +set Y 20 +set Z 30 +set DX 100 +set DY 200 +set DZ 300 +box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} + +# Set a shape to the label +set BoxLabel 0:3 +SetShape D ${BoxLabel} Box + +# Set integer attribute +set Integer 10 +set IntegerLabel 0:4 +SetInteger D ${IntegerLabel} ${Integer} + +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Constraint +Label D ${Label} +SetConstraint D ${Label} "tan" ${BoxLabel} +SetConstraint D ${Label} "plane" ${BoxLabel} +SetConstraint D ${Label} "value" ${IntegerLabel} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Constraint +SetConstraint D ${Label} "tan" ${BoxLabel} +SetConstraint D ${Label} "plane" ${BoxLabel} +SetConstraint D ${Label} "value" ${IntegerLabel} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_6 b/tests/bugs/caf/bug2932_6 new file mode 100644 index 0000000000..2572b57118 --- /dev/null +++ b/tests/bugs/caf/bug2932_6 @@ -0,0 +1,71 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 4 (TDataStd_Current) +####################################################################################### + +pload QAcommands + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Current +OCC2932_SetCurrent D ${Label} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Current +OCC2932_SetCurrent D ${Label} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_7 b/tests/bugs/caf/bug2932_7 new file mode 100644 index 0000000000..05622df47c --- /dev/null +++ b/tests/bugs/caf/bug2932_7 @@ -0,0 +1,70 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 5 (TDataStd_Expression) +####################################################################################### + +pload QAcommands + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Expression "New Expression" +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +OCC2932_SetExpression D ${Label} ${Expression} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Expression +OCC2932_SetExpression D ${Label} ${Expression} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug2932_8 b/tests/bugs/caf/bug2932_8 new file mode 100644 index 0000000000..d42419c1f6 --- /dev/null +++ b/tests/bugs/caf/bug2932_8 @@ -0,0 +1,116 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 6 (TDataStd_Geometry) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +# Create a box +set X 10 +set Y 20 +set Z 30 +set DX 100 +set DY 200 +set DZ 300 +box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ} +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Geometry +Label D ${Label} +SetGeometry D ${Label} "pnt" ${Box} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Geometry +SetGeometry D ${Label} "pnt" ${Box} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +if { 1 == 2 } { +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} +} + +# NEW VERSION!!!!! +set ll [llength ${list}] +set good_length 20 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute1 [lindex ${list} [expr ${good_length} - 1]] + set name_attribute2 [lindex ${list} [expr ${good_length} - 4]] + set modified_attribute2 TNaming_NamedShape + puts "name_attribute1 = ${name_attribute1}" + puts "name_attribute2 = ${name_attribute2}" + puts "modified_attribute = ${modified_attribute}" + puts "modified_attribute2 = ${modified_attribute2}" + + set Is_TDataStd_Real 0 + set Is_TNaming_NamedShape 0 + if {[string compare ${name_attribute1} ${modified_attribute}] == 0 || + [string compare ${name_attribute2} ${modified_attribute}] == 0 } { + set Is_TDataStd_Real 1 + } + if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 || + [string compare ${name_attribute2} ${modified_attribute2}] == 0 } { + set Is_TNaming_NamedShape 1 + } + + + if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } + +} diff --git a/tests/bugs/caf/bug2932_9 b/tests/bugs/caf/bug2932_9 new file mode 100644 index 0000000000..59fa3d0156 --- /dev/null +++ b/tests/bugs/caf/bug2932_9 @@ -0,0 +1,69 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 7 (TDataStd_Integer) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set Integer 100 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_Integer +SetInteger D ${Label} ${Integer} +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_Integer +SetInteger D ${Label} ${Integer} +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set ll [llength ${list}] +set good_length 17 +puts "length = ${ll}" +puts "good_length = ${good_length}" + +if { ${ll} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug644 b/tests/bugs/caf/bug644 new file mode 100644 index 0000000000..8e0a901943 --- /dev/null +++ b/tests/bugs/caf/bug644 @@ -0,0 +1,30 @@ +puts "=================" +puts "OCC644" +puts "SAM1513" +puts "=================" +puts "" + +NewDocument D +UndoLimit D 10 + +NewCommand D +SetVariable D 0:1 0 mm +SetRelation D 0:2 x=10 0:1 + +NewCommand D +SetRelation D 0:2 x=20 0:1 + +NewCommand D +Undo D +Redo D +Undo D + +set RelationList [DumpRelation D 0:2] + +if {[llength ${RelationList}] <= 10} { + puts "OCC644: OK" +} else { + puts "OCC644: ERROR" +} + + diff --git a/tests/bugs/fclasses/bug11568_3 b/tests/bugs/fclasses/bug11568_3 new file mode 100644 index 0000000000..9ba5db60b8 --- /dev/null +++ b/tests/bugs/fclasses/bug11568_3 @@ -0,0 +1,18 @@ +puts "============" +puts "OCC11568" +puts "============" +puts "" +####################################################################### +# UnitsAPI package uses incorrect symbol for minutes: mn instead of min +####################################################################### + +set BugNumber OCC11568 + +set UnitString "min" +set result "Token word : min\n" + +if { [unitparsing ${UnitString}] == ${result} } { + puts "${BugNumber}: OK" +} else { + puts "${BugNumber}: Faulty" +} diff --git a/tests/bugs/fclasses/bug11568_4 b/tests/bugs/fclasses/bug11568_4 new file mode 100644 index 0000000000..a5cda62d4d --- /dev/null +++ b/tests/bugs/fclasses/bug11568_4 @@ -0,0 +1,18 @@ +puts "============" +puts "OCC11568" +puts "============" +puts "" +####################################################################### +# UnitsAPI package uses incorrect symbol for minutes: mn instead of min +####################################################################### + +set BugNumber OCC11568 + +set UnitString "min" +set result "result: 60\n" + +if { [unitconvtoSI 1 ${UnitString}] == ${result} } { + puts "${BugNumber}: OK" +} else { + puts "${BugNumber}: Faulty" +} diff --git a/tests/bugs/fclasses/bug142 b/tests/bugs/fclasses/bug142 new file mode 100644 index 0000000000..f0d6b552ea --- /dev/null +++ b/tests/bugs/fclasses/bug142 @@ -0,0 +1,8 @@ +puts "========" +puts "OCC142" +puts "CSR888 (call 68539)" +puts "========" + +pload QAcommands + +OCC142 diff --git a/tests/bugs/fclasses/bug181_1 b/tests/bugs/fclasses/bug181_1 new file mode 100644 index 0000000000..b2fcaf541f --- /dev/null +++ b/tests/bugs/fclasses/bug181_1 @@ -0,0 +1,36 @@ +puts "========" +puts "OCC181" +puts "OCC701" +puts "========" +###################################################### +# Resource_Manager class doen't return status of saving resources in a file. +###################################################### +# Add method BuildPath to OSD_Directory +###################################################### + +# Clear tmp-data +###################################################################### +set tmp ${imagedir} +###################################################################### + +pload QAcommands + +file delete ${tmp}/1/2/3/OCC181 +file delete ${tmp}/1/2/OCC181 +file delete ${tmp}/1/OCC181 +file delete ${tmp}/1/2/3 +file delete ${tmp}/1/2 +file delete ${tmp}/1 + +set log [OCC181 OCC181 ${imagedir} ${tmp}/1 0] + +set list [split ${log}] +set ll [llength ${list}] +set status [lindex ${list} [expr ${ll} - 2] ] + +if { ${status} == "TRUE"} then { + puts "OCC181: OK" +} else { + puts "OCC181: Error" +} + diff --git a/tests/bugs/fclasses/bug181_2 b/tests/bugs/fclasses/bug181_2 new file mode 100644 index 0000000000..8e743acbe0 --- /dev/null +++ b/tests/bugs/fclasses/bug181_2 @@ -0,0 +1,38 @@ +puts "TODO OCC12345 ALL: OCC181: Error" + +puts "========" +puts "OCC181" +puts "OCC701" +puts "========" +###################################################### +# Resource_Manager class doen't return status of saving resources in a file. +###################################################### +# Add method BuildPath to OSD_Directory +###################################################### + +# Clear tmp-data +###################################################################### +set tmp ${imagedir} +###################################################################### + +pload QAcommands + +file delete ${tmp}/1/2/3/OCC181 +file delete ${tmp}/1/2/OCC181 +file delete ${tmp}/1/OCC181 +file delete ${tmp}/1/2/3 +file delete ${tmp}/1/2 +file delete ${tmp}/1 + +set log [OCC181 OCC181 ${imagedir} ${tmp}/1/2/3 0] + +set list [split ${log}] +set ll [llength ${list}] +set status [lindex ${list} [expr ${ll} - 2] ] + +if { ${status} == "TRUE"} then { + puts "OCC181: OK" +} else { + puts "OCC181: Error" +} + diff --git a/tests/bugs/fclasses/bug216 b/tests/bugs/fclasses/bug216 new file mode 100644 index 0000000000..394b8c985e --- /dev/null +++ b/tests/bugs/fclasses/bug216 @@ -0,0 +1,7 @@ +puts "========" +puts "OCC216" +puts "========" + +pload QAcommands + +OCC216 diff --git a/tests/bugs/fclasses/bug309 b/tests/bugs/fclasses/bug309 new file mode 100644 index 0000000000..84e07b2b64 --- /dev/null +++ b/tests/bugs/fclasses/bug309 @@ -0,0 +1,44 @@ +puts "================" +puts "OCC309" +puts "================" +puts "" + +pload QAcommands + +set result [OCC309] + +set ll [llength ${result}] +if { ${ll} != 2 } { + puts "result = ${result}" + puts "length = ${ll}" + puts "OCC309: ERROR 0" +} else { + set result1 [lindex ${result} 0] + set result2 [lindex ${result} 1] + set CurrentDirectory [pwd] + set UpTrek [file dirname ${CurrentDirectory}] + if { [string compare $tcl_platform(platform) "windows"] != 0} { + set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ] + set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ] + } else { + set res1 [ string range $result1 1 [expr [string length $result1] -2 ] ] + set res2 [ string range $result1 1 [expr [string length $result2] -8 ] ] + } + if {[string compare ${res1} "${CurrentDirectory}"] == 0} { + puts "OCC309: OK 1" + } else { + puts "result1 = ${result1}" + puts "res1 = ${res1}" + puts "CurrentDirectory = ${CurrentDirectory}" + puts "OCC309: ERROR 1" + } + if {[string compare ${res2} "${UpTrek}"] == 0} { + puts "OCC309: OK 2" + } else { + puts "result2 = ${result2}" + puts "res2 = ${res2}" + puts "UpTrek = ${UpTrek}" + puts "OCC309: ERROR 2" + } +} + diff --git a/tests/bugs/fclasses/bug310 b/tests/bugs/fclasses/bug310 new file mode 100644 index 0000000000..0dae584b6e --- /dev/null +++ b/tests/bugs/fclasses/bug310 @@ -0,0 +1,35 @@ +puts "================" +puts "OCC310" +puts "================" +puts "" + +pload QAcommands + +set result [OCC310] + +set ll [llength ${result}] +if { ${ll} != 2 } { + puts "result = ${result}" + puts "length = ${ll}" + puts "OCC310: ERROR 0" +} else { + set result1 [lindex ${result} 0] + set result2 [lindex ${result} 1] + set Directory "|where|you|want|tmp|qwerty|tmp|" + set UpTrek "|where|you|want|tmp|qwerty|" + if {[string compare ${result1} "${Directory}"] == 0} { + puts "OCC310: OK 1" + } else { + puts "result1 = ${result1}" + puts "Directory = ${Directory}" + puts "OCC310: ERROR 1" + } + if {[string compare ${result2} "${UpTrek}"] == 0} { + puts "OCC310: OK 2" + } else { + puts "result2 = ${result2}" + puts "UpTrek = ${UpTrek}" + puts "OCC310: ERROR 2" + } +} + diff --git a/tests/bugs/fclasses/bug6143 b/tests/bugs/fclasses/bug6143 new file mode 100644 index 0000000000..f950e54d52 --- /dev/null +++ b/tests/bugs/fclasses/bug6143 @@ -0,0 +1,31 @@ +puts "================" +puts "OCC1723" +puts "OCC2707" +puts "OCC6143" +puts "OCC12131" +puts "================" +puts "" +####################################################################################### +# OSD::SetSignal : not all FLT exceptions are catched +# Various improvements of RINA LH3D-3H project +# Correct handling of exceptions on WNT +####################################################################################### + +pload QAcommands + +set BugNumber OCC6143 + +set OK_string "TestExcept: Successfull completion\n" +set IsDone [catch {set aResult [OCC6143]} result] + +if { ${IsDone} != 0 } { + puts "result = ${result}" + puts "Faulty ${BugNumber}" +} else { + if { [string first ${OK_string} ${aResult} ] != -1 } { + puts "OK ${BugNumber}" + } else { + puts "Faulty ${BugNumber}" + } +} + diff --git a/tests/bugs/fclasses/bug983 b/tests/bugs/fclasses/bug983 new file mode 100644 index 0000000000..a3dc215a07 --- /dev/null +++ b/tests/bugs/fclasses/bug983 @@ -0,0 +1,24 @@ +puts "================" +puts "OCC983" +puts "================" +puts "" +####################################################################################### +# LDOM xml parser does not take into account "&" xml entity. +####################################################################################### + +pload QAcommands + +set list [OCC983 [locate_data_file OCC983.xml]] + +if { [regexp "Document parsed" $list] == 1 } { + if {[lsearch -exact ${list} "&View"] != -1 } { + puts "OCC983: OK" + } elseif {[lsearch -exact ${list} "&View"] != 0 } { + puts "OCC983: Error" + } else { + puts "OCC983: Error ; bad input file." + } +} else { + puts "OCC983: Error ; document not parsed" +} + diff --git a/tests/bugs/iges/bug5079 b/tests/bugs/iges/bug5079 new file mode 100644 index 0000000000..413df8514f --- /dev/null +++ b/tests/bugs/iges/bug5079 @@ -0,0 +1,14 @@ +puts "================" +puts "OCC5079" +puts "================" +puts "" +####################################################################################### +# Exception in translating of IGES files +####################################################################################### + +igesbrep [locate_data_file OCC5079.igs] a * +tpcompound result + +checkshape result + +set 2dviewer 0 diff --git a/tests/bugs/iges/bug6508 b/tests/bugs/iges/bug6508 new file mode 100644 index 0000000000..15e3f18dc1 --- /dev/null +++ b/tests/bugs/iges/bug6508 @@ -0,0 +1,16 @@ +puts "========" +puts "OCC6508" +puts "========" +puts "" +###################################################### +# Reading invalid General Symbol entity from an IGES file causes an exception +###################################################### + +igesbrep [locate_data_file OCC6508.igs] a * +tpcompound result + +checkshape result + +set nb_f_good 192 + +set 2dviewer 0 diff --git a/tests/bugs/iges/bug663 b/tests/bugs/iges/bug663 new file mode 100644 index 0000000000..916b123198 --- /dev/null +++ b/tests/bugs/iges/bug663 @@ -0,0 +1,23 @@ +puts "========================" +puts "OCC663" +puts "========================" +#### Wrong translation of faces on SurfaceOfRevolution +puts "" + +igesbrep [locate_data_file D44-11325-6.igs] a 2860 + +set x 62.5015115293408 +set y -56.0926450759605 +set z -44.3 +vertex v $x $y $z + +distmini d a_1 v + +set MinDistList [dump d_val] +set MinDist [lindex $MinDistList end] + +if {$MinDist > 1e-7} { + puts "Faulty OCC663" +} else { + puts "OCC663 OK" +} diff --git a/tests/bugs/modalg/bug10160_1 b/tests/bugs/modalg/bug10160_1 new file mode 100644 index 0000000000..98e2c133f6 --- /dev/null +++ b/tests/bugs/modalg/bug10160_1 @@ -0,0 +1,59 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-2.brep] b2 + +set NbTests 3 + +dchrono h0 reset +dchrono h0 start + +bop b1 b2 +dchrono h0 stop +set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcommon result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time + +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 1.30062e+07 + +# Analysis of "nbshapes res" +set nb_v_good 20 +set nb_e_good 28 +set nb_w_good 16 +set nb_f_good 15 +set nb_sh_good 3 +set nb_sol_good 3 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 86 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_10 b/tests/bugs/modalg/bug10160_10 new file mode 100644 index 0000000000..a6f967858b --- /dev/null +++ b/tests/bugs/modalg/bug10160_10 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-2.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopfuse result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 3.20326e+07 + +# Analysis of "nbshapes res" +set nb_v_good 116 +set nb_e_good 173 +set nb_w_good 67 +set nb_f_good 63 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 422 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_11 b/tests/bugs/modalg/bug10160_11 new file mode 100644 index 0000000000..8172a4166e --- /dev/null +++ b/tests/bugs/modalg/bug10160_11 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-2.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcut result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 3.05154e+07 + +# Analysis of "nbshapes res" +set nb_v_good 96 +set nb_e_good 143 +set nb_w_good 51 +set nb_f_good 48 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 341 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_12 b/tests/bugs/modalg/bug10160_12 new file mode 100644 index 0000000000..e4c0243320 --- /dev/null +++ b/tests/bugs/modalg/bug10160_12 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-2.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + boptuc result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 6.38359e+06 + +# Analysis of "nbshapes res" +set nb_v_good 108 +set nb_e_good 161 +set nb_w_good 61 +set nb_f_good 60 +set nb_sh_good 3 +set nb_sol_good 3 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 397 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_2 b/tests/bugs/modalg/bug10160_2 new file mode 100644 index 0000000000..e85072e0ef --- /dev/null +++ b/tests/bugs/modalg/bug10160_2 @@ -0,0 +1,57 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-2.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopfuse result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 4.75218e+07 + +# Analysis of "nbshapes res" +set nb_v_good 32 +set nb_e_good 60 +set nb_w_good 32 +set nb_f_good 29 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 156 + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug10160_3 b/tests/bugs/modalg/bug10160_3 new file mode 100644 index 0000000000..bba4743bb5 --- /dev/null +++ b/tests/bugs/modalg/bug10160_3 @@ -0,0 +1,56 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "TODO OCC11111 ALL: Error : The square of result shape is" +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-2.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcut result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 2.36194e+07 + +# Analysis of "nbshapes res" +set nb_v_good 24 +set nb_e_good 34 +set nb_w_good 20 +set nb_f_good 19 +set nb_sh_good 4 +set nb_sol_good 4 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 106 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_4 b/tests/bugs/modalg/bug10160_4 new file mode 100644 index 0000000000..c8283b9efe --- /dev/null +++ b/tests/bugs/modalg/bug10160_4 @@ -0,0 +1,56 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-2.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + boptuc result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 3.56087e+07 + +# Analysis of "nbshapes res" +set nb_v_good 24 +set nb_e_good 34 +set nb_w_good 20 +set nb_f_good 17 +set nb_sh_good 3 +set nb_sol_good 3 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 102 + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug10160_5 b/tests/bugs/modalg/bug10160_5 new file mode 100644 index 0000000000..87ca7f71e6 --- /dev/null +++ b/tests/bugs/modalg/bug10160_5 @@ -0,0 +1,55 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcommon result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 782201 + +# Analysis of "nbshapes res" +set nb_v_good 53 +set nb_e_good 75 +set nb_w_good 38 +set nb_f_good 34 +set nb_sh_good 6 +set nb_sol_good 6 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 213 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_6 b/tests/bugs/modalg/bug10160_6 new file mode 100644 index 0000000000..029f0ce478 --- /dev/null +++ b/tests/bugs/modalg/bug10160_6 @@ -0,0 +1,57 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopfuse result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 3.61484e+07 + +# Analysis of "nbshapes res" +set nb_v_good 121 +set nb_e_good 178 +set nb_w_good 65 +set nb_f_good 59 +set nb_sh_good 3 +set nb_sol_good 2 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 429 + +set 2dviewer 0 + + diff --git a/tests/bugs/modalg/bug10160_7 b/tests/bugs/modalg/bug10160_7 new file mode 100644 index 0000000000..bbbc95e988 --- /dev/null +++ b/tests/bugs/modalg/bug10160_7 @@ -0,0 +1,56 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcut result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 3.00597e+07 + +# Analysis of "nbshapes res" +set nb_v_good 61 +set nb_e_good 87 +set nb_w_good 44 +set nb_f_good 36 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 231 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_8 b/tests/bugs/modalg/bug10160_8 new file mode 100644 index 0000000000..e2b97189cd --- /dev/null +++ b/tests/bugs/modalg/bug10160_8 @@ -0,0 +1,55 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-1.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + boptuc result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 6.87093e+06 + +# Analysis of "nbshapes res" +set nb_v_good 113 +set nb_e_good 166 +set nb_w_good 59 +set nb_f_good 57 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 398 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10160_9 b/tests/bugs/modalg/bug10160_9 new file mode 100644 index 0000000000..eb5f66f169 --- /dev/null +++ b/tests/bugs/modalg/bug10160_9 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC10160" +puts "============" +puts "" +####################################################################### +# BOP perfomance improvemen +####################################################################### + +set BugNumber OCC10160 + +restore [locate_data_file OCC10160-2.brep] b1 +restore [locate_data_file OCC10160-3.brep] b2 + +set NbTests 3 + +puts "Prepare boolean operation ..." +dchrono h0 reset; dchrono h0 start +bop b1 b2 +dchrono h0 stop; set CPU_time0_List [dchrono h0 show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 +puts "CPU_user_time0=${CPU_user_time0}" + +puts "Start boolean operation ..." +dchrono h reset; dchrono h start +# +# BOOLEAN OPERATION ----- START +# +for {set i 1} {$i <= ${NbTests}} {incr i} { + bopcommon result +} +# +# BOOLEAN OPERATION ----- FINISH +# +dchrono h stop; set CPU_time_List [dchrono h show] +regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time +puts "Finish boolean operation ..." +puts "CPU_user_time=${CPU_user_time}" +set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] +puts "CPU_user_time=${CPU_user_time}" + +set square 4.86635e+06 + +# Analysis of "nbshapes res" +set nb_v_good 88 +set nb_e_good 131 +set nb_w_good 45 +set nb_f_good 45 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 312 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10232 b/tests/bugs/modalg/bug10232 new file mode 100644 index 0000000000..38ceba48e6 --- /dev/null +++ b/tests/bugs/modalg/bug10232 @@ -0,0 +1,38 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10232" +puts "============" +puts "" +####################################################################### +# Exception "Segmentation violation" in Boolean Operations +####################################################################### + +set BugNumber OCC10232 + +puts "Load first shape ..." +restore [locate_data_file OCC10232_ms1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10232_ms2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result +puts "Finish boolean operation ..." + +set length 3210.71 + +set nb_v_good 1197 +set nb_e_good 1182 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 2380 + +set 2dviewer 1 + diff --git a/tests/bugs/modalg/bug10435_1 b/tests/bugs/modalg/bug10435_1 new file mode 100644 index 0000000000..4605e60820 --- /dev/null +++ b/tests/bugs/modalg/bug10435_1 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC10435" +puts "============" +puts "" +####################################################################### +# error in fillet after Cut of torus from box +####################################################################### + +set BugNumber OCC10435 + +restore [locate_data_file OCC10435.brep] a + +checkshape a +explode a e + +set radius 5. + +if { [catch {fillet result a ${radius} a_10 ${radius} a_15 ${radius} a_16 } catch_result] } { + puts "Faulty ${BugNumber} exception (case 1): Fillet operation fails on given shape " +} else { + puts "${BugNumber} (case 1) OK: Fillet operation was made" + + set square 36455.2 + + # Analysis of "nbshapes res" + set nb_v_good 12 + set nb_e_good 19 + set nb_w_good 11 + set nb_f_good 10 + set nb_sh_good 1 + set nb_sol_good 1 + set nb_compsol_good 0 + set nb_compound_good 1 + set nb_shape_good 55 +} + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug10435_2 b/tests/bugs/modalg/bug10435_2 new file mode 100644 index 0000000000..ae6577a41b --- /dev/null +++ b/tests/bugs/modalg/bug10435_2 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10435" +puts "============" +puts "" +####################################################################### +# error in fillet after Cut of torus from box +####################################################################### + +set BugNumber OCC10435 + +puts "Load shape ..." +restore [locate_data_file OCC10435.brep] b1 + +explode b1 e + +puts "Start fillet ..." +fillet result b1 5 b1_15 5 b1_16 5 b1_10 +puts "Finish fillet ..." + +set square 36455.2 + +# Analysis of "nbshapes res" +set nb_v_good 12 +set nb_e_good 19 +set nb_w_good 11 +set nb_f_good 10 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 55 + +set 2dviewer 1 + diff --git a/tests/bugs/modalg/bug10605_1 b/tests/bugs/modalg/bug10605_1 new file mode 100644 index 0000000000..023a6ecad7 --- /dev/null +++ b/tests/bugs/modalg/bug10605_1 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10605" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10605 + +restore [locate_data_file OCC10605-1.brep] b1 +restore [locate_data_file OCC10605-3.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcommon result +puts "Finish boolean operation ..." + +set square 233.798 + +# Analysis of "nbshapes res" +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 42 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10605_2 b/tests/bugs/modalg/bug10605_2 new file mode 100644 index 0000000000..af3bae240b --- /dev/null +++ b/tests/bugs/modalg/bug10605_2 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10605" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10605 + +restore [locate_data_file OCC10605-1.brep] b1 +restore [locate_data_file OCC10605-3.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopfuse result +puts "Finish boolean operation ..." + +set square 838.752 + +# Analysis of "nbshapes res" +set nb_v_good 15 +set nb_e_good 22 +set nb_w_good 10 +set nb_f_good 9 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 59 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10605_3 b/tests/bugs/modalg/bug10605_3 new file mode 100644 index 0000000000..ed50c6eb71 --- /dev/null +++ b/tests/bugs/modalg/bug10605_3 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10605" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10605 + +restore [locate_data_file OCC10605-1.brep] b1 +restore [locate_data_file OCC10605-3.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcut result +puts "Finish boolean operation ..." + +set square 779.887 + +# Analysis of "nbshapes res" +set nb_v_good 13 +set nb_e_good 19 +set nb_w_good 8 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 50 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10605_4 b/tests/bugs/modalg/bug10605_4 new file mode 100644 index 0000000000..eb432e0348 --- /dev/null +++ b/tests/bugs/modalg/bug10605_4 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10605" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10605 + +restore [locate_data_file OCC10605-1.brep] b1 +restore [locate_data_file OCC10605-3.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +boptuc result +puts "Finish boolean operation ..." + +set square 292.663 + +# Analysis of "nbshapes res" +set nb_v_good 12 +set nb_e_good 18 +set nb_w_good 9 +set nb_f_good 9 +set nb_sh_good 2 +set nb_sol_good 2 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 53 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10605_5 b/tests/bugs/modalg/bug10605_5 new file mode 100644 index 0000000000..3f6d3b4929 --- /dev/null +++ b/tests/bugs/modalg/bug10605_5 @@ -0,0 +1,33 @@ +puts "============" +puts "OCC10605" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10605 + +restore [locate_data_file OCC10605-1.brep] b1 +restore [locate_data_file OCC10605-3.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result b1 b2 +puts "Finish boolean operation ..." + +set length 59.8334 +# Analysis of "nbshapes res" +set nb_v_good 9 +set nb_e_good 9 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 19 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10606_1 b/tests/bugs/modalg/bug10606_1 new file mode 100644 index 0000000000..2196de4079 --- /dev/null +++ b/tests/bugs/modalg/bug10606_1 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10606" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10606 + +restore [locate_data_file OCC10604-1.brep] b1 +restore [locate_data_file OCC10606-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcommon result +puts "Finish boolean operation ..." + +set square 66.672 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 8 +set nb_w_good 2 +set nb_f_good 2 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 21 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10606_2 b/tests/bugs/modalg/bug10606_2 new file mode 100644 index 0000000000..b2e880752c --- /dev/null +++ b/tests/bugs/modalg/bug10606_2 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10606" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10606 + +restore [locate_data_file OCC10604-1.brep] b1 +restore [locate_data_file OCC10606-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopfuse result +puts "Finish boolean operation ..." + +set square 1450.22 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 8 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 25 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10606_3 b/tests/bugs/modalg/bug10606_3 new file mode 100644 index 0000000000..ca14f2ea3c --- /dev/null +++ b/tests/bugs/modalg/bug10606_3 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10606" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10606 + +restore [locate_data_file OCC10604-1.brep] b1 +restore [locate_data_file OCC10606-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcut result +puts "Finish boolean operation ..." + +set square 761.355 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 8 +set nb_w_good 3 +set nb_f_good 3 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 23 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10606_4 b/tests/bugs/modalg/bug10606_4 new file mode 100644 index 0000000000..144937b15e --- /dev/null +++ b/tests/bugs/modalg/bug10606_4 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10606" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10606 + +restore [locate_data_file OCC10604-1.brep] b1 +restore [locate_data_file OCC10606-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +boptuc result +puts "Finish boolean operation ..." + +set square 755.54 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 8 +set nb_w_good 3 +set nb_f_good 3 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 23 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10606_5 b/tests/bugs/modalg/bug10606_5 new file mode 100644 index 0000000000..46e467e4a7 --- /dev/null +++ b/tests/bugs/modalg/bug10606_5 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10606" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10606 + +restore [locate_data_file OCC10604-1.brep] b1 +restore [locate_data_file OCC10606-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result b1 b2 +puts "Finish boolean operation ..." + +set length 18.3861 + +# Analysis of "nbshapes res" +set nb_v_good 4 +set nb_e_good 4 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 9 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug1077 b/tests/bugs/modalg/bug1077 new file mode 100644 index 0000000000..5f6a1a718c --- /dev/null +++ b/tests/bugs/modalg/bug1077 @@ -0,0 +1,16 @@ +pload QAcommands + +puts "============" +puts "OCC1077" +puts "============" +puts "" +###################################################### +# BUG in boolean operations in the development version +###################################################### + +if { [catch { OCC1077 result } catch_result] } { + puts "Faulty OCC1077" +} + +set square 587.181 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug10842_1 b/tests/bugs/modalg/bug10842_1 new file mode 100644 index 0000000000..a269905008 --- /dev/null +++ b/tests/bugs/modalg/bug10842_1 @@ -0,0 +1,36 @@ +puts "TODO OCC111111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10842" +puts "============" +puts "" +####################################################################### +# Bug in Bop +####################################################################### + +set BugNumber OCC10842 + +restore [locate_data_file OCC10842-1.brep] b1 +restore [locate_data_file OCC10842-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcommon result +puts "Finish boolean operation ..." + +set square 2312.93 + +# Analysis of "nbshapes res" +set nb_v_good 7 +set nb_e_good 9 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 27 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10842_2 b/tests/bugs/modalg/bug10842_2 new file mode 100644 index 0000000000..85e0e6fd46 --- /dev/null +++ b/tests/bugs/modalg/bug10842_2 @@ -0,0 +1,36 @@ +puts "TODO OCC111111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10842" +puts "============" +puts "" +####################################################################### +# Bug in Bop +####################################################################### + +set BugNumber OCC10842 + +restore [locate_data_file OCC10842-1.brep] b1 +restore [locate_data_file OCC10842-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopfuse result +puts "Finish boolean operation ..." + +set square 27919.7 + +# Analysis of "nbshapes res" +set nb_v_good 15 +set nb_e_good 21 +set nb_w_good 7 +set nb_f_good 6 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 52 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10842_3 b/tests/bugs/modalg/bug10842_3 new file mode 100644 index 0000000000..0dd94602c8 --- /dev/null +++ b/tests/bugs/modalg/bug10842_3 @@ -0,0 +1,36 @@ +puts "TODO OCC111111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10842" +puts "============" +puts "" +####################################################################### +# Bug in Bop +####################################################################### + +set BugNumber OCC10842 + +restore [locate_data_file OCC10842-1.brep] b1 +restore [locate_data_file OCC10842-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcut result +puts "Finish boolean operation ..." + +set square 18757.7 + +# Analysis of "nbshapes res" +set nb_v_good 13 +set nb_e_good 18 +set nb_w_good 6 +set nb_f_good 6 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 46 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10842_4 b/tests/bugs/modalg/bug10842_4 new file mode 100644 index 0000000000..df6e78c140 --- /dev/null +++ b/tests/bugs/modalg/bug10842_4 @@ -0,0 +1,36 @@ +puts "TODO OCC111111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC10842" +puts "============" +puts "" +####################################################################### +# Bug in Bop +####################################################################### + +set BugNumber OCC10842 + +restore [locate_data_file OCC10842-1.brep] b1 +restore [locate_data_file OCC10842-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +boptuc result +puts "Finish boolean operation ..." + +set square 11475 + +# Analysis of "nbshapes res" +set nb_v_good 9 +set nb_e_good 12 +set nb_w_good 5 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 33 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10842_5 b/tests/bugs/modalg/bug10842_5 new file mode 100644 index 0000000000..87cddb120d --- /dev/null +++ b/tests/bugs/modalg/bug10842_5 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10842" +puts "============" +puts "" +####################################################################### +# Bug in Bop +####################################################################### + +set BugNumber OCC10842 + +restore [locate_data_file OCC10842-1.brep] b1 +restore [locate_data_file OCC10842-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result b1 b2 +puts "Finish boolean operation ..." + +set length 122.816 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 6 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 13 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10846_1 b/tests/bugs/modalg/bug10846_1 new file mode 100644 index 0000000000..151d20a9aa --- /dev/null +++ b/tests/bugs/modalg/bug10846_1 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10846" +puts "============" +puts "" +####################################################################### +# Cut operation produces invalid result +####################################################################### + +set BugNumber OCC10846 + +restore [locate_data_file bug10846_solid1.brep] b1 +restore [locate_data_file bug10846_solid2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcommon result +puts "Finish boolean operation ..." + +set square 183.567 + +# Analysis of "nbshapes res" +set nb_v_good 18 +set nb_e_good 31 +set nb_w_good 19 +set nb_f_good 19 +set nb_sh_good 6 +set nb_sol_good 6 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 100 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10846_2 b/tests/bugs/modalg/bug10846_2 new file mode 100644 index 0000000000..17e59f1ef0 --- /dev/null +++ b/tests/bugs/modalg/bug10846_2 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10846" +puts "============" +puts "" +####################################################################### +# Cut operation produces invalid result +####################################################################### + +set BugNumber OCC10846 + +restore [locate_data_file bug10846_solid1.brep] b1 +restore [locate_data_file bug10846_solid2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopfuse result +puts "Finish boolean operation ..." + +set square 2309.97 + +# Analysis of "nbshapes res" +set nb_v_good 25 +set nb_e_good 45 +set nb_w_good 15 +set nb_f_good 15 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 103 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10846_3 b/tests/bugs/modalg/bug10846_3 new file mode 100644 index 0000000000..c69041bca7 --- /dev/null +++ b/tests/bugs/modalg/bug10846_3 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10846" +puts "============" +puts "" +####################################################################### +# Cut operation produces invalid result +####################################################################### + +set BugNumber OCC10846 + +restore [locate_data_file bug10846_solid1.brep] b1 +restore [locate_data_file bug10846_solid2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcut result +puts "Finish boolean operation ..." + +set square 510.907 + +# Analysis of "nbshapes res" +set nb_v_good 24 +set nb_e_good 43 +set nb_w_good 20 +set nb_f_good 20 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 110 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10846_4 b/tests/bugs/modalg/bug10846_4 new file mode 100644 index 0000000000..0f277e7ddb --- /dev/null +++ b/tests/bugs/modalg/bug10846_4 @@ -0,0 +1,34 @@ +puts "============" +puts "OCC10846" +puts "============" +puts "" +####################################################################### +# Cut operation produces invalid result +####################################################################### + +set BugNumber OCC10846 + +restore [locate_data_file bug10846_solid1.brep] b1 +restore [locate_data_file bug10846_solid2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +boptuc result +puts "Finish boolean operation ..." + +set square 1982.63 + +# Analysis of "nbshapes res" +set nb_v_good 19 +set nb_e_good 33 +set nb_w_good 14 +set nb_f_good 14 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 83 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug10846_5 b/tests/bugs/modalg/bug10846_5 new file mode 100644 index 0000000000..4130e90237 --- /dev/null +++ b/tests/bugs/modalg/bug10846_5 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC10846" +puts "============" +puts "" +####################################################################### +# Cut operation produces invalid result +####################################################################### + +set BugNumber OCC10846 + +restore [locate_data_file bug10846_solid1.brep] b1 +restore [locate_data_file bug10846_solid2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result b1 b2 +puts "Finish boolean operation ..." + +set length 94.4534 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug12213 b/tests/bugs/modalg/bug12213 new file mode 100644 index 0000000000..d52e13b4ad --- /dev/null +++ b/tests/bugs/modalg/bug12213 @@ -0,0 +1,47 @@ +puts "============" +puts "OCC12213" +puts "============" +puts "" +####################################################################### +# Invalid sweep was created by command "buildsweep" in DRAW in case circular path +####################################################################### + +set BugNumber OCC12213 + +circle c1 0 0 0 100 +trim cc1 c1 0 3.14 +mkedge e2 cc1 +wire w2 e2 + +box a 95 -10 -5 10 10 10 +explode a w +explode a_4 e +wire w21 a_4_1 a_4_2 a_4_3 a_4_4 + +box b -110 -10 -5 20 10 10 +explode b w +explode b_4 e +wire w22 b_4_1 b_4_2 b_4_3 b_4_4 + +explode w2 v + +mksweep w2 +addsweep w21 w2_1 +addsweep w22 w2_2 +buildsweep result + +set square 15708.8 + +# Analysis of "nbshapes res" +set nb_v_good 8 +set nb_e_good 12 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 29 + +set 2dviewer 1 + diff --git a/tests/bugs/modalg/bug12257 b/tests/bugs/modalg/bug12257 new file mode 100644 index 0000000000..39214ff550 --- /dev/null +++ b/tests/bugs/modalg/bug12257 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC12257" +puts "============" +puts "" +####################################################################### +# Fuse operation fails +####################################################################### + +set BugNumber OCC12257 + +puts "Load shape ..." +restore [locate_data_file OCC12257.brep] b1 + +explode b1 + +puts "Prepare boolean operation ..." +bop b1_1 b1_2 + +puts "Start boolean operation ..." +bopfuse result +puts "Finish boolean operation ..." + +set square 3394.17 + +# Analysis of "nbshapes res" +set nb_v_good 72 +set nb_e_good 109 +set nb_w_good 39 +set nb_f_good 39 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 262 + +set 2dviewer 1 + diff --git a/tests/bugs/modalg/bug1226 b/tests/bugs/modalg/bug1226 new file mode 100644 index 0000000000..cc775f0d25 --- /dev/null +++ b/tests/bugs/modalg/bug1226 @@ -0,0 +1,24 @@ +puts "================" +puts "OCC1226" +puts "The revolution problem reproduced in OCC Samples" +puts "================" +puts "" + +vertex v1 0 0 0 +vertex v2 50 0 0 +vertex v3 50 50 0 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w e1 e2 e3 + +mkplane f w + +revol result f 0 0 30 0 1 0 180 + +set square 23211.3 +set 2dviewer 0 + + diff --git a/tests/bugs/modalg/bug1243_1 b/tests/bugs/modalg/bug1243_1 new file mode 100644 index 0000000000..8fa04a21b7 --- /dev/null +++ b/tests/bugs/modalg/bug1243_1 @@ -0,0 +1,26 @@ +puts "================" +puts "OCC1243" +puts "================" +puts "Bad solid created from face with command 'revol'" +puts "" + +restore [locate_data_file OCC1243-1.brep] f1 +checkshape f1 + +revol result f1 -5000.0 0.0 0.0 10000.0 0.0 0.0 360.0 + +set tolerance [maxtolerance result] +regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance +regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance + +set max_tolerance 1.00000e-06 + +if { ${MaxFaceTolerance} > ${max_tolerance} || ${MaxEdgeTolerance} > ${max_tolerance} || ${MaxVertexTolerance} > ${max_tolerance} } { + puts "OCC1243 - Error" +} else { + puts "OCC1243 - OK" +} + +set square 350733 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug1243_2 b/tests/bugs/modalg/bug1243_2 new file mode 100644 index 0000000000..3fc9d74348 --- /dev/null +++ b/tests/bugs/modalg/bug1243_2 @@ -0,0 +1,26 @@ +puts "================" +puts "OCC1243" +puts "================" +puts "Bad solid created from face with command 'revol'" +puts "" + +restore [locate_data_file OCC1243-2.brep] f1 +checkshape f1 + +revol result f1 -5000.0 0.0 0.0 10000.0 0.0 0.0 360.0 + +set tolerance [maxtolerance result] +regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance +regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance + +set max_tolerance 1.00000e-06 + +if { ${MaxFaceTolerance} > ${max_tolerance} || ${MaxEdgeTolerance} > ${max_tolerance} || ${MaxVertexTolerance} > ${max_tolerance} } { + puts "OCC1243 - Error" +} else { + puts "OCC1243 - OK" +} + +set square 3.06024e+06 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug1255 b/tests/bugs/modalg/bug1255 new file mode 100644 index 0000000000..7ee3cb6152 --- /dev/null +++ b/tests/bugs/modalg/bug1255 @@ -0,0 +1,16 @@ +puts "================" +puts "OCC1255" +puts "================" +puts "" +# Exception in command 'section' + +restore [locate_data_file OCC1255.brep] a +checkshape a + +plane p1 0 -36.8067 0 0 1 0 +mkface f1 p1 + +bsection result a f1 + +set length 5534.74 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug1255_1 b/tests/bugs/modalg/bug1255_1 new file mode 100644 index 0000000000..e204e59af1 --- /dev/null +++ b/tests/bugs/modalg/bug1255_1 @@ -0,0 +1,24 @@ +puts "=========" +puts " OCC1255 " +puts "=========" +puts "" +############################################### +## Exception in command 'section' +# (This script tests new topology) +############################################### + +restore [locate_data_file OCC1255.brep] a +checkshape a + +plane p1 0 -36.8067 0 0 1 0 +mkface f1 p1 + +if { [catch {bop a f1 } ] } { + puts "Faulty OCC1255: BOP operation was made wrongly" +} else { + bopsection result +} + +set length 5383.42 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug1360 b/tests/bugs/modalg/bug1360 new file mode 100644 index 0000000000..3d3bec60ac --- /dev/null +++ b/tests/bugs/modalg/bug1360 @@ -0,0 +1,19 @@ +pload QAcommands + +puts "================" +puts "OCC1360" +puts "================" +puts "" +###################################################### +# Solid correctly displayed in shadding mode, but one tis faces itself has no prs +###################################################### + +pload XDE + +restore [locate_data_file OCC1360.brep] sh + +fixshape result sh 1e-7 + +set square 407.599 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1456 b/tests/bugs/modalg/bug1456 new file mode 100644 index 0000000000..ccde302470 --- /dev/null +++ b/tests/bugs/modalg/bug1456 @@ -0,0 +1,36 @@ +puts "============" +puts "OCC1456" +puts "============" +puts "" +###################################################### +# Impossible to build mixed type fillets +###################################################### + +restore [locate_data_file OCC1456.brep] a + +checkshape a + +############################################## +explode a w +explode a_4 e +mkevol result a +updatevol a_4_1 0 5 0.5 20 1 5 +updatevol a_4_2 0 5 +updatevol a_4_3 0 5 +updatevol a_4_4 0 5 0.5 20 1 5 +updatevol a_4_5 0 5 0.5 20 1 5 +updatevol a_4_6 0 5 +updatevol a_4_7 0 5 0.5 20 1 5 +updatevol a_4_8 0 5 + +if { [catch { buildevol } catch_result] } { + puts "Faulty OCC1456 (case 2)" +} + +vinit +vdisplay result +vsetdispmode 0 +vfit + +set square 3.21455e+06 +set only_screen 1 diff --git a/tests/bugs/modalg/bug1477_1 b/tests/bugs/modalg/bug1477_1 new file mode 100644 index 0000000000..ec27ed3140 --- /dev/null +++ b/tests/bugs/modalg/bug1477_1 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 1) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC1477" +} + +set square 913238 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug1477_10 b/tests/bugs/modalg/bug1477_10 new file mode 100644 index 0000000000..5ba4490fec --- /dev/null +++ b/tests/bugs/modalg/bug1477_10 @@ -0,0 +1,29 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 10) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T 0 1 1 2 2 .5 + +if { [catch {buildsweep result -C} catch_result] } { + puts "Faulty OCC1477" +} + +set square 0 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_11 b/tests/bugs/modalg/bug1477_11 new file mode 100644 index 0000000000..e820087640 --- /dev/null +++ b/tests/bugs/modalg/bug1477_11 @@ -0,0 +1,31 @@ +puts "TODO ?OCC11111 ALL: An exception was caught" +puts "TODO ?OCC11111 ALL: Exception" +puts "TODO ?OCC11111 ALL: Faulty OCC1477" +puts "TODO ?OCC11111 ALL: TEST INCOMPLETE" + +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 11) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 0 1 1 2 2 .5 + +if { [catch {buildsweep result -R} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.81647e+006 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_12 b/tests/bugs/modalg/bug1477_12 new file mode 100644 index 0000000000..d842464f99 --- /dev/null +++ b/tests/bugs/modalg/bug1477_12 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 12) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T 0 1 1 2 2 .5 + +if { [catch {buildsweep result -R} catch_result] } { + puts "Faulty OCC1477" +} + +set good_square 1.99019e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_2 b/tests/bugs/modalg/bug1477_2 new file mode 100644 index 0000000000..0791b76a0f --- /dev/null +++ b/tests/bugs/modalg/bug1477_2 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 2) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC1477" +} + +set square 913238 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_3 b/tests/bugs/modalg/bug1477_3 new file mode 100644 index 0000000000..5a8856743b --- /dev/null +++ b/tests/bugs/modalg/bug1477_3 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 3) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 + +if { [catch {buildsweep result -C} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.02648e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_4 b/tests/bugs/modalg/bug1477_4 new file mode 100644 index 0000000000..6cf2622d9b --- /dev/null +++ b/tests/bugs/modalg/bug1477_4 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 4) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T + +if { [catch {buildsweep result -C} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.11707e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_5 b/tests/bugs/modalg/bug1477_5 new file mode 100644 index 0000000000..170be3cec4 --- /dev/null +++ b/tests/bugs/modalg/bug1477_5 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 5) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 + +if { [catch {buildsweep result -R} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.02342e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_6 b/tests/bugs/modalg/bug1477_6 new file mode 100644 index 0000000000..d434bc9ce2 --- /dev/null +++ b/tests/bugs/modalg/bug1477_6 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 6) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T + +if { [catch {buildsweep result -R} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.10891e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_7 b/tests/bugs/modalg/bug1477_7 new file mode 100644 index 0000000000..207c93f8c3 --- /dev/null +++ b/tests/bugs/modalg/bug1477_7 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 7) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 0 1 1 2 2 .5 + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.49907e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_8 b/tests/bugs/modalg/bug1477_8 new file mode 100644 index 0000000000..1f30885fba --- /dev/null +++ b/tests/bugs/modalg/bug1477_8 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 8) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 -T 0 1 1 2 2 .5 + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC1477" +} + +set square 1.56786e+06 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug1477_9 b/tests/bugs/modalg/bug1477_9 new file mode 100644 index 0000000000..5590bcc157 --- /dev/null +++ b/tests/bugs/modalg/bug1477_9 @@ -0,0 +1,29 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC1477" +puts "============" +puts "" +###################################################### +# Problems in MakePipeShell +# (case 9) +###################################################### + +restore [locate_data_file OCC1477-1.brep] s1 +restore [locate_data_file OCC1477-2.brep] s2 + +checkshape s1 +checkshape s2 + +mksweep s1 + +addsweep s2 0 1 1 2 2 .5 + +if { [catch {buildsweep result -C} catch_result] } { + puts "Faulty OCC1477" +} + +set square 0 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug165_4 b/tests/bugs/modalg/bug165_4 new file mode 100644 index 0000000000..49c2d68c5f --- /dev/null +++ b/tests/bugs/modalg/bug165_4 @@ -0,0 +1,83 @@ +puts "TODO OCC11111 ALL: An exception was caught" +puts "TODO OCC11111 ALL: Exception" +puts "TODO OCC11111 ALL: Faulty OCC165" +puts "TODO OCC11111 ALL: Error : The length of result shape is" + +cpulimit 600 + +puts "========" +puts "OCC165" +puts "========" +puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" + + +dchrono h reset +dchrono h start + +restore [locate_data_file offset_wire_019.brep] a +checkshape a + +mkplane f a +checkshape f + +set start_stepoffset -5.7 +set incr_stepoffset 0.1 +set finish_stepoffset -2.8 + +set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1] + +set IsMade 0 +set IsBeginMade 0 +set IsGood 1 +set i 0 +set resume_string "" +for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} { + incr i + puts "i = $i" + if { [catch {mkoffset result f 1 $stepoffset } catch_result] } { + puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly" + set IsGood 0 + set IsMade 0 + } else { + puts "OK OCC165 (stepoffset = $stepoffset)" + set IsMade 1 + } + if {$IsBeginMade == 0 && $IsMade == 1} { + set IsBeginMade 1 + set BeginStepOffset $stepoffset + } + if {$IsMade == 1} { + set FinishStepOffset $stepoffset + } + + dchrono h show + + if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { + set IsBeginMade 0 + set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" + set resume_string "${resume_string}${resume_tmp}" + } +} + +puts "" +if {[string length $resume_string] == 0} { + puts "Offset is created wrongly on initial shape in following borders" + puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]" +} else { + puts "Offset is created correctly on initial shape in following borders" + puts "$resume_string" +} + +if {$IsGood == 1} { + puts "OCC165 OK" +} else { + puts "Faulty OCC165" +} + +dchrono h stop +dchrono h show + +renamevar result_1 result + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug165_5 b/tests/bugs/modalg/bug165_5 new file mode 100644 index 0000000000..4437242231 --- /dev/null +++ b/tests/bugs/modalg/bug165_5 @@ -0,0 +1,77 @@ +cpulimit 600 + +puts "========" +puts "OCC165" +puts "========" +puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" + +dchrono h reset +dchrono h start + +restore [locate_data_file offset_wire_019.brep] a +checkshape a + +mkplane f a +checkshape f + +set start_stepoffset -2.6 +set incr_stepoffset 0.1 +set finish_stepoffset 0.0 + +set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1] + +set IsMade 0 +set IsBeginMade 0 +set IsGood 1 +set i 0 +set resume_string "" +for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} { + incr i + puts "i = $i" + if { [catch {mkoffset result f 1 $stepoffset } catch_result] } { + puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly" + set IsGood 0 + set IsMade 0 + } else { + puts "OK OCC165 (stepoffset = $stepoffset)" + set IsMade 1 + } + if {$IsBeginMade == 0 && $IsMade == 1} { + set IsBeginMade 1 + set BeginStepOffset $stepoffset + } + if {$IsMade == 1} { + set FinishStepOffset $stepoffset + } + + dchrono h show + + if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { + set IsBeginMade 0 + set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" + set resume_string "${resume_string}${resume_tmp}" + } +} + +puts "" +if {[string length $resume_string] == 0} { + puts "Offset is created wrongly on initial shape in following borders" + puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]" +} else { + puts "Offset is created correctly on initial shape in following borders" + puts "$resume_string" +} + +if {$IsGood == 1} { + puts "OCC165 OK" +} else { + puts "Faulty OCC165" +} + +dchrono h stop +dchrono h show + +renamevar result_1 result + +set length 1081.52 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug165_6 b/tests/bugs/modalg/bug165_6 new file mode 100644 index 0000000000..aeb81211ce --- /dev/null +++ b/tests/bugs/modalg/bug165_6 @@ -0,0 +1,83 @@ +puts "TODO ?OCC11111 ALL: An exception was caught" +puts "TODO ?OCC11111 ALL: Exception" +puts "TODO ?OCC11111 ALL: Faulty OCC165" +puts "TODO ?OCC11111 ALL: Error : The length of result shape is" + +cpulimit 600 + +puts "========" +puts "OCC165" +puts "========" +puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" + + +dchrono h reset +dchrono h start + +restore [locate_data_file offset_wire_019.brep] a +checkshape a + +mkplane f a +checkshape f + +set start_stepoffset 0.2 +set incr_stepoffset 0.1 +set finish_stepoffset 4.9 + +set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1] + +set IsMade 0 +set IsBeginMade 0 +set IsGood 1 +set i 0 +set resume_string "" +for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} { + incr i + puts "i = $i" + if { [catch {mkoffset result f 1 $stepoffset } catch_result] } { + puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly" + set IsGood 0 + set IsMade 0 + } else { + puts "OK OCC165 (stepoffset = $stepoffset)" + set IsMade 1 + } + if {$IsBeginMade == 0 && $IsMade == 1} { + set IsBeginMade 1 + set BeginStepOffset $stepoffset + } + if {$IsMade == 1} { + set FinishStepOffset $stepoffset + } + + dchrono h show + + if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { + set IsBeginMade 0 + set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" + set resume_string "${resume_string}${resume_tmp}" + } +} + +puts "" +if {[string length $resume_string] == 0} { + puts "Offset is created wrongly on initial shape in following borders" + puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]" +} else { + puts "Offset is created correctly on initial shape in following borders" + puts "$resume_string" +} + +if {$IsGood == 1} { + puts "OCC165 OK" +} else { + puts "Faulty OCC165" +} + +renamevar result_1 result + +set length 1112.83 +set 2dviewer 0 + +dchrono h stop +dchrono h show diff --git a/tests/bugs/modalg/bug165_7 b/tests/bugs/modalg/bug165_7 new file mode 100644 index 0000000000..c2fd0a3dea --- /dev/null +++ b/tests/bugs/modalg/bug165_7 @@ -0,0 +1,77 @@ +cpulimit 600 + +puts "========" +puts "OCC165" +puts "========" +puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" + +dchrono h reset +dchrono h start + +restore [locate_data_file offset_wire_019.brep] a +checkshape a + +mkplane f a +checkshape f + +set start_stepoffset 5.1 +set incr_stepoffset 0.1 +set finish_stepoffset 6.3 + +set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1] + +set IsMade 0 +set IsBeginMade 0 +set IsGood 1 +set i 0 +set resume_string "" +for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} { + incr i + puts "i = $i" + if { [catch {mkoffset result f 1 $stepoffset } catch_result] } { + puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly" + set IsGood 0 + set IsMade 0 + } else { + puts "OK OCC165 (stepoffset = $stepoffset)" + set IsMade 1 + } + if {$IsBeginMade == 0 && $IsMade == 1} { + set IsBeginMade 1 + set BeginStepOffset $stepoffset + } + if {$IsMade == 1} { + set FinishStepOffset $stepoffset + } + + dchrono h show + + if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { + set IsBeginMade 0 + set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" + set resume_string "${resume_string}${resume_tmp}" + } +} + +puts "" +if {[string length $resume_string] == 0} { + puts "Offset is created wrongly on initial shape in following borders" + puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]" +} else { + puts "Offset is created correctly on initial shape in following borders" + puts "$resume_string" +} + +if {$IsGood == 1} { + puts "OCC165 OK" +} else { + puts "Faulty OCC165" +} + +renamevar result_1 result + +set length 1113.06 +set 2dviewer 0 + +dchrono h stop +dchrono h show diff --git a/tests/bugs/modalg/bug2083_1 b/tests/bugs/modalg/bug2083_1 new file mode 100644 index 0000000000..1149afadf0 --- /dev/null +++ b/tests/bugs/modalg/bug2083_1 @@ -0,0 +1,28 @@ +puts "============" +puts "OCC2083" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakePipeShell throws an exception +###################################################### + +restore [locate_data_file OCC2083-f1.brep] f1 +restore [locate_data_file OCC2083-f2.brep] f2 +restore [locate_data_file OCC2083-w.brep] s + +checkshape f1 +checkshape f2 +checkshape s + +explode f1 w +explode f2 w +mksweep s +addsweep f1_1 +addsweep f2_1 + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC2083" +} + +set square 36302.3 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug2083_2 b/tests/bugs/modalg/bug2083_2 new file mode 100644 index 0000000000..f9c0386a97 --- /dev/null +++ b/tests/bugs/modalg/bug2083_2 @@ -0,0 +1,29 @@ +puts "============" +puts "OCC2083" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakePipeShell throws an exception +###################################################### + +restore [locate_data_file OCC2083-f1.brep] f1 +restore [locate_data_file OCC2083-f2.brep] f2 +restore [locate_data_file OCC2083-w.brep] s + +checkshape f1 +checkshape f2 +checkshape s + +explode f1 w +explode f2 w +mksweep s +addsweep f1_1 -T +addsweep f2_1 -T + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC2083" +} + +set square 36583.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2083_3 b/tests/bugs/modalg/bug2083_3 new file mode 100644 index 0000000000..3865579dc4 --- /dev/null +++ b/tests/bugs/modalg/bug2083_3 @@ -0,0 +1,29 @@ +puts "============" +puts "OCC2083" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakePipeShell throws an exception +###################################################### + +restore [locate_data_file OCC2083-f1.brep] f1 +restore [locate_data_file OCC2083-f2.brep] f2 +restore [locate_data_file OCC2083-w.brep] s + +checkshape f1 +checkshape f2 +checkshape s + +explode f1 w +explode f2 w +mksweep s +addsweep f1_1 -T +addsweep f2_1 + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC2083" +} + +set square 36546.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2083_4 b/tests/bugs/modalg/bug2083_4 new file mode 100644 index 0000000000..ea963c56b5 --- /dev/null +++ b/tests/bugs/modalg/bug2083_4 @@ -0,0 +1,29 @@ +puts "============" +puts "OCC2083" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakePipeShell throws an exception +###################################################### + +restore [locate_data_file OCC2083-f1.brep] f1 +restore [locate_data_file OCC2083-f2.brep] f2 +restore [locate_data_file OCC2083-w.brep] s + +checkshape f1 +checkshape f2 +checkshape s + +explode f1 w +explode f2 w +mksweep s +addsweep f1_1 +addsweep f2_1 -T + +if { [catch {buildsweep result} catch_result] } { + puts "Faulty OCC2083" +} + +set square 36339.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2172_1 b/tests/bugs/modalg/bug2172_1 new file mode 100644 index 0000000000..2ce9f618ca --- /dev/null +++ b/tests/bugs/modalg/bug2172_1 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC2172" +puts "============" +puts "" +###################################################### +# Fuse operation produces invalid shape +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC2172-torus.brep] torus +restore [locate_data_file OCC2172-cylinder.brep] cylinder + +checkshape torus +checkshape cylinder + +bfuse result torus cylinder + +set square 28603.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2172_2 b/tests/bugs/modalg/bug2172_2 new file mode 100644 index 0000000000..cdda117dc4 --- /dev/null +++ b/tests/bugs/modalg/bug2172_2 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC2172" +puts "============" +puts "" +###################################################### +# Fuse operation produces invalid shape +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC2172-torus.brep] torus +restore [locate_data_file OCC2172-cylinder.brep] cylinder + +checkshape torus +checkshape cylinder + +bfuse result cylinder torus + +set square 28603.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2172_3 b/tests/bugs/modalg/bug2172_3 new file mode 100644 index 0000000000..e950a60dcd --- /dev/null +++ b/tests/bugs/modalg/bug2172_3 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC2172" +puts "============" +puts "" +###################################################### +# Fuse operation produces invalid shape +###################################################### +## (old topology) +## (fuse) +###################################################### + +restore [locate_data_file OCC2172-torus.brep] torus +restore [locate_data_file OCC2172-cylinder.brep] cylinder + +checkshape torus +checkshape cylinder + +if { [catch {bfuse result torus cylinder} catch_result] } { + puts "Faulty OCC2172" +} + +set square 28603.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2172_4 b/tests/bugs/modalg/bug2172_4 new file mode 100644 index 0000000000..d28938b40d --- /dev/null +++ b/tests/bugs/modalg/bug2172_4 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC2172" +puts "============" +puts "" +###################################################### +# Fuse operation produces invalid shape +###################################################### +## (old topology) +## (fuse) +###################################################### + +restore [locate_data_file OCC2172-torus.brep] torus +restore [locate_data_file OCC2172-cylinder.brep] cylinder + +checkshape torus +checkshape cylinder + +if { [catch {bfuse result cylinder torus} catch_result] } { + puts "Faulty OCC2172" +} + +set square 28603.8 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug260 b/tests/bugs/modalg/bug260 new file mode 100644 index 0000000000..bdb003566c --- /dev/null +++ b/tests/bugs/modalg/bug260 @@ -0,0 +1,20 @@ +#INTERFACE IGES +puts "========" +puts "OCC260" +puts "========" + +pload XDE + +if { [catch { igesbrep [locate_data_file OCC260.igs] a * } catch_result] } { + puts "OCC260: Error: there is reading problem" +} else { + regexp {([-0-9.+eE]+) Shape\(s\) listed} [tpcompound result] full ShapeNumber + if {${ShapeNumber} > 0} { + puts "OCC260: OK" + } else { + puts "OCC260: Error" + } +} + +set length 4.41928 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug263 b/tests/bugs/modalg/bug263 new file mode 100644 index 0000000000..35d5f52d13 --- /dev/null +++ b/tests/bugs/modalg/bug263 @@ -0,0 +1,30 @@ +puts "TODO OCC11111 ALL: Faulty OCC263: here is shading problem" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "========" +puts "OCC263" +puts "========" + +restore [locate_data_file OCC263.brep] result + +isos result 0 +tclean result + +#Creating mesh +incmesh result 0.01 + +#View the result of mesh +triangles result + +set tri_info [trinfo result] +regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri +regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod + +if { $tri != 989 && $nod != 535 } { + puts "Faulty OCC263: here is shading problem" +} else { + puts "Shading of OCC263 is OK" +} + +set square 0 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug264_12 b/tests/bugs/modalg/bug264_12 new file mode 100644 index 0000000000..ce6cf1a364 --- /dev/null +++ b/tests/bugs/modalg/bug264_12 @@ -0,0 +1,33 @@ +puts "TODO OCC11111 ALL: Faulty OCC264_12: here is shading problem" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "========" +puts "OCC264" +puts " (case 12)" +puts "========" + +restore [locate_data_file OCC264_12.brep] result + +tclean result +vinit +vdisplay result +vclear + +isos res 0 +triangles result + +#smallview +#fit + +set tri_info [trinfo result] +regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri +regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod + +if { $tri != 19 && $nod != 21 } { + puts "Faulty OCC264_12: here is shading problem" +} else { + puts "Shading of OCC264_12 is OK" +} + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug2785_1 b/tests/bugs/modalg/bug2785_1 new file mode 100644 index 0000000000..42b70ffee3 --- /dev/null +++ b/tests/bugs/modalg/bug2785_1 @@ -0,0 +1,42 @@ +puts "============" +puts "OCC2785" +puts "============" +puts "" +###################################################### +# Cut and fuse operations for two faces that share same domain give invalid result +###################################################### +# Cut and fuse operations for two faces that share same domain gives invalid +# result, if one face has a hole and other face touches a boundary of this hole. +###################################################### +## (new topology) +## (bcut) +## (bop) +## (boptuc) +## (bfuse) +###################################################### + +############# data ############# +pcylinder c1 2 10 +pcylinder c2 2 2 +explode c1 f +explode c2 f +mksurface gs c2_1 +trim trgs gs 1 2 2 4 +mkface ff trgs +trim trgs gs 0 1 2 4 +mkface ff2 trgs + +bcut rcut1 c1_1 ff +checkshape rcut1 + +bop ff2 rcut1 +boptuc rcut2 +checkshape rcut2 + +bfuse fuse1 rcut2 ff2 +checkshape fuse1 + +bfuse result fuse1 ff + +set square 125.664 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug2785_2 b/tests/bugs/modalg/bug2785_2 new file mode 100644 index 0000000000..93a13db1b3 --- /dev/null +++ b/tests/bugs/modalg/bug2785_2 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC2785" +puts "============" +puts "" +###################################################### +# Cut and fuse operations for two faces that share same domain give invalid result +###################################################### +# Cut and fuse operations for two faces that share same domain gives invalid +# result, if one face has a hole and other face touches a boundary of this hole. +###################################################### +## (old topology) +## (cut) +## (fuse) +###################################################### + +############# data ############# +pcylinder c1 2 10 +pcylinder c2 2 2 +explode c1 f +explode c2 f +mksurface gs c2_1 +trim trgs gs 1 2 2 4 +mkface ff trgs +trim trgs gs 0 1 2 4 +mkface ff2 trgs + +bcut rcut1 c1_1 ff +checkshape rcut1 + +bcut rcut2 rcut1 ff2 +checkshape rcut2 + +bfuse fuse1 rcut2 ff2 +checkshape fuse1 + +bfuse result fuse1 ff + +set square 125.664 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2986_1 b/tests/bugs/modalg/bug2986_1 new file mode 100644 index 0000000000..4201444734 --- /dev/null +++ b/tests/bugs/modalg/bug2986_1 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC2986" +puts "============" +puts "" +###################################################### +# Cut&fuse oprs. for 2 toroidal faces, sharing the same domain give invalid result +###################################################### +## (new topology) +## (bop) +## (bopcut) +## (bfuse) +###################################################### + +############# data ############# +ptorus p1 10 4 +explode p1 f +mksurface gs p1_1 +trim trgs gs 1 2 1 2 +mkface ff trgs +############# testing faces are: p1_1 ff ############# + +bop p1_1 ff +bopcut rcut1 +checkshape rcut1 + +bfuse result rcut1 ff + +set square 1579.81 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug2986_2 b/tests/bugs/modalg/bug2986_2 new file mode 100644 index 0000000000..a1f56647c8 --- /dev/null +++ b/tests/bugs/modalg/bug2986_2 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC2986" +puts "============" +puts "" +###################################################### +# Cut&fuse oprs. for 2 toroidal faces, sharing the same domain give invalid result +###################################################### +## (old topology) +## (cut) +## (fuse) +###################################################### + +############# data ############# +ptorus p1 10 4 +explode p1 f +mksurface gs p1_1 +trim trgs gs 1 2 1 2 +mkface ff trgs + +bcut rcut1 p1_1 ff +checkshape rcut1 + +bfuse result rcut1 ff + +set square 1579.81 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug369 b/tests/bugs/modalg/bug369 new file mode 100644 index 0000000000..c514c42830 --- /dev/null +++ b/tests/bugs/modalg/bug369 @@ -0,0 +1,20 @@ +pload QAcommands + +puts "========" +puts "OCC369" +puts "BUC61031" +puts "========" +puts "" +################################################################# +## BndLib_Add3dCurve raised an exception on edges which range is out of the domain of the curve. +################################################################# + +restore [locate_data_file OCC369.brep] result +OCC369 result + +set square 0.077223 +set 2dviewer 0 + + + + diff --git a/tests/bugs/modalg/bug400 b/tests/bugs/modalg/bug400 new file mode 100644 index 0000000000..fcdc4131a4 --- /dev/null +++ b/tests/bugs/modalg/bug400 @@ -0,0 +1,31 @@ +puts "TODO OCC11111 ALL: OCC358 : Faulty" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "========================" +puts " OCC400 " +puts "========================" + +restore [locate_data_file OCC400.brep] result + +tclean result +isos result 0 + +vinit +vdisplay result +vfit +vsetdispmode result 1 + +set tri_info [trinfo result] +regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri +regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod + +if { $tri == 66 && $nod ==70} { + puts " Warning: OCC358 looks like OK, but visual checking is required !!!!" +} else { + puts "OCC358 : Faulty , but visual checking is required !!!!" +} + +set square 0 +set 3dviewer 1 + + diff --git a/tests/bugs/modalg/bug405 b/tests/bugs/modalg/bug405 new file mode 100644 index 0000000000..612f2ba75c --- /dev/null +++ b/tests/bugs/modalg/bug405 @@ -0,0 +1,27 @@ +pload QAcommands + +puts "================" +puts "OCC405" +puts "OCC435" +puts "SAM1296" +puts "================" +puts "" + +restore [locate_data_file OCC395-1.brep] e1 +restore [locate_data_file OCC405-2.brep] e2 + +checkshape e1 +checkshape e2 + +OCC405 result e1 e2 + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num + +if { $num == 2 } { + puts "OCC405 OK : Result shape is CORRECT !!! " +} else { + puts " Faulty OCC405: Result shape is INcorrect !!! " +} + +set length 17.5348 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug426_1 b/tests/bugs/modalg/bug426_1 new file mode 100644 index 0000000000..a6b43d1b9f --- /dev/null +++ b/tests/bugs/modalg/bug426_1 @@ -0,0 +1,26 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +pload QAcommands + +puts "========" +puts "OCC426" +puts "OCC50" +puts "========" +############################################################################# +## The result of fuse operation is invalid +############################################################################# +## BRepFilletAPI_MakeFillet presents a bug on fillet computation (build()) +############################################################################# + +OCC426 result rs1 rs2 rs3 fuse32 fuse321 + +checkshape rs1 +checkshape rs2 +checkshape rs3 +checkshape fuse32 +checkshape fuse321 + +set square 7507.61 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug434 b/tests/bugs/modalg/bug434 new file mode 100644 index 0000000000..65aa2e1b5a --- /dev/null +++ b/tests/bugs/modalg/bug434 @@ -0,0 +1,29 @@ +pload QAcommands + +puts "================" +puts "OCC434" +puts "SAM1296" +puts "================" +puts "" + +######################################################## +## Exception is raised on NT, SUN in the GeomConvert_CompCurveToBSplineCurve +######################################################## + +restore [locate_data_file OCC434.brep] e +checkshape e +explode e e + +OCC405 result e_1 e_2 + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num + +if { $num == 2 } { + puts "OCC434 OK : Result shape is CORRECT !!! " +} else { + puts " Faulty OCC434: Result shape is INcorrect !!! " +} + +set length 8.74616 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug435 b/tests/bugs/modalg/bug435 new file mode 100644 index 0000000000..2b126e957a --- /dev/null +++ b/tests/bugs/modalg/bug435 @@ -0,0 +1,28 @@ +pload QAcommands + +#INTERFACE IGES +puts "========================" +puts " OCC435 " +puts " OCC405 " +puts "========================" +puts "" +############################################################### +## Exception Standard_ConstructuionError is rased in DRAW in the +## GeomConvert_CompCurveToBSplineCurve on the attached shapes during command merge +############################################################### + +restore [locate_data_file OCC435a.brep] a +explode a +set j 1 +repeat 8 { + explode a_$j + if { [catch {OCC405 result a_${j}_1 a_${j}_2} catch_result] } { + puts "Faulty OCC435 : merge operation was made incorrect" + } else { + puts " OCC435 OK: merge operation was made properly" + } + incr j +} + +set length 17.2848 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug5157_1 b/tests/bugs/modalg/bug5157_1 new file mode 100644 index 0000000000..c34d06e902 --- /dev/null +++ b/tests/bugs/modalg/bug5157_1 @@ -0,0 +1,27 @@ +puts "============" +puts "OCC5157" +puts "============" +puts "" +###################################################### +# DRAW commands vprops and sprops with tolerance 1.e-6 hange on attached shape. +###################################################### + +cpulimit 3500 +#dchrono h reset; dchrono h start + +catch { pload XDE } + +set BugNumber OCC5157 + +set status 0 +if {[catch { stepread [locate_data_file OCC5157.stp] a * } catch_result] } { + puts "Faulty ${BugNumber} : here is reading problem" +} else { + tpcompound result +} + +set tol_square 1.e-6 +set square 35273.9 +set 2dviewer 0 + + diff --git a/tests/bugs/modalg/bug5157_2 b/tests/bugs/modalg/bug5157_2 new file mode 100644 index 0000000000..63b1821fab --- /dev/null +++ b/tests/bugs/modalg/bug5157_2 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC5157" +puts "============" +puts "" +###################################################### +# DRAW commands vprops and sprops with tolerance 1.e-6 hange on attached shape. +###################################################### + +cpulimit 3500 +#dchrono h reset; dchrono h start + +catch { pload XDE } + +set BugNumber OCC5157 + +if { [catch { stepread [locate_data_file OCC5157.stp] a * } catch_result] } { + puts "Faulty ${BugNumber} : here is reading problem" +} else { + tpcompound result +} +set tol_square 1.e-6 +set square 35362.3 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug570 b/tests/bugs/modalg/bug570 new file mode 100644 index 0000000000..6066927281 --- /dev/null +++ b/tests/bugs/modalg/bug570 @@ -0,0 +1,11 @@ +pload QAcommands + +puts "========" +puts "OCC570" +puts "========" +puts "" + +OCC570 result + +set square 58500 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug5729 b/tests/bugs/modalg/bug5729 new file mode 100644 index 0000000000..a594ca7460 --- /dev/null +++ b/tests/bugs/modalg/bug5729 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC5729" +puts "============" +puts "" +###################################################### +# Regression on case cfe 900 K5 +###################################################### + +set BugNumber OCC5729 + +restore [locate_data_file OCC5729-f1.brep] f1 +restore [locate_data_file OCC5729-f2.brep] f2 + +decho off +set che_1 [checkshape f1] +decho on +if { [regexp {Faulty} $che_1] } { + puts "Faulty ${BugNumber} : checkshape is wrong for f1" +} + +decho off +set che_2 [checkshape f2] +decho on +if { [regexp {Faulty} $che_2] } { + puts "Faulty ${BugNumber} : checkshape is wrong for f2" +} + +bfuse result f1 f2 + +set square 28559.8 + +set nb_v_good 13 +set nb_e_good 22 +set nb_w_good 15 +set nb_f_good 13 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 66 + diff --git a/tests/bugs/modalg/bug578_1 b/tests/bugs/modalg/bug578_1 new file mode 100644 index 0000000000..3993d65e01 --- /dev/null +++ b/tests/bugs/modalg/bug578_1 @@ -0,0 +1,25 @@ +puts "================" +puts "OCC578" +puts "OCC584" +puts "================" +puts "" + +restore [locate_data_file OCC578_w1.brep] w1 +checkshape w1 + +restore [locate_data_file OCC578_w2.brep] w2 +checkshape w2 + +set x 1 +set y 1 +set z 0.5 +box b ${x} ${y} ${z} +checkshape b + +bfuse res1 w1 w2 +checkshape res1 + +bcut result b res1 + +set square 4.84596 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug578_2 b/tests/bugs/modalg/bug578_2 new file mode 100644 index 0000000000..89e192879a --- /dev/null +++ b/tests/bugs/modalg/bug578_2 @@ -0,0 +1,27 @@ +puts "================" +puts "OCC578" +puts "OCC582" +puts "OCC583" +puts "================" +puts "" + +restore [locate_data_file OCC578_w1.brep] w1 +checkshape w1 + +restore [locate_data_file OCC578_w2.brep] w2 +checkshape w2 + +set x 1 +set y 1 +set z 0.5 +box b ${x} ${y} ${z} +checkshape b + +bfuse res1 w1 w2 +checkshape res1 + +bop b res1 +bopcut result + +set square 4.84596 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug5805_1 b/tests/bugs/modalg/bug5805_1 new file mode 100644 index 0000000000..ccde342639 --- /dev/null +++ b/tests/bugs/modalg/bug5805_1 @@ -0,0 +1,59 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +puts "demonstration of pipes and hollowing for GTISoft" +puts "" +puts "Scenario 2A: Hollowed elliptical cylinder - ThroughSection and MakeThickSolid (work-around: ellipse is split into 2)" + + +ellipse e 10 60 0 1 0 0 5 3 +trim e1 e 0 pi +trim e2 e pi 2*pi +mkedge ee1 e1 +mkedge ee2 e2 +wire w1 ee1 ee2 +copy w1 w2 +ttranslate w2 -20 0 0 + +if { [catch { thrusections rthru2 1 1 w1 w2 } catch_result] } { + puts "Faulty ${BugNumber} : thrusections is wrong" +} + +explode rthru2 f + +if { [catch { offsetshape result rthru2 -0.5 rthru2_3 rthru2_4 } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} + +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 981.941 + +set nb_v_good 6 +set nb_e_good 10 +set nb_w_good 8 +set nb_f_good 6 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 32 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5805_2 b/tests/bugs/modalg/bug5805_2 new file mode 100644 index 0000000000..b9739e9327 --- /dev/null +++ b/tests/bugs/modalg/bug5805_2 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +puts "demonstration of pipes and hollowing for GTISoft" +puts "" +puts "Scenario 2A: Hollowed elliptical cylinder - ThroughSection and MakeThickSolid" + +ellipse e 10 60 0 1 0 0 5 3 +mkedge ee e +wire w1 ee +copy w1 w2 +ttranslate w2 -20 0 0 + +if { [catch { thrusections rthru2 1 1 w1 w2 } catch_result] } { + puts "Faulty ${BugNumber} : thrusections is wrong" +} + +explode rthru2 f + +if { [catch { offsetshape result rthru2 -0.5 rthru2_2 rthru2_3 } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 982.254 + +set nb_v_good 3 +set nb_e_good 5 +set nb_w_good 6 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 20 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5805_3 b/tests/bugs/modalg/bug5805_3 new file mode 100644 index 0000000000..44313f3355 --- /dev/null +++ b/tests/bugs/modalg/bug5805_3 @@ -0,0 +1,50 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +restore [locate_data_file OCC5805.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +explode a f + +if { [catch { offsetshape result a -1 a_6 } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} + +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 1185.03 + +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 41 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5805_4 b/tests/bugs/modalg/bug5805_4 new file mode 100644 index 0000000000..c5a54e1e87 --- /dev/null +++ b/tests/bugs/modalg/bug5805_4 @@ -0,0 +1,53 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +restore [locate_data_file OCC5805.brep] a + +decho off +set che_a [checkshape a] +decho on + +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +explode a f + +offsetparameter 1e-7 c a +offsetload a -1 a_6 + +if { [catch { offsetperform result } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 1185.03 + +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 41 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5805_5 b/tests/bugs/modalg/bug5805_5 new file mode 100644 index 0000000000..341e0c0308 --- /dev/null +++ b/tests/bugs/modalg/bug5805_5 @@ -0,0 +1,52 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +restore [locate_data_file OCC5805.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +explode a f + +offsetparameter 1e-7 c a +offsetload a -1 + +if { [catch { offsetperform result } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result]} { + puts "Faulty ${BugNumber} : tolmax is wrong" +} +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 876.584 + +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 41 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5805_6 b/tests/bugs/modalg/bug5805_6 new file mode 100644 index 0000000000..44e88f523d --- /dev/null +++ b/tests/bugs/modalg/bug5805_6 @@ -0,0 +1,47 @@ +puts "============" +puts "OCC5805" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results. +###################################################### + +set BugNumber OCC5805 + +restore [locate_data_file OCC5805.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +if { [catch { offsetshape result a -1 } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)" +} + +set square 876.584 + +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 41 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug5806 b/tests/bugs/modalg/bug5806 new file mode 100644 index 0000000000..16eec40e7a --- /dev/null +++ b/tests/bugs/modalg/bug5806 @@ -0,0 +1,54 @@ +puts "============" +puts "OCC5806" +puts "============" +puts "" +###################################################### +# BRepOffsetAPI_MakeThickSolid fails to build a result +###################################################### + +set BugNumber OCC5806 + +puts "demonstration of pipes and hollowing for GTISoft" +puts "" +puts "Scenario 3A: Hollowed general pipe - ThroughSection with following shell reconstruction" + +circle c 0 100 0 1 0 0 5 +mkedge ec c +wire wc ec +polyline pl 10 90 -10 10 90 10 10 110 10 10 110 -10 10 90 -10 + +if { [catch { thrusections resthru 1 1 wc pl } catch_result] } { + puts "Faulty ${BugNumber} : thrusections is wrong" +} + +# straighforward hollowing will fail due to problems in the algorithm +explode resthru f + +if { [catch { offsetshape result resthru -0.5 resthru_6 resthru_7 } catch_result] } { + puts "Faulty ${BugNumber} : offsetshape is wrong" +} + +if { [catch { set tolmaxres [tolmax result] } catch_result] } { + puts "Faulty ${BugNumber} : tolmax is wrong" +} +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance +if { [catch { expr $maxtolerance } catch_result] } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (1)." +} +if { $maxtolerance > 1. } { + puts "Faulty ${BugNumber} : maxtolerance is wrong (2)." +} + +set square 1116.06 + +set nb_v_good 10 +set nb_e_good 15 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 41 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6063 b/tests/bugs/modalg/bug6063 new file mode 100644 index 0000000000..d397d8c667 --- /dev/null +++ b/tests/bugs/modalg/bug6063 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC6063" +puts "============" +puts "" +###################################################### +# Exception is raised during command "sprops" in DRAW on attached shape. +###################################################### + +set BugNumber OCC6063 +cpulimit 2000 + +restore [locate_data_file OCC6063-2.brep] result + +decho off +set che_res [checkshape result] +decho on +if { [regexp {Faulty} $che_res] } { + puts "Faulty ${BugNumber} : checkshape is wrong for res" +} + +set tol_square 1.e-6 +set square 2465.96 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6063_1 b/tests/bugs/modalg/bug6063_1 new file mode 100644 index 0000000000..a29cf8ec6a --- /dev/null +++ b/tests/bugs/modalg/bug6063_1 @@ -0,0 +1,19 @@ +puts "============" +puts "OCC6063" +puts "============" +puts "" +###################################################### +# Exception is raised during command "sprops" in DRAW on attached shape. +###################################################### + +set BugNumber OCC6063 + +restore [locate_data_file OCC6063.brep] result + +checkshape result + +set tol_square 1.e-6 +set square 413318 +set 3dviewer 1 + + diff --git a/tests/bugs/modalg/bug606_1 b/tests/bugs/modalg/bug606_1 new file mode 100644 index 0000000000..c8a50d5b93 --- /dev/null +++ b/tests/bugs/modalg/bug606_1 @@ -0,0 +1,14 @@ +pload QAcommands + +puts "================" +puts "OCC606" +puts "================" +puts "" + +restore [locate_data_file OCC606_2.brep] w2 +checkshape w2 + +OCC606 result w2 -t + +set square 508.243 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug606_2 b/tests/bugs/modalg/bug606_2 new file mode 100644 index 0000000000..4fabb19701 --- /dev/null +++ b/tests/bugs/modalg/bug606_2 @@ -0,0 +1,14 @@ +pload QAcommands + +puts "================" +puts "OCC606" +puts "================" +puts "" + +restore [locate_data_file OCC606_10.brep] w10 +checkshape w10 + +OCC606 result w10 -t + +set square 522.56 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug6181 b/tests/bugs/modalg/bug6181 new file mode 100644 index 0000000000..5a5667d9e1 --- /dev/null +++ b/tests/bugs/modalg/bug6181 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC6181" +puts "============" +puts "" +###################################################### +# Incorrect result of boolean cut +###################################################### + +set BugNumber OCC6181 + +restore [locate_data_file OCC6181_A.brep] s1 +restore [locate_data_file OCC6181_B.brep] s2 + +decho off +set che_s1 [checkshape s1] +set che_s2 [checkshape s2] +decho on +if { [regexp {Faulty} $che_s1] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s1" +} + +if { [regexp {Faulty} $che_s2] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s2" +} + +bcut result s1 s2 + +set square 151691 + +set nb_v_good 14 +set nb_e_good 21 +set nb_w_good 9 +set nb_f_good 9 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 56 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6182 b/tests/bugs/modalg/bug6182 new file mode 100644 index 0000000000..f0b12771a4 --- /dev/null +++ b/tests/bugs/modalg/bug6182 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC6182" +puts "============" +puts "" +###################################################### +# Incorrect result of boolean cut +###################################################### + +set BugNumber OCC6182 + +restore [locate_data_file OCC6182_A.brep] s1 +restore [locate_data_file OCC6182_B.brep] s2 + +decho off +set che_s1 [checkshape s1] +set che_s2 [checkshape s2] +decho on +if { [regexp {Faulty} $che_s1] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s1" +} +if { [regexp {Faulty} $che_s2] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s2" +} + +bcut result s1 s2 + +set square 318709 + +set nb_v_good 316 +set nb_e_good 502 +set nb_w_good 185 +set nb_f_good 181 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 1187 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_1 b/tests/bugs/modalg/bug6272_1 new file mode 100644 index 0000000000..c162845bee --- /dev/null +++ b/tests/bugs/modalg/bug6272_1 @@ -0,0 +1,22 @@ +puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC111111 ALL: Error : The square of result shape is" +pload QAcommands + +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 +restore [locate_data_file OCC6272_revolution.brep] a2 + +OCC307 result a1 a2 0 + +set square 0 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_2 b/tests/bugs/modalg/bug6272_2 new file mode 100644 index 0000000000..0d527f44d0 --- /dev/null +++ b/tests/bugs/modalg/bug6272_2 @@ -0,0 +1,22 @@ +puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC111111 ALL: Error : The square of result shape is" + +pload QAcommands + +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 +restore [locate_data_file OCC6272_revolution.brep] a2 + +OCC307 result a1 a2 1 + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_3 b/tests/bugs/modalg/bug6272_3 new file mode 100644 index 0000000000..d4b9253e82 --- /dev/null +++ b/tests/bugs/modalg/bug6272_3 @@ -0,0 +1,23 @@ +puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC111111 ALL: Error : The square of result shape is" + +pload QAcommands + +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +explode a1 +OCC307 result a1_1 a1_2 0 + +set square 0 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_4 b/tests/bugs/modalg/bug6272_4 new file mode 100644 index 0000000000..99883aabb7 --- /dev/null +++ b/tests/bugs/modalg/bug6272_4 @@ -0,0 +1,22 @@ +puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC111111 ALL: Error : The square of result shape is" + +pload QAcommands + +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +explode a1 +OCC307 result a1_1 a1_2 1 + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_5 b/tests/bugs/modalg/bug6272_5 new file mode 100644 index 0000000000..fc46efeeb1 --- /dev/null +++ b/tests/bugs/modalg/bug6272_5 @@ -0,0 +1,33 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +explode a1 + +bop a1_1 a1_2 +bopfuse result + +set square 6552.67 + +# Analysis of "nbshapes res" +set nb_v_good 116 +set nb_e_good 176 +set nb_w_good 72 +set nb_f_good 70 +set nb_sh_good 5 +set nb_sol_good 5 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 445 + +set 2dviewer 0 + + diff --git a/tests/bugs/modalg/bug6272_6 b/tests/bugs/modalg/bug6272_6 new file mode 100644 index 0000000000..2d85e74eaf --- /dev/null +++ b/tests/bugs/modalg/bug6272_6 @@ -0,0 +1,35 @@ +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 +restore [locate_data_file OCC6272_revolution.brep] a2 + +bop a1 a2 +bopfuse result + +# puts "See result in the viewer!!!" + +set square 8979.70 + +# Analysis of "nbshapes res" +set nb_v_good 60 +set nb_e_good 90 +set nb_w_good 42 +set nb_f_good 40 +set nb_sh_good 5 +set nb_sol_good 5 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 243 + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_71 b/tests/bugs/modalg/bug6272_71 new file mode 100644 index 0000000000..8bb8228ab7 --- /dev/null +++ b/tests/bugs/modalg/bug6272_71 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_3 a1_5 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 730.993 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_710 b/tests/bugs/modalg/bug6272_710 new file mode 100644 index 0000000000..12b3ca8ffb --- /dev/null +++ b/tests/bugs/modalg/bug6272_710 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_6 a1_4 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 3387.54 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_72 b/tests/bugs/modalg/bug6272_72 new file mode 100644 index 0000000000..7b05acbb54 --- /dev/null +++ b/tests/bugs/modalg/bug6272_72 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_5 a1_3 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 730.993 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_73 b/tests/bugs/modalg/bug6272_73 new file mode 100644 index 0000000000..d9f34046bf --- /dev/null +++ b/tests/bugs/modalg/bug6272_73 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_5 a1_1 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 2037.7 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_74 b/tests/bugs/modalg/bug6272_74 new file mode 100644 index 0000000000..f9e0dfc319 --- /dev/null +++ b/tests/bugs/modalg/bug6272_74 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_1 a1_5 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 2037.7 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_75 b/tests/bugs/modalg/bug6272_75 new file mode 100644 index 0000000000..8306731bd7 --- /dev/null +++ b/tests/bugs/modalg/bug6272_75 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_1 a1_2 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 2314.14 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_76 b/tests/bugs/modalg/bug6272_76 new file mode 100644 index 0000000000..a0dc833fb0 --- /dev/null +++ b/tests/bugs/modalg/bug6272_76 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_2 a1_1 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 2314.14 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_77 b/tests/bugs/modalg/bug6272_77 new file mode 100644 index 0000000000..05d7c48819 --- /dev/null +++ b/tests/bugs/modalg/bug6272_77 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_2 a1_4 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 922.7 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_78 b/tests/bugs/modalg/bug6272_78 new file mode 100644 index 0000000000..7ed242a4f8 --- /dev/null +++ b/tests/bugs/modalg/bug6272_78 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_4 a1_2 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 922.7 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_79 b/tests/bugs/modalg/bug6272_79 new file mode 100644 index 0000000000..987aa25e56 --- /dev/null +++ b/tests/bugs/modalg/bug6272_79 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_4 a1_6 +if { [catch { bopfuse result } ] } { + puts "Faulty ${BugNumber}" +} + +set square 3387.54 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6272_81 b/tests/bugs/modalg/bug6272_81 new file mode 100644 index 0000000000..959fac2093 --- /dev/null +++ b/tests/bugs/modalg/bug6272_81 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_3 a1_5 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 36 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_810 b/tests/bugs/modalg/bug6272_810 new file mode 100644 index 0000000000..bfa564e265 --- /dev/null +++ b/tests/bugs/modalg/bug6272_810 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_6 a1_4 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 57.3941 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_82 b/tests/bugs/modalg/bug6272_82 new file mode 100644 index 0000000000..690c798a1a --- /dev/null +++ b/tests/bugs/modalg/bug6272_82 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_5 a1_3 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 36 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_83 b/tests/bugs/modalg/bug6272_83 new file mode 100644 index 0000000000..08c2deb590 --- /dev/null +++ b/tests/bugs/modalg/bug6272_83 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_5 a1_1 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_84 b/tests/bugs/modalg/bug6272_84 new file mode 100644 index 0000000000..1519b34c5d --- /dev/null +++ b/tests/bugs/modalg/bug6272_84 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_1 a1_5 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_85 b/tests/bugs/modalg/bug6272_85 new file mode 100644 index 0000000000..a35fd9446e --- /dev/null +++ b/tests/bugs/modalg/bug6272_85 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_1 a1_2 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_86 b/tests/bugs/modalg/bug6272_86 new file mode 100644 index 0000000000..1c64b335b6 --- /dev/null +++ b/tests/bugs/modalg/bug6272_86 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_2 a1_1 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_87 b/tests/bugs/modalg/bug6272_87 new file mode 100644 index 0000000000..809b9371b9 --- /dev/null +++ b/tests/bugs/modalg/bug6272_87 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_2 a1_4 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32.1528 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_88 b/tests/bugs/modalg/bug6272_88 new file mode 100644 index 0000000000..9418190d0e --- /dev/null +++ b/tests/bugs/modalg/bug6272_88 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_4 a1_2 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 32.1528 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6272_89 b/tests/bugs/modalg/bug6272_89 new file mode 100644 index 0000000000..8aeefc7cf9 --- /dev/null +++ b/tests/bugs/modalg/bug6272_89 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC6272" +puts "============" +puts "" +###################################################### +# Incorrect results of gluing operation +###################################################### + +set BugNumber OCC6272 + +restore [locate_data_file OCC6272_bridge2.brep] a1 + +# +# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids +# + +explode a1 so + +bop a1_4 a1_6 +if { [catch { bopsection result } ] } { + puts "Faulty ${BugNumber}" +} + +set length 57.3941 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6277 b/tests/bugs/modalg/bug6277 new file mode 100644 index 0000000000..fcc3558b47 --- /dev/null +++ b/tests/bugs/modalg/bug6277 @@ -0,0 +1,43 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC6277" +puts "============" +puts "" +###################################################### +# Cut operation does not produce any result +###################################################### + +set BugNumber OCC6277 + +restore [locate_data_file OCC6277_A.brep] s1 +restore [locate_data_file OCC6277_B.brep] s2 + +decho off +set che_s1 [checkshape s1] +set che_s2 [checkshape s2] +decho on +if { [regexp {Faulty} $che_s1] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s1" +} + +if { [regexp {Faulty} $che_s2] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s2" +} + +bcut result s1 s2 + +set square 40084.9 + +set nb_v_good 23 +set nb_e_good 34 +set nb_w_good 19 +set nb_f_good 14 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 93 + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug6289 b/tests/bugs/modalg/bug6289 new file mode 100644 index 0000000000..2697f7fcb8 --- /dev/null +++ b/tests/bugs/modalg/bug6289 @@ -0,0 +1,29 @@ +#INTERFACE STEP +puts "============" +puts "OCC6289" +puts "============" +puts "" +###################################################### +# Internal error (code 101) in Section computation +###################################################### + +catch { pload XDE } + +set BugNumber OCC6289 + +if { [catch { stepread [locate_data_file OCC6289.stp] a * } catch_result] } { + puts "Faulty ${BugNumber} : here is reading problem" +} else { + tpcompound comp + + plane pl 0 0 28 0 0 1 + mkface f pl + + if { [catch { bsection result comp f } catch_result] } { + puts "Faulty ${BugNumber}" + } +} + +set length 453.679 +set 3dviewer 0 + diff --git a/tests/bugs/modalg/bug6334 b/tests/bugs/modalg/bug6334 new file mode 100644 index 0000000000..b90cd69b7e --- /dev/null +++ b/tests/bugs/modalg/bug6334 @@ -0,0 +1,69 @@ +puts "TODO OCC11111 ALL: Error : Result shape is WRONG" + +puts "============" +puts "OCC6334" +puts "============" +puts "" +###################################################### +# Invalid result of MakeCylindricalHole when input solid is REVERSED +###################################################### + +set BugNumber OCC6334 + +# 1. Make box +box b 100 100 100 + +subshape b f 1 +offsetshape t b 10 b_1 + +decho off +set che_t [checkshape t] +decho on + +if {[regexp {Faulty} $che_t]} { + puts "Faulty ${BugNumber} : checkshape is wrong for t" +} + +set bnd_t [bounding t] +set ori [lindex [dtyp t] 2] +puts "Orientation of thick solid is $ori" + +# 3. Make hole +hole h t 110 50 50 1 0 0 10 + +set che [checkshape h] +if { [regexp {Faulty} $che] } { + puts "Faulty ${BugNumber} : checkshape is wrong for h" +} + +set bnd_h [bounding h] + +renamevar h result + +set square 117509 + +set nb_v_good 32 +set nb_e_good 53 +set nb_w_good 27 +set nb_f_good 24 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 139 + + +# 4. Check thickness of box and hole +set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]] +set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]] + +if { [expr abs($dx_h - $dx_t)] > 1e-5 } { + puts "Thickness of solid = $dx_t" + puts "Thickness of solid with hole = $dx_h" + puts "Invalid result of making a hole" + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6502 b/tests/bugs/modalg/bug6502 new file mode 100644 index 0000000000..0a7a2f6796 --- /dev/null +++ b/tests/bugs/modalg/bug6502 @@ -0,0 +1,21 @@ +puts "================" +puts "OCC6502" +puts "================" +puts "" +####################################################################################### +# Failure calculation of ShrunkRange resulting to failure of boolean operation +####################################################################################### + +set BugNumber OCC6502 + + +restore [locate_data_file OCC6502.brep] a +plane pl 100 0 0 1 0 0 +mkface f pl + +if { [catch { bsection result a f -a } catch_result] } { + puts "Faulty ${BugNumber}" +} + +set length 37.7831 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug6538 b/tests/bugs/modalg/bug6538 new file mode 100644 index 0000000000..dec5dfa13e --- /dev/null +++ b/tests/bugs/modalg/bug6538 @@ -0,0 +1,42 @@ +puts "============" +puts "OCC6538" +puts "============" +puts "" +###################################################### +# Empty result obtained by operation "common" for couple of faces +###################################################### + +set BugNumber OCC6538 + +restore [locate_data_file OCC6538-f1.brep] s1 +restore [locate_data_file OCC6538-f2.brep] s2 + +decho off +set che_s1 [checkshape s1] +set che_s2 [checkshape s2] +decho on +if { [regexp {Faulty} $che_s1] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s1" +} + +if { [regexp {Faulty} $che_s2] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s2" +} + + +bop s1 s2 +bopcommon result + +set square 18.695 + +set nb_v_good 16 +set nb_e_good 16 +set nb_w_good 1 +set nb_f_good 1 +set nb_sh_good 1 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 36 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6554 b/tests/bugs/modalg/bug6554 new file mode 100644 index 0000000000..b5cd3b1087 --- /dev/null +++ b/tests/bugs/modalg/bug6554 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC6554" +puts "============" +puts "" +###################################################### +# Intersection shell-plane gives a disconnected set of edges +###################################################### + +set BugNumber OCC6554 + +restore [locate_data_file OCC6554-shell.brep] sh +restore [locate_data_file OCC6554-face.brep] f + +decho off +set che_sh [checkshape sh] +set che_f [checkshape f] +decho on +if { [regexp {Faulty} $che_sh] } { + puts "Faulty ${BugNumber} : checkshape is wrong for sh" +} + +if { [regexp {Faulty} $che_f] } { + puts "Faulty ${BugNumber} : checkshape is wrong for f" +} + +bsection result sh f -a + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full Vertices + +set good_Vertices 2 + +if { ${Vertices} != ${good_Vertices} } { + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + +set length 110.045 +set 2dviewer 2 diff --git a/tests/bugs/modalg/bug6766_1 b/tests/bugs/modalg/bug6766_1 new file mode 100644 index 0000000000..6f6222a947 --- /dev/null +++ b/tests/bugs/modalg/bug6766_1 @@ -0,0 +1,38 @@ +puts "================" +puts "OCC6766" +puts "================" +puts "" +####################################################################################### +# Invalid result of intersection of a bspline face with a plane +####################################################################################### + +set BugNumber OCC6766 + +restore [locate_data_file OCC6766.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for s1" +} + +set Y 4 +plane pl 0 ${Y} 0 0 1 0 +mkface f pl +bsection result a f -2d -a + + + +set nb_v_good 4 +set nb_e_good 3 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 8 + +set length 138.474 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6766_2 b/tests/bugs/modalg/bug6766_2 new file mode 100644 index 0000000000..d0e28edac3 --- /dev/null +++ b/tests/bugs/modalg/bug6766_2 @@ -0,0 +1,38 @@ +puts "================" +puts "OCC6766" +puts "================" +puts "" +####################################################################################### +# Invalid result of intersection of a bspline face with a plane +####################################################################################### + +set BugNumber OCC6766 + +restore [locate_data_file OCC6766.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +set Y 4 +plane pl 0 ${Y} 0 0 1 0 +mkface f pl +bop a f +bopsection result + + +set nb_v_good 4 +set nb_e_good 3 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 8 + +set length 138.474 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6766_3 b/tests/bugs/modalg/bug6766_3 new file mode 100644 index 0000000000..610bb604ed --- /dev/null +++ b/tests/bugs/modalg/bug6766_3 @@ -0,0 +1,37 @@ +puts "================" +puts "OCC6766" +puts "================" +puts "" +####################################################################################### +# Invalid result of intersection of a bspline face with a plane +####################################################################################### + +set BugNumber OCC6766 + +restore [locate_data_file OCC6766.brep] a + +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +set Y 6 +plane pl 0 ${Y} 0 0 1 0 +mkface f pl +bsection result a f -2d -a + + +set nb_v_good 4 +set nb_e_good 3 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 8 + +set length 126.138 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6766_4 b/tests/bugs/modalg/bug6766_4 new file mode 100644 index 0000000000..21479c806d --- /dev/null +++ b/tests/bugs/modalg/bug6766_4 @@ -0,0 +1,37 @@ +puts "================" +puts "OCC6766" +puts "================" +puts "" +####################################################################################### +# Invalid result of intersection of a bspline face with a plane +####################################################################################### + +set BugNumber OCC6766 + +restore [locate_data_file OCC6766.brep] a +decho off +set che_a [checkshape a] +decho on +if { [regexp {Faulty} $che_a] } { + puts "Faulty ${BugNumber} : checkshape is wrong for a" +} + +set Y 6 +plane pl 0 ${Y} 0 0 1 0 +mkface f pl +bop a f +bopsection result + + +set nb_v_good 4 +set nb_e_good 3 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 8 + +set length 126.138 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug6811 b/tests/bugs/modalg/bug6811 new file mode 100644 index 0000000000..bcbe7e35a0 --- /dev/null +++ b/tests/bugs/modalg/bug6811 @@ -0,0 +1,32 @@ +#INTERFACE STEP +puts "================" +puts "OCC6811" +puts "================" +puts "" +####################################################################################### +# Unstable work of the checkshape on the attached file. +####################################################################################### + +catch { pload XDE } + +set BugNumber OCC6811 + +if { [catch { stepread [locate_data_file trj12_b3-tu-203.stp] a * } catch_result] } { + puts "Faulty ${BugNumber} : here is reading problem" +} else { + decho off + set che_a_1 [checkshape a_1 f] + set che_a_2 [checkshape a_1 f] + decho on + if { [regexp {Faulty} $che_a_1] } { + puts "Faulty ${BugNumber} : checkshape 1 is wrong for a" + } + if { [regexp {Faulty} $che_a_2] } { + puts "Faulty ${BugNumber} : checkshape 2 is wrong for a" + } + + renamevar a_1 result +} + +set square 1.48021e+06 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug697_10 b/tests/bugs/modalg/bug697_10 new file mode 100644 index 0000000000..fe0095349e --- /dev/null +++ b/tests/bugs/modalg/bug697_10 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bopfuse) +###################################################### + +restore [locate_data_file OCC697_2.brep] b2 +restore [locate_data_file OCC697_3.brep] b3 + +checkshape b2 +checkshape b3 + +bop b3 b2 +if { [catch {bopfuse result} catch_result] } { + puts "Faulty OCC697" +} +set square 25357.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_11 b/tests/bugs/modalg/bug697_11 new file mode 100644 index 0000000000..ef72bfc681 --- /dev/null +++ b/tests/bugs/modalg/bug697_11 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (old topology) +## (fuse) +###################################################### + +restore [locate_data_file OCC697_1.brep] b1 +restore [locate_data_file OCC697_2.brep] b2 + +checkshape b1 +checkshape b2 +if { [catch {bfuse result b2 b1} catch_result] } { + puts "Faulty OCC697" +} +set square 8879.41 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_12 b/tests/bugs/modalg/bug697_12 new file mode 100644 index 0000000000..489d407f97 --- /dev/null +++ b/tests/bugs/modalg/bug697_12 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (old topology) +## (fuse) +###################################################### + +restore [locate_data_file OCC697_2.brep] b2 +restore [locate_data_file OCC697_3.brep] b3 + +checkshape b2 +checkshape b3 +if { [catch {bfuse result b3 b2} catch_result] } { + puts "Faulty OCC697" +} +set square 25357.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_3 b/tests/bugs/modalg/bug697_3 new file mode 100644 index 0000000000..5854b25549 --- /dev/null +++ b/tests/bugs/modalg/bug697_3 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC697_1.brep] b1 +restore [locate_data_file OCC697_2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bfuse result b1 b2} catch_result] } { + puts "Faulty OCC697" +} + +set square 8879.41 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug697_4 b/tests/bugs/modalg/bug697_4 new file mode 100644 index 0000000000..062a87919f --- /dev/null +++ b/tests/bugs/modalg/bug697_4 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC697_1.brep] b1 +restore [locate_data_file OCC697_2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bfuse result b2 b1} catch_result] } { + puts "Faulty OCC697" +} + +set square 8879.41 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug697_5 b/tests/bugs/modalg/bug697_5 new file mode 100644 index 0000000000..081912d0d6 --- /dev/null +++ b/tests/bugs/modalg/bug697_5 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC697_2.brep] b2 +restore [locate_data_file OCC697_3.brep] b3 + +checkshape b2 +checkshape b3 + +if { [catch {bfuse result b2 b3} catch_result] } { + puts "Faulty OCC697" +} +set square 25357.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_6 b/tests/bugs/modalg/bug697_6 new file mode 100644 index 0000000000..69adc12578 --- /dev/null +++ b/tests/bugs/modalg/bug697_6 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC697_2.brep] b2 +restore [locate_data_file OCC697_3.brep] b3 + +checkshape b2 +checkshape b3 + +if { [catch {bfuse result b3 b2} catch_result] } { + puts "Faulty OCC697" +} +set square 25357.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_7 b/tests/bugs/modalg/bug697_7 new file mode 100644 index 0000000000..c9c5e67dad --- /dev/null +++ b/tests/bugs/modalg/bug697_7 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bopfuse) +###################################################### + +restore [locate_data_file OCC697_1.brep] b1 +restore [locate_data_file OCC697_2.brep] b2 + +checkshape b1 +checkshape b2 + +bop b1 b2 +if { [catch {bopfuse result} catch_result] } { + puts "Faulty OCC697" +} +set square 8879.41 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_8 b/tests/bugs/modalg/bug697_8 new file mode 100644 index 0000000000..2188a19a5d --- /dev/null +++ b/tests/bugs/modalg/bug697_8 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bopfuse) +###################################################### + +restore [locate_data_file OCC697_1.brep] b1 +restore [locate_data_file OCC697_2.brep] b2 + +checkshape b1 +checkshape b2 + +bop b2 b1 +if { [catch {bopfuse result} catch_result] } { + puts "Faulty OCC697" +} +set square 8879.41 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug697_9 b/tests/bugs/modalg/bug697_9 new file mode 100644 index 0000000000..c897130e3d --- /dev/null +++ b/tests/bugs/modalg/bug697_9 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC697" +puts "============" +puts "" +###################################################### +# Fuse operation does not work +###################################################### +## (new topology) +## (bopfuse) +###################################################### + +restore [locate_data_file OCC697_2.brep] b2 +restore [locate_data_file OCC697_3.brep] b3 + +checkshape b2 +checkshape b3 + +bop b2 b3 +if { [catch {bopfuse result} catch_result] } { + puts "Faulty OCC697 " +} +set square 25357.5 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug7626_1 b/tests/bugs/modalg/bug7626_1 new file mode 100644 index 0000000000..4eb38094ab --- /dev/null +++ b/tests/bugs/modalg/bug7626_1 @@ -0,0 +1,29 @@ +puts "============" +puts "OCC7626" +puts "============" +puts "" +###################################################### +# Bad result of bcut operation +###################################################### + +set BugNumber OCC7626 + +psphere s 10 +box b 10 0 0 20 20 20 +trotate b 10 0 0 0 0 1 45 + +bcut result s b + +set square 1271.7 + +set nb_v_good 4 +set nb_e_good 7 +set nb_w_good 4 +set nb_f_good 3 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 21 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug7626_2 b/tests/bugs/modalg/bug7626_2 new file mode 100644 index 0000000000..406de37ad2 --- /dev/null +++ b/tests/bugs/modalg/bug7626_2 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC7626" +puts "============" +puts "" +###################################################### +# Bad result of bcut operation +###################################################### + +set BugNumber OCC7626 + +psphere s 10 +box b 10 0 0 20 20 20 +trotate b 10 0 0 0 0 1 45 + +bcommon result s b + +set square 199.095 + +set nb_v_good 2 +set nb_e_good 3 +set nb_w_good 3 +set nb_f_good 3 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 14 + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/bug7668 b/tests/bugs/modalg/bug7668 new file mode 100644 index 0000000000..e3704ab77e --- /dev/null +++ b/tests/bugs/modalg/bug7668 @@ -0,0 +1,36 @@ +puts "============" +puts "OCC7668" +puts "============" +puts "" +####################################################################### +# BRepOffsetAPI_MakeOffset wrong generated list +####################################################################### + +puts "#" +puts "Non stable test case on Linux. MKV. 29.12.2010" +puts " ( VERTEX : 136 or VERTEX : 134 )" +puts "#" + +set BugNumber OCC7668 + +restore [locate_data_file OCC7668.brep] a1 + +wire w1 a1 + +mkoffset result w1 1 2 + +renamevar result_1 result + +# Analysis of "nbshapes res" +set nb_v_good 134 +set nb_e_good 134 +set nb_w_good 1 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 269 + +set length 136.008 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug770 b/tests/bugs/modalg/bug770 index 3d04ff31d1..7abd3b3e11 100755 --- a/tests/bugs/modalg/bug770 +++ b/tests/bugs/modalg/bug770 @@ -1,5 +1,6 @@ puts "TODO ?OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" puts "TODO ?OCC12345 ALL: Error : The square of result shape is" +puts "TODO ?OCC12345 ALL: TEST ICOMPLETE" puts "========" puts "OCC770" diff --git a/tests/bugs/modalg/bug8228 b/tests/bugs/modalg/bug8228 new file mode 100644 index 0000000000..570e5e26f9 --- /dev/null +++ b/tests/bugs/modalg/bug8228 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC8228" +puts "============" +puts "" +###################################################### +# exeption is raised during the vprops in DRAW on the attached shape +###################################################### + +set BugNumber OCC8228 + +catch {pload XDE} +catch {pload DCAF} + +# Create a new document and set UndoLimit + +NewDocument D MDTV-XCAF +UndoLimit D 100 + +# Open a transaction +NewCommand D + +ReadStep D [locate_data_file OCC8228.stp] +XGetOneShape result D + +set square 1.46159e+06 + +set nb_v_good 1296 +set nb_e_good 2041 +set nb_w_good 826 +set nb_f_good 761 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 4926 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug8372 b/tests/bugs/modalg/bug8372 new file mode 100644 index 0000000000..5a7cfaa4d7 --- /dev/null +++ b/tests/bugs/modalg/bug8372 @@ -0,0 +1,28 @@ +puts "============" +puts "OCC8372" +puts "============" +puts "" +###################################################### +# Twisted result of ThruSections operation +###################################################### + +set BugNumber OCC8372 + +restore [locate_data_file OCC8372_1.brep] w1 +restore [locate_data_file OCC8372_2.brep] w2 + +thrusections result 1 1 w1 w2 + +set square 4140.46 + +set nb_v_good 12 +set nb_e_good 18 +set nb_w_good 8 +set nb_f_good 8 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 48 + +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug951_31 b/tests/bugs/modalg/bug951_31 new file mode 100644 index 0000000000..0cbdd41ef4 --- /dev/null +++ b/tests/bugs/modalg/bug951_31 @@ -0,0 +1,43 @@ +puts "=========" +puts " OCC951 " +puts "=========" +puts "" +################################################## +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +################################################## +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] b +restore [locate_data_file OCC951_2.brep] a + +checkshape b +checkshape a + +bcommon result a b + +set nb_info [nbshapes result] + +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed +regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi +regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh +regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so +regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full shl + +if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } { + puts " OCC951 : COMMON operation was made PROPERLY" + puts "" +} else { + puts "Faulty OCC951 : result of COMMON operation is EMPTY compound" + puts "" +} + +set square 560.908 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_32 b/tests/bugs/modalg/bug951_32 new file mode 100644 index 0000000000..8d181b16eb --- /dev/null +++ b/tests/bugs/modalg/bug951_32 @@ -0,0 +1,43 @@ +puts "=========" +puts " OCC951 " +puts "=========" +puts "" +################################################## +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +################################################## +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] b +restore [locate_data_file OCC951_2.brep] a + +checkshape b +checkshape a + +bsection result a b + +set nb_info [nbshapes result] + +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed +regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi +regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh +regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so +regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full shl + + + +if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } { + puts " OCC951 : SECTION operation was made PROPERLY" + puts "" +} else { + puts "Faulty OCC951 : result of SECTION operation is EMPTY compound" + puts "" +} +set length 39.8616 +set 3dviewer 1 diff --git a/tests/bugs/modalg/bug951_41 b/tests/bugs/modalg/bug951_41 new file mode 100644 index 0000000000..dcf984e10d --- /dev/null +++ b/tests/bugs/modalg/bug951_41 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bop s1 s2 +bopcommon result + +set square 560.908 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_42 b/tests/bugs/modalg/bug951_42 new file mode 100644 index 0000000000..e801200b83 --- /dev/null +++ b/tests/bugs/modalg/bug951_42 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bop s1 s2 +bopsection result + +set length 39.8616 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_5 b/tests/bugs/modalg/bug951_5 new file mode 100644 index 0000000000..b82848fa0b --- /dev/null +++ b/tests/bugs/modalg/bug951_5 @@ -0,0 +1,43 @@ +puts "=========" +puts " OCC951 " +puts "=========" +puts "" +################################################## +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +################################################## +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] b +restore [locate_data_file OCC951_2.brep] a + +checkshape b +checkshape a + +############ +bop a b +bopcommon result +############ +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed +regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi +regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh +regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so +regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co +regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full shl + +if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } { + puts " OCC951 : COMMON operation was made PROPERLY" + puts "" +} else { + puts "Faulty OCC951 : result of COMMON operation is EMPTY compound" + puts "" +} + +set square 560.908 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug951_51 b/tests/bugs/modalg/bug951_51 new file mode 100644 index 0000000000..3f561bf95a --- /dev/null +++ b/tests/bugs/modalg/bug951_51 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bop s2 s1 +bopcommon result + +set square 560.908 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_52 b/tests/bugs/modalg/bug951_52 new file mode 100644 index 0000000000..79fd3a630b --- /dev/null +++ b/tests/bugs/modalg/bug951_52 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bop s2 s1 +bopsection result + +set length 39.8616 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_6 b/tests/bugs/modalg/bug951_6 new file mode 100644 index 0000000000..8b0800d618 --- /dev/null +++ b/tests/bugs/modalg/bug951_6 @@ -0,0 +1,43 @@ +puts "=========" +puts " OCC951 " +puts "=========" +puts "" +################################################## +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +################################################## +## (new topology) +## (bopcommon) +## (bopsection) +###################################################### + +restore [locate_data_file OCC951_1.brep] b +restore [locate_data_file OCC951_2.brep] a + +checkshape b +checkshape a + +bop a b +bopcommon res1 +bopsection result + +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed +regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi +regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh +regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so +regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co +regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full shl + +if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } { + puts " OCC951 : COMMON operation was made PROPERLY" + puts "" +} else { + puts "Faulty OCC951 : result of COMMON operation is EMPTY compound" + puts "" +} + +set length 39.8616 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug951_61 b/tests/bugs/modalg/bug951_61 new file mode 100644 index 0000000000..23e752c547 --- /dev/null +++ b/tests/bugs/modalg/bug951_61 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bcommon result s1 s2 + +set square 560.908 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_62 b/tests/bugs/modalg/bug951_62 new file mode 100644 index 0000000000..50ebc0733e --- /dev/null +++ b/tests/bugs/modalg/bug951_62 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bsection result s1 s2 + +set length 39.8616 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_71 b/tests/bugs/modalg/bug951_71 new file mode 100644 index 0000000000..8217619dd2 --- /dev/null +++ b/tests/bugs/modalg/bug951_71 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bcommon result s2 s1 + +set square 560.908 +set 3dviewer 1 + diff --git a/tests/bugs/modalg/bug951_72 b/tests/bugs/modalg/bug951_72 new file mode 100644 index 0000000000..82a31c9976 --- /dev/null +++ b/tests/bugs/modalg/bug951_72 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC951" +puts "============" +puts "" +###################################################### +##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes +###################################################### +## (old topology) +## (common) +## (section) +###################################################### + +restore [locate_data_file OCC951_1.brep] s1 +restore [locate_data_file OCC951_2.brep] s2 + +checkshape s1 +checkshape s2 + +bsection result s2 s1 + +set length 39.8616 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug10603 b/tests/bugs/moddata/bug10603 new file mode 100644 index 0000000000..5b3f7614e7 --- /dev/null +++ b/tests/bugs/moddata/bug10603 @@ -0,0 +1,47 @@ +puts "============" +puts "OCC10603" +puts "============" +puts "" +####################################################################### +# Fuse of torus fails +####################################################################### + +set BugNumber OCC10603 + +puts "Create 3 torus ..." +ptorus a0 100 20 +tcopy a0 a1 +tcopy a0 a2 +trotate a1 0 0 0 1 0 0 90 +trotate a2 0 0 0 0 1 0 90 + +puts "Prepare first boolean operation ..." +bop a0 a1 + +puts "Start first boolean operation ..." +bopfuse res1 +puts "Finish first boolean operation ..." + +puts "Prepare second boolean operation ..." +bop res1 a2 + +puts "Start second boolean operation ..." +bopfuse result +checkshape result +puts "Finish second boolean operation ..." + +set square 197753 + +# Analysis of "nbshapes res" +set nb_v_good 12 +set nb_e_good 36 +set nb_w_good 12 +set nb_f_good 12 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 75 + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug10604_1 b/tests/bugs/moddata/bug10604_1 new file mode 100644 index 0000000000..a0a16e2d62 --- /dev/null +++ b/tests/bugs/moddata/bug10604_1 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC10604" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10604 + +puts "Load first shape ..." +restore [locate_data_file OCC10604-1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10604-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcommon result +checkshape result +puts "Finish boolean operation ..." + +set square 585.072 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 12 +set nb_w_good 5 +set nb_f_good 5 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 31 + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug10604_2 b/tests/bugs/moddata/bug10604_2 new file mode 100644 index 0000000000..ee66d39432 --- /dev/null +++ b/tests/bugs/moddata/bug10604_2 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC10604" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10604 + +puts "Load first shape ..." +restore [locate_data_file OCC10604-1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10604-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopfuse result +checkshape result +puts "Finish boolean operation ..." + +set square 808.713 + +# Analysis of "nbshapes res" +set nb_v_good 8 +set nb_e_good 15 +set nb_w_good 8 +set nb_f_good 7 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 41 + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug10604_3 b/tests/bugs/moddata/bug10604_3 new file mode 100644 index 0000000000..6db8c36620 --- /dev/null +++ b/tests/bugs/moddata/bug10604_3 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC10604" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10604 + +puts "Load first shape ..." +restore [locate_data_file OCC10604-1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10604-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopcut result +checkshape result +puts "Finish boolean operation ..." + +set square 893.394 + +# Analysis of "nbshapes res" +set nb_v_good 7 +set nb_e_good 15 +set nb_w_good 6 +set nb_f_good 5 +set nb_sh_good 1 +set nb_sol_good 1 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 36 + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug10604_4 b/tests/bugs/moddata/bug10604_4 new file mode 100644 index 0000000000..8b9571f924 --- /dev/null +++ b/tests/bugs/moddata/bug10604_4 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC10604" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10604 + +puts "Load first shape ..." +restore [locate_data_file OCC10604-1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10604-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +boptuc result +checkshape result +puts "Finish boolean operation ..." + +set square 500.39 + +# Analysis of "nbshapes res" +set nb_v_good 7 +set nb_e_good 12 +set nb_w_good 7 +set nb_f_good 7 +set nb_sh_good 2 +set nb_sol_good 2 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 38 + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug10604_5 b/tests/bugs/moddata/bug10604_5 new file mode 100644 index 0000000000..08b5926ca6 --- /dev/null +++ b/tests/bugs/moddata/bug10604_5 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC10604" +puts "============" +puts "" +####################################################################### +# Fuse Fails +####################################################################### + +set BugNumber OCC10604 + +puts "Load first shape ..." +restore [locate_data_file OCC10604-1.brep] b1 +puts "Load second shape ..." +restore [locate_data_file OCC10604-2.brep] b2 + +puts "Prepare boolean operation ..." +bop b1 b2 + +puts "Start boolean operation ..." +bopsection result b1 b2 +checkshape result +puts "Finish boolean operation ..." + +set length 88.9912 + +# Analysis of "nbshapes res" +set nb_v_good 6 +set nb_e_good 6 +set nb_w_good 0 +set nb_f_good 0 +set nb_sh_good 0 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 13 + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug1416 b/tests/bugs/moddata/bug1416 new file mode 100644 index 0000000000..666fdf3093 --- /dev/null +++ b/tests/bugs/moddata/bug1416 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC1416" +puts "============" +puts "" +###################################################### +# Shading mode doesn't work on a face of the model +###################################################### + +restore [locate_data_file OCC1416.brep] result + +# Clean mesh +isos result 0 +tclean result + +#Creating mesh +incmesh result 0.01 + +#View the result of mesh +triangles result + +############################################## +if { [catch { set tri_info [trinfo result] } catch_result] } { +############################################## + puts "Faulty OCC1416" +} else { + set ll [ llength ${tri_info} ] + if {${ll} < 6} { + puts "Faulty OCC1416" + } else { + regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri + regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod + if { $tri == 0 || $nod == 0 } { + puts "Faulty OCC1416" + } else { + puts "Warning: OCC1416 looks like OK, but visual checking is required !!!!" + } + } +} + +set square 863.938 +set 3dviewer 1 diff --git a/tests/bugs/moddata/bug145 b/tests/bugs/moddata/bug145 new file mode 100644 index 0000000000..6992d661d9 --- /dev/null +++ b/tests/bugs/moddata/bug145 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC145" +puts "========" + +pload QAcommands + +OCC145 [locate_data_file OCC145.brep] 1 + +set listmem {} +set i_max 10000 +OCC145 [locate_data_file OCC145.brep] ${i_max} + +lappend listmem [expr [meminfo w] / 1024] +if { [checktrend $listmem 0 1 "Memory leak detected"] } { + puts "No memory leak, $i iterations" + break +} + diff --git a/tests/bugs/moddata/bug157 b/tests/bugs/moddata/bug157 new file mode 100644 index 0000000000..d7bdf91ebb --- /dev/null +++ b/tests/bugs/moddata/bug157 @@ -0,0 +1,27 @@ +pload QAcommands + +puts "================" +puts "OCC157" +puts "================" +puts "" + +restore [locate_data_file OCC157.brep] wire +checkshape wire + +set Tolerance 100. +set info_result [OCC157 result wire ${Tolerance}] + +set ll [llength ${info_result}] +if {${ll} < 2} { + puts "length = ${ll}" + puts "OCC157: Error" +} else { + if { [regexp {OK} $info_result] } { + puts "OCC157: OK" + } else { + puts "OCC157: Error" + } +} +set square 2.11095e+06 +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug1651 b/tests/bugs/moddata/bug1651 new file mode 100644 index 0000000000..a3cba8df8b --- /dev/null +++ b/tests/bugs/moddata/bug1651 @@ -0,0 +1,64 @@ +puts "TODO OCC11111 ALL: Faulty OCC1651" + +pload QAcommands + +puts "============" +puts "OCC1651" +puts "============" +puts "" +###################################################### +# No intersection found using BRepClass3d_Intersector3d +###################################################### + +restore [locate_data_file OCC1651.brep] face + +checkshape face + +set PntX 164.6207 +set PntY -105.2869 +set PntZ 557.8805 +set DirX 0.5774 +set DirY -0.5774 +set DirZ 0.5774 + +if { [catch { set PointList [OCC1651 face ${PntX} ${PntY} ${PntZ} ${DirX} ${DirY} ${DirZ}] } catch_result] } { + puts "Faulty OCC1651" +} else { + set ll [ llength ${PointList} ] + if {${ll} != 3} { + puts "Faulty OCC1651" + } else { + set IntersectionPointX [lindex ${PointList} 0] + set IntersectionPointY [lindex ${PointList} 1] + set IntersectionPointZ [lindex ${PointList} 2] + + set good_IntersectionPointX 42.6199 + set good_IntersectionPointY 16.7139 + set good_IntersectionPointZ 435.88 + + set X_percent [expr abs(${IntersectionPointX} - ${good_IntersectionPointX}) / double(${good_IntersectionPointX}) * 100.] + set Y_percent [expr abs(${IntersectionPointY} - ${good_IntersectionPointY}) / double(${good_IntersectionPointY}) * 100.] + set Z_percent [expr abs(${IntersectionPointZ} - ${good_IntersectionPointZ}) / double(${good_IntersectionPointZ}) * 100.] + + set percent_max 0.1 + + set IsGood 1 + if {${X_percent} > ${percent_max}} { + puts "OCC1651 Faulty" + set IsGood 0 + } + if {${Y_percent} > ${percent_max}} { + puts "OCC1651 Faulty" + set IsGood 0 + } + if {${Z_percent} > ${percent_max}} { + puts "OCC1651 Faulty" + set IsGood 0 + } + if {${IsGood} == 1} { + puts "OCC1651 OK" + } + } +} + + diff --git a/tests/bugs/moddata/bug203 b/tests/bugs/moddata/bug203 new file mode 100644 index 0000000000..6e9c8de18b --- /dev/null +++ b/tests/bugs/moddata/bug203 @@ -0,0 +1,41 @@ + +puts "========" +puts "OCC203" +puts "========" + +set dx 100 +set dy 100 +set dz 100 + +box b ${dx} ${dy} ${dz} + +renamevar b edge +explode edge e + +renamevar edge face +explode face f + +set radis 5 +set angle 45 + +chamf result1 face edge_1 face_3 A ${radis} ${angle} + +explode result1 e + +decho off +if { [catch {fillet result result1 ${radis} result1_1 ${radis} result1_7 } catch_result] } { + set mistake 1 +} else { + set mistake 0 +} +decho on + +if { $mistake != 0} { + puts "OK OCC203" + puts "Filet can not be created" +} else { + puts "Faulty OCC203: function FILLET works wrongly" + checkshape result +} + + diff --git a/tests/bugs/moddata/bug2442 b/tests/bugs/moddata/bug2442 new file mode 100644 index 0000000000..e291a20e5f --- /dev/null +++ b/tests/bugs/moddata/bug2442 @@ -0,0 +1,65 @@ +puts "TODO OCC11111 ALL: OCC2442 Faulty" + +puts "============" +puts "OCC2442" +puts "============" +puts "" +###################################################### +# Error in BRepClass3d_SolidClassifier +###################################################### + +set IsGood 1 + +restore [locate_data_file OCC2442-1.brep] a +restore [locate_data_file OCC2442-2.brep] b + +distmini dm1 a b +set dm1_list [dump dm1_val] +set dm1_length [llength $dm1_list] +if {$dm1_length < 6} { + puts "Faulty OCC2442" + set IsGood 0 +} + +explode a +explode b +distmini dm2 a_1 b_1 +set dm2_list [dump dm2_val] +set dm2_length [llength $dm2_list] +if {$dm2_length < 6} { + puts "Faulty OCC2442" + set IsGood 0 +} + +if {$IsGood == 1} { + regexp {([-0-9.+eE]+)} $dm1_list full dist1 + regexp {([-0-9.+eE]+)} $dm2_list full dist2 + + set good_dist 18.4816355578064 + set dist1_percent [expr abs(${dist1} - ${good_dist}) / double(${good_dist}) * 100.] + + set dist2_percent [expr abs(${dist1} - ${dist2}) / double(${dist2}) * 100.] + + set percent_max 0.1 + + if {${dist1_percent} > ${percent_max}} { + puts "OCC2442 Faulty" + set IsGood 0 + } + if {${dist2_percent} > ${percent_max}} { + puts "OCC2442 Faulty" + set IsGood 0 + } + if {${IsGood} == 1} { + puts "OCC2442 OK" + } +} + +set boundbox [boundingstr a] +set x0 [lindex $boundbox 0] +set y0 [lindex $boundbox 1] +set z0 [lindex $boundbox 2] +ttranslate a [expr -1 * $x0] [expr -1 * $y0] [expr -1 * $z0] +ttranslate b [expr -1 * $x0] [expr -1 * $y0] [expr -1 * $z0] + +set 3dviewer 1 diff --git a/tests/bugs/moddata/bug2569_1 b/tests/bugs/moddata/bug2569_1 new file mode 100644 index 0000000000..f7e2a4073a --- /dev/null +++ b/tests/bugs/moddata/bug2569_1 @@ -0,0 +1,20 @@ +pload QAcommands + +puts "============" +puts "OCC2569" +puts "============" +puts "" +###################################################### +# If it is not possible to create the bezier curve, +# it should throw an exception. +###################################################### +cpulimit 60 +vinit +set out [OCC2569 26 result] +if {[string compare $out "\n Degree = 25\n"] == 0} { + puts "OCC2569: OK" +} else { + puts "OCC2569: Faulty" +} + +set 3dviewer 0 diff --git a/tests/bugs/moddata/bug2569_2 b/tests/bugs/moddata/bug2569_2 new file mode 100644 index 0000000000..079685cbec --- /dev/null +++ b/tests/bugs/moddata/bug2569_2 @@ -0,0 +1,20 @@ +puts "TODO OCC11111 ALL: Exception" +puts "TODO OCC11111 ALL: An exception was caught" +puts "TODO OCC11111 ALL: TEST INCOMPLETE" + +pload QAcommands + +puts "============" +puts "OCC2569" +puts "============" +puts "" +###################################################### +# If it is not possible to create the bezier curve, +# it should throw an exception. +###################################################### +cpulimit 60 +vinit + +OCC2569 29 result + +set 3dviewer 0 diff --git a/tests/bugs/moddata/bug262 b/tests/bugs/moddata/bug262 new file mode 100644 index 0000000000..f74746bc9e --- /dev/null +++ b/tests/bugs/moddata/bug262 @@ -0,0 +1,59 @@ + +puts "========" +puts "OCC262" +puts "========" + +restore [locate_data_file OCC262.brep] a +# checkshape a + +set tolerance 1e-5 + +build3d a ${tolerance} + +fsameparameter a + +explode a E +# Verify only a_1 and a_2 eges becouse a_3 had 3d curve before call of build3d command + +set toler1 [maxtolerance a_1] +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $toler1 full MaxEdgeTolerance1 + +if { [ expr $MaxEdgeTolerance1 > $tolerance ] } { + puts "OCC262 - FAULTY. Tolerance of a_1 is too big" +} else { + puts "TOLERANCE OF A_1 - OK" +} + +set toler2 [maxtolerance a_2] +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $toler2 full MaxEdgeTolerance2 + +if { [ expr $MaxEdgeTolerance2 > $tolerance ] } { + puts "OCC262 - FAULTY. Tolerance of a_1 is too big" +} else { + puts "TOLERANCE OF A_2 - OK" +} + + +#set tolerancelist [maxtolerance a] + +#set list [split ${tolerancelist} "\n\t"] +#set listLength [llength ${list}] +#if { ${listLength} < 9 } then {puts "OCC262 - Error : listLength= ${listLength}"} + +#set EdgeList [lindex ${list} 5] +#set MaxEdgeTolerance [lindex [split ${EdgeList}] [expr [llength [split ${EdgeList}] ] - 2] ] + +#set delta [expr abs(${MaxEdgeTolerance} - ${tolerance}) / ${tolerance} * 100] + +#set maxdelta 1 + +#if { ${delta} > ${maxdelta} } then {puts "OCC262 - Error : delta = ${delta}"} else { +# puts "OCC262: OK" +#} + +#puts "MaxEdgeTolerance = ${MaxEdgeTolerance}" + +renamevar a result + +set square 449.437 +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug2755 b/tests/bugs/moddata/bug2755 new file mode 100644 index 0000000000..856197fcbe --- /dev/null +++ b/tests/bugs/moddata/bug2755 @@ -0,0 +1,139 @@ +puts "============" +puts "OCC2755" +puts "============" +puts "" +###################################################### +# Boolean Bug in OCC5.0 with the shape having a ellipse curve +###################################################### + +restore [locate_data_file OCC2755.brep] a + +checkshape a + +explode a f +mksurface gs a_1 +set list [proj gs 0 10 50] +set ll 4 + +set good_Parameter1List [list 0 0 0 0] +set good_Parameter2List [list 40.4616826479819 211.944716681974 64.3186164305428 81.0582330575794] +set good_OriginXList [list 0 0 0 0] +set good_OriginYList [list 10 10 10 10] +set good_OriginZList [list 50 50 50 50] +set good_AxisXList [list -0.0300865818651084 -0.941236271764613 0.534306660761684 0.998573938898137] +set good_AxisYList [list 0.999547296325529 -0.337748842654791 -0.845290714645381 0.0533862206328518] +set good_AxisZList [list 0 0 0 0] + +proc CalculatePercent {value good_value} { + if {${good_value} == 0. && ${value} == 0.} { + set percent 0. + } else { + set percent [expr abs(${value} - ${good_value}) / double(${good_value}) * 100.] + } + return ${percent} +} + +if {[llength ${list}] != ${ll}} { + puts "Faulty OCC2755" +} else { + set percent_max 0.1 + set IsGood 1 + for {set i 0} {$i < ${ll}} {incr i} { + set dump_list [dump [lindex ${list} $i]] + regexp { *Parameters *: *([-0-9.+eE]+) *([-0-9.+eE]+)} $dump_list full Parameter1 Parameter2 + regexp { *Origin *:([-0-9.+eE]+), *([-0-9.+eE]+), *([-0-9.+eE]+)} $dump_list full OriginX OriginY OriginZ + regexp { *Axis *:([-0-9.+eE]+), *([-0-9.+eE]+), *([-0-9.+eE]+)} $dump_list full AxisX AxisY AxisZ + + set good_Parameter1 [lindex ${good_Parameter1List} $i] + set good_Parameter2 [lindex ${good_Parameter2List} $i] + set good_OriginX [lindex ${good_OriginXList} $i] + set good_OriginY [lindex ${good_OriginYList} $i] + set good_OriginZ [lindex ${good_OriginZList} $i] + set good_AxisX [lindex ${good_AxisXList} $i] + set good_AxisY [lindex ${good_AxisYList} $i] + set good_AxisZ [lindex ${good_AxisZList} $i] + + set Parameter1_percent [CalculatePercent ${Parameter1} ${good_Parameter1}] + set Parameter2_percent [CalculatePercent ${Parameter2} ${good_Parameter2}] + set OriginX_percent [CalculatePercent ${OriginX} ${good_OriginX}] + set OriginY_percent [CalculatePercent ${OriginY} ${good_OriginY}] + set OriginZ_percent [CalculatePercent ${OriginZ} ${good_OriginZ}] + set AxisX_percent [CalculatePercent ${AxisX} ${good_AxisX}] + set AxisY_percent [CalculatePercent ${AxisY} ${good_AxisY}] + set AxisZ_percent [CalculatePercent ${AxisZ} ${good_AxisZ}] + + puts "good_Parameter1 = ${good_Parameter1}" + puts "Parameter1 = ${Parameter1}" + puts "Parameter1_percent = ${Parameter1_percent}\n" + + puts "good_Parameter2 = ${good_Parameter2}" + puts "Parameter2 = ${Parameter2}" + puts "Parameter2_percent = ${Parameter2_percent}\n" + + puts "good_OriginX = ${good_OriginX}" + puts "OriginX = ${OriginX}" + puts "OriginX_percent = ${OriginX_percent}\n" + + puts "good_OriginY = ${good_OriginY}" + puts "OriginY = ${OriginY}" + puts "OriginY_percent = ${OriginY_percent}\n" + + puts "good_OriginZ = ${good_OriginZ}" + puts "OriginZ = ${OriginZ}" + puts "OriginZ_percent = ${OriginZ_percent}\n" + + puts "good_AxisX = ${good_AxisX}" + puts "AxisX = ${AxisX}" + puts "AxisX_percent = ${AxisX_percent}\n" + + puts "good_AxisY = ${good_AxisY}" + puts "AxisY = ${AxisY}" + puts "AxisY_percent = ${AxisY_percent}\n" + + puts "good_AxisZ = ${good_AxisZ}" + puts "AxisZ = ${AxisZ}" + puts "AxisZ_percent = ${AxisZ_percent}\n" + + if {${Parameter1_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${Parameter2_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${OriginX_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${OriginY_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${OriginZ_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${AxisX_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${AxisY_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + if {${AxisZ_percent} > ${percent_max}} { + puts "OCC2755 Faulty (case 3 / $i)" + set IsGood 0 + } + + } + + if {${IsGood} == 1} { + puts "OCC2755 OK" + } + +} + +set 3dviewer 0 + diff --git a/tests/bugs/moddata/bug277 b/tests/bugs/moddata/bug277 new file mode 100644 index 0000000000..5a0aa435ba --- /dev/null +++ b/tests/bugs/moddata/bug277 @@ -0,0 +1,20 @@ +puts "========" +puts "OCC277" +puts "========" +puts "" + +pload QAcommands + +OCC277 + +set listmem {} +set i_max 10 +for {set i 1} {${i} <= ${i_max}} {incr i} { + OCC277 + + lappend listmem [expr [meminfo w] / 1024] + if { [checktrend $listmem 0 1 "Memory leak detected"] } { + puts "No memory leak, $i iterations" + break + } +} diff --git a/tests/bugs/moddata/bug2784_1 b/tests/bugs/moddata/bug2784_1 new file mode 100644 index 0000000000..c6a4ae78b8 --- /dev/null +++ b/tests/bugs/moddata/bug2784_1 @@ -0,0 +1,35 @@ +puts "============" +puts "OCC2784" +puts "============" +puts "" +###################################################### +# Common and cut operations for two faces gives invalid result +###################################################### +# Common and cut operations for two faces gives invalid result if one of the faces +# has a hole and other face lay in this hole (fill this hole). +###################################################### +## (new topology) +## (bcut) +## (bcommon) +###################################################### + +############# data ############# +box b1 10 20 10 +box b2 1 1 1 +ttranslate b2 5 5 0 +explode b1 f +explode b2 f + +bcut rcut1 b1_5 b2_5 +checkshape rcut1 + +bcommon result rcut1 b2_5 + +regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m + +if { $m != 0 } { + puts "Error : square is not right" +} + +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug2784_2 b/tests/bugs/moddata/bug2784_2 new file mode 100644 index 0000000000..69dc62992d --- /dev/null +++ b/tests/bugs/moddata/bug2784_2 @@ -0,0 +1,35 @@ +puts "============" +puts "OCC2784" +puts "============" +puts "" +###################################################### +# Common and cut operations for two faces gives invalid result +###################################################### +# Common and cut operations for two faces gives invalid result if one of the faces +# has a hole and other face lay in this hole (fill this hole). +###################################################### +## (old topology) +## (cut) +## (common) +###################################################### + +############# data ############# +box b1 10 20 10 +box b2 1 1 1 +ttranslate b2 5 5 0 +explode b1 f +explode b2 f + +bcut rcut1 b1_5 b2_5 +checkshape rcut1 + +bcommon result rcut1 b2_5 + +regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m + +if { $m != 0 } { + puts "Error : square is not right" +} + +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug299 b/tests/bugs/moddata/bug299 new file mode 100644 index 0000000000..fca2b46e0b --- /dev/null +++ b/tests/bugs/moddata/bug299 @@ -0,0 +1,26 @@ +puts "TODO OCC11111 ALL: OCC299: Error 2" + +pload QAcommands + +puts "================" +puts "OCC299" +puts "================" +puts "" + +restore [locate_data_file OCC298.brep] pr +checkshape pr + +point p 0.86427836 -1 -1 + +set info_result [OCC299 pr p] +set ll [llength ${info_result}] +if { ${ll} < 4 } { + puts "OCC299: Error 1" +} else { + if { [regexp {IN} $info_result] } { + puts "OCC299: OK" + } else { + puts "OCC299: Error 2" + } +} + diff --git a/tests/bugs/moddata/bug353 b/tests/bugs/moddata/bug353 new file mode 100644 index 0000000000..52a2e79662 --- /dev/null +++ b/tests/bugs/moddata/bug353 @@ -0,0 +1,16 @@ +pload QAcommands + +puts "================" +puts "OCC353" +puts "================" +puts "" +########################################################## +## Attached DRAW command "TATA_const" hangs in Geom2dGcc_Circ2d3Tan. +########################################################## + +if [catch { OCC353 }] { + puts "OCC353: Error" +} else { + puts "OCC353: OK" +} + diff --git a/tests/bugs/moddata/bug367 b/tests/bugs/moddata/bug367 new file mode 100644 index 0000000000..324a449d0e --- /dev/null +++ b/tests/bugs/moddata/bug367 @@ -0,0 +1,24 @@ +pload QAcommands + +puts "================" +puts "OCC367" +puts "BUC61013" +puts "================" +puts "" + +restore [locate_data_file OCC105.brep] result +checkshape result + +set step 0.5 +set goodX -307.47165394 +set goodY -340.18073533 +set goodZ 0 +set percent_tolerance 0.01 + +OCC367 result ${step} ${goodX} ${goodY} ${goodZ} ${percent_tolerance} + +set length 1760.13 +set 2dviewer 0 + + + diff --git a/tests/bugs/moddata/bug3721_1 b/tests/bugs/moddata/bug3721_1 new file mode 100644 index 0000000000..c2e74d4898 --- /dev/null +++ b/tests/bugs/moddata/bug3721_1 @@ -0,0 +1,28 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bfuse result b1 b2} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 diff --git a/tests/bugs/moddata/bug3721_2 b/tests/bugs/moddata/bug3721_2 new file mode 100644 index 0000000000..1d95c6ef74 --- /dev/null +++ b/tests/bugs/moddata/bug3721_2 @@ -0,0 +1,29 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (bfuse) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bfuse result b2 b1} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug3721_3 b/tests/bugs/moddata/bug3721_3 new file mode 100644 index 0000000000..e7203b5981 --- /dev/null +++ b/tests/bugs/moddata/bug3721_3 @@ -0,0 +1,28 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (bcommon) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bcommon result b2 b1} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 0. +set 3dviewer 1 \ No newline at end of file diff --git a/tests/bugs/moddata/bug3721_4 b/tests/bugs/moddata/bug3721_4 new file mode 100644 index 0000000000..114a74c187 --- /dev/null +++ b/tests/bugs/moddata/bug3721_4 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (bcut) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bcut result b1 b2} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug3721_5 b/tests/bugs/moddata/bug3721_5 new file mode 100644 index 0000000000..fbcbeafd1c --- /dev/null +++ b/tests/bugs/moddata/bug3721_5 @@ -0,0 +1,29 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (bcut) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +if { [catch {bcut result b2 b1} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug3721_6 b/tests/bugs/moddata/bug3721_6 new file mode 100644 index 0000000000..9f854db4d9 --- /dev/null +++ b/tests/bugs/moddata/bug3721_6 @@ -0,0 +1,30 @@ +puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC11111 ALL: Error : The square of result shape is" + +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (boptuc) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +bop b1 b2 +if { [catch {boptuc result} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug3721_7 b/tests/bugs/moddata/bug3721_7 new file mode 100644 index 0000000000..732e3f4660 --- /dev/null +++ b/tests/bugs/moddata/bug3721_7 @@ -0,0 +1,27 @@ +puts "============" +puts "OCC3721" +puts "============" +puts "" +###################################################### +# When using Boolean Operations exception is raised for some tolerance vals. +###################################################### +## (new topology) +## (boptuc) +###################################################### + +restore [locate_data_file OCC3721-1.brep] b1 +restore [locate_data_file OCC3721-2.brep] b2 + +checkshape b1 +checkshape b2 + +bop b2 b1 +if { [catch {boptuc result} catch_result] } { + puts "Faulty OCC3721" +} + +checkshape result + +set square 71185 +set 3dviewer 1 + diff --git a/tests/bugs/moddata/bug377 b/tests/bugs/moddata/bug377 new file mode 100644 index 0000000000..aa2826ec62 --- /dev/null +++ b/tests/bugs/moddata/bug377 @@ -0,0 +1,22 @@ +puts "TODO OCC11111 ALL: Error : OCC377" + +pload QAcommands + +puts "========" +puts "OCC377" +puts "BUC61056" +puts "========" +puts "" +################################################################### +##Incorrect behaviour of BRepTopAdapter_FClass2d. It cannot work with parametric representation +## of the first wire on the face. It says that point (1.9812, -0.9557948) is outside the contour for +## forward wire and inside for reversed one if tolerance is equal to 6.45 +################################################################### + +set result_info [ OCC377 [locate_data_file OCC377.brep] 1.9812 -0.9557948 6.45 ] +if { [ regexp {FAULTY} $result_info ]} { + puts "Error : OCC377" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug3896 b/tests/bugs/moddata/bug3896 new file mode 100644 index 0000000000..f9135bf24b --- /dev/null +++ b/tests/bugs/moddata/bug3896 @@ -0,0 +1,48 @@ +puts "TODO OCC11111 ALL: Faulty OCC3896" + +puts "============" +puts "OCC3896" +puts "============" +puts "" +###################################################### +# BRepCheck_Analyzer does not detect faulty faces in solid shape. +###################################################### + +# +# a_13 face is FORVARD (faulty), but checkshape command does not detect it +# + +set BugNumber OCC3896 + +restore [locate_data_file OCC3896-pipe.brep] a + +explode a f +compound a_1 a_13 result + +explode a_1 e +explode a_13 e + +smallview +donly result +fit +r + +normals result 200 + +puts "Normal of a_13 face is red (FORWARD)" + +for {set i 1} {$i <= 14} {incr i} { + whatis a_$i +} + +decho off +set info_result [checkshape result] +decho on + +if {[regexp {Faulty} $info_result] } { + puts "OK ${BugNumber} : checkshape detect faulty faces in solid shape" +} else { + puts "Faulty ${BugNumber} : checkshape does not detect faulty faces in solid shape" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug4426_1 b/tests/bugs/moddata/bug4426_1 new file mode 100644 index 0000000000..bea9a8aeee --- /dev/null +++ b/tests/bugs/moddata/bug4426_1 @@ -0,0 +1,22 @@ +puts "================" +puts "OCC4426" +puts "================" +puts "" +####################################################################################### +# Incorrect result of intersection in 2D between circle and line +####################################################################################### + +v2d2 +circle c1 2 2 1 +2dfit +2dzoom 120 +line l1 3 0 0 1 +2dintersect l1 c1 +erase l1 c1 +2dfit + +puts "ATTENTION! Check following:" +puts "There is only one intersection point (green X)" + +set 2dviewer 1 + diff --git a/tests/bugs/moddata/bug4426_2 b/tests/bugs/moddata/bug4426_2 new file mode 100644 index 0000000000..66aa3ab334 --- /dev/null +++ b/tests/bugs/moddata/bug4426_2 @@ -0,0 +1,22 @@ +puts "================" +puts "OCC4426" +puts "================" +puts "" +####################################################################################### +# Incorrect result of intersection in 2D between circle and line +####################################################################################### + +v2d2 +line ll1 0 0 0.3 0.7 +line ll2 0 0 0.37 0.63 +trim tll1 ll1 -0.00001 0.00001 +trim tll2 ll2 -0.00001 0.00001 +donly tll1 tll2 +2dintersect tll1 tll2 +2dfit + +puts "ATTENTION! Check following:" +puts "There is the intersection point (green X) on center of grid axis" + +set 2dviewer 1 + diff --git a/tests/bugs/moddata/bug454 b/tests/bugs/moddata/bug454 new file mode 100644 index 0000000000..412f66ea68 --- /dev/null +++ b/tests/bugs/moddata/bug454 @@ -0,0 +1,25 @@ +pload QAcommands + +puts "================" +puts "OCC454" +puts "================" +puts "" + +restore [locate_data_file OCC454_b1.brep] b1 +checkshape b1 + +restore [locate_data_file OCC454_p1.draw] p1 + +set info_result [OCC299 b1 p1] +set ll [llength ${info_result}] +if { ${ll} < 4 } { + puts "OCC454: ERROR 1" +} else { + if { [regexp {IN} ${info_result}] } { + puts "OCC454: OK" + } else { + puts "OCC454: ERROR 2" + } +} + + diff --git a/tests/bugs/moddata/bug524 b/tests/bugs/moddata/bug524 new file mode 100644 index 0000000000..cb640524b2 --- /dev/null +++ b/tests/bugs/moddata/bug524 @@ -0,0 +1,60 @@ +pload QAcommands + +puts "========" +puts "OCC524" +puts "========" +puts "" + + +set LowerVector 1 +set UpperVector 9 +set InitialValueVector 5 +set LowerRowMatrix 1 +set UpperRowMatrix 6 +set LowerColMatrix 1 +set UpperColMatrix 3 +set InitialValueMatrix 4 + +set info_result [OCC524 ${LowerVector} ${UpperVector} ${InitialValueVector} ${LowerRowMatrix} ${UpperRowMatrix} ${LowerColMatrix} ${UpperColMatrix} ${InitialValueMatrix}] + +set ll [llength ${info_result}] + +if {${ll} != 64} { + puts "OCC524: Error" +} else { + regexp {math_Vector of Length = ([-0-9.+eE]+)} ${info_result} full Vector1Length + if {${Vector1Length} != [expr ${UpperVector} - ${LowerVector} + 1]} { + puts "Vector1Length=${Vector1Length}" + puts "OCC524: Error" + } else { + regexp {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector1_1 + regexp {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector1_2 + regexp {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector1_3 + regexp {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector1_4 + regexp {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector1_5 + regexp {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector1_6 + regexp {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector1_7 + regexp {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector1_8 + regexp {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector1_9 + + if {${Vector1_1}!=120. || ${Vector1_2}!=120. || ${Vector1_3}!=120. || ${Vector1_4}!=0. || ${Vector1_5}!=0. || ${Vector1_6}!=0. || ${Vector1_7}!=0. || ${Vector1_8}!= 0.|| ${Vector1_9}!=0.} { + puts "Error : OCC524" + } else { + regexp -all {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector2_1 + regexp -all {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector2_2 + regexp -all {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector2_3 + regexp -all {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector2_4 + regexp -all {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector2_5 + regexp -all {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector2_6 + regexp -all {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector2_7 + regexp -all {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector2_8 + regexp -all {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector2_9 + if {${Vector2_1}!=60. || ${Vector2_2}!=60. || ${Vector2_3}!=60. || ${Vector2_4}!=60. || ${Vector2_5}!=60. || ${Vector2_6}!=60. || ${Vector2_7}!=0. || ${Vector2_8}!= 0.|| ${Vector2_9}!=0.} { + puts "OCC524: Error" + } else { + puts "OCC524: OK" + } + } + } +} + diff --git a/tests/bugs/moddata/bug536_11 b/tests/bugs/moddata/bug536_11 new file mode 100644 index 0000000000..065edf84b1 --- /dev/null +++ b/tests/bugs/moddata/bug536_11 @@ -0,0 +1,25 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_1 +checkshape S_2 + +if [catch {bfuse result S_1 S_2}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.5068e+06 +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug536_12 b/tests/bugs/moddata/bug536_12 new file mode 100644 index 0000000000..2d7aac8d08 --- /dev/null +++ b/tests/bugs/moddata/bug536_12 @@ -0,0 +1,25 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_1 +checkshape S_3 + +if [catch {bfuse result S_1 S_3}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.56034e+06 +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug536_13 b/tests/bugs/moddata/bug536_13 new file mode 100644 index 0000000000..5a455d5517 --- /dev/null +++ b/tests/bugs/moddata/bug536_13 @@ -0,0 +1,25 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_1 +checkshape S_4 + +if [catch {bfuse result S_1 S_4}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.5405e+06 +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug536_14 b/tests/bugs/moddata/bug536_14 new file mode 100644 index 0000000000..34ede3fede --- /dev/null +++ b/tests/bugs/moddata/bug536_14 @@ -0,0 +1,25 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_1 +checkshape S_5 + +if [catch {bfuse result S_1 S_5}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.45349e+06 +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug536_21 b/tests/bugs/moddata/bug536_21 new file mode 100644 index 0000000000..eb9666b3c4 --- /dev/null +++ b/tests/bugs/moddata/bug536_21 @@ -0,0 +1,24 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_2 +checkshape S_1 + +if [catch {bfuse result S_2 S_1}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.5068e+06 +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug536_22 b/tests/bugs/moddata/bug536_22 new file mode 100644 index 0000000000..e0703dbdd9 --- /dev/null +++ b/tests/bugs/moddata/bug536_22 @@ -0,0 +1,24 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_3 +checkshape S_1 + +if [catch {bfuse result S_3 S_1}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.56034e+06 +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug536_23 b/tests/bugs/moddata/bug536_23 new file mode 100644 index 0000000000..789059a484 --- /dev/null +++ b/tests/bugs/moddata/bug536_23 @@ -0,0 +1,24 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_4 +checkshape S_1 + +if [catch {bfuse result S_4 S_1}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.5405e+06 +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug536_24 b/tests/bugs/moddata/bug536_24 new file mode 100644 index 0000000000..32e2e26211 --- /dev/null +++ b/tests/bugs/moddata/bug536_24 @@ -0,0 +1,24 @@ + +puts "========" +puts "OCC536" +puts "SAM1504" +puts "========" + +vinit + +restore [locate_data_file OCC536.brep] S +checkshape S + +explode S So +checkshape S_5 +checkshape S_1 + +if [catch {bfuse result S_5 S_1}] { + puts "Faulty OCC536" +} else { + puts "OCC536 : OK" + checkshape result +} + +set square 2.45349e+06 +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug538 b/tests/bugs/moddata/bug538 new file mode 100644 index 0000000000..126b5dd948 --- /dev/null +++ b/tests/bugs/moddata/bug538 @@ -0,0 +1,25 @@ +puts "TODO OCC11111 ALL: Faulty OCC132" + +puts "================" +puts "OCC538" +puts "================" +puts "" + +restore [locate_data_file OCC538.brep] Face +checkshape Face + +point p 0.2453959532714904 -1.246869357124329 + +set res1 [b2dclassify Face p] +set info_result [split ${res1}] + +set ll [llength ${info_result}] +if {${ll} < 4} { + puts "Faulty OCC132" +} else { + if {[regexp {IN} $info_result]} { + puts "OCC132 : OK" + } else { + puts "Faulty OCC132" + } +} diff --git a/tests/bugs/moddata/bug5696 b/tests/bugs/moddata/bug5696 new file mode 100644 index 0000000000..a8abf8aaa9 --- /dev/null +++ b/tests/bugs/moddata/bug5696 @@ -0,0 +1,21 @@ +pload QAcommands + +puts "================" +puts "OCC5696" +puts "================" +puts "" +####################################################################################### +# Exception in BRepAdaptor_CompCurve due to uninitialised variable CurIndex +####################################################################################### + +set BugNumber OCC5696 + +set info_result [OCC5696] +set index [string compare ${info_result} "par_edge = 1\n"] +if {$index != 0} { + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + + diff --git a/tests/bugs/moddata/bug5698 b/tests/bugs/moddata/bug5698 new file mode 100644 index 0000000000..56d1bde45c --- /dev/null +++ b/tests/bugs/moddata/bug5698 @@ -0,0 +1,25 @@ +puts "TODO OCC11111 ALL: Faulty OCC5698" + +pload QAcommands + +puts "============" +puts "OCC5698" +puts "============" +puts "" +###################################################### +# Incorrect result of intersection of a plane and an extrusion surface +###################################################### + +set BugNumber OCC5698 + +restore [locate_data_file OCC5698.brep] s1 + +set info_result [OCC5698 s1] + +set index [string compare ${info_result} "OK\n"] +if {$index != 0} { + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + diff --git a/tests/bugs/moddata/bug6278 b/tests/bugs/moddata/bug6278 new file mode 100644 index 0000000000..5a3919f79e --- /dev/null +++ b/tests/bugs/moddata/bug6278 @@ -0,0 +1,61 @@ +puts "============" +puts "OCC6278" +puts "============" +puts "" +###################################################### +# Fuse operation produces incorrect result +###################################################### + +set BugNumber OCC6278 + +restore [locate_data_file OCC6278-A.brep] a +restore [locate_data_file OCC6278-B.brep] b + +bfuse result a b +explode result v + +set nb_v_good 4 + +set DumpList [dump result_2] +if {[llength ${DumpList}] < 40} { + puts "Faulty ${BugNumber}: bad format of dump" +} else { + regexp { *- *Point *3D *: *([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} ${DumpList} full x y z + puts $x + puts $y + puts $z + + set percent_max 0.1 + + set x [lindex ${DumpList} 37] + set y [lindex ${DumpList} 38] + set z [lindex ${DumpList} 39] + + set x [string range ${x} 0 end-1] + set y [string range ${y} 0 end-1] + + set good_x -32.3042674857046 + set good_y 20.0000000000001 + set good_z 0. + + set Percent_x [expr abs(${x} - ${good_x}) / abs(${good_x}) * 100.] + set Percent_y [expr abs(${y} - ${good_y}) / abs(${good_y}) * 100.] + if {${z} == 0.} { + set Percent_z 0. + } else { + set Percent_z [expr abs(${good_z} - ${z}) / abs(${z}) * 100.] + } + + if {${Percent_x} > ${percent_max}} { + puts "Faulty ${BugNumber}: bad value of x = ${x}" + } + if {${Percent_y} > ${percent_max}} { + puts "Faulty ${BugNumber}: bad value of y = ${y}" + } + if {${Percent_z} > ${percent_max}} { + puts "Faulty ${BugNumber}: bad value of z = ${z}" + } +} + +set length 278.725 +set 3dviewer 2 diff --git a/tests/bugs/moddata/bug6412 b/tests/bugs/moddata/bug6412 new file mode 100644 index 0000000000..2521030190 --- /dev/null +++ b/tests/bugs/moddata/bug6412 @@ -0,0 +1,33 @@ +puts "========" +puts "OCC6412" +puts "========" +puts "" +#################################################### +## Regression in visualization +#################################################### + +set BugNumber OCC6412 + +restore [locate_data_file OCC6412.brep] result + +tclean result +vinit +vdisplay result +vsetdispmode result 1 + +isos result 0 +triangles result + +set tri 0 +set nod 0 +set tri_info [trinfo result] +regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri +regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod +if { ${tri} == 0 && ${nod} == 0 } { + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + +set 3dviewer 0 + diff --git a/tests/bugs/moddata/bug6450_1 b/tests/bugs/moddata/bug6450_1 new file mode 100644 index 0000000000..2fcb1e3568 --- /dev/null +++ b/tests/bugs/moddata/bug6450_1 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC6450" +puts "============" +puts "" +###################################################### +# Cannot get common part of two parallel halfspaces +###################################################### + +set BugNumber OCC6450 + +plane pl 100 0 0 1 0 0 +mkface f pl +halfspace so1 f 0 0 0 +ttranslate f -200 0 0 +halfspace so2 f 0 0 0 +bcommon result so1 so2 +if {[dtyp result] == ""} { + puts "Faulty ${BugNumber}: operation failed" +} else { + puts "OK ${BugNumber}" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug6450_2 b/tests/bugs/moddata/bug6450_2 new file mode 100644 index 0000000000..6acfde9fae --- /dev/null +++ b/tests/bugs/moddata/bug6450_2 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC6450" +puts "============" +puts "" +###################################################### +# Cannot get common part of two parallel halfspaces +###################################################### + +set BugNumber OCC6450 + +plane pl 100 0 0 1 0 0 +mkface f pl +halfspace so1 f 0 0 0 +ttranslate f -200 0 0 +trotate f 0 0 0 0 0 1 45 +halfspace so2 f 0 0 0 +bcommon result so1 so2 +if {[dtyp result] == ""} { + puts "Faulty ${BugNumber}: operation failed" +} else { + puts "OK ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug6474 b/tests/bugs/moddata/bug6474 new file mode 100644 index 0000000000..97c93c567a --- /dev/null +++ b/tests/bugs/moddata/bug6474 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC6474" +puts "============" +puts "" +###################################################### +# Incorrect result of intersection of a plane and an extrusion surface +###################################################### + +set BugNumber OCC6474 + +restore [locate_data_file OCC6474-s1.draw] s1 +restore [locate_data_file OCC6474-s2.draw] s2 + +intersect result s1 s2 + +if {[llength [directory res*]] != 1} { + puts "Faulty ${BugNumber}: more than 1 intersection line is got" +} else { + puts "OK ${BugNumber}" +} + +set 3dviewer 1 diff --git a/tests/bugs/moddata/bug6503 b/tests/bugs/moddata/bug6503 new file mode 100644 index 0000000000..8c7c1cc372 --- /dev/null +++ b/tests/bugs/moddata/bug6503 @@ -0,0 +1,83 @@ +puts "================" +puts "OCC6503" +puts "================" +puts "" +####################################################################################### +# Incorrect calculation of bounding box for infinite surfaces +####################################################################################### + +set BugNumber OCC6503 + +proc GetPercent {Value GoodValue} { + set Percent 0. + if {${GoodValue} != 0.} { + set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] + } elseif {${Value} != 0.} { + set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] + } else { + set Percent 0. + } + return ${Percent} +} + +plane pl 0 0 0 0 0 1 +mkface f pl +set info_result [bounding f] + +set x1 [lindex ${info_result} 0] +set y1 [lindex ${info_result} 1] +set z1 [lindex ${info_result} 2] +set x2 [lindex ${info_result} 3] +set y2 [lindex ${info_result} 4] +set z2 [lindex ${info_result} 5] + +set good_x1 -1e+100 +set good_y1 -1e+100 +set good_z1 -9.9999999999999995e-08 +set good_x2 1e+100 +set good_y2 1e+100 +set good_z2 9.9999999999999995e-08 + +set percent_max 0.1 +set status 0 + +set x1_percent [GetPercent ${x1} ${good_x1}] +set y1_percent [GetPercent ${y1} ${good_y1}] +set z1_percent [GetPercent ${z1} ${good_z1}] +set x2_percent [GetPercent ${x2} ${good_x2}] +set y2_percent [GetPercent ${y2} ${good_y2}] +set z2_percent [GetPercent ${z2} ${good_z2}] + +if {${x1_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : x1 is wrong" + set status 1 +} +if {${y1_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : y1 is wrong" + set status 1 +} +if {${z1_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : z1 is wrong" + set status 1 +} +if {${x2_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : x2 is wrong" + set status 1 +} +if {${y2_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : y2 is wrong" + set status 1 +} +if {${z2_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : z2 is wrong" + set status 1 +} + +if { ${status} == 0 } { + puts "${BugNumber}: OK" +} else { + puts "${BugNumber}: Faulty" +} + +set 3dviewer 0 + diff --git a/tests/bugs/moddata/bug6862_1 b/tests/bugs/moddata/bug6862_1 new file mode 100644 index 0000000000..c7c40679cc --- /dev/null +++ b/tests/bugs/moddata/bug6862_1 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# self-intersection test +restore [locate_data_file OCC497a.brep] a_1 +restore [locate_data_file OCC497b.brep] a_2 + +decho off +set resstr [bopargcheck a_2] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug6862_2 b/tests/bugs/moddata/bug6862_2 new file mode 100644 index 0000000000..b390a3a97e --- /dev/null +++ b/tests/bugs/moddata/bug6862_2 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# self-intersection test +restore [locate_data_file OCC497e.brep] a_1 +restore [locate_data_file OCC497f.brep] a_2 + +decho off +set resstr [bopargcheck a_2] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug6862_3 b/tests/bugs/moddata/bug6862_3 new file mode 100644 index 0000000000..354c8a360f --- /dev/null +++ b/tests/bugs/moddata/bug6862_3 @@ -0,0 +1,30 @@ +puts "TODO OCC111111 ALL: Faulty OCC6862" + +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test small edges +restore [locate_data_file OCC651a.brep] a +restore [locate_data_file OCC651b.brep] b + +puts "Checking shapes: bopargcheck a b /FTVEIP ..." +decho off +set resstr [bopargcheck a b /FTVEIP] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 + + diff --git a/tests/bugs/moddata/bug6862_4 b/tests/bugs/moddata/bug6862_4 new file mode 100644 index 0000000000..6b0e1ea5ae --- /dev/null +++ b/tests/bugs/moddata/bug6862_4 @@ -0,0 +1,28 @@ +puts "TODO OCC111111 ALL: Faulty OCC6862" + +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test small edges +restore [locate_data_file OCC651a.brep] a + +decho off +puts "Checking shapes: bopargcheck a b /FTVEIP ..." +set resstr [bopargcheck a /FTVEIP] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug6862_5 b/tests/bugs/moddata/bug6862_5 new file mode 100644 index 0000000000..738b2a7ce7 --- /dev/null +++ b/tests/bugs/moddata/bug6862_5 @@ -0,0 +1,26 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test types +box b1 10 20 10 +box b2 20 10 10 +explode b2 f + +decho off +set resstr [bopargcheck b1 b2_1 -C /RFTVEI] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug6862_6 b/tests/bugs/moddata/bug6862_6 new file mode 100644 index 0000000000..72b6a61273 --- /dev/null +++ b/tests/bugs/moddata/bug6862_6 @@ -0,0 +1,27 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +puts "TODO OCC111111 ALL: Faulty OCC6862" + +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test small edges +restore [locate_data_file OCC726.brep] a +explode a + +decho off +set resstr [bopargcheck a_1 a_2 -O /FTVEI] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug6862_7 b/tests/bugs/moddata/bug6862_7 new file mode 100644 index 0000000000..5ea0d6d597 --- /dev/null +++ b/tests/bugs/moddata/bug6862_7 @@ -0,0 +1,37 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# face verification +box b1 10 20 10 +box b2 20 10 10 +explode b1 f +explode b2 f +bcut r1 b1_6 b2_6 +bcommon r2 b1_6 b2_6 +explode r1 w +explode r2 w +mksurface gs b1_6 +mkface ff gs +add r1_1 ff +add r2_1 ff + +decho off +set resstr [bopargcheck ff b2_6 -F /RTVEIP] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 + + diff --git a/tests/bugs/moddata/bug6862_8 b/tests/bugs/moddata/bug6862_8 new file mode 100644 index 0000000000..80f386f041 --- /dev/null +++ b/tests/bugs/moddata/bug6862_8 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test possibility to merge vertices +box b1 10 20 10 +box b2 20 10 10 +explode b1 e +explode b2 e +tcopy b2_10 ee2 +compound b2_10 ee2 comp +donl b1_10 comp + +decho off +set resstr [bopargcheck b1_10 comp -O /RFTEIP] +decho on + +if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug6862_9 b/tests/bugs/moddata/bug6862_9 new file mode 100644 index 0000000000..4f790dcd86 --- /dev/null +++ b/tests/bugs/moddata/bug6862_9 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC6862" +puts "============" +puts "" +####################################################################### +# Tool for checking arguments of Boolean Operations +####################################################################### + +set BugNumber OCC6862 + +# test possibility to merge edges +box b1 10 20 10 +box b2 20 10 10 +explode b1 e +explode b2 e +tcopy b2_10 ee2 +wire ww b2_10 ee2 +donl b1_10 ww + +decho off +set resstr [bopargcheck b1_10 ww -O /RFTVIP] +decho on + +if { $resstr=="Faulties, that can not be treated by BOP, are detected.\n" } { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/moddata/bug7372 b/tests/bugs/moddata/bug7372 new file mode 100644 index 0000000000..5478ffbdf0 --- /dev/null +++ b/tests/bugs/moddata/bug7372 @@ -0,0 +1,37 @@ +pload QAcommands + +puts "================" +puts "OCC7372" +puts "================" +puts "" +####################################################################################### +# Invalid conversion 2D periodic BSpline curve to Bezier segments +####################################################################################### + +set BugNumber OCC7372 + +OCC7372 + +set mistake 0 +set len [llength [directory segment*]] +if { ${len} != 5 } { + puts "Faulty ${BugNumber} : segment number is wrong" + set mistake 1 +} else { + set good_length 73.3203 + regexp {The length .* is ([-0-9.+eE]+)} [length segment_5] full current_length + if { [expr 1.*abs($good_length - $current_length)/$good_length * 100] > 0.1 } { + puts "Faulty ${BugNumber} : length is wrong for segment_5" + set mistake 1 + } + renamevar segment_5 result +} + +if { ${mistake} != 0 } { + puts "Faulty ${BugNumber}" +} else { + puts "OK ${BugNumber}" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata/bug8169 b/tests/bugs/moddata/bug8169 new file mode 100644 index 0000000000..193f62818e --- /dev/null +++ b/tests/bugs/moddata/bug8169 @@ -0,0 +1,26 @@ +pload QAcommands + +puts "============" +puts "OCC8169" +puts "============" +puts "" +####################################################################### +# Wrong Geom2dAPI_InterCurveCurve segment +####################################################################### + +set BugNumber OCC6768 + +restore [locate_data_file OCC8169_1.brep] e1 +restore [locate_data_file OCC8169_2.brep] e2 + +plane p 0 0 500 0 0 1 1 0 0 +dump p +mkface result p + +if { [regexp {Faulty} [OCC8169 e1 e2 result]] == 0 } { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} + +set 2dviewer 0 diff --git a/tests/bugs/step/bug2368 b/tests/bugs/step/bug2368 new file mode 100644 index 0000000000..46dfe0d928 --- /dev/null +++ b/tests/bugs/step/bug2368 @@ -0,0 +1,18 @@ +puts "TODO OCC12345 ALL: Error on Record" +puts "TODO OCC12345 ALL: OCC2368: Error during reading attached IGES file" + +puts "============" +puts "OCC2368" +puts "============" +puts "" +###################################################### +# Exeption is raised in the application during reading attached IGES file. +###################################################### + +set list [stepread [locate_data_file OCC2368.stp] a *] +if {[lsearch ${list} Error] > -1} { + puts "OCC2368: Error during reading attached IGES file" +} else { + puts "OCC2368: OK" +} + diff --git a/tests/bugs/step/bug5099 b/tests/bugs/step/bug5099 new file mode 100644 index 0000000000..b71df43c5e --- /dev/null +++ b/tests/bugs/step/bug5099 @@ -0,0 +1,14 @@ +puts "============" +puts "OCC5099" +puts "============" +puts "" +###################################################### +# After translation attached file obtained shape is invalid. +###################################################### + +stepread [locate_data_file OCC5099.stp] a * +tpcompound result + +checkshape result + +set 2dviewer 0 diff --git a/tests/bugs/step/bug5215 b/tests/bugs/step/bug5215 new file mode 100644 index 0000000000..211a083b56 --- /dev/null +++ b/tests/bugs/step/bug5215 @@ -0,0 +1,14 @@ +puts "============" +puts "OCC5215" +puts "============" +puts "" +###################################################### +# Problem with splitting face +###################################################### + +stepread [locate_data_file trj4_k1_geo-md-203.stp] a * +tpcompound result + +checkshape result + +set 2dviewer 0 diff --git a/tests/bugs/step/bug5708 b/tests/bugs/step/bug5708 new file mode 100644 index 0000000000..189d9fdd65 --- /dev/null +++ b/tests/bugs/step/bug5708 @@ -0,0 +1,21 @@ +puts "============" +puts "OCC5708" +puts "OCC6284" +puts "============" +puts "" +###################################################### +# New feature for fixing position vertices made during project COLORVIZ +# Following after bug OCC5708. Exception during reading on the file attached to the bug OCC5708 +###################################################### + +cpulimit 3000 + +set BugNumber OCC5708 + +#set env(CSF_STEPDefaults) ${filedir}/OCC5708_STEPDefaults/. + +stepread [locate_data_file OCC5708.step] a * +tpcompound result + +set 3dviewer 1 + diff --git a/tests/bugs/vis/bug10 b/tests/bugs/vis/bug10 new file mode 100644 index 0000000000..ce5182ee91 --- /dev/null +++ b/tests/bugs/vis/bug10 @@ -0,0 +1,16 @@ +puts "================" +puts "OCC10" +puts "================" +puts "" + +vinit +box b 10 10 10 +explode b f +vdisplay b_1 +vfit + +set ll 5 + +OCC10 trihedron1 b_1 ${ll} + +set only_screen 1 diff --git a/tests/bugs/vis/bug113 b/tests/bugs/vis/bug113 new file mode 100644 index 0000000000..18902499bd --- /dev/null +++ b/tests/bugs/vis/bug113 @@ -0,0 +1,69 @@ +puts "================" +puts "OCC113" +puts "BUC60978" +puts "================" +puts "" + +# Data +set X_01 29 +set Y_01 170 + +set X_02 204 +set Y_02 300 + +set scale 60.6309 +set center_X 7.07107 +set center_Y 4.08248 +set proj_X 0.479541 +set proj_Y 0.586729 +set proj_Z 0.652525 +set up_X -0.838029 +set up_Y 0.0856396 +set up_Z 0.538863 +set at_X 8.87741 +set at_Y -2.73728 +set at_Z 4.68363 + +# Display two face +vinit +box b 10 10 10 +explode b f +vdisplay b_1 +vdisplay b_2 +vfit + +QAUpdateLights + +# Check face color +checkcolor ${X_01} ${Y_01} 0 1 0 +checkcolor ${X_02} ${Y_02} 0 1 0 + +# Select faces +QAAddOrRemoveSelected b_1 +QAAddOrRemoveSelected b_2 + +# Check face color +QAUpdateLights +checkcolor ${X_01} ${Y_01} 0.8 0.8 0.8 + +QAUpdateLights +checkcolor ${X_02} ${Y_02} 0.8 0.8 0.8 + +# Hilight face +QAMoveTo ${X_01} ${Y_01} +QAMoveTo ${X_01} ${Y_01} + +# Check face color +QAUpdateLights +QASelect 10 10 +QAMoveTo ${X_01} ${Y_01} +checkcolor ${X_01} ${Y_01} 0 1 1 + +QAUpdateLights +QAMoveTo ${X_02} ${Y_02} +checkcolor ${X_02} ${Y_02} 0 1 1 + +# Rotation +QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z} + +set only_screen 1 diff --git a/tests/bugs/vis/bug1174 b/tests/bugs/vis/bug1174 new file mode 100644 index 0000000000..fdfe97da34 --- /dev/null +++ b/tests/bugs/vis/bug1174 @@ -0,0 +1,74 @@ +puts "================" +puts "OCC1174" +puts "================" +puts "" +######################################################################################## +# puts "Impossible to set different properties for different sides of a (sur)face" +######################################################################################## + +set x 200 +set y 200 + +set Black_R 0 +set Black_G 0 +set Black_B 0 + +restore [locate_data_file OCC1174.brep] a +vinit +OCC1174_1 a +vdisplay a +vfit + +set scale 2.50501 +set center_X 191.285 +set center_Y 76.6556 +set proj_X 0.672033 +set proj_Y -0.721033 +set proj_Z 0.168771 +set up_X -0.131494 +set up_Y 0.108095 +set up_Z 0.985406 +set at_X -27.258 +set at_Y 30.2321 +set at_Z -9.0201 + +QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z} + +set x_GREEN 300 +set y_GREEN 180 + +set x_BLUE 180 +set y_BLUE 250 + +QAUpdateLights + +set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}] +regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1 +regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1 +regexp {BLUE +: +([-0-9.+eE]+)} $ColorList1 full BLUE_1 + +set ColorList2 [QAGetPixelColor ${x_BLUE} ${y_BLUE}] +regexp {RED +: +([-0-9.+eE]+)} $ColorList2 full RED_2 +regexp {GREEN +: +([-0-9.+eE]+)} $ColorList2 full GREEN_2 +regexp {BLUE +: +([-0-9.+eE]+)} $ColorList2 full BLUE_2 + +if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} { + set IsGreen 1 +} else { + set IsGreen 0 +} + +if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} { + set IsBlue 1 +} else { + set IsBlue 0 +} + +if {${IsGreen} == 1 && ${IsBlue} == 1} { + puts "OCC1174: OK" +} else { + puts "OCC1174: Error" +} + +set only_screen 1 + diff --git a/tests/bugs/vis/bug1188 b/tests/bugs/vis/bug1188 new file mode 100644 index 0000000000..c2d2e47a95 --- /dev/null +++ b/tests/bugs/vis/bug1188 @@ -0,0 +1,20 @@ +puts "================" +puts "OCC1188" +puts "Impossible to set background image for V3d_View" +puts "================" +puts "" + +set x 200 +set y 200 + +vinit + +OCC1188 [locate_data_file OCC1188.gif] + +QAUpdateLights +checkcolor $x $y 0.99 0.99 0.99 +if { ${stat} != 1} { + puts "OCC1188: Error" +} + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_10 b/tests/bugs/vis/bug137_10 new file mode 100644 index 0000000000..a7aeff62f3 --- /dev/null +++ b/tests/bugs/vis/bug137_10 @@ -0,0 +1,34 @@ +if { [array get env os_type] != "" } { + set os $env(os_type) +} +if { [string compare $os "windows"] != 0 } { + puts "TODO OCC12345 ALL: An exception was caught" + puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*" + puts "TODO OCC12345 ALL: TEST INCOMPLETE" +} + +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING" +puts "" + +pload XDE + +igesbrep [locate_data_file OCC137-ANC101-Solid.igs] a * +tpcompound a +vinit +vdisplay a +vfit +vsetdispmode 1 + +QASetChoiceMode FACE ON +set x 170 +set y 80 +QASelect $x $y +QASelect $x $y + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_11 b/tests/bugs/vis/bug137_11 new file mode 100644 index 0000000000..909962ecd5 --- /dev/null +++ b/tests/bugs/vis/bug137_11 @@ -0,0 +1,34 @@ +if { [array get env os_type] != "" } { + set os $env(os_type) +} +if { [string compare $os "windows"] != 0 } { + puts "TODO OCC12345 ALL: An exception was caught" + puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*" + puts "TODO OCC12345 ALL: TEST INCOMPLETE" +} + +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING" +puts "" + +pload XDE + +stepread [locate_data_file OCC137-ANC101-Solid.stp] a * +tpcompound a +vinit +vdisplay a +vfit +vsetdispmode 1 + +QASetChoiceMode FACE ON +set x 170 +set y 80 +QASelect $x $y +QASelect $x $y + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_6 b/tests/bugs/vis/bug137_6 new file mode 100644 index 0000000000..87040a1639 --- /dev/null +++ b/tests/bugs/vis/bug137_6 @@ -0,0 +1,16 @@ +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SHAPE SHADING" +puts "" + +restore [locate_data_file OCC137-ANC101-Solid.brep] a +vinit +vdisplay a +vfit +vsetdispmode 1 + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_7 b/tests/bugs/vis/bug137_7 new file mode 100644 index 0000000000..dbee1a0001 --- /dev/null +++ b/tests/bugs/vis/bug137_7 @@ -0,0 +1,20 @@ +#INTERFACE IGES +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SHAPE SHADING" +puts "" + +pload XDE + +igesbrep [locate_data_file OCC137-ANC101-Solid.igs] a * +tpcompound a +vinit +vdisplay a +vfit +vsetdispmode 1 + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_8 b/tests/bugs/vis/bug137_8 new file mode 100644 index 0000000000..90ad528591 --- /dev/null +++ b/tests/bugs/vis/bug137_8 @@ -0,0 +1,19 @@ +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SHAPE SHADING" +puts "" + +pload XDE + +stepread [locate_data_file OCC137-ANC101-Solid.stp] a * +tpcompound a +vinit +vdisplay a +vfit +vsetdispmode 1 + +set only_screen 1 diff --git a/tests/bugs/vis/bug137_9 b/tests/bugs/vis/bug137_9 new file mode 100644 index 0000000000..4064e99b9b --- /dev/null +++ b/tests/bugs/vis/bug137_9 @@ -0,0 +1,31 @@ +if { [array get env os_type] != "" } { + set os $env(os_type) +} +if { [string compare $os "windows"] != 0 } { + puts "TODO OCC12345 ALL: An exception was caught" + puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*" + puts "TODO OCC12345 ALL: TEST INCOMPLETE" +} + +puts "================" +puts "OCC137" +puts "================" +# +# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0 +# +puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING" +puts "" + +restore [locate_data_file OCC137-ANC101-Solid.brep] a +vinit +vdisplay a +vfit +vsetdispmode 1 + +QASetChoiceMode FACE ON +set x 170 +set y 80 +QASelect $x $y +QASelect $x $y + +set only_screen 1 diff --git a/tests/bugs/vis/bug166 b/tests/bugs/vis/bug166 new file mode 100644 index 0000000000..0273c68138 --- /dev/null +++ b/tests/bugs/vis/bug166 @@ -0,0 +1,14 @@ +puts "=================" +puts "OCC166" +puts "=================" +puts "" + +vinit + +if [ catch { OCC166 } res ] then { + puts "OCC166: Error" +} else { + puts "OCC166: OK" +} + +set only_screen 1 diff --git a/tests/bugs/vis/bug186 b/tests/bugs/vis/bug186 new file mode 100644 index 0000000000..f45b34da4c --- /dev/null +++ b/tests/bugs/vis/bug186 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC186" +puts "========" + +v2dinit +v2dcircle circle 0 0 5 +set zoom_factor 10000000 +QAv2dzoom ${zoom_factor} + +set only_screen2d 1 + diff --git a/tests/bugs/vis/bug200 b/tests/bugs/vis/bug200 new file mode 100644 index 0000000000..48ae1c6eac --- /dev/null +++ b/tests/bugs/vis/bug200 @@ -0,0 +1,23 @@ +puts "========" +puts "OCC200" +puts "========" +puts "" + +####################################################### +##puts "2D Viewer. Changing of background color from BLACK to R (R is missing color name)" +##puts "(visual checking for this case is desirable)" +####################################################### + +set mistake 0 +v2dinit +if [catch {v2dsetbgcolor R} ] { + set mistake 1 +} + +if {$mistake != 0} { + puts "Faulty : Changing of backgroundcolor was NOT MADE properly" +} else { + puts "Changing of backgroundcolor was made properly" +} + +set only_screen2d 1 diff --git a/tests/bugs/vis/bug2066 b/tests/bugs/vis/bug2066 new file mode 100644 index 0000000000..a7931331eb --- /dev/null +++ b/tests/bugs/vis/bug2066 @@ -0,0 +1,24 @@ +puts "================" +puts "OCC2066" +puts "================" +puts "" +####################################################################################### +# CRASH in AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr) +####################################################################################### + +box b 10 10 10 +box b2 20 20 20 10 10 10 +vinit +vdisplay b b2 +vfit +verase b +set CollectorToo 1 + +if [catch {QAPurgeDisplay $CollectorToo} result] { + puts "Faulty OCC2066" +} else { + puts "OK OCC2066" +} + +set only_screen 1 + diff --git a/tests/bugs/vis/bug223 b/tests/bugs/vis/bug223 new file mode 100644 index 0000000000..c81c62338e --- /dev/null +++ b/tests/bugs/vis/bug223 @@ -0,0 +1,64 @@ +puts "========" +puts "OCC223" +puts "========" +puts "" +###################################################### +# Shading is not correct for several overlapped faces, converted to B-Spline representation +###################################################### + +restore [locate_data_file OCC223-1.brep] cylinder +checkshape cylinder +restore [locate_data_file OCC223-2.brep] face +checkshape face + +set Start_X 140 +set Start_Y 40 + +vinit +tclean cylinder +tclean face + +vdisplay cylinder +vdisplay face +vfit + +vsetdispmode face 1 +vsetcolor face GREEN1 + +vsetdispmode cylinder 1 +vsetcolor cylinder RED1 + +QAUpdateLights +set ColorList [QAGetPixelColor $Start_X $Start_Y] +regexp {RED +: +([-0-9.+eE]+)} $ColorList full R_START_POINT +regexp {GREEN +: +([-0-9.+eE]+)} $ColorList full G_START_POINT +regexp {BLUE +: +([-0-9.+eE]+)} $ColorList full B_START_POINT + +puts "R_START_POINT=$R_START_POINT ; G_START_POINT=$G_START_POINT ; B_START_POINT=$B_START_POINT" + +set IsGood 1 +for {set count 0} {${count} <= 11} {incr count 1} { + QAUpdateLights + checkcolor $Start_X $Start_Y $R_START_POINT $G_START_POINT $B_START_POINT + if {$stat != 1} { + set IsGood 0 + } + incr $Start_X 10 + incr $Start_Y 10 +} + +if {$IsGood == 1} { + puts "\nOCC223 OK\n" +} else { + puts "\nFaulty OCC223\n" +} + +set only_screen 1 + +puts "\n------- Additional Comments From Igor FEOKTISTOV 2002-05-20 12:32 -------\n" + +puts "It is not problem of meshing." +puts "It is pure problem of shading geometrically coinciding faces with different" +puts "triangulation. If we create analitical cylinder and box by such way that plane" +puts "faces of cylinder and two faces of box are coinceded, we will have the same" +puts "result: fractional shading of coinciding faces.\n" diff --git a/tests/bugs/vis/bug230_1 b/tests/bugs/vis/bug230_1 new file mode 100644 index 0000000000..a530225817 --- /dev/null +++ b/tests/bugs/vis/bug230_1 @@ -0,0 +1,17 @@ +puts "========" +puts "OCC230" +puts "OCC489" +puts "========" +puts "" +############################################ +## Numeric Error occures in V2d_View::WindowFit() , Magnify() +############################################ + +point p1 0 10 +point p2 10 20 + +if [catch { OCC230 tc p1 p2 } ] { + puts "OCC230: Error" +} else { + puts "OCC230: OK" +} diff --git a/tests/bugs/vis/bug230_2 b/tests/bugs/vis/bug230_2 new file mode 100644 index 0000000000..5abb7f7e16 --- /dev/null +++ b/tests/bugs/vis/bug230_2 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC230" +puts "OCC489" +puts "========" +puts "" +############################################ +## Numeric Error occures in V2d_View::WindowFit() , Magnify() +############################################ + +point p1 0 10 +point p2 10 20 + +if [catch { OCC230 tc p2 p1 } ] { + puts "OCC230: Error" +} else { + puts "OCC230: OK" +} + diff --git a/tests/bugs/vis/bug23652 b/tests/bugs/vis/bug23652 index 8a714b17de..7c638215ca 100755 --- a/tests/bugs/vis/bug23652 +++ b/tests/bugs/vis/bug23652 @@ -1,16 +1,36 @@ -puts "============" -puts "CR23652" -puts "============" -puts "" -####################################################################### -# Non zoomable text with alignment slides away when zooming view -####################################################################### +puts "========" +puts "OCC23652" +puts "========" + +############################################################################### +# Non zoomable text with alignment slides away when zooming view +############################################################################### -pload AISV vinit vtrihedron tri -vdrawtext Default 0.0 0.0 0.0 255 255 255 0 0 0 0 20 0 -vdrawtext Right_Align 0.0 0.0 0.0 255 255 255 2 0 0 0 20 0 -vfit +vdrawtext Default 0.0 0.0 0.0 255 255 255 0 0 0 1 20 0 +vdrawtext Right_Align 0.0 0.0 0.0 255 255 255 2 0 0 1 20 0 + +set scale 3.1783114563761763 +set center_X 0 +set center_Y 0 +set proj_X 0.57735025882720947 +set proj_Y -0.57735025882720947 +set proj_Z 0.57735025882720947 +set up_X -0.40824827551841736 +set up_Y 0.40824827551841736 +set up_Z 0.81649655103683472 +set at_X 0 +set at_Y 0 +set at_Z 0 + +QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z} + +set x_coord 36 +set y_coord 201 + +checkcolor $x_coord $y_coord 0.6 0.6 0.6 + +set only_screen 1 + -set 3dviewer 7 diff --git a/tests/bugs/vis/bug270_1 b/tests/bugs/vis/bug270_1 new file mode 100644 index 0000000000..6f86447e8f --- /dev/null +++ b/tests/bugs/vis/bug270_1 @@ -0,0 +1,28 @@ +puts "========" +puts "OCC270" +puts "========" + +vinit +box box 10 10 10 +vaxis axis 1 1 1 7 7 7 +vdisplay box +vdisplay axis +vsetdispmode 1 + +set x1 172 +set y1 223 + +QAUpdateLights +checkcolor ${x1} ${y1} 1 0 0 + +QASetZClippingMode FRONT +set ZClippingMode [lindex [QAGetZClippingMode] 2] +if {${ZClippingMode} != "FRONT"} { + puts "OCC270: Error (ZClippingMode != FRONT)" +} + +QAUpdateLights +checkcolor ${x1} ${y1} 1 0 0 +vfit + +set only_screen 1 diff --git a/tests/bugs/vis/bug270_2 b/tests/bugs/vis/bug270_2 new file mode 100644 index 0000000000..1fbe12488e --- /dev/null +++ b/tests/bugs/vis/bug270_2 @@ -0,0 +1,28 @@ +puts "========" +puts "OCC270" +puts "========" + +vinit +box box 10 10 10 +vaxis axis 1 1 1 7 7 7 +vdisplay box +vdisplay axis +vsetdispmode 0 + +set x1 172 +set y1 223 + +QAUpdateLights +checkcolor ${x1} ${y1} 1 0 0 + +QASetZClippingMode FRONT +set ZClippingMode [lindex [QAGetZClippingMode] 2] +if {${ZClippingMode} != "FRONT"} { + puts "OCC270: Error (ZClippingMode != FRONT)" +} + +QAUpdateLights +checkcolor ${x1} ${y1} 1 0 0 +vfit + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_1 b/tests/bugs/vis/bug281_1 new file mode 100644 index 0000000000..fc680ed1c3 --- /dev/null +++ b/tests/bugs/vis/bug281_1 @@ -0,0 +1,33 @@ +puts "========" +puts "OCC281" +puts "========" + +vinit + +set x 205 +set y 208 +set TypeOfMarker 0 + +set scale 50.0521 +set center_X 0 +set center_Y 0 +set proj_X 0.57735 +set proj_Y -0.57735 +set proj_Z 0.57735 +set up_X -0.408248 +set up_Y 0.408248 +set up_Z 0.816497 +set at_X 0 +set at_Y 0 +set at_Z 0 + +QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z} + +OCC281 ${x} ${y} ${TypeOfMarker} +OCC281 ${x} ${y} ${TypeOfMarker} + +OCC281 200 200 0 +OCC281 200 200 0 +puts "Type of marker mast be blue point!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_10 b/tests/bugs/vis/bug281_10 new file mode 100644 index 0000000000..0da2067203 --- /dev/null +++ b/tests/bugs/vis/bug281_10 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts '' + +vinit + +OCC281 200 290 9 +OCC281 200 290 9 +puts "Type of marker mast be a ball with 1 color and different saturations!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_11 b/tests/bugs/vis/bug281_11 new file mode 100644 index 0000000000..05b92636d5 --- /dev/null +++ b/tests/bugs/vis/bug281_11 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts '' + +vinit + +OCC281 200 300 10 +OCC281 200 300 10 +puts "Type of marker mast be blue large ring!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_12 b/tests/bugs/vis/bug281_12 new file mode 100644 index 0000000000..a58b9585f3 --- /dev/null +++ b/tests/bugs/vis/bug281_12 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts '' + +vinit + +OCC281 200 310 11 +OCC281 200 310 11 +puts "Type of marker mast be blue medium ring!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_13 b/tests/bugs/vis/bug281_13 new file mode 100644 index 0000000000..20d07ba060 --- /dev/null +++ b/tests/bugs/vis/bug281_13 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 320 12 +OCC281 200 320 12 +puts "Type of marker mast be blue small ring!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_2 b/tests/bugs/vis/bug281_2 new file mode 100644 index 0000000000..5f028e5a74 --- /dev/null +++ b/tests/bugs/vis/bug281_2 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 210 1 +OCC281 200 210 1 +puts "Type of marker mast be blue plus!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_3 b/tests/bugs/vis/bug281_3 new file mode 100644 index 0000000000..1d4d89d0c1 --- /dev/null +++ b/tests/bugs/vis/bug281_3 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 220 2 +OCC281 200 220 2 +puts "Type of marker mast be blue star!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_4 b/tests/bugs/vis/bug281_4 new file mode 100644 index 0000000000..c7727d7473 --- /dev/null +++ b/tests/bugs/vis/bug281_4 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 230 3 +OCC281 200 230 3 +puts "Type of marker mast be blue circle!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_5 b/tests/bugs/vis/bug281_5 new file mode 100644 index 0000000000..3c04dfcb3c --- /dev/null +++ b/tests/bugs/vis/bug281_5 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 240 4 +OCC281 200 240 4 +puts "Type of marker mast be blue cross!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_6 b/tests/bugs/vis/bug281_6 new file mode 100644 index 0000000000..d1ec9b7f9f --- /dev/null +++ b/tests/bugs/vis/bug281_6 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 250 5 +OCC281 200 250 5 +puts "Type of marker mast be blue point in a circle!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_7 b/tests/bugs/vis/bug281_7 new file mode 100644 index 0000000000..ab5592bf2c --- /dev/null +++ b/tests/bugs/vis/bug281_7 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 260 6 +OCC281 200 260 6 +puts "Type of marker mast be blue plus in a circle!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_8 b/tests/bugs/vis/bug281_8 new file mode 100644 index 0000000000..ff67c3e527 --- /dev/null +++ b/tests/bugs/vis/bug281_8 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 270 7 +OCC281 200 270 7 +puts "Type of marker mast be blue star in a circle!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug281_9 b/tests/bugs/vis/bug281_9 new file mode 100644 index 0000000000..4bf8d96e13 --- /dev/null +++ b/tests/bugs/vis/bug281_9 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC281" +puts "========" +puts "" + +vinit + +OCC281 200 280 8 +OCC281 200 280 8 +puts "Type of marker mast be blue cross in a circle!" + +set only_screen 1 diff --git a/tests/bugs/vis/bug294 b/tests/bugs/vis/bug294 new file mode 100644 index 0000000000..6da82a342e --- /dev/null +++ b/tests/bugs/vis/bug294 @@ -0,0 +1,29 @@ +puts "TODO OCC12345 ALL: Faulty OCC294 : result - shape_result is null" + +puts "================" +puts "OCC294" +puts "SAM1293" +puts "================" +puts "" + +restore [locate_data_file OCC294.brep] a +checkshape a + +set a_fullness [nbshapes a] +regexp {EDGE +: +([-0-9.+eE]+)} $a_fullness full a_edg + +explode a e +if [catch { OCC294 result a a_1 } ] { + puts "OCC294: FAULTY" +} else { + set b_fullness [ nbshapes b] + regexp {EDGE +: +([-0-9.+eE]+)} $b_fullness full b_edg + + puts "a_edg = ${a_edg}" + puts "b_edg = ${b_edg}" + if { ${b_edg} >= ${a_edg} } { + puts "OCC294: FAULTY" + } else { + puts "OCC294: OK" + } +} diff --git a/tests/bugs/vis/bug301 b/tests/bugs/vis/bug301 new file mode 100644 index 0000000000..81921a068e --- /dev/null +++ b/tests/bugs/vis/bug301 @@ -0,0 +1,14 @@ +puts "========" +puts "OCC301" +puts "SAM926" +puts "========" +puts "" + +vinit +OCC301 50 50 0 5 +OCC301 50 30 0 3 +vtop +vfit +puts "Angle dimensions have different arrow sizes" + +set only_screen 1 diff --git a/tests/bugs/vis/bug349 b/tests/bugs/vis/bug349 new file mode 100644 index 0000000000..bd2f4f3469 --- /dev/null +++ b/tests/bugs/vis/bug349 @@ -0,0 +1,103 @@ +puts "========" +puts "OCC349" +puts "1. Hidden line removal algorithm works incorrect in the perspective view" +puts "========" + +vinit +box b 100 900 300 +set 3dviewer 1 +vdisplay b + +OCC280 1 0 + +vfit + +set x1 165 +set y1 109 + +set x2 380 +set y2 26 + +set x3 215 +set y3 130 + +set x4 31 +set y4 199 + +set x5 188 +set y5 254 + +set x6 351 +set y6 177 + +set x7 216 +set y7 287 + +set x8 22 +set y8 373 + +set x9 2 +set y9 249 + +set x10 345 +set y10 92 + +set x11 393 +set y11 109 + +set x12 52 +set y12 284 + +# +# ___________2________________ +# /| /| +# / | / | +# / | / | +# / | / | +# / | / | +# 1 | 3 | +# / | / | +# / | / | +# / | / | +# / | / | +# ----------------4------------ | +# | | | | +# | | | | +# | | | | +# | 10 | 11 +# | | | | +# | | | | +# | | | | +# | | | | +# | | | | +# 9 | 12 | +# | |___________6____|__________| +# | / | / +# | / | / +# | / | / +# | / | / +# | 5 | / +# | / | 7 +# | / | / +# | / | / +# | / | / +# |/ |/ +# |--------------8------------| +# +# + +QAUpdateLights +checkcolor ${x1} ${y1} 1 1 0 +checkcolor ${x2} ${y2} 1 1 0 +checkcolor ${x3} ${y3} 1 1 0 +checkcolor ${x4} ${y4} 1 1 0 +checkcolor ${x7} ${y7} 1 1 0 +checkcolor ${x8} ${y8} 1 1 0 +checkcolor ${x9} ${y9} 1 1 0 +checkcolor ${x11} ${y11} 1 1 0 +checkcolor ${x12} ${y12} 1 1 0 +checkcolor ${x5} ${y5} 0 0 0 +checkcolor ${x6} ${y6} 0 0 0 +checkcolor ${x10} ${y10} 0 0 0 + +set only_screen 1 diff --git a/tests/bugs/vis/bug362 b/tests/bugs/vis/bug362 new file mode 100644 index 0000000000..bb9b8f12ac --- /dev/null +++ b/tests/bugs/vis/bug362 @@ -0,0 +1,10 @@ +puts "========" +puts "OCC362" +puts "BUC60997" +puts "========" + +smallview +box b 10 10 10 +sphere s -30 -30 -30 20 +QAwzoom 1 -86 -72 -13 10 + diff --git a/tests/bugs/vis/bug38 b/tests/bugs/vis/bug38 new file mode 100644 index 0000000000..318c83ad46 --- /dev/null +++ b/tests/bugs/vis/bug38 @@ -0,0 +1,20 @@ +puts "========" +puts "OCC38" +puts "========" + +set GAMMA_CORRECTION 0.5 +set env(Xw_SET_GAMMA_CORRECTION) ${GAMMA_CORRECTION} + +v2dinit + +set Xw_SET_GAMMA_CORRECTION [expr 1. / ${GAMMA_CORRECTION}] + +OCC404 0.7 0.7 0.7 + +set x_coord 10 +set y_coord 10 +set color2d 1 +checkcolor $x_coord $y_coord 0.6 0.6 0.6 + +set only_screen2d 1 + diff --git a/tests/bugs/vis/bug389 b/tests/bugs/vis/bug389 new file mode 100644 index 0000000000..adc4181bd2 --- /dev/null +++ b/tests/bugs/vis/bug389 @@ -0,0 +1,20 @@ +puts "================" +puts "OCC389" +puts "================" +puts "" + +v2dinit + +box b 10 10 10 + +if [catch { OCC389 proj b } res] { + puts "OCC389: Error" + puts "${res}" +} else { + puts "OCC389: OK" +} + +v2ddisplay proj +v2dfit +set only_screen2d 1 + diff --git a/tests/bugs/vis/bug402 b/tests/bugs/vis/bug402 new file mode 100644 index 0000000000..9e0d2bd691 --- /dev/null +++ b/tests/bugs/vis/bug402 @@ -0,0 +1,25 @@ +puts "========" +puts "OCC402" +puts "========" + +v2dinit + +set IndexMarker 1 +set TypeOfDetection 0 +set X 10 +set Y 10 +set Width 3 +set Height 3 +set Angle 0 + +for {set i 1} {${i} <= 14} {incr i} { + OCC402 ${IndexMarker} ${TypeOfDetection} ${X} ${Y} ${Width} ${Height} ${Angle} + incr X 10 + incr Y 10 + incr IndexMarker 1 +} + +puts "There are 14 markers in the viewer" +puts "Visual checking is required !!!!" + +set only_screen2d 1 diff --git a/tests/bugs/vis/bug403 b/tests/bugs/vis/bug403 new file mode 100644 index 0000000000..4377b77915 --- /dev/null +++ b/tests/bugs/vis/bug403 @@ -0,0 +1,35 @@ +puts "========" +puts "OCC403" +puts "========" + +v2dinit +v2dgrid Rect 0 0 10 10 0 Lines + +OCC403 RED GREEN + +puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +puts "Visual control: background is RED" +puts "Visual control: major grid lines are GREEN" +puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +puts "" + +set x_coord 175 +set y_coord 155 +set color2d 1 +checkcolor $x_coord $y_coord 1 0 0 + +if {$stat != 1} { + puts "Faulty OCC403: background has NOT RED color" +} else { + puts "OCC403 OK: background is RED" +} + +set x_coord 122 +set y_coord 105 +checkcolor $x_coord $y_coord 0 1 0 + +if {$stat != 1} { + puts "Faulty OCC403: major grid lines have NOT GREEN color" +} + +set only_screen2d 1 diff --git a/tests/bugs/vis/bug404 b/tests/bugs/vis/bug404 new file mode 100644 index 0000000000..f7077a8ed8 --- /dev/null +++ b/tests/bugs/vis/bug404 @@ -0,0 +1,65 @@ +puts "========" +puts "OCC404" +puts "========" + +v2dinit + +# +### RED +# +set R1 1 +set G1 0 +set B1 0 + +OCC404 ${R1} ${G1} ${B1} + +set x_coord 10 +set y_coord 10 +set color2d 1 +checkcolor $x_coord $y_coord 1 0 0 + +if { $stat != 1 } { + puts "OCC404: Get background color ERROR (case 1)" +} + + +# +### GREEN +# + +set R1 0 +set G1 1 +set B1 0 + +OCC404 ${R1} ${G1} ${B1} + +set x_coord 10 +set y_coord 10 +set color2d 1 +checkcolor $x_coord $y_coord 0 1 0 + +if { $stat != 1 } { + puts "OCC404: Get background color ERROR (case 2)" +} + + +# +### BLUE +# + +set R1 0 +set G1 0 +set B1 1 + +OCC404 ${R1} ${G1} ${B1} + +set x_coord 10 +set y_coord 10 +set color2d 1 +checkcolor $x_coord $y_coord 0 0 1 + +if { $stat != 1 } { + puts "OCC404: Get background color ERROR (case 2)" +} + +set only_screen2d 1 diff --git a/tests/bugs/vis/bug543 b/tests/bugs/vis/bug543 new file mode 100644 index 0000000000..fff91caa00 --- /dev/null +++ b/tests/bugs/vis/bug543 @@ -0,0 +1,30 @@ +puts "========" +puts "OCC543" +puts "========" + +v2dinit + +set X 0 +set Y 0 +set Radius 10 +set Alpha 0 +set Beta 3.14 + +QAv2dcircle Circle ${X} ${Y} ${Radius} ${Alpha} ${Beta} +v2dfit + +set x1 207 +#set y1 103 +set y1 104 + +QAMoveTo2d ${x1} ${y1} + +set result [lindex [OCC543 Circle] 2] + +if {${result} == 0} { + puts "OCC543: Error" +} + +set only_screen2d 1 + + diff --git a/tests/bugs/vis/bug544 b/tests/bugs/vis/bug544 new file mode 100644 index 0000000000..a5f2ecdf06 --- /dev/null +++ b/tests/bugs/vis/bug544 @@ -0,0 +1,50 @@ +puts "========" +puts "OCC544" +puts "========" +puts "" +################################# +## Problems with the results of MakePipeShell +################################# + +vinit +vsetdispmode 1 +OCC544 +vdisplay result +vsetmaterial result PLASTIC +vsetcolor result MATRABLUE +vsettransparency result 0.5 +vsetdispmode 1 +vfit + +set scale 2.05374 +set center_X 169.854 +set center_Y -49.5549 +set proj_X 0.135192 +set proj_Y -0.978297 +set proj_Z -0.157031 +set up_X -0.399854 +set up_Y -0.198875 +set up_Z 0.894743 +set at_X 241.985 +set at_Y 329.911 +set at_Z 390.356 + +QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z} + +set x1 300 +set y1 70 + +set x2 190 +set y2 110 + +set x3 220 +set y3 110 + +QAMoveTo ${x1} ${y1} +QAMoveTo ${x1} ${y1} + +QAUpdateLights +checkcolor $x3 $y3 0.04 0.04 0.5 + +set only_screen 1 + diff --git a/tests/bugs/vis/bug60 b/tests/bugs/vis/bug60 new file mode 100644 index 0000000000..ec25189197 --- /dev/null +++ b/tests/bugs/vis/bug60 @@ -0,0 +1,34 @@ +puts "========" +puts "OCC60" +puts "SAM723" +puts "BUC60916" +puts "========" + +vinit +box b 10 10 10 +vdisplay b +vfit + +set x_coord 83 +set y_coord 337 + +QAUpdateLights +checkcolor $x_coord $y_coord 1 1 0 + +set xmin 1 +set ymin 1 +set xmax 409 +set ymax 300 + +# Select part of box +OCC60 ${xmin} ${ymin} ${xmax} ${ymax} +OCC60 ${xmin} ${ymin} ${xmax} ${ymax} + +set Selection_R 0.8 +set Selection_G 0.8 +set Selection_B 0.8 + +QAUpdateLights +checkcolor $x_coord $y_coord 0.8 0.8 0.8 + +set only_screen 1 diff --git a/tests/bugs/vis/bug61 b/tests/bugs/vis/bug61 new file mode 100644 index 0000000000..64bea8ed11 --- /dev/null +++ b/tests/bugs/vis/bug61 @@ -0,0 +1,28 @@ +puts "========" +puts "OCC61" +puts "SAM723" +puts "BUC60919" +puts "========" + +vinit +vtrihedron trihedron + +set x_coord 205 +set y_coord 205 + +QAUpdateLights +checkcolor $x_coord $y_coord 0.43 0.48 0.54 + +set xmin 1 +set ymin 1 +set xmax 409 +set ymax 205 + +# Select part of trihedron +OCC60 ${xmin} ${ymin} ${xmax} ${ymax} +OCC60 ${xmin} ${ymin} ${xmax} ${ymax} + +QAUpdateLights +checkcolor $x_coord $y_coord 0.8 0.8 0.8 + +set only_screen 1 diff --git a/tests/bugs/vis/bug6132 b/tests/bugs/vis/bug6132 new file mode 100644 index 0000000000..048979f1d9 --- /dev/null +++ b/tests/bugs/vis/bug6132 @@ -0,0 +1,15 @@ +puts "================" +puts "OCC6132" +puts "================" +puts "" +####################################################################################### +# Bad isos presentation in Draw for a face built on a periodic surface +####################################################################################### + +set BugNumber OCC6132 + +restore [locate_data_file OCC6132.brep] result +checkshape result + +set 2dviewer 1 + diff --git a/tests/bugs/vis/bug627 b/tests/bugs/vis/bug627 new file mode 100644 index 0000000000..4674e5ab9d --- /dev/null +++ b/tests/bugs/vis/bug627 @@ -0,0 +1,27 @@ +puts "========" +puts "OCC627" +puts "========" + +v2dinit +v2dcircle circle 0 0 5 +v2dfit + +set i 10 +for {set j 1} {${j} <= ${i}} {incr j} { + v2derase circle + v2ddisplay circle +} + +set k [lindex [OCC627] 2] + +if {${k} != 1} { + puts "Sequence length = ${k}" + puts "OCC627: Error" +} + +set only_screen2d 1 + + + + + diff --git a/tests/bugs/vis/bug71 b/tests/bugs/vis/bug71 new file mode 100644 index 0000000000..8fdebc1231 --- /dev/null +++ b/tests/bugs/vis/bug71 @@ -0,0 +1,55 @@ +puts "================" +puts "OCC71" +puts "BUC61045" +puts "================" +puts "" + +# Data +set Triedron_X 29 +set Triedron_Y 380 + +set Shape_X 120 +set Shape_Y 250 + +# Display box +vinit +box b 10 10 10 +vdisplay b + +# Display triedron +OCC71 +vfit + +# Check triedron color +checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1 + +# Shading box +vsetdispmode b 1 + +# Check box color +checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09 + +# Check triedron color +checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1 + +# Select box +QASelect ${Shape_X} ${Shape_Y} +QASelect ${Shape_X} ${Shape_Y} + +# Check box color +checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09 + +# Check triedron color +checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1 + +# Select empty view +QASelect 1 1 +QASelect 1 1 + +# Check box color +checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09 + +# Check triedron color +checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1 + +set only_screen 1 diff --git a/tests/bugs/vis/bug74 b/tests/bugs/vis/bug74 new file mode 100644 index 0000000000..212b0786f0 --- /dev/null +++ b/tests/bugs/vis/bug74 @@ -0,0 +1,251 @@ +puts "TODO ?OCC12345 ALL: An exception was caught" +puts "TODO ?OCC12345 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO ?OCC12345 ALL: TEST INCOMPLETE" + +puts "================" +puts "OCC74" +puts "BUC61051" +puts "================" +puts "" + +# Data +set Shape_X 100 +set Shape_Y 346 + +set Vertex_X 29 +set Vertex_Y 305 + +set Edge_X ${Shape_X} +set Edge_Y ${Shape_Y} + +set Wire_X ${Shape_X} +set Wire_Y ${Shape_Y} + +set Face_X ${Shape_X} +set Face_Y ${Shape_Y} + +set Shell_X ${Shape_X} +set Shell_Y ${Shape_Y} + +set Solid_X ${Shape_X} +set Solid_Y ${Shape_Y} + +# Display box +vinit +box b 10 10 10 +vdisplay b +vfit + +QAUpdateLights + +### FIRST PART + +# Check Shape color +checkcolor ${Shape_X} ${Shape_Y} 1 1 0 + +# Check Vertex color +checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0 + +# Check Edge color +checkcolor ${Edge_X} ${Edge_Y} 1 1 0 + +# Check Wire color +checkcolor ${Wire_X} ${Wire_Y} 1 1 0 + +# Check Face color +checkcolor ${Face_X} ${Face_Y} 1 1 0 + +# Check Shell color +checkcolor ${Shell_X} ${Shell_Y} 1 1 0 + +# Check Solid color +checkcolor ${Solid_X} ${Solid_Y} 1 1 0 + +### SECOND PART + +# Check Shape color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 0 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Shape_X} ${Shape_Y} +QAMoveTo ${Shape_X} ${Shape_Y} + +QAUpdateLights +checkcolor ${Shape_X} ${Shape_Y} 0 1 1 + +# Check Vertex color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 1 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Vertex_X} ${Vertex_Y} +QAMoveTo ${Vertex_X} ${Vertex_Y} + +QAUpdateLights +checkcolor ${Vertex_X} ${Vertex_Y} 0 1 1 + +# Check Edge color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 2 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Edge_X} ${Edge_Y} +QAMoveTo ${Edge_X} ${Edge_Y} + +QAUpdateLights +checkcolor ${Edge_X} ${Edge_Y} 0 1 1 + +# Check Wire color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 3 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Wire_X} ${Wire_Y} +QAMoveTo ${Wire_X} ${Wire_Y} + +QAUpdateLights +checkcolor ${Wire_X} ${Wire_Y} 0 1 1 + +# Check Face color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 4 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Face_X} ${Face_Y} +QAMoveTo ${Face_X} ${Face_Y} + +QAUpdateLights +checkcolor ${Face_X} ${Face_Y} 0 1 1 + +# Check Shell color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 5 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Shell_X} ${Shell_Y} +QAMoveTo ${Shell_X} ${Shell_Y} + +QAUpdateLights +checkcolor ${Shell_X} ${Shell_Y} 0 1 1 + +# Check Solid color +QAMoveTo 1 1 +QAMoveTo 1 1 +set SetSelectMode 6 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} +QAMoveTo ${Solid_X} ${Solid_Y} +QAMoveTo ${Solid_X} ${Solid_Y} + +QAUpdateLights +checkcolor ${Solid_X} ${Solid_Y} 0 1 1 + +### THIRD PART + +set SetSelectMode -1 +OCC74_set b ${SetSelectMode} +set GetSelectMode [OCC74_get b] +if { ${GetSelectMode} != ${SetSelectMode} } then { + puts "Select Mode = ${GetSelectMode}" + puts "OCC74: Get Select Mode Error " +} + +# Check Shape color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Shape_X} ${Shape_Y} +QAMoveTo ${Shape_X} ${Shape_Y} + +QAUpdateLights +checkcolor ${Shape_X} ${Shape_Y} 1 1 0 + +# Check Vertex color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Vertex_X} ${Vertex_Y} +QAMoveTo ${Vertex_X} ${Vertex_Y} + +QAUpdateLights +checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0 + +# Check Edge color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Edge_X} ${Edge_Y} +QAMoveTo ${Edge_X} ${Edge_Y} + +QAUpdateLights +checkcolor ${Edge_X} ${Edge_Y} 1 1 0 + +# Check Wire color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Wire_X} ${Wire_Y} +QAMoveTo ${Wire_X} ${Wire_Y} + +QAUpdateLights +checkcolor ${Wire_X} ${Wire_Y} 1 1 0 + +# Check Face color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Face_X} ${Face_Y} +QAMoveTo ${Face_X} ${Face_Y} + +QAUpdateLights +checkcolor ${Face_X} ${Face_Y} 1 1 0 + +# Check Shell color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Shell_X} ${Shell_Y} +QAMoveTo ${Shell_X} ${Shell_Y} + +QAUpdateLights +checkcolor ${Shell_X} ${Shell_Y} 1 1 0 + +# Check Solid color +QAMoveTo 1 1 +QAMoveTo 1 1 +QAMoveTo ${Solid_X} ${Solid_Y} +QAMoveTo ${Solid_X} ${Solid_Y} + +QAUpdateLights +checkcolor ${Solid_X} ${Solid_Y} 1 1 0 + +set only_screen 1 diff --git a/tests/bugs/vis/bug79 b/tests/bugs/vis/bug79 new file mode 100644 index 0000000000..0f9520ef70 --- /dev/null +++ b/tests/bugs/vis/bug79 @@ -0,0 +1,23 @@ +puts "========" +puts "OCC79" +puts "========" + +vinit +restore [locate_data_file OCC162.brep] s +vdisplay s + +verase s +vdisplay s + +set listmem {} +set i_max 10 +for {set i 1} {${i} <= ${i_max}} {incr i} { + verase s + vdisplay s + + lappend listmem [expr [meminfo w] / 1024] + if { [checktrend $listmem 0 1 "Memory leak detected"] } { + puts "No memory leak, $i iterations" + break + } +} diff --git a/tests/bugs/xde/bug1055 b/tests/bugs/xde/bug1055 new file mode 100644 index 0000000000..d1a37aeded --- /dev/null +++ b/tests/bugs/xde/bug1055 @@ -0,0 +1,18 @@ +puts "============" +puts "OCC1055" +puts "============" +puts "" +###################################################### +# Exception is raised during mesh preparation for shading mode representation +###################################################### + +restore [locate_data_file OCC1055.brep] a +checkshape a + +if [catch { fixshape result a 1e-7 } res] { + puts "Error : fixshape works wrongly" +} + +set square 162.581 +set 2dviewer 1 + diff --git a/tests/bugs/xde/bug1430_1 b/tests/bugs/xde/bug1430_1 new file mode 100644 index 0000000000..ccd63c8497 --- /dev/null +++ b/tests/bugs/xde/bug1430_1 @@ -0,0 +1,19 @@ +puts "================" +puts "OCC1430" +puts "ShapeFix_Wireframe does not process separate wires" +puts "================" +puts "" + +restore [locate_data_file OCC1430-1.brep] a +checkshape a + +set message [fixsmall result a 10.] + +if {[string length ${message}] > 0} { + # Small edges fixed on shape + checkshape result + set 2dviewer 0 +} else { + puts "OCC1430: Error" +} + diff --git a/tests/bugs/xde/bug1430_2 b/tests/bugs/xde/bug1430_2 new file mode 100644 index 0000000000..21536f6303 --- /dev/null +++ b/tests/bugs/xde/bug1430_2 @@ -0,0 +1,19 @@ +puts "================" +puts "OCC1430" +puts "ShapeFix_Wireframe does not process separate wires" +puts "================" +puts "" + +restore [locate_data_file OCC1430-2.brep] a +checkshape a + +set message [fixwgaps result a 0.1] + +if {[string length ${message}] > 0} { + # Small edges fixed on shape + checkshape result + set 2dviewer 0 +} else { + puts "OCC1430: Error" +} + diff --git a/tests/bugs/xde/bug2821 b/tests/bugs/xde/bug2821 new file mode 100644 index 0000000000..aa4ce6f268 --- /dev/null +++ b/tests/bugs/xde/bug2821 @@ -0,0 +1,20 @@ +puts "============" +puts "OCC2821" +puts "============" +puts "" +###################################################### +# IGES file not impored correctly +###################################################### + +igesbrep [locate_data_file OCC2821.igs] a * + +set comp [tpcompound result] +regexp {([-0-9.+eE]+) +Shape\(s\)} $comp full nb +if { $nb < 1} { + puts "Error : Number of shape(s) listed is wrong" +} else { + set square 41153 +} + +set 2dviewer 1 + diff --git a/tests/bugs/xde/bug3926 b/tests/bugs/xde/bug3926 new file mode 100644 index 0000000000..00a4778ebd --- /dev/null +++ b/tests/bugs/xde/bug3926 @@ -0,0 +1,16 @@ +puts "============" +puts "OCC3926" +puts "============" +puts "" +###################################################### +# Exception during reading file using XDEDRAWEXE +###################################################### + +pload DCAF + +NewDocument D MDTV-XCAF +UndoLimit D 100 +NewCommand D + +ReadStep D [locate_data_file PRO9233.stp] + diff --git a/tests/bugs/xde/bug394 b/tests/bugs/xde/bug394 new file mode 100644 index 0000000000..e0f088bc06 --- /dev/null +++ b/tests/bugs/xde/bug394 @@ -0,0 +1,58 @@ +puts "================" +puts "OCC394" +puts "SAM1296" +puts "================" +puts "" +################################################################### +## After operation "Merge edges" tolerance shape increased from 5 to 198. +################################################################### + +pload QAcommands + +restore [locate_data_file OCC394.brep] a + +OCC394 r a 10000 2 1.57 + +regexp { +Face +: +Min +([-0-9.+eE]+)} [maxtolerance a] full face_a_tolerance +regexp { +Edge +: +Min +([-0-9.+eE]+)} [maxtolerance a] full edge_a_tolerance +regexp { +Vertex +: +Min +([-0-9.+eE]+)} [maxtolerance a] full vertex_a_tolerance + +set max_a_tolerance ${face_a_tolerance} +if {${edge_a_tolerance} > ${max_a_tolerance}} { + set max_a_tolerance ${edge_a_tolerance} +} +if {${vertex_a_tolerance} > ${max_a_tolerance}} { + set max_a_tolerance ${vertex_a_tolerance} +} + +regexp { +Face +: +Min +([-0-9.+eE]+)} [maxtolerance r] full face_r_tolerance +regexp { +Edge +: +Min +([-0-9.+eE]+)} [maxtolerance r] full edge_r_tolerance +regexp { +Vertex +: +Min +([-0-9.+eE]+)} [maxtolerance r] full vertex_r_tolerance + +set max_r_tolerance ${face_r_tolerance} +if {${edge_r_tolerance} > ${max_r_tolerance}} { + set max_r_tolerance ${edge_r_tolerance} +} +if {${vertex_r_tolerance} > ${max_r_tolerance}} { + set max_r_tolerance ${vertex_r_tolerance} +} + +puts "\nface_a_tolerance = ${face_a_tolerance}" +puts "edge_a_tolerance = ${edge_a_tolerance}" +puts "vertex_a_tolerance = ${vertex_a_tolerance}" +puts "\nmax_a_tolerance = ${max_a_tolerance}" + +puts "\nface_r_tolerance = ${face_r_tolerance}" +puts "edge_a_tolerance = ${edge_a_tolerance}" +puts "vertex_a_tolerance = ${vertex_a_tolerance}" +puts "\nmax_r_tolerance = ${max_r_tolerance}\n" + +if { ${max_a_tolerance} < ${max_r_tolerance} } { + puts "OCC394 - Error" +} else { + puts "OCC394 - OK" +} + +renamevar r result +set 2dviewer 0 + diff --git a/tests/bugs/xde/bug5439 b/tests/bugs/xde/bug5439 new file mode 100644 index 0000000000..641c398e75 --- /dev/null +++ b/tests/bugs/xde/bug5439 @@ -0,0 +1,14 @@ +puts "============" +puts "OCC5439" +puts "============" +puts "" +###################################################### +# Problems in work of fixshape +###################################################### + +restore [locate_data_file OCC5439-1.brep] a + +catch { fixshape result a 1.e-7 } + +set square 13.1825 +set 2dviewer 1 diff --git a/tests/bugs/xde/bug6283 b/tests/bugs/xde/bug6283 new file mode 100644 index 0000000000..f869520dd2 --- /dev/null +++ b/tests/bugs/xde/bug6283 @@ -0,0 +1,30 @@ +puts "============" +puts "OCC6283" +puts "============" +puts "" +###################################################### +# Unstable work fixshape on attached shape (different number of warnings) +###################################################### + +set BugNumber OCC6283 + +set list [stepread [locate_data_file wgehaeuse_surface.stp] a *] + +if {[lsearch ${list} Error] > -1} { + puts "${BugNumber} : Error during reading attached IGES file" +} else { + tpcompound comp + if [catch { set fixlist [fixshape result comp 1e-7] } res] { + puts "${BugNumber}: Error during fixshape" + } else { + set index [string first "Segments were disordered; fixed\n" ${fixlist}] + if {$index != -1} { + puts "Faulty ${BugNumber}" + } else { + puts "OK ${BugNumber}" + } + set square 2.22665e+06 + set 2dviewer 0 + } +} + diff --git a/tests/bugs/xde/bug6542 b/tests/bugs/xde/bug6542 new file mode 100644 index 0000000000..846cad7375 --- /dev/null +++ b/tests/bugs/xde/bug6542 @@ -0,0 +1,200 @@ +puts "========" +puts "OCC6542" +puts "========" +puts "" +###################################################### +# Circle is translated to IGES as NURBS +###################################################### + +set BugNumber OCC6542 +set TheFileName OCC6542.igs +set TheFileName2 ${TheFileName}-2.igs + +set percent_max 0.1 + +igesbrep [locate_data_file ${TheFileName}] a * +set comp [tpcompound res1] + +set status 0 +set result [checkshape res1] +set index [lsearch $result Faulty] +if {$index > -1} { + puts "Faulty ${BugNumber} : checkshape is wrong for source file" + incr status +} else { + puts "OK ${BugNumber} : checkshape is good for source file" + + set dumpList [split [dump res1] "\n\t :,"] + set index1 [lsearch -exact ${dumpList} Circle] + + if {${index1} == -1} { + puts "Faulty ${BugNumber} : there is not a cirle in source file" + incr status + } else { + puts "OK ${BugNumber} : there is a cirle in source file" + set Center_X_1 [lindex ${dumpList} [expr ${index1} + 5]] + set Center_Y_1 [lindex ${dumpList} [expr ${index1} + 7]] + set Center_Z_1 [lindex ${dumpList} [expr ${index1} + 9]] + set Axis_X_1 [lindex ${dumpList} [expr ${index1} + 17]] + set Axis_Y_1 [lindex ${dumpList} [expr ${index1} + 19]] + set Axis_Z_1 [lindex ${dumpList} [expr ${index1} + 21]] + set XAxis_X_1 [lindex ${dumpList} [expr ${index1} + 28]] + set XAxis_Y_1 [lindex ${dumpList} [expr ${index1} + 30]] + set XAxis_Z_1 [lindex ${dumpList} [expr ${index1} + 32]] + set YAxis_X_1 [lindex ${dumpList} [expr ${index1} + 39]] + set YAxis_Y_1 [lindex ${dumpList} [expr ${index1} + 41]] + set YAxis_Z_1 [lindex ${dumpList} [expr ${index1} + 43]] + set Radius_1 [lindex ${dumpList} [expr ${index1} + 49]] + puts "Center_X_1 = ${Center_X_1}" + puts "Center_Y_1 = ${Center_Y_1}" + puts "Center_Z_1 = ${Center_Z_1}" + puts "Axis_X_1 = ${Axis_X_1}" + puts "Axis_Y_1 = ${Axis_Y_1}" + puts "Axis_Z_1 = ${Axis_Z_1}" + puts "XAxis_X_1 = ${XAxis_X_1}" + puts "XAxis_Y_1 = ${XAxis_Y_1}" + puts "XAxis_Z_1 = ${XAxis_Z_1}" + puts "YAxis_X_1 = ${YAxis_X_1}" + puts "YAxis_Y_1 = ${YAxis_Y_1}" + puts "YAxis_Z_1 = ${YAxis_Z_1}" + puts "Radius_1 = ${Radius_1}" + } + + brepiges res1 ${imagedir}/${TheFileName2} + + dall + if [catch { igesbrep ${imagedir}/${TheFileName2} b * } res] { + puts "Error ${BugNumber}: there is reading problem" + } else { + set comp [tpcompound res] + set result [checkshape res] + set index [lsearch $result Faulty] + if {$index > -1} { + puts "Faulty ${BugNumber} : checkshape is wrong for writing file" + incr status + } else { + puts "OK ${BugNumber} : checkshape is good for writing file" + + set dumpList2 [split [dump res] "\n\t :,"] + set index2 [lsearch -exact ${dumpList2} Circle] + + if {${index2} == -1} { + puts "Faulty ${BugNumber} : there is not a cirle in writing file" + incr status + } else { + puts "OK ${BugNumber} : there is a cirle in writing file" + set Center_X_2 [lindex ${dumpList2} [expr ${index2} + 5]] + set Center_Y_2 [lindex ${dumpList2} [expr ${index2} + 7]] + set Center_Z_2 [lindex ${dumpList2} [expr ${index2} + 9]] + set Axis_X_2 [lindex ${dumpList2} [expr ${index2} + 17]] + set Axis_Y_2 [lindex ${dumpList2} [expr ${index2} + 19]] + set Axis_Z_2 [lindex ${dumpList2} [expr ${index2} + 21]] + set XAxis_X_2 [lindex ${dumpList2} [expr ${index2} + 28]] + set XAxis_Y_2 [lindex ${dumpList2} [expr ${index2} + 30]] + set XAxis_Z_2 [lindex ${dumpList2} [expr ${index2} + 32]] + set YAxis_X_2 [lindex ${dumpList2} [expr ${index2} + 39]] + set YAxis_Y_2 [lindex ${dumpList2} [expr ${index2} + 41]] + set YAxis_Z_2 [lindex ${dumpList2} [expr ${index2} + 43]] + set Radius_2 [lindex ${dumpList2} [expr ${index2} + 49]] + puts "Center_X_2 = ${Center_X_2}" + puts "Center_Y_2 = ${Center_Y_2}" + puts "Center_Z_2 = ${Center_Z_2}" + puts "Axis_X_2 = ${Axis_X_2}" + puts "Axis_Y_2 = ${Axis_Y_2}" + puts "Axis_Z_2 = ${Axis_Z_2}" + puts "XAxis_X_2 = ${XAxis_X_2}" + puts "XAxis_Y_2 = ${XAxis_Y_2}" + puts "XAxis_Z_2 = ${XAxis_Z_2}" + puts "YAxis_X_2 = ${YAxis_X_2}" + puts "YAxis_Y_2 = ${YAxis_Y_2}" + puts "YAxis_Z_2 = ${YAxis_Z_2}" + puts "Radius_2 = ${Radius_2}" + + set Center_X_percent [GetPercent ${Center_X_2} ${Center_X_1}] + set Center_Y_percent [GetPercent ${Center_Y_2} ${Center_Y_1}] + set Center_Z_percent [GetPercent ${Center_Z_2} ${Center_Z_1}] + + set Axis_X_percent [GetPercent ${Axis_X_2} ${Axis_X_1}] + set Axis_Y_percent [GetPercent ${Axis_Y_2} ${Axis_Y_1}] + set Axis_Z_percent [GetPercent ${Axis_Z_2} ${Axis_Z_1}] + + set XAxis_X_percent [GetPercent ${XAxis_X_2} ${XAxis_X_1}] + set XAxis_Y_percent [GetPercent ${XAxis_Y_2} ${XAxis_Y_1}] + set XAxis_Z_percent [GetPercent ${XAxis_Z_2} ${XAxis_Z_1}] + + set YAxis_X_percent [GetPercent ${YAxis_X_2} ${YAxis_X_1}] + set YAxis_Y_percent [GetPercent ${YAxis_Y_2} ${YAxis_Y_1}] + set YAxis_Z_percent [GetPercent ${YAxis_Z_2} ${YAxis_Z_1}] + + set Radius_percent [GetPercent ${Radius_2} ${Radius_1}] + + if {${Center_X_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Center_X is wrong" + incr status + } + if {${Center_Y_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Center_Y is wrong" + incr status + } + if {${Center_Z_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Center_Z is wrong" + incr status + } + + if {${Axis_X_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Axis_X is wrong" + incr status + } + if {${Axis_Y_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Axis_Y is wrong" + incr status + } + if {${Axis_Z_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Axis_Z is wrong" + incr status + } + + if {${XAxis_X_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : XAxis_X is wrong" + incr status + } + if {${XAxis_Y_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : XAxis_Y is wrong" + incr status + } + if {${XAxis_Z_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : XAxis_Z is wrong" + incr status + } + + if {${YAxis_X_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : YAxis_X is wrong" + incr status + } + if {${YAxis_Y_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : YAxis_Y is wrong" + incr status + } + if {${YAxis_Z_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : YAxis_Z is wrong" + incr status + } + + if {${Radius_percent} > ${percent_max}} { + puts "Faulty ${BugNumber} : Radius is wrong" + incr status + } + + } + } + } +} + +puts "" +if {${status} == 0} { + puts "${BugNumber}: OK" +} else { + puts "${BugNumber}: Error" +} + +