File: buc60906

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (74 lines) | stat: -rw-r--r-- 1,960 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# by apn master-master 03.12.2012
#puts "TODO OCC12345 ALL: An exception was caught"
#puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC12345 ALL: Faulty OCC294"
puts "TODO OCC12345 ALL: Error : OCC294"
#puts "TODO OCC12345 ALL: TEST INCOMPLETE"

puts "========================"
puts " BUC60906 "
puts "========================"

cpulimit 3000
pload QAcommands

stepread [locate_data_file carcasse_gauche_simpl3.stp] a *

tpcompound com

set AllEdgesList [explode com e]
set list [split ${AllEdgesList}]
set NumbEdges [llength ${list}]
set delta 0.03
set IsSmallEdges 0

set IsOK 1

for {set i 1} {${i} <= ${NumbEdges}} {incr i} {
   set i_tolerance [maxtolerance com_${i}]
   set i_list [split ${i_tolerance} "\n\t"]
   set i_listLength [llength ${i_list}]
   if { ${i_listLength} < 7 } then {
      puts "BUC60906 - Error : i = ${i}"
      puts "BUC60906 - Error : i_listLength = ${i_listLength}"
   }
   set i_EdgeList [lindex ${i_list} 3]
   set i_MaxEdgeTolerance [lindex [split ${i_EdgeList}] [expr [llength [split ${i_EdgeList}] ] - 2] ]
   #puts "i_MaxEdgeTolerance = ${i_MaxEdgeTolerance}"
   if { ${i_MaxEdgeTolerance} > ${delta} } then {
       set IsSmallEdges 1
       puts "Remove ${i}-th small edge with a tolerance of ${delta} mm"

       if [catch { OCC294 shape_result com com_${i} } result] {
          puts "Error : OCC294"
          set IsOK 0
          break
       }

       renamevar shape_result com
   }
}
if { ${IsOK} == 1 } {
   if { ${IsSmallEdges} == 0 } {
      puts "Error : here are not small edges"
      set IsOK 0
   }
}

if { ${IsOK} == 1 } {
   set fullness [nbshapes com]
   regexp {VERTEX +: +([-0-9.+eE]+)} $fullness full vert
   regexp {EDGE +: +([-0-9.+eE]+)} $fullness full edg
   if { $edg == 0 || $vert == 0 } { 
      puts "Error : it is Faulty result" 
      set IsOK 0
   }
} 

if { ${IsOK} == 1 } {
   fixshape result com ${delta}
    checkshape result
   checkshape result r
}

set 2dviewer 0