From: admin Date: Wed, 17 Nov 2004 06:48:41 +0000 (+0000) Subject: Merge with PAL/SALOME 2.1.0d X-Git-Tag: OCC-V2_1_0d X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FPAL_OCC-V2_1_0d;p=modules%2Fkernel.git Merge with PAL/SALOME 2.1.0d --- diff --git a/examples/crank.igs b/examples/crank.igs new file mode 100644 index 000000000..5c3ab1689 --- /dev/null +++ b/examples/crank.igs @@ -0,0 +1,1012 @@ + S0000001 +,,,13HFilename.iges,31HMATRA-DATAVISION EUCLID-QUANTUM, G0000001 +45HOL-2.0D on SunOS 5.5.1 sparc Sun_Microsystems,32,308,15,308,15, G0000002 +7HUnknown,1.,2,2HMM,1,0.01,13H981223.100346,0.0001,160.525285,7Hcascade,G0000003 +16HMatra Datavision,9,0,13H981223.100346; G0000004 + 402 1 0 0 0 0 0 000000000D0000001 + 402 0 0 1 1 0D0000002 + 144 2 0 0 0 0 0 000020000D0000003 + 144 0 0 1 0 0D0000004 + 128 3 0 0 0 0 0 000010000D0000005 + 128 0 0 7 0 0D0000006 + 142 10 0 0 0 0 0 000010500D0000007 + 142 0 0 1 0 0D0000008 + 102 11 0 0 0 0 0 000010000D0000009 + 102 0 0 1 0 0D0000010 + 126 12 0 0 0 0 0 000010000D0000011 + 126 0 0 9 0 0D0000012 + 110 21 0 0 0 0 0 000010000D0000013 + 110 0 0 1 0 0D0000014 + 126 22 0 0 0 0 0 000010000D0000015 + 126 0 0 9 0 0D0000016 + 100 31 0 0 0 0 0 000010000D0000017 + 100 0 0 2 0 0D0000018 + 126 33 0 0 0 0 0 000010000D0000019 + 126 0 0 9 0 0D0000020 + 110 42 0 0 0 0 0 000010000D0000021 + 110 0 0 2 0 0D0000022 + 126 44 0 0 0 0 0 000010000D0000023 + 126 0 0 9 0 0D0000024 + 100 53 0 0 0 0 0 000010000D0000025 + 100 0 0 2 0 0D0000026 + 102 55 0 0 0 0 0 000010000D0000027 + 102 0 0 1 0 0D0000028 + 100 56 0 0 0 0 31 000010000D0000029 + 100 0 0 1 0 0D0000030 + 124 57 0 0 0 0 0 000000000D0000031 + 124 0 0 2 0 0D0000032 + 110 59 0 0 0 0 0 000010000D0000033 + 110 0 0 2 0 0D0000034 + 100 61 0 0 0 0 37 000010000D0000035 + 100 0 0 2 0 0D0000036 + 124 63 0 0 0 0 0 000000000D0000037 + 124 0 0 2 0 0D0000038 + 100 65 0 0 0 0 41 000010000D0000039 + 100 0 0 2 0 0D0000040 + 124 67 0 0 0 0 0 000000000D0000041 + 124 0 0 2 0 0D0000042 + 100 69 0 0 0 0 45 000010000D0000043 + 100 0 0 2 0 0D0000044 + 124 71 0 0 0 0 0 000000000D0000045 + 124 0 0 2 0 0D0000046 + 110 73 0 0 0 0 0 000010000D0000047 + 110 0 0 2 0 0D0000048 + 100 75 0 0 0 0 51 000010000D0000049 + 100 0 0 2 0 0D0000050 + 124 77 0 0 0 0 0 000000000D0000051 + 124 0 0 2 0 0D0000052 + 100 79 0 0 0 0 55 000010000D0000053 + 100 0 0 2 0 0D0000054 + 124 81 0 0 0 0 0 000000000D0000055 + 124 0 0 2 0 0D0000056 + 142 83 0 0 0 0 0 000010500D0000057 + 142 0 0 1 0 0D0000058 + 126 84 0 0 0 0 0 000010000D0000059 + 126 0 0 10 0 0D0000060 + 126 94 0 0 0 0 0 000010000D0000061 + 126 0 0 12 0 0D0000062 + 142 106 0 0 0 0 0 000010500D0000063 + 142 0 0 1 0 0D0000064 + 126 107 0 0 0 0 0 000010000D0000065 + 126 0 0 10 0 0D0000066 + 126 117 0 0 0 0 0 000010000D0000067 + 126 0 0 12 0 0D0000068 + 144 129 0 0 0 0 0 000020000D0000069 + 144 0 0 1 0 0D0000070 + 120 130 0 0 0 0 73 000010000D0000071 + 120 0 0 1 0 0D0000072 + 124 131 0 0 0 0 0 000000000D0000073 + 124 0 0 2 0 0D0000074 + 110 133 0 0 0 0 0 000010000D0000075 + 110 0 0 1 0 0D0000076 + 110 134 0 0 0 0 0 000010000D0000077 + 110 0 0 1 0 0D0000078 + 142 135 0 0 0 0 0 000010500D0000079 + 142 0 0 1 0 0D0000080 + 102 136 0 0 0 0 0 000010000D0000081 + 102 0 0 1 0 0D0000082 + 110 137 0 0 0 0 0 000010000D0000083 + 110 0 0 1 0 0D0000084 + 110 138 0 0 0 0 0 000010000D0000085 + 110 0 0 2 0 0D0000086 + 110 140 0 0 0 0 0 000010000D0000087 + 110 0 0 1 0 0D0000088 + 110 141 0 0 0 0 0 000010000D0000089 + 110 0 0 1 0 0D0000090 + 102 142 0 0 0 0 0 000010000D0000091 + 102 0 0 1 0 0D0000092 + 110 143 0 0 0 0 0 000010000D0000093 + 110 0 0 2 0 0D0000094 + 100 145 0 0 0 0 97 000010000D0000095 + 100 0 0 2 0 0D0000096 + 124 147 0 0 0 0 0 000000000D0000097 + 124 0 0 2 0 0D0000098 + 110 149 0 0 0 0 0 000010000D0000099 + 110 0 0 2 0 0D0000100 + 100 151 0 0 0 0 103 000010000D0000101 + 100 0 0 1 0 0D0000102 + 124 152 0 0 0 0 0 000000000D0000103 + 124 0 0 2 0 0D0000104 + 144 154 0 0 0 0 0 000020000D0000105 + 144 0 0 1 0 0D0000106 + 120 155 0 0 0 0 109 000010000D0000107 + 120 0 0 1 0 0D0000108 + 124 156 0 0 0 0 0 000000000D0000109 + 124 0 0 2 0 0D0000110 + 110 158 0 0 0 0 0 000010000D0000111 + 110 0 0 1 0 0D0000112 + 110 159 0 0 0 0 0 000010000D0000113 + 110 0 0 1 0 0D0000114 + 142 160 0 0 0 0 0 000010500D0000115 + 142 0 0 1 0 0D0000116 + 102 161 0 0 0 0 0 000010000D0000117 + 102 0 0 1 0 0D0000118 + 110 162 0 0 0 0 0 000010000D0000119 + 110 0 0 1 0 0D0000120 + 110 163 0 0 0 0 0 000010000D0000121 + 110 0 0 2 0 0D0000122 + 110 165 0 0 0 0 0 000010000D0000123 + 110 0 0 1 0 0D0000124 + 110 166 0 0 0 0 0 000010000D0000125 + 110 0 0 1 0 0D0000126 + 102 167 0 0 0 0 0 000010000D0000127 + 102 0 0 1 0 0D0000128 + 110 168 0 0 0 0 0 000010000D0000129 + 110 0 0 2 0 0D0000130 + 100 170 0 0 0 0 133 000010000D0000131 + 100 0 0 2 0 0D0000132 + 124 172 0 0 0 0 0 000000000D0000133 + 124 0 0 2 0 0D0000134 + 110 174 0 0 0 0 0 000010000D0000135 + 110 0 0 2 0 0D0000136 + 100 176 0 0 0 0 139 000010000D0000137 + 100 0 0 2 0 0D0000138 + 124 178 0 0 0 0 0 000000000D0000139 + 124 0 0 2 0 0D0000140 + 144 180 0 0 0 0 0 000020000D0000141 + 144 0 0 1 0 0D0000142 + 120 181 0 0 0 0 145 000010000D0000143 + 120 0 0 1 0 0D0000144 + 124 182 0 0 0 0 0 000000000D0000145 + 124 0 0 2 0 0D0000146 + 110 184 0 0 0 0 0 000010000D0000147 + 110 0 0 1 0 0D0000148 + 110 185 0 0 0 0 0 000010000D0000149 + 110 0 0 1 0 0D0000150 + 142 186 0 0 0 0 0 000010500D0000151 + 142 0 0 1 0 0D0000152 + 102 187 0 0 0 0 0 000010000D0000153 + 102 0 0 1 0 0D0000154 + 110 188 0 0 0 0 0 000010000D0000155 + 110 0 0 1 0 0D0000156 + 110 189 0 0 0 0 0 000010000D0000157 + 110 0 0 2 0 0D0000158 + 110 191 0 0 0 0 0 000010000D0000159 + 110 0 0 1 0 0D0000160 + 110 192 0 0 0 0 0 000010000D0000161 + 110 0 0 1 0 0D0000162 + 102 193 0 0 0 0 0 000010000D0000163 + 102 0 0 1 0 0D0000164 + 110 194 0 0 0 0 0 000010000D0000165 + 110 0 0 2 0 0D0000166 + 100 196 0 0 0 0 169 000010000D0000167 + 100 0 0 1 0 0D0000168 + 124 197 0 0 0 0 0 000000000D0000169 + 124 0 0 2 0 0D0000170 + 110 199 0 0 0 0 0 000010000D0000171 + 110 0 0 2 0 0D0000172 + 100 201 0 0 0 0 175 000010000D0000173 + 100 0 0 2 0 0D0000174 + 124 203 0 0 0 0 0 000000000D0000175 + 124 0 0 2 0 0D0000176 + 144 205 0 0 0 0 0 000020000D0000177 + 144 0 0 1 0 0D0000178 + 128 206 0 0 0 0 0 000010000D0000179 + 128 0 0 6 0 0D0000180 + 142 212 0 0 0 0 0 000010500D0000181 + 142 0 0 1 0 0D0000182 + 102 213 0 0 0 0 0 000010000D0000183 + 102 0 0 1 0 0D0000184 + 110 214 0 0 0 0 0 000010000D0000185 + 110 0 0 1 0 0D0000186 + 110 215 0 0 0 0 0 000010000D0000187 + 110 0 0 1 0 0D0000188 + 110 216 0 0 0 0 0 000010000D0000189 + 110 0 0 1 0 0D0000190 + 110 217 0 0 0 0 0 000010000D0000191 + 110 0 0 1 0 0D0000192 + 102 218 0 0 0 0 0 000010000D0000193 + 102 0 0 1 0 0D0000194 + 110 219 0 0 0 0 0 000010000D0000195 + 110 0 0 2 0 0D0000196 + 110 221 0 0 0 0 0 000010000D0000197 + 110 0 0 2 0 0D0000198 + 110 223 0 0 0 0 0 000010000D0000199 + 110 0 0 2 0 0D0000200 + 110 225 0 0 0 0 0 000010000D0000201 + 110 0 0 2 0 0D0000202 + 144 227 0 0 0 0 0 000020000D0000203 + 144 0 0 1 0 0D0000204 + 120 228 0 0 0 0 207 000010000D0000205 + 120 0 0 1 0 0D0000206 + 124 229 0 0 0 0 0 000000000D0000207 + 124 0 0 2 0 0D0000208 + 110 231 0 0 0 0 0 000010000D0000209 + 110 0 0 1 0 0D0000210 + 110 232 0 0 0 0 0 000010000D0000211 + 110 0 0 1 0 0D0000212 + 142 233 0 0 0 0 0 000010500D0000213 + 142 0 0 1 0 0D0000214 + 102 234 0 0 0 0 0 000010000D0000215 + 102 0 0 1 0 0D0000216 + 110 235 0 0 0 0 0 000010000D0000217 + 110 0 0 1 0 0D0000218 + 110 236 0 0 0 0 0 000010000D0000219 + 110 0 0 2 0 0D0000220 + 110 238 0 0 0 0 0 000010000D0000221 + 110 0 0 1 0 0D0000222 + 110 239 0 0 0 0 0 000010000D0000223 + 110 0 0 1 0 0D0000224 + 102 240 0 0 0 0 0 000010000D0000225 + 102 0 0 1 0 0D0000226 + 110 241 0 0 0 0 0 000010000D0000227 + 110 0 0 2 0 0D0000228 + 100 243 0 0 0 0 231 000010000D0000229 + 100 0 0 1 0 0D0000230 + 124 244 0 0 0 0 0 000000000D0000231 + 124 0 0 2 0 0D0000232 + 110 246 0 0 0 0 0 000010000D0000233 + 110 0 0 2 0 0D0000234 + 100 248 0 0 0 0 237 000010000D0000235 + 100 0 0 2 0 0D0000236 + 124 250 0 0 0 0 0 000000000D0000237 + 124 0 0 2 0 0D0000238 + 144 252 0 0 0 0 0 000020000D0000239 + 144 0 0 1 0 0D0000240 + 120 253 0 0 0 0 243 000010000D0000241 + 120 0 0 1 0 0D0000242 + 124 254 0 0 0 0 0 000000000D0000243 + 124 0 0 2 0 0D0000244 + 110 256 0 0 0 0 0 000010000D0000245 + 110 0 0 1 0 0D0000246 + 110 257 0 0 0 0 0 000010000D0000247 + 110 0 0 1 0 0D0000248 + 142 258 0 0 0 0 0 000010500D0000249 + 142 0 0 1 0 0D0000250 + 102 259 0 0 0 0 0 000010000D0000251 + 102 0 0 1 0 0D0000252 + 110 260 0 0 0 0 0 000010000D0000253 + 110 0 0 1 0 0D0000254 + 110 261 0 0 0 0 0 000010000D0000255 + 110 0 0 2 0 0D0000256 + 110 263 0 0 0 0 0 000010000D0000257 + 110 0 0 1 0 0D0000258 + 110 264 0 0 0 0 0 000010000D0000259 + 110 0 0 1 0 0D0000260 + 102 265 0 0 0 0 0 000010000D0000261 + 102 0 0 1 0 0D0000262 + 110 266 0 0 0 0 0 000010000D0000263 + 110 0 0 2 0 0D0000264 + 100 268 0 0 0 0 267 000010000D0000265 + 100 0 0 2 0 0D0000266 + 124 270 0 0 0 0 0 000000000D0000267 + 124 0 0 2 0 0D0000268 + 110 272 0 0 0 0 0 000010000D0000269 + 110 0 0 2 0 0D0000270 + 100 274 0 0 0 0 273 000010000D0000271 + 100 0 0 2 0 0D0000272 + 124 276 0 0 0 0 0 000000000D0000273 + 124 0 0 2 0 0D0000274 + 144 278 0 0 0 0 0 000020000D0000275 + 144 0 0 1 0 0D0000276 + 120 279 0 0 0 0 279 000010000D0000277 + 120 0 0 1 0 0D0000278 + 124 280 0 0 0 0 0 000000000D0000279 + 124 0 0 2 0 0D0000280 + 110 282 0 0 0 0 0 000010000D0000281 + 110 0 0 1 0 0D0000282 + 110 283 0 0 0 0 0 000010000D0000283 + 110 0 0 1 0 0D0000284 + 142 284 0 0 0 0 0 000010500D0000285 + 142 0 0 1 0 0D0000286 + 102 285 0 0 0 0 0 000010000D0000287 + 102 0 0 1 0 0D0000288 + 110 286 0 0 0 0 0 000010000D0000289 + 110 0 0 1 0 0D0000290 + 110 287 0 0 0 0 0 000010000D0000291 + 110 0 0 2 0 0D0000292 + 110 289 0 0 0 0 0 000010000D0000293 + 110 0 0 1 0 0D0000294 + 110 290 0 0 0 0 0 000010000D0000295 + 110 0 0 1 0 0D0000296 + 102 291 0 0 0 0 0 000010000D0000297 + 102 0 0 1 0 0D0000298 + 110 292 0 0 0 0 0 000010000D0000299 + 110 0 0 2 0 0D0000300 + 100 294 0 0 0 0 303 000010000D0000301 + 100 0 0 2 0 0D0000302 + 124 296 0 0 0 0 0 000000000D0000303 + 124 0 0 2 0 0D0000304 + 110 298 0 0 0 0 0 000010000D0000305 + 110 0 0 2 0 0D0000306 + 100 300 0 0 0 0 309 000010000D0000307 + 100 0 0 2 0 0D0000308 + 124 302 0 0 0 0 0 000000000D0000309 + 124 0 0 2 0 0D0000310 + 144 304 0 0 0 0 0 000020000D0000311 + 144 0 0 1 0 0D0000312 + 128 305 0 0 0 0 0 000010000D0000313 + 128 0 0 6 0 0D0000314 + 142 311 0 0 0 0 0 000010500D0000315 + 142 0 0 1 0 0D0000316 + 102 312 0 0 0 0 0 000010000D0000317 + 102 0 0 1 0 0D0000318 + 110 313 0 0 0 0 0 000010000D0000319 + 110 0 0 1 0 0D0000320 + 110 314 0 0 0 0 0 000010000D0000321 + 110 0 0 1 0 0D0000322 + 110 315 0 0 0 0 0 000010000D0000323 + 110 0 0 1 0 0D0000324 + 110 316 0 0 0 0 0 000010000D0000325 + 110 0 0 1 0 0D0000326 + 102 317 0 0 0 0 0 000010000D0000327 + 102 0 0 1 0 0D0000328 + 110 318 0 0 0 0 0 000010000D0000329 + 110 0 0 2 0 0D0000330 + 110 320 0 0 0 0 0 000010000D0000331 + 110 0 0 2 0 0D0000332 + 110 322 0 0 0 0 0 000010000D0000333 + 110 0 0 2 0 0D0000334 + 110 324 0 0 0 0 0 000010000D0000335 + 110 0 0 2 0 0D0000336 + 144 326 0 0 0 0 0 000020000D0000337 + 144 0 0 1 0 0D0000338 + 120 327 0 0 0 0 341 000010000D0000339 + 120 0 0 1 0 0D0000340 + 124 328 0 0 0 0 0 000000000D0000341 + 124 0 0 2 0 0D0000342 + 110 330 0 0 0 0 0 000010000D0000343 + 110 0 0 1 0 0D0000344 + 110 331 0 0 0 0 0 000010000D0000345 + 110 0 0 1 0 0D0000346 + 142 332 0 0 0 0 0 000010500D0000347 + 142 0 0 1 0 0D0000348 + 102 333 0 0 0 0 0 000010000D0000349 + 102 0 0 1 0 0D0000350 + 110 334 0 0 0 0 0 000010000D0000351 + 110 0 0 1 0 0D0000352 + 110 335 0 0 0 0 0 000010000D0000353 + 110 0 0 2 0 0D0000354 + 110 337 0 0 0 0 0 000010000D0000355 + 110 0 0 1 0 0D0000356 + 126 338 0 0 0 0 0 000010000D0000357 + 126 0 0 3 0 0D0000358 + 102 341 0 0 0 0 0 000010000D0000359 + 102 0 0 1 0 0D0000360 + 110 342 0 0 0 0 0 000010000D0000361 + 110 0 0 2 0 0D0000362 + 126 344 0 0 0 0 0 000010000D0000363 + 126 0 0 12 0 0D0000364 + 110 356 0 0 0 0 0 000010000D0000365 + 110 0 0 2 0 0D0000366 + 126 358 0 0 0 0 0 000010000D0000367 + 126 0 0 12 0 0D0000368 + 144 370 0 0 0 0 0 000020000D0000369 + 144 0 0 1 0 0D0000370 + 120 371 0 0 0 0 373 000010000D0000371 + 120 0 0 1 0 0D0000372 + 124 372 0 0 0 0 0 000000000D0000373 + 124 0 0 2 0 0D0000374 + 110 374 0 0 0 0 0 000010000D0000375 + 110 0 0 1 0 0D0000376 + 110 375 0 0 0 0 0 000010000D0000377 + 110 0 0 1 0 0D0000378 + 142 376 0 0 0 0 0 000010500D0000379 + 142 0 0 1 0 0D0000380 + 102 377 0 0 0 0 0 000010000D0000381 + 102 0 0 1 0 0D0000382 + 110 378 0 0 0 0 0 000010000D0000383 + 110 0 0 1 0 0D0000384 + 110 379 0 0 0 0 0 000010000D0000385 + 110 0 0 2 0 0D0000386 + 110 381 0 0 0 0 0 000010000D0000387 + 110 0 0 1 0 0D0000388 + 126 382 0 0 0 0 0 000010000D0000389 + 126 0 0 3 0 0D0000390 + 102 385 0 0 0 0 0 000010000D0000391 + 102 0 0 1 0 0D0000392 + 110 386 0 0 0 0 0 000010000D0000393 + 110 0 0 2 0 0D0000394 + 126 388 0 0 0 0 0 000010000D0000395 + 126 0 0 12 0 0D0000396 + 110 400 0 0 0 0 0 000010000D0000397 + 110 0 0 2 0 0D0000398 + 126 402 0 0 0 0 0 000010000D0000399 + 126 0 0 12 0 0D0000400 + 144 414 0 0 0 0 0 000020000D0000401 + 144 0 0 1 0 0D0000402 + 128 415 0 0 0 0 0 000010000D0000403 + 128 0 0 7 0 0D0000404 + 142 422 0 0 0 0 0 000010500D0000405 + 142 0 0 1 0 0D0000406 + 102 423 0 0 0 0 0 000010000D0000407 + 102 0 0 1 0 0D0000408 + 126 424 0 0 0 0 0 000010000D0000409 + 126 0 0 9 0 0D0000410 + 110 433 0 0 0 0 0 000010000D0000411 + 110 0 0 1 0 0D0000412 + 126 434 0 0 0 0 0 000010000D0000413 + 126 0 0 9 0 0D0000414 + 100 443 0 0 0 0 0 000010000D0000415 + 100 0 0 2 0 0D0000416 + 126 445 0 0 0 0 0 000010000D0000417 + 126 0 0 9 0 0D0000418 + 110 454 0 0 0 0 0 000010000D0000419 + 110 0 0 2 0 0D0000420 + 126 456 0 0 0 0 0 000010000D0000421 + 126 0 0 9 0 0D0000422 + 100 465 0 0 0 0 0 000010000D0000423 + 100 0 0 2 0 0D0000424 + 102 467 0 0 0 0 0 000010000D0000425 + 102 0 0 1 0 0D0000426 + 100 468 0 0 0 0 429 000010000D0000427 + 100 0 0 1 0 0D0000428 + 124 469 0 0 0 0 0 000000000D0000429 + 124 0 0 2 0 0D0000430 + 110 471 0 0 0 0 0 000010000D0000431 + 110 0 0 2 0 0D0000432 + 100 473 0 0 0 0 435 000010000D0000433 + 100 0 0 2 0 0D0000434 + 124 475 0 0 0 0 0 000000000D0000435 + 124 0 0 2 0 0D0000436 + 100 477 0 0 0 0 439 000010000D0000437 + 100 0 0 2 0 0D0000438 + 124 479 0 0 0 0 0 000000000D0000439 + 124 0 0 2 0 0D0000440 + 100 481 0 0 0 0 443 000010000D0000441 + 100 0 0 2 0 0D0000442 + 124 483 0 0 0 0 0 000000000D0000443 + 124 0 0 2 0 0D0000444 + 110 485 0 0 0 0 0 000010000D0000445 + 110 0 0 2 0 0D0000446 + 100 487 0 0 0 0 449 000010000D0000447 + 100 0 0 2 0 0D0000448 + 124 489 0 0 0 0 0 000000000D0000449 + 124 0 0 2 0 0D0000450 + 100 491 0 0 0 0 453 000010000D0000451 + 100 0 0 2 0 0D0000452 + 124 493 0 0 0 0 0 000000000D0000453 + 124 0 0 2 0 0D0000454 + 142 495 0 0 0 0 0 000010500D0000455 + 142 0 0 1 0 0D0000456 + 126 496 0 0 0 0 0 000010000D0000457 + 126 0 0 10 0 0D0000458 + 126 506 0 0 0 0 0 000010000D0000459 + 126 0 0 12 0 0D0000460 + 142 518 0 0 0 0 0 000010500D0000461 + 142 0 0 1 0 0D0000462 + 126 519 0 0 0 0 0 000010000D0000463 + 126 0 0 10 0 0D0000464 + 126 529 0 0 0 0 0 000010000D0000465 + 126 0 0 12 0 0D0000466 +402,12,3,69,105,141,177,203,239,275,311,337,369,401; 0000001P0000001 +144,5,1,2,7,57,63; 0000003P0000002 +128,1,1,1,1,0,0,1,0,0,-139.650442578,-139.650442578, 0000005P0000003 +164.864616815,164.864616815,-52.441943309,-52.441943309, 0000005P0000004 +47.40098106,47.40098106,1.,1.,1.,1.,-139.650442578, 0000005P0000005 +-52.441943309,-19.999999553,164.864616815,-52.441943309, 0000005P0000006 +-19.999999553,-139.650442578,47.40098106,-19.999999553, 0000005P0000007 +164.864616815,47.40098106,-19.999999553,-139.650442578, 0000005P0000008 +164.864616815,-52.441943309,47.40098106; 0000005P0000009 +142,0,5,9,27,3; 0000007P0000010 +102,8,11,13,15,17,19,21,23,25; 0000009P0000011 +126,7,4,0,0,0,0,1.073345169,1.073345169,1.073345169,1.073345169, 0000011P0000012 +1.073345169,1.284126135,1.284126135,1.284126135,1.494907102, 0000011P0000013 +1.494907102,1.494907102,1.494907102,1.494907102,1.011189921, 0000011P0000014 +1.011189921,1.011189931,1.011179532,1.011179532,1.011189931, 0000011P0000015 +1.011189921,1.011189921,93.497879803,36.745399237,0., 0000011P0000016 +90.049436422,34.872902929,0.,86.473696164,33.245011418,0., 0000011P0000017 +82.790432165,31.870724965,0.,75.248696652,29.647496417,0., 0000011P0000018 +71.408940021,28.804071284,0.,67.521947549,28.232023481,0., 0000011P0000019 +63.609212637,27.934517711,0.,1.073345169,1.494907102,0.,0.,1.; 0000011P0000020 +110,63.609212637,27.934517711,0.,-72.422526777,17.591310665,0.; 0000013P0000021 +126,7,4,0,0,0,0,1.367007434,1.367007434,1.367007434,1.367007434, 0000015P0000022 +1.367007434,1.781832767,1.781832767,1.781832767,2.1966581, 0000015P0000023 +2.1966581,2.1966581,2.1966581,2.1966581,1.044284595,1.044284595, 0000015P0000024 +1.044285207,1.044124006,1.044124006,1.044285207,1.044284595, 0000015P0000025 +1.044284595,-72.422526777,17.591310665,0.,-74.496301391, 0000015P0000026 +17.162749235,0.,-76.619336034,17.023005488,0.,-78.746721852, 0000015P0000027 +17.175011565,0.,-82.917772227,18.068559876,0.,-84.920732008, 0000015P0000028 +18.80138208,0.,-86.800206478,19.798568183,0.,-88.516429067, 0000015P0000029 +21.039046347,0.,1.367007434,2.1966581,0.,0.,1.; 0000015P0000030 +100,0.,-105.960486735,-3.095103428,-88.516429067,21.039046347, 0000017P0000031 +-88.516429067,-27.229253203; 0000017P0000032 +126,7,4,0,0,0,0,4.086527207,4.086527207,4.086527207,4.086527207, 0000019P0000033 +4.086527207,4.434162711,4.434162711,4.434162711,4.781798214, 0000019P0000034 +4.781798214,4.781798214,4.781798214,4.781798214,1.03083173, 0000019P0000035 +1.03083173,1.03083194,1.030753477,1.030753477,1.03083194, 0000019P0000036 +1.03083173,1.03083173,-88.516429067,-27.229253203,0., 0000019P0000037 +-86.786150795,-25.978615653,0.,-84.916794517,-24.932704109,0., 0000019P0000038 +-82.936273839,-24.107124921,0.,-78.80986423,-22.928478295,0., 0000019P0000039 +-76.69208436,-22.583439786,0.,-74.552323437,-22.484207509,0., 0000019P0000040 +-72.422526777,-22.632272914,0.,4.086527207,4.781798214,0.,0.,1.; 0000019P0000041 +110,-72.422526777,-22.632272914,0.,59.138831837,-31.778538464, 0000021P0000042 +0.; 0000021P0000043 +126,7,4,0,0,0,0,4.781798214,4.781798214,4.781798214,4.781798214, 0000023P0000044 +4.781798214,4.995819176,4.995819176,4.995819176,5.209840139, 0000023P0000045 +5.209840139,5.209840139,5.209840139,5.209840139,1.011539234, 0000023P0000046 +1.011539234,1.011539246,1.011528189,1.011528189,1.011539246, 0000023P0000047 +1.011539234,1.011539234,59.138831837,-31.778538464,0., 0000023P0000048 +63.635671563,-32.09116286,0.,68.104473804,-32.724194555,0., 0000023P0000049 +72.519765903,-33.674023313,0.,81.191994379,-36.199999233,0., 0000023P0000050 +85.426740197,-37.76968291,0.,89.536511056,-39.635347961,0., 0000023P0000051 +93.497879803,-41.786361486,0.,4.781798214,5.209840139,0.,0.,1.; 0000023P0000052 +100,0.,114.819156639,-2.520481125,93.497879803,-41.786361486, 0000025P0000053 +93.497879803,36.745399237; 0000025P0000054 +102,8,29,33,35,39,43,47,49,53; 0000027P0000055 +100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000029P0000056 +124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1., 0000031P0000057 +-19.999999553; 0000031P0000058 +110,63.609212637,27.934517711,-19.999999553,-72.422526777, 0000033P0000059 +17.591310665,-19.999999553; 0000033P0000060 +100,0.,0.,0.,4.132451861,19.996605313,-11.961450429, 0000035P0000061 +16.548869631; 0000035P0000062 +124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1., 0000037P0000063 +-19.999999553; 0000037P0000064 +100,0.,0.,0.,17.444057668,24.134149775,17.444057668, 0000039P0000065 +-24.134149775; 0000039P0000066 +124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1., 0000041P0000067 +-19.999999553; 0000041P0000068 +100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653, 0000043P0000069 +-24.506089179; 0000043P0000070 +124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1., 0000045P0000071 +-19.999999553; 0000045P0000072 +110,-72.422526777,-22.632272914,-19.999999553,59.138831837, 0000047P0000073 +-31.778538464,-19.999999553; 0000047P0000074 +100,0.,0.,0.,5.842874313,-84.04484635,40.201922279, 0000049P0000075 +-74.037023328; 0000049P0000076 +124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1., 0000051P0000077 +-19.999999553; 0000051P0000078 +100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836, 0000053P0000079 +39.265880361; 0000053P0000080 +124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1., 0000055P0000081 +-19.999999553; 0000055P0000082 +142,0,5,59,61,3; 0000057P0000083 +126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000059P0000084 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000059P0000085 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000059P0000086 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000059P0000087 +4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225, 0000059P0000088 +-2.809300087,0.,-91.414337225,-14.635572856,0.,-102.903753475, 0000059P0000089 +-21.095273982,0.,-121.529693537,-21.981331368,0.,-121.529693537, 0000059P0000090 +16.362731193,0.,-102.903753475,15.476673808,0.,-91.414337225, 0000059P0000091 +9.016972681,0.,-91.414337225,-2.809300087,0.,1.570796327, 0000059P0000092 +7.853981634,0.,0.,1.; 0000059P0000093 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000061P0000094 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000061P0000095 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000061P0000096 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000061P0000097 +4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225, 0000061P0000098 +-2.809300087,-19.999999553,-91.414337225,-14.635572856, 0000061P0000099 +-19.999999553,-102.903753475,-21.095273982,-19.999999553, 0000061P0000100 +-121.529693537,-21.981331368,-19.999999553,-121.529693537, 0000061P0000101 +16.362731193,-19.999999553,-102.903753475,15.476673808, 0000061P0000102 +-19.999999553,-91.414337225,9.016972681,-19.999999553, 0000061P0000103 +-91.414337225,-2.809300087,-19.999999553,1.570796327, 0000061P0000104 +7.853981634,0.,0.,1.; 0000061P0000105 +142,0,5,65,67,3; 0000063P0000106 +126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000065P0000107 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000065P0000108 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000065P0000109 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000065P0000110 +4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459, 0000065P0000111 +-4.606760107,0.,141.976625459,-22.988349754,0.,124.118612294, 0000065P0000112 +-33.028670798,0.,95.168291791,-34.405870832,0.,95.168291791, 0000065P0000113 +25.192350618,0.,124.118612294,23.815150584,0.,141.976625459, 0000065P0000114 +13.77482954,0.,141.976625459,-4.606760107,0.,1.570796327, 0000065P0000115 +7.853981634,0.,0.,1.; 0000065P0000116 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000067P0000117 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000067P0000118 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000067P0000119 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000067P0000120 +4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459, 0000067P0000121 +-4.606760107,-19.999999553,141.976625459,-22.988349754, 0000067P0000122 +-19.999999553,124.118612294,-33.028670798,-19.999999553, 0000067P0000123 +95.168291791,-34.405870832,-19.999999553,95.168291791, 0000067P0000124 +25.192350618,-19.999999553,124.118612294,23.815150584, 0000067P0000125 +-19.999999553,141.976625459,13.77482954,-19.999999553, 0000067P0000126 +141.976625459,-4.606760107,-19.999999553,1.570796327, 0000067P0000127 +7.853981634,0.,0.,1.; 0000067P0000128 +144,71,1,0,79; 0000069P0000129 +120,75,77,1.073345169,1.494907102; 0000071P0000130 +124,1.,0.,0.,57.9634321,0.,1.,0.,102.18666633,0.,0.,1., 0000073P0000131 +-19.999999553; 0000073P0000132 +110,0.,0.,1.,0.,0.,0.; 0000075P0000133 +110,74.466478448,0.,0.,74.466478448,0.,39.999999106; 0000077P0000134 +142,0,71,81,91,3; 0000079P0000135 +102,4,83,85,87,89; 0000081P0000136 +110,1.,1.494907102,0.,-2.658028415E-17,1.494907102,0.; 0000083P0000137 +110,-2.658028415E-17,1.494907102,0.,-2.892042303E-17, 0000085P0000138 +1.073345169,0.; 0000085P0000139 +110,-2.892042303E-17,1.073345169,0.,1.,1.073345169,0.; 0000087P0000140 +110,1.,1.073345169,0.,1.,1.494907102,0.; 0000089P0000141 +102,4,93,95,99,101; 0000091P0000142 +110,63.609212637,27.934517711,19.999999553,63.609212637, 0000093P0000143 +27.934517711,-19.999999553; 0000093P0000144 +100,0.,0.,0.,5.645780537,-74.252148619,35.534447703, 0000095P0000145 +-65.441267094; 0000095P0000146 +124,1.,0.,0.,57.9634321,0.,1.,0.,102.18666633,0.,0.,1., 0000097P0000147 +-19.999999553; 0000097P0000148 +110,93.497879803,36.745399237,-19.999999553,93.497879803, 0000099P0000149 +36.745399237,19.999999553; 0000099P0000150 +100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000101P0000151 +124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1., 0000103P0000152 +19.999999553; 0000103P0000153 +144,107,1,0,115; 0000105P0000154 +120,111,113,-2.068247485,2.068247485; 0000107P0000155 +124,1.,0.,0.,114.819156639,0.,-1.,0.,-2.520481125,0.,0.,-1., 0000109P0000156 +-19.999999553; 0000109P0000157 +110,0.,0.,1.,0.,0.,0.; 0000111P0000158 +110,44.681161651,0.,-39.999999106,44.681161651,0.,0.; 0000113P0000159 +142,0,107,117,127,3; 0000115P0000160 +102,4,119,121,123,125; 0000117P0000161 +110,1.,2.068247485,0.,-2.220446049E-16,2.068247485,0.; 0000119P0000162 +110,-2.339760561E-17,2.068247485,0.,-4.635976591E-17, 0000121P0000163 +-2.068247485,0.; 0000121P0000164 +110,-2.220446049E-16,-2.068247485,0.,1.,-2.068247485,0.; 0000123P0000165 +110,1.,-2.068247485,0.,1.,2.068247485,0.; 0000125P0000166 +102,4,129,131,135,137; 0000127P0000167 +110,93.497879803,36.745399237,-19.999999553,93.497879803, 0000129P0000168 +36.745399237,19.999999553; 0000129P0000169 +100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836, 0000131P0000170 +39.265880361; 0000131P0000171 +124,1.,0.,0.,114.819156639,0.,-1.,0.,-2.520481125,0.,0.,-1., 0000133P0000172 +19.999999553; 0000133P0000173 +110,93.497879803,-41.786361486,19.999999553,93.497879803, 0000135P0000174 +-41.786361486,-19.999999553; 0000135P0000175 +100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836, 0000137P0000176 +39.265880361; 0000137P0000177 +124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1., 0000139P0000178 +-19.999999553; 0000139P0000179 +144,143,1,0,151; 0000141P0000180 +120,147,149,4.781798214,5.209840139; 0000143P0000181 +124,1.,0.,0.,53.295957524,0.,1.,0.,-115.823384813,0.,0.,1., 0000145P0000182 +-19.999999553; 0000145P0000183 +110,0.,0.,1.,0.,0.,0.; 0000147P0000184 +110,84.24770251,0.,0.,84.24770251,0.,39.999999106; 0000149P0000185 +142,0,143,153,163,3; 0000151P0000186 +102,4,155,157,159,161; 0000153P0000187 +110,1.,5.209840139,0.,-5.958262731E-18,5.209840139,0.; 0000155P0000188 +110,-5.958262731E-18,5.209840139,0.,-8.334372787E-18, 0000157P0000189 +4.781798214,0.; 0000157P0000190 +110,-8.334372787E-18,4.781798214,0.,1.,4.781798214,0.; 0000159P0000191 +110,1.,4.781798214,0.,1.,5.209840139,0.; 0000161P0000192 +102,4,165,167,171,173; 0000163P0000193 +110,93.497879803,-41.786361486,19.999999553,93.497879803, 0000165P0000194 +-41.786361486,-19.999999553; 0000165P0000195 +100,0.,0.,0.,40.201922279,74.037023328,5.842874313,84.04484635; 0000167P0000196 +124,1.,0.,0.,53.295957524,0.,1.,0.,-115.823384813,0.,0.,1., 0000169P0000197 +-19.999999553; 0000169P0000198 +110,59.138831837,-31.778538464,-19.999999553,59.138831837, 0000171P0000199 +-31.778538464,19.999999553; 0000171P0000200 +100,0.,0.,0.,5.842874313,-84.04484635,40.201922279, 0000173P0000201 +-74.037023328; 0000173P0000202 +124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1., 0000175P0000203 +19.999999553; 0000175P0000204 +144,179,1,0,181; 0000177P0000205 +128,1,1,1,1,0,0,1,0,0,0.,0.,131.878903748,131.878903748, 0000179P0000206 +-39.999999106,-39.999999106,0.,0.,1.,1.,1.,1.,59.138831837, 0000179P0000207 +-31.778538464,19.999999553,-72.422526777,-22.632272914, 0000179P0000208 +19.999999553,59.138831837,-31.778538464,-19.999999553, 0000179P0000209 +-72.422526777,-22.632272914,-19.999999553,0.,131.878903748, 0000179P0000210 +-39.999999106,0.; 0000179P0000211 +142,0,179,183,193,3; 0000181P0000212 +102,4,185,187,189,191; 0000183P0000213 +110,0.,0.,0.,0.,-39.999999106,0.; 0000185P0000214 +110,0.,-39.999999106,0.,131.878903748,-39.999999106,0.; 0000187P0000215 +110,131.878903748,-39.999999106,0.,131.878903748,0.,0.; 0000189P0000216 +110,131.878903748,-3.552713679E-14,0.,0.,-3.552713679E-14,0.; 0000191P0000217 +102,4,195,197,199,201; 0000193P0000218 +110,59.138831837,-31.778538464,-19.999999553,59.138831837, 0000195P0000219 +-31.778538464,19.999999553; 0000195P0000220 +110,59.138831837,-31.778538464,19.999999553,-72.422526777, 0000197P0000221 +-22.632272914,19.999999553; 0000197P0000222 +110,-72.422526777,-22.632272914,19.999999553,-72.422526777, 0000199P0000223 +-22.632272914,-19.999999553; 0000199P0000224 +110,-72.422526777,-22.632272914,-19.999999553,59.138831837, 0000201P0000225 +-31.778538464,-19.999999553; 0000201P0000226 +144,205,1,0,213; 0000203P0000227 +120,209,211,4.086527207,4.781798214; 0000205P0000228 +124,1.,0.,0.,-74.12621243,0.,1.,0.,-47.138362093,0.,0.,1., 0000207P0000229 +-19.999999553; 0000207P0000230 +110,0.,0.,1.,0.,0.,0.; 0000209P0000231 +110,24.565238685,0.,0.,24.565238685,0.,39.999999106; 0000211P0000232 +142,0,205,215,225,3; 0000213P0000233 +102,4,217,219,221,223; 0000215P0000234 +110,1.,4.781798214,0.,-8.334372787E-18,4.781798214,0.; 0000217P0000235 +110,-8.334372787E-18,4.781798214,0.,-1.219390227E-17, 0000219P0000236 +4.086527207,0.; 0000219P0000237 +110,-1.219390227E-17,4.086527207,0.,1.,4.086527207,0.; 0000221P0000238 +110,1.,4.086527207,0.,1.,4.781798214,0.; 0000223P0000239 +102,4,227,229,233,235; 0000225P0000240 +110,-72.422526777,-22.632272914,19.999999553,-72.422526777, 0000227P0000241 +-22.632272914,-19.999999553; 0000227P0000242 +100,0.,0.,0.,1.703685653,24.506089179,-14.390216636,19.90910889; 0000229P0000243 +124,1.,0.,0.,-74.12621243,0.,1.,0.,-47.138362093,0.,0.,1., 0000231P0000244 +-19.999999553; 0000231P0000245 +110,-88.516429067,-27.229253203,-19.999999553,-88.516429067, 0000233P0000246 +-27.229253203,19.999999553; 0000233P0000247 +100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653, 0000235P0000248 +-24.506089179; 0000235P0000249 +124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1., 0000237P0000250 +19.999999553; 0000237P0000251 +144,241,1,0,249; 0000239P0000252 +120,245,247,0.944934554,5.338250753; 0000241P0000253 +124,1.,0.,0.,-105.960486735,0.,-1.,0.,-3.095103428,0.,0.,-1., 0000243P0000254 +-19.999999553; 0000243P0000255 +110,0.,0.,1.,0.,0.,0.; 0000245P0000256 +110,29.778387016,0.,-39.999999106,29.778387016,0.,0.; 0000247P0000257 +142,0,241,251,261,3; 0000249P0000258 +102,4,253,255,257,259; 0000251P0000259 +110,1.,5.338250753,0.,-2.220446049E-16,5.338250753,0.; 0000253P0000260 +110,-5.245440609E-18,5.338250753,0.,-2.963324515E-17, 0000255P0000261 +0.944934554,0.; 0000255P0000262 +110,-2.220446049E-16,0.944934554,0.,1.,0.944934554,0.; 0000257P0000263 +110,1.,0.944934554,0.,1.,5.338250753,0.; 0000259P0000264 +102,4,263,265,269,271; 0000261P0000265 +110,-88.516429067,-27.229253203,-19.999999553,-88.516429067, 0000263P0000266 +-27.229253203,19.999999553; 0000263P0000267 +100,0.,0.,0.,17.444057668,24.134149775,17.444057668, 0000265P0000268 +-24.134149775; 0000265P0000269 +124,1.,0.,0.,-105.960486735,0.,-1.,0.,-3.095103428,0.,0.,-1., 0000267P0000270 +19.999999553; 0000267P0000271 +110,-88.516429067,21.039046347,19.999999553,-88.516429067, 0000269P0000272 +21.039046347,-19.999999553; 0000269P0000273 +100,0.,0.,0.,17.444057668,24.134149775,17.444057668, 0000271P0000274 +-24.134149775; 0000271P0000275 +124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1., 0000273P0000276 +-19.999999553; 0000273P0000277 +144,277,1,0,285; 0000275P0000278 +120,281,283,1.367007434,2.1966581; 0000277P0000279 +124,1.,0.,0.,-76.554978638,0.,1.,0.,37.587915978,0.,0.,1., 0000279P0000280 +-19.999999553; 0000279P0000281 +110,0.,0.,1.,0.,0.,0.; 0000281P0000282 +110,20.419142549,0.,0.,20.419142549,0.,39.999999106; 0000283P0000283 +142,0,277,287,297,3; 0000285P0000284 +102,4,289,291,293,295; 0000287P0000285 +110,1.,2.1966581,0.,-2.268478349E-17,2.1966581,0.; 0000289P0000286 +110,-2.268478349E-17,2.1966581,0.,-2.729026995E-17,1.367007434, 0000291P0000287 +0.; 0000291P0000288 +110,-2.729026995E-17,1.367007434,0.,1.,1.367007434,0.; 0000293P0000289 +110,1.,1.367007434,0.,1.,2.1966581,0.; 0000295P0000290 +102,4,299,301,305,307; 0000297P0000291 +110,-88.516429067,21.039046347,19.999999553,-88.516429067, 0000299P0000292 +21.039046347,-19.999999553; 0000299P0000293 +100,0.,0.,0.,-11.961450429,-16.548869631,4.132451861, 0000301P0000294 +-19.996605313; 0000301P0000295 +124,1.,0.,0.,-76.554978638,0.,1.,0.,37.587915978,0.,0.,1., 0000303P0000296 +-19.999999553; 0000303P0000297 +110,-72.422526777,17.591310665,-19.999999553,-72.422526777, 0000305P0000298 +17.591310665,19.999999553; 0000305P0000299 +100,0.,0.,0.,4.132451861,19.996605313,-11.961450429, 0000307P0000300 +16.548869631; 0000307P0000301 +124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1., 0000309P0000302 +19.999999553; 0000309P0000303 +144,313,1,0,315; 0000311P0000304 +128,1,1,1,1,0,0,1,0,0,0.,0.,136.424396865,136.424396865, 0000313P0000305 +-39.999999106,-39.999999106,0.,0.,1.,1.,1.,1.,-72.422526777, 0000313P0000306 +17.591310665,19.999999553,63.609212637,27.934517711, 0000313P0000307 +19.999999553,-72.422526777,17.591310665,-19.999999553, 0000313P0000308 +63.609212637,27.934517711,-19.999999553,0.,136.424396865, 0000313P0000309 +-39.999999106,0.; 0000313P0000310 +142,0,313,317,327,3; 0000315P0000311 +102,4,319,321,323,325; 0000317P0000312 +110,0.,0.,0.,0.,-39.999999106,0.; 0000319P0000313 +110,0.,-39.999999106,0.,136.424396865,-39.999999106,0.; 0000321P0000314 +110,136.424396865,-39.999999106,0.,136.424396865,0.,0.; 0000323P0000315 +110,136.424396865,-3.552713679E-14,0.,0.,-3.552713679E-14,0.; 0000325P0000316 +102,4,329,331,333,335; 0000327P0000317 +110,-72.422526777,17.591310665,-19.999999553,-72.422526777, 0000329P0000318 +17.591310665,19.999999553; 0000329P0000319 +110,-72.422526777,17.591310665,19.999999553,63.609212637, 0000331P0000320 +27.934517711,19.999999553; 0000331P0000321 +110,63.609212637,27.934517711,19.999999553,63.609212637, 0000333P0000322 +27.934517711,-19.999999553; 0000333P0000323 +110,63.609212637,27.934517711,-19.999999553,-72.422526777, 0000335P0000324 +17.591310665,-19.999999553; 0000335P0000325 +144,339,1,0,347; 0000337P0000326 +120,343,345,-3.552713679E-15,6.283185307; 0000339P0000327 +124,1.,0.,0.,-106.472015381,0.,1.,0.,-2.809300087,0.,0.,1., 0000341P0000328 +-40.000199106; 0000341P0000329 +110,0.,0.,1.,0.,0.,0.; 0000343P0000330 +110,15.057678156,0.,20.000199553,15.057678156,0.,60.000198659; 0000345P0000331 +142,0,339,349,359,3; 0000347P0000332 +102,4,351,353,355,357; 0000349P0000333 +110,1.,6.283185307,0.,8.881784396E-17,6.283185307,0.; 0000351P0000334 +110,1.232595164E-32,6.283185307,0.,-3.487868576E-17, 0000353P0000335 +7.993605777E-15,0.; 0000353P0000336 +110,8.881784396E-17,-1.77631253E-15,0.,1.,7.105471469E-15,0.; 0000355P0000337 +126,1,1,0,0,1,0,1.570796327,1.570796327,7.853981634,7.853981634, 0000357P0000338 +1.,1.,1.,1.687538997E-14,0.,1.,6.283185307,0.,1.570796327, 0000357P0000339 +7.853981634,0.,0.,1.; 0000357P0000340 +102,4,361,363,365,367; 0000359P0000341 +110,-91.414337225,-2.809300087,19.999999553,-91.414337225, 0000361P0000342 +-2.809300087,-19.999999553; 0000361P0000343 +126,7,4,0,1,0,0,4.71238898,4.71238898,4.71238898,4.71238898, 0000363P0000344 +4.71238898,7.853981634,7.853981634,7.853981634,10.995574288, 0000363P0000345 +10.995574288,10.995574288,10.995574288,10.995574288, 0000363P0000346 +3.831440713E+29,3.831440713E+29,4.129910647E+29,2.363425258E+29, 0000363P0000347 +2.363425258E+29,4.129910647E+29,3.831440713E+29,3.831440713E+29, 0000363P0000348 +-91.414337225,-2.809300087,-19.999999553,-91.414337225, 0000363P0000349 +9.016972681,-19.999999553,-102.903753475,15.476673808, 0000363P0000350 +-19.999999553,-121.529693537,16.362731193,-19.999999553, 0000363P0000351 +-121.529693537,-21.981331368,-19.999999553,-102.903753475, 0000363P0000352 +-21.095273982,-19.999999553,-91.414337225,-14.635572856, 0000363P0000353 +-19.999999553,-91.414337225,-2.809300087,-19.999999553, 0000363P0000354 +4.71238898,10.995574288,0.,0.,1.; 0000363P0000355 +110,-91.414337225,-2.809300087,-19.999999553,-91.414337225, 0000365P0000356 +-2.809300087,19.999999553; 0000365P0000357 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000367P0000358 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000367P0000359 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000367P0000360 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000367P0000361 +4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225, 0000367P0000362 +-2.809300087,19.999999553,-91.414337225,-14.635572856, 0000367P0000363 +19.999999553,-102.903753475,-21.095273982,19.999999553, 0000367P0000364 +-121.529693537,-21.981331368,19.999999553,-121.529693537, 0000367P0000365 +16.362731193,19.999999553,-102.903753475,15.476673808, 0000367P0000366 +19.999999553,-91.414337225,9.016972681,19.999999553, 0000367P0000367 +-91.414337225,-2.809300087,19.999999553,1.570796327,7.853981634, 0000367P0000368 +0.,0.,1.; 0000367P0000369 +144,371,1,0,379; 0000369P0000370 +120,375,377,-3.552713679E-15,6.283185307; 0000371P0000371 +124,1.,0.,0.,118.572458625,0.,1.,0.,-4.606760107,0.,0.,1., 0000373P0000372 +-40.000199106; 0000373P0000373 +110,0.,0.,1.,0.,0.,0.; 0000375P0000374 +110,23.404166834,0.,20.000199553,23.404166834,0.,60.000198659; 0000377P0000375 +142,0,371,381,391,3; 0000379P0000376 +102,4,383,385,387,389; 0000381P0000377 +110,1.,6.283185307,0.,8.881784396E-17,6.283185307,0.; 0000383P0000378 +110,1.232595164E-32,6.283185307,0.,-3.487868576E-17, 0000385P0000379 +7.993605777E-15,0.; 0000385P0000380 +110,8.881784396E-17,-1.77631253E-15,0.,1.,7.105471469E-15,0.; 0000387P0000381 +126,1,1,0,0,1,0,1.570796327,1.570796327,7.853981634,7.853981634, 0000389P0000382 +1.,1.,1.,1.687538997E-14,0.,1.,6.283185307,0.,1.570796327, 0000389P0000383 +7.853981634,0.,0.,1.; 0000389P0000384 +102,4,393,395,397,399; 0000391P0000385 +110,141.976625459,-4.606760107,19.999999553,141.976625459, 0000393P0000386 +-4.606760107,-19.999999553; 0000393P0000387 +126,7,4,0,1,0,0,4.71238898,4.71238898,4.71238898,4.71238898, 0000395P0000388 +4.71238898,7.853981634,7.853981634,7.853981634,10.995574288, 0000395P0000389 +10.995574288,10.995574288,10.995574288,10.995574288, 0000395P0000390 +3.831440713E+29,3.831440713E+29,4.129910647E+29,2.363425258E+29, 0000395P0000391 +2.363425258E+29,4.129910647E+29,3.831440713E+29,3.831440713E+29, 0000395P0000392 +141.976625459,-4.606760107,-19.999999553,141.976625459, 0000395P0000393 +13.77482954,-19.999999553,124.118612294,23.815150584, 0000395P0000394 +-19.999999553,95.168291791,25.192350618,-19.999999553, 0000395P0000395 +95.168291791,-34.405870832,-19.999999553,124.118612294, 0000395P0000396 +-33.028670798,-19.999999553,141.976625459,-22.988349754, 0000395P0000397 +-19.999999553,141.976625459,-4.606760107,-19.999999553, 0000395P0000398 +4.71238898,10.995574288,0.,0.,1.; 0000395P0000399 +110,141.976625459,-4.606760107,-19.999999553,141.976625459, 0000397P0000400 +-4.606760107,19.999999553; 0000397P0000401 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000399P0000402 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000399P0000403 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000399P0000404 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000399P0000405 +4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459, 0000399P0000406 +-4.606760107,19.999999553,141.976625459,-22.988349754, 0000399P0000407 +19.999999553,124.118612294,-33.028670798,19.999999553, 0000399P0000408 +95.168291791,-34.405870832,19.999999553,95.168291791, 0000399P0000409 +25.192350618,19.999999553,124.118612294,23.815150584, 0000399P0000410 +19.999999553,141.976625459,13.77482954,19.999999553, 0000399P0000411 +141.976625459,-4.606760107,19.999999553,1.570796327,7.853981634, 0000399P0000412 +0.,0.,1.; 0000399P0000413 +144,403,1,2,405,455,461; 0000401P0000414 +128,1,1,1,1,0,0,1,0,0,-139.650442578,-139.650442578, 0000403P0000415 +164.864616815,164.864616815,-52.441943309,-52.441943309, 0000403P0000416 +47.40098106,47.40098106,1.,1.,1.,1.,-139.650442578, 0000403P0000417 +-52.441943309,19.999999553,164.864616815,-52.441943309, 0000403P0000418 +19.999999553,-139.650442578,47.40098106,19.999999553, 0000403P0000419 +164.864616815,47.40098106,19.999999553,-139.650442578, 0000403P0000420 +164.864616815,-52.441943309,47.40098106; 0000403P0000421 +142,0,403,407,425,3; 0000405P0000422 +102,8,409,411,413,415,417,419,421,423; 0000407P0000423 +126,7,4,0,0,0,0,1.073345169,1.073345169,1.073345169,1.073345169, 0000409P0000424 +1.073345169,1.284126135,1.284126135,1.284126135,1.494907102, 0000409P0000425 +1.494907102,1.494907102,1.494907102,1.494907102,1.011189921, 0000409P0000426 +1.011189921,1.011189931,1.011179532,1.011179532,1.011189931, 0000409P0000427 +1.011189921,1.011189921,93.497879803,36.745399237,0., 0000409P0000428 +90.049436422,34.872902929,0.,86.473696164,33.245011418,0., 0000409P0000429 +82.790432165,31.870724965,0.,75.248696652,29.647496417,0., 0000409P0000430 +71.408940021,28.804071284,0.,67.521947549,28.232023481,0., 0000409P0000431 +63.609212637,27.934517711,0.,1.073345169,1.494907102,0.,0.,1.; 0000409P0000432 +110,63.609212637,27.934517711,0.,-72.422526777,17.591310665,0.; 0000411P0000433 +126,7,4,0,0,0,0,1.367007434,1.367007434,1.367007434,1.367007434, 0000413P0000434 +1.367007434,1.781832767,1.781832767,1.781832767,2.1966581, 0000413P0000435 +2.1966581,2.1966581,2.1966581,2.1966581,1.044284595,1.044284595, 0000413P0000436 +1.044285207,1.044124006,1.044124006,1.044285207,1.044284595, 0000413P0000437 +1.044284595,-72.422526777,17.591310665,0.,-74.496301391, 0000413P0000438 +17.162749235,0.,-76.619336034,17.023005488,0.,-78.746721852, 0000413P0000439 +17.175011565,0.,-82.917772227,18.068559876,0.,-84.920732008, 0000413P0000440 +18.80138208,0.,-86.800206478,19.798568183,0.,-88.516429067, 0000413P0000441 +21.039046347,0.,1.367007434,2.1966581,0.,0.,1.; 0000413P0000442 +100,0.,-105.960486735,-3.095103428,-88.516429067,21.039046347, 0000415P0000443 +-88.516429067,-27.229253203; 0000415P0000444 +126,7,4,0,0,0,0,4.086527207,4.086527207,4.086527207,4.086527207, 0000417P0000445 +4.086527207,4.434162711,4.434162711,4.434162711,4.781798214, 0000417P0000446 +4.781798214,4.781798214,4.781798214,4.781798214,1.03083173, 0000417P0000447 +1.03083173,1.03083194,1.030753477,1.030753477,1.03083194, 0000417P0000448 +1.03083173,1.03083173,-88.516429067,-27.229253203,0., 0000417P0000449 +-86.786150795,-25.978615653,0.,-84.916794517,-24.932704109,0., 0000417P0000450 +-82.936273839,-24.107124921,0.,-78.80986423,-22.928478295,0., 0000417P0000451 +-76.69208436,-22.583439786,0.,-74.552323437,-22.484207509,0., 0000417P0000452 +-72.422526777,-22.632272914,0.,4.086527207,4.781798214,0.,0.,1.; 0000417P0000453 +110,-72.422526777,-22.632272914,0.,59.138831837,-31.778538464, 0000419P0000454 +0.; 0000419P0000455 +126,7,4,0,0,0,0,4.781798214,4.781798214,4.781798214,4.781798214, 0000421P0000456 +4.781798214,4.995819176,4.995819176,4.995819176,5.209840139, 0000421P0000457 +5.209840139,5.209840139,5.209840139,5.209840139,1.011539234, 0000421P0000458 +1.011539234,1.011539246,1.011528189,1.011528189,1.011539246, 0000421P0000459 +1.011539234,1.011539234,59.138831837,-31.778538464,0., 0000421P0000460 +63.635671563,-32.09116286,0.,68.104473804,-32.724194555,0., 0000421P0000461 +72.519765903,-33.674023313,0.,81.191994379,-36.199999233,0., 0000421P0000462 +85.426740197,-37.76968291,0.,89.536511056,-39.635347961,0., 0000421P0000463 +93.497879803,-41.786361486,0.,4.781798214,5.209840139,0.,0.,1.; 0000421P0000464 +100,0.,114.819156639,-2.520481125,93.497879803,-41.786361486, 0000423P0000465 +93.497879803,36.745399237; 0000423P0000466 +102,8,427,431,433,437,441,445,447,451; 0000425P0000467 +100,0.,0.,0.,35.534447703,65.441267094,5.645780537,74.252148619; 0000427P0000468 +124,1.,0.,0.,57.9634321,0.,-1.,0.,102.18666633,0.,0.,-1., 0000429P0000469 +19.999999553; 0000429P0000470 +110,63.609212637,27.934517711,19.999999553,-72.422526777, 0000431P0000471 +17.591310665,19.999999553; 0000431P0000472 +100,0.,0.,0.,4.132451861,19.996605313,-11.961450429, 0000433P0000473 +16.548869631; 0000433P0000474 +124,1.,0.,0.,-76.554978638,0.,-1.,0.,37.587915978,0.,0.,-1., 0000435P0000475 +19.999999553; 0000435P0000476 +100,0.,0.,0.,17.444057668,24.134149775,17.444057668, 0000437P0000477 +-24.134149775; 0000437P0000478 +124,1.,0.,-0.,-105.960486735,0.,1.,0.,-3.095103428,0.,0.,1., 0000439P0000479 +19.999999553; 0000439P0000480 +100,0.,0.,0.,-14.390216636,-19.90910889,1.703685653, 0000441P0000481 +-24.506089179; 0000441P0000482 +124,1.,0.,0.,-74.12621243,0.,-1.,0.,-47.138362093,0.,0.,-1., 0000443P0000483 +19.999999553; 0000443P0000484 +110,-72.422526777,-22.632272914,19.999999553,59.138831837, 0000445P0000485 +-31.778538464,19.999999553; 0000445P0000486 +100,0.,0.,0.,5.842874313,-84.04484635,40.201922279, 0000447P0000487 +-74.037023328; 0000447P0000488 +124,1.,0.,0.,53.295957524,0.,-1.,0.,-115.823384813,0.,0.,-1., 0000449P0000489 +19.999999553; 0000449P0000490 +100,0.,0.,0.,-21.321276836,-39.265880361,-21.321276836, 0000451P0000491 +39.265880361; 0000451P0000492 +124,1.,0.,-0.,114.819156639,0.,1.,0.,-2.520481125,0.,0.,1., 0000453P0000493 +19.999999553; 0000453P0000494 +142,0,403,457,459,3; 0000455P0000495 +126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000457P0000496 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000457P0000497 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000457P0000498 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000457P0000499 +4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225, 0000457P0000500 +-2.809300087,0.,-91.414337225,-14.635572856,0.,-102.903753475, 0000457P0000501 +-21.095273982,0.,-121.529693537,-21.981331368,0.,-121.529693537, 0000457P0000502 +16.362731193,0.,-102.903753475,15.476673808,0.,-91.414337225, 0000457P0000503 +9.016972681,0.,-91.414337225,-2.809300087,0.,1.570796327, 0000457P0000504 +7.853981634,0.,0.,1.; 0000457P0000505 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000459P0000506 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000459P0000507 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000459P0000508 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000459P0000509 +4.129910647E+29,3.831440713E+29,3.831440713E+29,-91.414337225, 0000459P0000510 +-2.809300087,19.999999553,-91.414337225,-14.635572856, 0000459P0000511 +19.999999553,-102.903753475,-21.095273982,19.999999553, 0000459P0000512 +-121.529693537,-21.981331368,19.999999553,-121.529693537, 0000459P0000513 +16.362731193,19.999999553,-102.903753475,15.476673808, 0000459P0000514 +19.999999553,-91.414337225,9.016972681,19.999999553, 0000459P0000515 +-91.414337225,-2.809300087,19.999999553,1.570796327,7.853981634, 0000459P0000516 +0.,0.,1.; 0000459P0000517 +142,0,403,463,465,3; 0000461P0000518 +126,7,4,0,0,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000463P0000519 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000463P0000520 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000463P0000521 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000463P0000522 +4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459, 0000463P0000523 +-4.606760107,0.,141.976625459,-22.988349754,0.,124.118612294, 0000463P0000524 +-33.028670798,0.,95.168291791,-34.405870832,0.,95.168291791, 0000463P0000525 +25.192350618,0.,124.118612294,23.815150584,0.,141.976625459, 0000463P0000526 +13.77482954,0.,141.976625459,-4.606760107,0.,1.570796327, 0000463P0000527 +7.853981634,0.,0.,1.; 0000463P0000528 +126,7,4,0,1,0,0,1.570796327,1.570796327,1.570796327,1.570796327, 0000465P0000529 +1.570796327,4.71238898,4.71238898,4.71238898,7.853981634, 0000465P0000530 +7.853981634,7.853981634,7.853981634,7.853981634,3.831440713E+29, 0000465P0000531 +3.831440713E+29,4.129910647E+29,2.363425258E+29,2.363425258E+29, 0000465P0000532 +4.129910647E+29,3.831440713E+29,3.831440713E+29,141.976625459, 0000465P0000533 +-4.606760107,19.999999553,141.976625459,-22.988349754, 0000465P0000534 +19.999999553,124.118612294,-33.028670798,19.999999553, 0000465P0000535 +95.168291791,-34.405870832,19.999999553,95.168291791, 0000465P0000536 +25.192350618,19.999999553,124.118612294,23.815150584, 0000465P0000537 +19.999999553,141.976625459,13.77482954,19.999999553, 0000465P0000538 +141.976625459,-4.606760107,19.999999553,1.570796327,7.853981634, 0000465P0000539 +0.,0.,1.; 0000465P0000540 +S 1G 4D 466P 540 T0000001 diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl index 42310794f..80afd5603 100644 --- a/idl/SALOMEDS_Attributes.idl +++ b/idl/SALOMEDS_Attributes.idl @@ -439,6 +439,36 @@ Sets the item to be selectable void SetExpandable(in boolean value); }; + //========================================================================== +/*! \brief Flags Attribute. + + This interface is intended for storing different object attributes that + have only two states (0 and 1). +*/ + //========================================================================== + + interface AttributeFlags : GenericAttribute + { + long GetFlags(); + void SetFlags( in long theFlags ); + + boolean Get( in long theFlag ); + void Set( in long theFlag, in boolean theValue ); + }; + + //========================================================================== +/*! \brief Graphic Attribute. + This class is intended for storing information about + graphic representation of objects in dirrent views +*/ + //========================================================================== + + interface AttributeGraphic : GenericAttribute + { + void SetVisibility( in long theViewId, in boolean theValue ); + boolean GetVisibility( in long theViewId ); + }; + //========================================================================== /*! \brief Opened flag Attribute. diff --git a/resources/KERNELCatalog.xml b/resources/KERNELCatalog.xml index b7049193c..c0d046504 100644 --- a/resources/KERNELCatalog.xml +++ b/resources/KERNELCatalog.xml @@ -16,7 +16,7 @@ Salome Other NRI - 1.0 + 2.1.0 GUI Neutral Context 1 diff --git a/src/Makefile.in b/src/Makefile.in index d40b8e22b..78d258453 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -39,9 +39,9 @@ SUBDIRS = MSG2QM SALOMELocalTrace Logger Utils CASCatch PatchQt \ Container TestContainer LifeCycleCORBA HDFPersist Prs \ VTKFilter OBJECT \ TOOLSDS SALOMEDS Event \ - SALOMEGUI Plot2d VTKViewer OCCViewer \ + SALOMEGUI TOOLSGUI Plot2d VTKViewer OCCViewer \ SUPERVGraph \ - Session SALOME_SWIG TOOLSGUI SALOME_PY \ + Session SALOME_SWIG SALOME_PY \ RegistryDisplay ModuleGenerator SALOME_PYQT Loader Communication ifeq (@mpi_ok@,yes) diff --git a/src/OCCViewer/Makefile.in b/src/OCCViewer/Makefile.in index d42b49280..55719f6e8 100644 --- a/src/OCCViewer/Makefile.in +++ b/src/OCCViewer/Makefile.in @@ -43,7 +43,7 @@ LIB_CLIENT_IDL = SALOMEDS.idl \ CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(OGL_INCLUDES) $(PYTHON_INCLUDES) -LDFLAGS+=$(QT_MT_LIBS) $(OGL_LIBS) -lSalomePrs -lSalomeGUI +LDFLAGS+=$(QT_MT_LIBS) $(OGL_LIBS) -lSalomePrs -lSalomeGUI -lToolsGUI @CONCLUDE@ diff --git a/src/OCCViewer/OCCViewer_ViewFrame.cxx b/src/OCCViewer/OCCViewer_ViewFrame.cxx index 47e4def85..caa2d2f27 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.cxx +++ b/src/OCCViewer/OCCViewer_ViewFrame.cxx @@ -44,6 +44,9 @@ #include "QAD_Settings.h" #include "SALOME_Selection.h" #include "SALOME_AISShape.hxx" +#include "SALOMEGUI.h" +#include "SALOMEDS_Tool.hxx" +#include "ToolsGUI.h" // QT Include #include @@ -52,37 +55,71 @@ #include #include #include + +// IDL headers +#include +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + using namespace std; -/*! - Constructor +//======================================================================= +// name : getMapOfEntry +// Purpose : Convert list of interactive objects in map interactive object> +//======================================================================= +static void getMapOfEntry( const AIS_ListOfInteractive& theList, + QMap< QString, Handle(AIS_InteractiveObject) >& theMap ) +{ + AIS_ListIteratorOfListOfInteractive anIter( theList ); + for ( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_InteractiveObject) anIO = + Handle(SALOME_InteractiveObject)::DownCast( anIter.Value() ); + if ( !anIO.IsNull() ) + theMap[ anIO->getEntry() ] = anIter.Value(); + } +} + + +/* + Class : OCCViewer_ViewFrame + Description : View frame for Open CASCADE view */ -OCCViewer_ViewFrame::OCCViewer_ViewFrame(QWidget* parent, const QString& title) - : QAD_ViewFrame (parent, "") + + +//======================================================================= +// name : OCCViewer_ViewFrame +// Purpose : Constructor +//======================================================================= +OCCViewer_ViewFrame::OCCViewer_ViewFrame( QWidget* parent, const QString& title ) + : QAD_ViewFrame ( parent, "" ) { initialize(); } -/*! - Constructor -*/ +//======================================================================= +// name : OCCViewer_ViewFrame +// Purpose : Constructor +//======================================================================= OCCViewer_ViewFrame::OCCViewer_ViewFrame( QWidget* parent ) : QAD_ViewFrame (parent, "") { initialize(); } -/*! - Destructor -*/ +//======================================================================= +// name : ~OCCViewer_ViewFrame +// Purpose : Destructor +//======================================================================= OCCViewer_ViewFrame::~OCCViewer_ViewFrame() { cleanup(); } -/*! - Init viewframe -*/ +//======================================================================= +// name : initialize +// Purpose : Initialize view frame (called from constructors ) +//======================================================================= void OCCViewer_ViewFrame::initialize() { myViewPort = NULL; @@ -93,17 +130,18 @@ void OCCViewer_ViewFrame::initialize() myViewer->enableMultipleSelection( true ); } -/*! - Cleanup viewframe -*/ +//======================================================================= +// name : cleanup +// Purpose : Cleanup viewframe +//======================================================================= void OCCViewer_ViewFrame::cleanup() { - } -/*! - Sets the viewport for this frame -*/ +//======================================================================= +// name : setViewPort +// Purpose : Sets the viewport for this frame +//======================================================================= void OCCViewer_ViewFrame::setViewPort( OCCViewer_ViewPort* view ) { myViewPort = view; @@ -111,76 +149,81 @@ void OCCViewer_ViewFrame::setViewPort( OCCViewer_ViewPort* view ) setCentralWidget ( myViewPort ); } -/*! - Inits the viewport for this frame -*/ +//======================================================================= +// name : initViewPort +// Purpose : Inits the viewport for this frame +//======================================================================= void OCCViewer_ViewFrame::initViewPort() { /* Active Key Event */ + setFocus(); /* Initial attributes */ + myViewPort->setCursor( cursor() ); myViewPort->setBackgroundColor( backgroundColor() ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyPress (QKeyEvent*)), - this, SIGNAL(vfKeyPress(QKeyEvent*))) ); - - /* Listen to my viewport */ - QAD_ASSERT ( QObject::connect(myViewPort, - SIGNAL(vpTransformationStarted (OCCViewer_ViewPort::OperationType)), - this, - SIGNAL(vfTransformationStarted(OCCViewer_ViewPort::OperationType))) ); - QAD_ASSERT ( QObject::connect( myViewPort, - SIGNAL(vpTransformationFinished (OCCViewer_ViewPort::OperationType)), - this, - SIGNAL(vfTransformationFinished(OCCViewer_ViewPort::OperationType))) ); - - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpDrawExternal (QPainter*)), - this, SIGNAL(vfDrawExternal(QPainter*))) ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMousePress (QMouseEvent*)), - this, SIGNAL(vfMousePress(QMouseEvent*))) ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseRelease (QMouseEvent*)), - this, SIGNAL(vfMouseRelease(QMouseEvent*))) ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseMove (QMouseEvent*)), - this, SIGNAL(vfMouseMove(QMouseEvent*))) ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpMouseDoubleClick (QMouseEvent*)), - this, SIGNAL(vfMouseDoubleClick(QMouseEvent*))) ); - - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyPress (QKeyEvent*)), - this, SIGNAL(vfKeyPress(QKeyEvent*))) ); - QAD_ASSERT ( QObject::connect(myViewPort, SIGNAL(vpKeyRelease (QKeyEvent*)), - this, SIGNAL(vfKeyRelease(QKeyEvent*))) ); -} - -/*! - Returns widget containing 3D-Viewer -*/ + QAD_ASSERT( QObject::connect(myViewPort, SIGNAL( vpKeyPress ( QKeyEvent* ) ), + this, SIGNAL(vfKeyPress(QKeyEvent*))) ); + + /* Listen to my viewport */ + + QAD_ASSERT( connect( myViewPort, SIGNAL( vpTransformationStarted( OCCViewer_ViewPort::OperationType ) ), + this, SIGNAL( vfTransformationStarted( OCCViewer_ViewPort::OperationType ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpTransformationFinished ( OCCViewer_ViewPort::OperationType ) ), + this, SIGNAL( vfTransformationFinished( OCCViewer_ViewPort::OperationType ) ) ) ); + + QAD_ASSERT( connect( myViewPort, SIGNAL( vpDrawExternal( QPainter* ) ), + this, SIGNAL( vfDrawExternal( QPainter* ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpMousePress( QMouseEvent* ) ), + this, SIGNAL( vfMousePress( QMouseEvent* ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseRelease( QMouseEvent* ) ), + this, SIGNAL( vfMouseRelease( QMouseEvent* ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseMove( QMouseEvent* ) ), + this, SIGNAL( vfMouseMove( QMouseEvent* ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpMouseDoubleClick( QMouseEvent* ) ), + this, SIGNAL( vfMouseDoubleClick( QMouseEvent* ) ) ) ); + + QAD_ASSERT( connect( myViewPort, SIGNAL( vpKeyPress( QKeyEvent* ) ), + this, SIGNAL( vfKeyPress( QKeyEvent* ) ) ) ); + QAD_ASSERT( connect( myViewPort, SIGNAL( vpKeyRelease( QKeyEvent* ) ), + this, SIGNAL( vfKeyRelease( QKeyEvent* ) ) ) ); +} + +//======================================================================= +// name : getViewWidget +// Purpose : Returns widget containing 3D-Viewer +//======================================================================= QWidget* OCCViewer_ViewFrame::getViewWidget() { return (QWidget*)getViewPort(); } -/*! - Returns the viewport of this frame -*/ +//======================================================================= +// name : getViewPort +// Purpose : Returns the viewport of this frame +//======================================================================= OCCViewer_ViewPort* OCCViewer_ViewFrame::getViewPort() const { return myViewPort; } -/*! - Sets the cursor for the viewframe's viewport -*/ +//======================================================================= +// name : Sets the cursor for the viewframe's viewport +// Purpose : setCursor +//======================================================================= void OCCViewer_ViewFrame::setCursor( const QCursor& cursor) { if ( myViewPort ) - myViewPort->QWidget::setCursor(cursor); + myViewPort->QWidget::setCursor( cursor ); } -/*! - Returns the current cursor -*/ + +//======================================================================= +// name : cursor +// Purpose : Returns the current cursor +//======================================================================= QCursor OCCViewer_ViewFrame::cursor() const { if ( myViewPort ) @@ -188,18 +231,20 @@ QCursor OCCViewer_ViewFrame::cursor() const return QMainWindow::cursor(); } -/*! - Set background of the viewport -*/ +//======================================================================= +// name : setBackgroundColor +// Purpose : Set background of the viewport +//======================================================================= void OCCViewer_ViewFrame::setBackgroundColor( const QColor& color) { if ( myViewPort ) - myViewPort->setBackgroundColor(color); + myViewPort->setBackgroundColor( color ); } -/*! - Returns background of the viewport -*/ +//======================================================================= +// name : backgroundColor +// Purpose : Returns background of the viewport +//======================================================================= QColor OCCViewer_ViewFrame::backgroundColor() const { if ( myViewPort ) @@ -207,116 +252,135 @@ QColor OCCViewer_ViewFrame::backgroundColor() const return QMainWindow::backgroundColor(); } -/*! - Sets the parent viewer for the window -*/ -void OCCViewer_ViewFrame::setViewer(OCCViewer_Viewer3d* viewer) +//======================================================================= +// name : setViewer +// Purpose : Sets the parent viewer for the window +//======================================================================= +void OCCViewer_ViewFrame::setViewer( OCCViewer_Viewer3d* viewer ) { myViewer = viewer; } -/*! - Returns the parent viewer for the window -*/ +//======================================================================= +// name : getViewer +// Purpose : Returns the parent viewer for the window +//======================================================================= OCCViewer_Viewer3d* OCCViewer_ViewFrame::getViewer() const { return myViewer; } -/*! - Returns 'true' if viewframe is visible -*/ -void OCCViewer_ViewFrame::setVisible( bool visible ) +//======================================================================= +// name : setVisible +// Purpose : Show/hide view +//======================================================================= +void OCCViewer_ViewFrame::setVisible( const bool visible ) { if ( visible == QWidget::isVisible() ) return; - if ( visible ) show(); - else hide(); + if ( visible ) + show(); + else + hide(); } -/*! - Called when viewframe is about to close -*/ -void OCCViewer_ViewFrame::closeEvent(QCloseEvent* e) +//======================================================================= +// name : closeEvent +// Purpose : Called when viewframe is about to close +//======================================================================= +void OCCViewer_ViewFrame::closeEvent( QCloseEvent* e ) { - emit vfViewClosing(e); /* notify our viewer */ + emit vfViewClosing( e ); /* notify our viewer */ } -/*! - Called when viewframe is resized -*/ -void OCCViewer_ViewFrame::resizeEvent(QResizeEvent* e) +//======================================================================= +// name : resizeEvent +// Purpose : Called when viewframe is resized +//======================================================================= +void OCCViewer_ViewFrame::resizeEvent( QResizeEvent* e ) { - emit vfResize(e); + emit vfResize( e ); } +//======================================================================= +// name : keyPressEvent +// Purpose : Called when key is pressed +//======================================================================= void OCCViewer_ViewFrame::keyPressEvent( QKeyEvent *k ) { emit vfKeyPress(k); } -/*! - Fits all objects in the active view -*/ +//======================================================================= +// name : onViewFitAll +// Purpose : Fits all objects in the active view +//======================================================================= void OCCViewer_ViewFrame::onViewFitAll() { myViewPort->fitAll(); } -/*! - Fits all obejcts within a rectangular area of the active view -*/ +//======================================================================= +// name : onViewFitArea +// Purpose : Fits all obejcts within a rectangular area of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewFitArea() { myViewPort->activateWindowFit(); - QAD_Application::getDesktop()->putInfo( tr("PRP_VW3D_SKETCHAREA") ); + QAD_Application::getDesktop()->putInfo( tr( "PRP_VW3D_SKETCHAREA" ) ); } -/*! - Moves the active view -*/ +//======================================================================= +// name : onViewPan +// Purpose : Moves the active view +//======================================================================= void OCCViewer_ViewFrame::onViewPan() { myViewPort->activatePanning(); } -/*! - Zooms the active view -*/ +//======================================================================= +// name : onViewZoom +// Purpose : Zooms the active view +//======================================================================= void OCCViewer_ViewFrame::onViewZoom() { myViewPort->activateZoom(); } -/*! - Sets a new center of the active view -*/ +//======================================================================= +// name : onViewGlobalPan +// Purpose : Sets a new center of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewGlobalPan() { myViewPort->activateGlobalPanning(); QAD_Application::getDesktop()->putInfo( tr("PRP_VW3D_POINTCENTER") ); } -/*! - Rotates the active view -*/ +//======================================================================= +// name : onViewRotate +// Purpose : Rotates the active view +//======================================================================= void OCCViewer_ViewFrame::onViewRotate() { myViewPort->activateRotation(); } -/*! - Reset the active view -*/ +//======================================================================= +// name : onViewReset +// Purpose : Reset the active view +//======================================================================= void OCCViewer_ViewFrame::onViewReset() { myViewPort->reset(); } -/*! - Provides front projection of the active view -*/ +//======================================================================= +// name : onViewFront +// Purpose : Provides front projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewFront() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -324,9 +388,10 @@ void OCCViewer_ViewFrame::onViewFront() onViewFitAll(); } -/*! - Provides back projection of the active view -*/ +//======================================================================= +// name : onViewBack +// Purpose : Provides back projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewBack() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -334,9 +399,10 @@ void OCCViewer_ViewFrame::onViewBack() onViewFitAll(); } -/*! - Provides right projection of the active view -*/ +//======================================================================= +// name : onViewRight +// Purpose : Provides right projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewRight() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -345,9 +411,10 @@ void OCCViewer_ViewFrame::onViewRight() onViewFitAll(); } -/*! - Provides left projection of the active view -*/ +//======================================================================= +// name : onViewLeft +// Purpose : Provides left projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewLeft() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -356,9 +423,10 @@ void OCCViewer_ViewFrame::onViewLeft() onViewFitAll(); } -/*! - Provides bottom projection of the active view -*/ +//======================================================================= +// name : onViewBottom +// Purpose : Provides bottom projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewBottom() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -366,9 +434,10 @@ void OCCViewer_ViewFrame::onViewBottom() onViewFitAll(); } -/*! - Provides top projection of the active view -*/ +//======================================================================= +// name : onViewTop +// Purpose : Provides top projection of the active view +//======================================================================= void OCCViewer_ViewFrame::onViewTop() { Handle( V3d_View) view3d = ((OCCViewer_ViewPort3d*)myViewPort)->getView(); @@ -376,9 +445,10 @@ void OCCViewer_ViewFrame::onViewTop() onViewFitAll(); } -/*! - Display/hide Trihedron -*/ +//======================================================================= +// name : onViewTrihedron +// Purpose : Display/hide Trihedron +//======================================================================= void OCCViewer_ViewFrame::onViewTrihedron() { if (!myViewer->getAISContext()->IsDisplayed( myViewer->getTrihedron() )) @@ -388,124 +458,143 @@ void OCCViewer_ViewFrame::onViewTrihedron() onAdjustTrihedron(); } -void OCCViewer_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject, QString newName ) +//======================================================================= +// name : rename +// Purpose : Rename entry object +//======================================================================= +void OCCViewer_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject, + const QString newName ) { myViewer->rename(IObject, newName); } +//======================================================================= +// name : unHighlightAll +// Purpose : Unhighlight all objects +//======================================================================= void OCCViewer_ViewFrame::unHighlightAll() { myViewer->unHighlightAll(); } -void OCCViewer_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update ) +//======================================================================= +// name : highlight +// Purpose : Highlight object +//======================================================================= +void OCCViewer_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject, + const bool highlight, + const bool update ) { - myViewer->highlight(IObject, highlight, update); + myViewer->highlight( IObject, highlight, update ); } +//======================================================================= +// name : isInViewer +// Purpose : Magic function +//======================================================================= bool OCCViewer_ViewFrame::isInViewer( const Handle(SALOME_InteractiveObject)& IObject ) { return myViewer->isInViewer( IObject ); } +//======================================================================= +// name : isVisible +// Purpose : Verify whether object is visible +//======================================================================= bool OCCViewer_ViewFrame::isVisible( const Handle(SALOME_InteractiveObject)& IObject ) { return myViewer->isVisible( IObject ); } +//======================================================================= +// name : setPopupServer +// Purpose : Set popup server +//======================================================================= void OCCViewer_ViewFrame::setPopupServer( QAD_Application* App ) { myViewer->setPopupServer( App ); } -void OCCViewer_ViewFrame::undo(QAD_Study* theStudy, const char* StudyFrameEntry) +//======================================================================= +// name : redisplayAll +// Purpose : Redisplay all objects of active component in accordance with +// their display flags +//======================================================================= +void OCCViewer_ViewFrame::redisplayAll( QAD_Study* theQADStudy, const bool theToUpdate ) { - SALOMEDS::Study_var aStudy = theStudy->getStudyDocument(); - AIS_ListOfInteractive List1; - myViewer->getAISContext()->ObjectsInCollector(List1); - AIS_ListIteratorOfListOfInteractive ite1(List1); - for( ; ite1.More(); ite1.Next() ) - { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite1.Value()->GetOwner() ); - - if ( !anObj.IsNull() && - anObj->hasEntry() && - theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry) ) - { - myViewer->getAISContext()->Display( ite1.Value() ); - } - } + SALOMEDS::Study_var aStudy = theQADStudy->getStudyDocument(); + QAD_Desktop* aDesktop = QAD_Application::getDesktop(); + SALOMEGUI* aGUI = aDesktop->getActiveGUI(); + const QString& aCompName = aDesktop->getComponentDataType(); + SALOMEDS::SObject_var aComponent = + SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) ); + + if ( aComponent->_is_nil() ) + return; + + Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); + bool isTrhDisplayed = anIC->IsDisplayed( myViewer->getTrihedron() ); - AIS_ListOfInteractive List; - myViewer->getAISContext()->DisplayedObjects(List); - AIS_ListIteratorOfListOfInteractive ite(List); - for ( ; ite.More(); ite.Next() ) - { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() ); + anIC->DisplayAll( true, false ); + anIC->EraseAll( false, false ); + + if ( isTrhDisplayed ) + anIC->Display( myViewer->getTrihedron(), false ); - if ( !anObj.IsNull() && - anObj->hasEntry() && - theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry) ) + std::list aList; + SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList ); + + std::list::iterator anIter = aList.begin(); + for ( ; anIter != aList.end(); ++anIter ) + { + SALOMEDS::SObject_var anObj = (*anIter); + if ( ToolsGUI::GetVisibility( aStudy, anObj, this ) ) { - myViewer->getAISContext()->Erase( ite.Value(), true, true ); + Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject(); + anIObj->setEntry( anObj->GetID() ); + aGUI->BuildPresentation( anIObj, this ); } } + + if ( theToUpdate ) + Repaint(); } -void OCCViewer_ViewFrame::redo(QAD_Study* theStudy, const char* StudyFrameEntry) +//======================================================================= +// name : undo +// Purpose : Redisplay all objects of active component in accordance with +// their display flags. Called when undo operation is complited +//======================================================================= +void OCCViewer_ViewFrame::undo( QAD_Study* theQADStudy, const char* ) { - SALOMEDS::Study_var aStudy = theStudy->getStudyDocument(); - SALOMEDS::SObject_var RefSO; - SALOMEDS::SObject_var SO = aStudy->FindObjectID( StudyFrameEntry ); - SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SO); - for (; it->More();it->Next()){ - SALOMEDS::SObject_var CSO= it->Value(); - if (CSO->ReferencedObject(RefSO)) - { - AIS_ListOfInteractive List; - myViewer->getAISContext()->ObjectsInCollector(List); - - AIS_ListIteratorOfListOfInteractive ite(List); - for ( ; ite.More(); ite.Next() ) - { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() ); - - if ( !anObj.IsNull() && anObj->hasEntry() && strcmp( anObj->getEntry(), RefSO->GetID() ) == 0 ) - myViewer->getAISContext()->Display( ite.Value(), false ); - } - } - } - - AIS_ListOfInteractive List1; - myViewer->getAISContext()->DisplayedObjects(List1); - AIS_ListIteratorOfListOfInteractive ite1(List1); - for ( ; ite1.More(); ite1.Next() ) - { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite1.Value()->GetOwner() ); + redisplayAll( theQADStudy ); +} - if ( !anObj.IsNull() && anObj->hasEntry() && !theStudy->isInViewer( anObj->getEntry(), StudyFrameEntry ) ) - myViewer->getAISContext()->Erase( ite1.Value(), false, true ); - } - - Repaint(); +//======================================================================= +// name : redo +// Purpose : Redisplay all objects of active component in accordance with +// their display flags. Called when undo operation is complited +//======================================================================= +void OCCViewer_ViewFrame::redo( QAD_Study* theQADStudy, const char* ) +{ + redisplayAll( theQADStudy ); } -/* selection */ -Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject(const char* Entry) +//======================================================================= +// name : FindIObject +// Purpose : Find in context SALOME_InteractiveObject by entry +//======================================================================= +Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject( const char* Entry ) { Handle (AIS_InteractiveContext) ic = myViewer->getAISContext(); AIS_ListOfInteractive List; - ic->DisplayedObjects(List); + ic->DisplayedObjects( List ); AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); + ic->ObjectsInCollector( List1 ); + List.Append( List1 ); - AIS_ListIteratorOfListOfInteractive ite(List); + AIS_ListIteratorOfListOfInteractive ite( List ); for ( ; ite.More(); ite.Next() ) { Handle(SALOME_InteractiveObject) anObj = @@ -521,54 +610,69 @@ Handle(SALOME_InteractiveObject) OCCViewer_ViewFrame::FindIObject(const char* En return Handle(SALOME_InteractiveObject)(); } -/* display */ -void OCCViewer_ViewFrame::Display(const Handle(SALOME_InteractiveObject)& IObject, bool update) +//======================================================================= +// name : Display +// Purpose : Display object +//======================================================================= +void OCCViewer_ViewFrame::Display( const Handle(SALOME_InteractiveObject)& theIObject, + bool toUpdate ) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOME_Selection* Sel - = SALOME_Selection::Selection( myStudy->getSelection() ); + if ( theIObject.IsNull() ) + return; - Handle (AIS_InteractiveContext) ic = myViewer->getAISContext(); + QAD_Study* aQADStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOME_Selection* aSel = SALOME_Selection::Selection( aQADStudy->getSelection() ); + SALOMEDS::Study_var aStudy = aQADStudy->getStudyDocument(); - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); - - AIS_ListIteratorOfListOfInteractive ite( List ); - for ( ; ite.More(); ite.Next() ) + Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); + + AIS_ListOfInteractive aList; + anIC->ObjectsInCollector( aList ); + AIS_ListIteratorOfListOfInteractive anIter( aList ); + for ( ; anIter.More(); anIter.Next() ) { Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() ); + Handle(SALOME_InteractiveObject)::DownCast( anIter.Value()->GetOwner() ); - if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( IObject ) ) + if ( !anObj.IsNull() && anObj->hasEntry() && anObj->isSame( theIObject ) ) { - ic->Display( ite.Value(), false ); - Sel->AddIObject( anObj, false ); + anIC->Display( anIter.Value(), false ); + aSel->AddIObject( anObj, false ); + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); break; } } - if ( update ) + if ( toUpdate ) Repaint(); } -void OCCViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject) +//======================================================================= +// name : DisplayOnly +// Purpose : Display object and erase all other ones +//======================================================================= +void OCCViewer_ViewFrame::DisplayOnly( const Handle(SALOME_InteractiveObject)& theIO ) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOME_Selection* Sel - = SALOME_Selection::Selection( myStudy->getSelection() ); + EraseAll(); + Display( theIO ); +} - Handle (AIS_InteractiveContext) ic = myViewer->getAISContext(); +//======================================================================= +// name : Erase +// Purpose : Erase object +//======================================================================= +void OCCViewer_ViewFrame::Erase( const Handle(SALOME_InteractiveObject)& theIObject, + bool toUpdate ) +{ + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOME_Selection* aSel = SALOME_Selection::Selection( aStudy->getSelection() ); + + Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); + AIS_ListOfInteractive aList; + anIC->DisplayedObjects( aList ); - AIS_ListIteratorOfListOfInteractive ite( List ); + AIS_ListIteratorOfListOfInteractive ite( aList ); for ( ; ite.More(); ite.Next() ) { Handle(SALOME_InteractiveObject) anObj = @@ -576,82 +680,129 @@ void OCCViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& IO if ( !anObj.IsNull() && anObj->hasEntry() ) { - if ( !anObj->isSame( IObject ) ) + if ( anObj->isSame( theIObject ) ) { - ic->Erase( ite.Value(), false ); - Sel->RemoveIObject( anObj, false ); - } - else - { - ic->Display( ite.Value(), false ); - Sel->AddIObject( anObj, false ); + anIC->Erase( ite.Value(), false ); + aSel->RemoveIObject( anObj, false ); + ToolsGUI::SetVisibility( aStudy->getStudyDocument(), anObj->getEntry(), false, this ); + break; } } } - - Repaint(); + + if ( toUpdate ) + Repaint(); } -void OCCViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& IObject, bool update) + +//======================================================================= +// name : DisplayAll +// Purpose : Display all objects of active component +//======================================================================= +void OCCViewer_ViewFrame::DisplayAll() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOME_Selection* Sel - = SALOME_Selection::Selection( myStudy->getSelection() ); + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + QAD_Desktop* aDesktop = QAD_Application::getDesktop(); + SALOMEGUI* aGUI = aDesktop->getActiveGUI(); + const QString& aCompName = aDesktop->getComponentDataType(); + SALOMEDS::SObject_var aComponent = + SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) ); + + if ( aComponent->_is_nil() ) + return; - Handle (AIS_InteractiveContext) ic = myViewer->getAISContext(); - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - - AIS_ListIteratorOfListOfInteractive ite( List ); - for ( ; ite.More(); ite.Next() ) + Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); + + AIS_ListOfInteractive aDispList; + AIS_ListOfInteractive aCollList; + anIC->DisplayedObjects( aDispList ); + anIC->ObjectsInCollector( aCollList ); + + QMap< QString, Handle(AIS_InteractiveObject) > aDispMap; + QMap< QString, Handle(AIS_InteractiveObject) > aCollMap; + getMapOfEntry( aDispList, aDispMap ); + getMapOfEntry( aCollList, aCollMap ); + + std::list aList; + SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList ); + + std::list::iterator anIter = aList.begin(); + for ( ; anIter != aList.end(); ++anIter ) { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast( ite.Value()->GetOwner() ); + SALOMEDS::SObject_var anObj = (*anIter); + if ( anObj->_is_nil() ) + continue; - if ( !anObj.IsNull() && anObj->hasEntry() ) + const char* aEntry = anObj->GetID(); + if ( aCollMap.contains( aEntry ) ) { - if ( anObj->isSame( IObject ) ) - { - ic->Erase( ite.Value(), false ); - Sel->RemoveIObject( anObj, false ); - break; - } + anIC->DisplayFromCollector( aCollMap[ aEntry ], false ); + ToolsGUI::SetVisibility( aStudy, aEntry, true, this ); + } + else if ( !aDispMap.contains( aEntry ) ) + { + Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject(); + anIObj->setEntry( anObj->GetID() ); + aGUI->BuildPresentation( anIObj, this ); } } - - if ( update ) - Repaint(); -} -void OCCViewer_ViewFrame::DisplayAll() -{ - myViewer->getAISContext()->DisplayAll(Standard_False,Standard_True); + Repaint(); } + +//======================================================================= +// name : EraseAll +// Purpose : Erase all objects +//======================================================================= void OCCViewer_ViewFrame::EraseAll() { - Standard_Boolean isTrihedronDisplayed = + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + + Standard_Boolean isTrihedronDisplayed = myViewer->getAISContext()->IsDisplayed( myViewer->getTrihedron() ); - myViewer->getAISContext()->EraseAll(); - if (isTrihedronDisplayed) + + Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); + + AIS_ListOfInteractive aList; + anIC->DisplayedObjects( aList ); + AIS_ListIteratorOfListOfInteractive anIter( aList ); + for ( ; anIter.More(); anIter.Next() ) + { + if ( anIC->IsDisplayed( myViewer->getTrihedron() ) && + anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) ) + continue; + + Handle(AIS_InteractiveObject) anIO = anIter.Value(); + anIC->Erase( anIO, false, true ); + + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() ); + + if ( !anObj.IsNull() && anObj->hasEntry() ) + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), false, this ); + } + + if ( isTrihedronDisplayed ) myViewer->getAISContext()->Display( myViewer->getTrihedron() ); else Repaint(); } - - +//======================================================================= +// name : Repaint +// Purpose : Uodate view +//======================================================================= void OCCViewer_ViewFrame::Repaint() { onAdjustTrihedron(); myViewer->getViewer3d()->Update(); } -//========================================================== -/*! - * OCCViewer_ViewFrame::getTrihedronSize - * Get new an current trihedron size - */ -//========================================================== +//======================================================================= +// name : getTrihedronSize +// Purpose : Get new and current trihedron size corresponding to the +// current model size +//======================================================================= bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize ) { theNewSize = 100; @@ -661,10 +812,9 @@ bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize if ( view3d.IsNull() ) return false; - + double Xmin = 0, Ymin = 0, Zmin = 0, Xmax = 0, Ymax = 0, Zmax = 0; double aMaxSide; - double aPercents; view3d->View()->MinMaxValues( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax ); @@ -689,6 +839,10 @@ bool OCCViewer_ViewFrame::getTrihedronSize( double& theNewSize, double& theSize fabs( theNewSize - theSize) > theNewSize * EPS; } +//======================================================================= +// name : AdjustTrihedrons +// Purpose : Adjust trihedron size in accordance with size of model +//======================================================================= void OCCViewer_ViewFrame::AdjustTrihedrons( const bool forced ) { Handle (AIS_InteractiveContext) ic = myViewer->getAISContext(); @@ -711,17 +865,19 @@ void OCCViewer_ViewFrame::AdjustTrihedrons( const bool forced ) myViewer->setTrihedronSize( aNewSize ); } +//======================================================================= +// name : onAdjustTrihedron +// Purpose : Slot. Called when trihedrons must be resized +//======================================================================= void OCCViewer_ViewFrame::onAdjustTrihedron() { AdjustTrihedrons( false ); } -//========================================================== -/*! - * OCCViewer_ViewFrame::Display - * Display presentation - */ -//========================================================== +//======================================================================= +// name : Display +// Purpose : Display presentation +//======================================================================= void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs ) { // try do downcast object @@ -734,7 +890,7 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs ) // get all displayed objects AIS_ListOfInteractive List; ic->DisplayedObjects( List ); - // get objects in he collector + // get objects in the collector AIS_ListOfInteractive ListCollector; ic->ObjectsInCollector( ListCollector ); @@ -743,46 +899,63 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs ) anOCCPrs->GetObjects( anAISObjects ); AIS_ListIteratorOfListOfInteractive aIter( anAISObjects ); - for ( ; aIter.More(); aIter.Next() ) { + for ( ; aIter.More(); aIter.Next() ) + { Handle(AIS_InteractiveObject) anAIS = aIter.Value(); - if ( !anAIS.IsNull() ) { + if ( !anAIS.IsNull() ) + { // try to find presentation in the viewer bool bDisplayed = false; AIS_ListIteratorOfListOfInteractive ite( List ); - while ( ite.More() ) { - // compare presentations by handles - // if the object is already displayed - nothing to do more - if ( ite.Value() == anAIS ) { - - // Deactivate object if necessary - if ( !anOCCPrs->ToActivate() ) - ic->Deactivate( anAIS ); - bDisplayed = true; - break; - } - ite.Next(); + for ( ; ite.More(); ite.Next() ) + { + // compare presentations by handles + // if the object is already displayed - nothing to do more + if ( ite.Value() == anAIS ) + { + // Deactivate object if necessary + if ( !anOCCPrs->ToActivate() ) + ic->Deactivate( anAIS ); + bDisplayed = true; + break; + } } + if ( bDisplayed ) - continue; + continue; + // then try to find presentation in the collector bDisplayed = false; ite.Initialize( ListCollector ); - while ( ite.More() ) { - // compare presentations by handles - // if the object is in collector - display it - if ( ite.Value() == anAIS ) { - ic->DisplayFromCollector( anAIS, false ); - - // Deactivate object if necessary - if ( !anOCCPrs->ToActivate() ) - ic->Deactivate( anAIS ); - bDisplayed = true; - break; - } - ite.Next(); + for ( ; ite.More(); ite.Next() ) + { + // compare presentations by handles + // if the object is in collector - display it + if ( ite.Value() == anAIS ) + { + ic->DisplayFromCollector( anAIS, false ); + + // Deactivate object if necessary + if ( !anOCCPrs->ToActivate() ) + ic->Deactivate( anAIS ); + bDisplayed = true; + + // Set visibility flag + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() ); + if ( !anObj.IsNull() && anObj->hasEntry() ) + { + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); + } + + break; + } } if ( bDisplayed ) - continue; + continue; + // if object is not displayed and not found in the collector - display it if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) ) { @@ -791,9 +964,19 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs ) getTrihedronSize( aNewSize, aSize ); aTrh->SetSize( aTrh == myViewer->getTrihedron() ? aNewSize : 0.5 * aNewSize ); } - + ic->Display( anAIS, false ); + // Set visibility flag + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() ); + if ( !anObj.IsNull() && anObj->hasEntry() ) + { + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); + } + // Deactivate object if necessary if ( !anOCCPrs->ToActivate() ) ic->Deactivate( anAIS ); @@ -801,12 +984,10 @@ void OCCViewer_ViewFrame::Display( const SALOME_OCCPrs* prs ) } } -//========================================================== -/*! - * OCCViewer_ViewFrame::Erase - * Erase presentation - */ -//========================================================== +//======================================================================= +// name : Erase +// Purpose : Erase presentation +//======================================================================= void OCCViewer_ViewFrame::Erase( const SALOME_OCCPrs* prs, const bool forced ) { // try do downcast object @@ -827,16 +1008,27 @@ void OCCViewer_ViewFrame::Erase( const SALOME_OCCPrs* prs, const bool forced ) if ( !anAIS.IsNull() ) { // erase the object from context : move it to collector ic->Erase( anAIS, false, forced ? false : true ); + + // Set visibility flag if necessary + if ( !forced ) + { + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() ); + if ( !anObj.IsNull() && anObj->hasEntry() ) + { + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); + } + } } } } -//========================================================== -/*! - * OCCViewer_ViewFrame::CreatePrs - * Create presentation by entry - */ -//========================================================== +//======================================================================= +// name : CreatePrs +// Purpose : Create presentation corresponding to the entry +//======================================================================= SALOME_Prs* OCCViewer_ViewFrame::CreatePrs( const char* entry ) { OCCViewer_Prs* prs = new OCCViewer_Prs(); @@ -866,12 +1058,10 @@ SALOME_Prs* OCCViewer_ViewFrame::CreatePrs( const char* entry ) return prs; } -//========================================================== -/*! - * OCCViewer_ViewFrame::LocalSelection - * Activates selection of sub shapes - */ -//========================================================== +//======================================================================= +// name : LocalSelection +// Purpose : Activates selection of sub shapes +//======================================================================= void OCCViewer_ViewFrame::LocalSelection( const SALOME_OCCPrs* thePrs, const int theMode ) { Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); @@ -914,12 +1104,10 @@ void OCCViewer_ViewFrame::LocalSelection( const SALOME_OCCPrs* thePrs, const int } } -//========================================================== -/*! - * OCCViewer_ViewFrame::GlobalSelection - * Deactivates selection of sub shapes - */ -//========================================================== +//======================================================================= +// name : GlobalSelection +// Purpose : Deactivates selection of sub shapes +//======================================================================= void OCCViewer_ViewFrame::GlobalSelection( const bool update ) const { Handle(AIS_InteractiveContext) anIC = myViewer->getAISContext(); @@ -929,24 +1117,20 @@ void OCCViewer_ViewFrame::GlobalSelection( const bool update ) const anIC->CurrentViewer()->Redraw(); } -//========================================================== -/*! - * OCCViewer_ViewFrame::BeforeDisplay - * Axiluary method called before displaying of objects - */ -//========================================================== +//======================================================================= +// name : BeforeDisplay +// Purpose : Axiluary method called before displaying of objects +//======================================================================= void OCCViewer_ViewFrame::BeforeDisplay( SALOME_Displayer* d ) { d->BeforeDisplay( this, SALOME_OCCViewType() ); } -//========================================================== -/*! - * OCCViewer_ViewFrame::AfterDisplay - * Axiluary method called after displaying of objects - */ -//========================================================== -void OCCViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d ) +//======================================================================= +// name : AfterDisplay +// Purpose : Axiluary method called after displaying of objects +//======================================================================= +void OCCViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d ) { d->AfterDisplay( this, SALOME_OCCViewType() ); } diff --git a/src/OCCViewer/OCCViewer_ViewFrame.h b/src/OCCViewer/OCCViewer_ViewFrame.h index 4d29bcc44..42b3c0685 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.h +++ b/src/OCCViewer/OCCViewer_ViewFrame.h @@ -34,126 +34,142 @@ #include "SALOME_Selection.h" class OCCViewer_Viewer3d; + +/* + Class : OCCViewer_ViewFrame + Description : View frame for Open CASCADE view +*/ + class QAD_EXPORT OCCViewer_ViewFrame : public QAD_ViewFrame { Q_OBJECT - public: - OCCViewer_ViewFrame(QWidget* parent, const QString& title); - OCCViewer_ViewFrame(QWidget* parent = 0); - virtual ~OCCViewer_ViewFrame(); - - protected: - virtual void initViewPort(); - void initialize(); - void cleanup(); - - public: - ViewType getTypeView() const{ return VIEW_OCC;}; - QWidget* getViewWidget(); - void setViewPort(OCCViewer_ViewPort* view); - OCCViewer_ViewPort* getViewPort() const; - - void setViewer(OCCViewer_Viewer3d* viewer); - OCCViewer_Viewer3d* getViewer() const; +public: - void setVisible( bool isVisible = true ); + OCCViewer_ViewFrame( QWidget* parent, const QString& title ); + OCCViewer_ViewFrame( QWidget* parent = 0 ); + virtual ~OCCViewer_ViewFrame(); - void setBackgroundColor( const QColor& ); - QColor backgroundColor() const; + /* + Reimplemented from QAD_ViewFrame + */ - void setCursor( const QCursor& ); - QCursor cursor() const; + virtual ViewType getTypeView() const { return VIEW_OCC; } + virtual QWidget* getViewWidget(); + virtual void setBackgroundColor( const QColor& ); + virtual QColor backgroundColor() const; + virtual void SetSelectionMode( Selection_Mode mode ) {}; - void SetSelectionMode( Selection_Mode mode ) {}; - /* popup management */ - void setPopupServer( QAD_Application* ); - + + virtual void setPopupServer( QAD_Application* ); /* interactive object management */ - void highlight( const Handle(SALOME_InteractiveObject)& IObject, - bool highlight, bool update = true ); - void unHighlightAll(); - void rename( const Handle(SALOME_InteractiveObject)& IObject, - QString newName ); - bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject ); - bool isVisible( const Handle(SALOME_InteractiveObject)& IObject ); + + virtual void highlight( const Handle(SALOME_InteractiveObject)&, + const bool highlight, + const bool update = true ); + virtual void unHighlightAll(); + virtual void rename( const Handle(SALOME_InteractiveObject)&, + QString ); + virtual bool isInViewer( const Handle(SALOME_InteractiveObject)& ); + virtual bool isVisible( const Handle(SALOME_InteractiveObject)& ); /* undo/redo management */ - void undo(QAD_Study* aStudy, const char* StudyFrameEntry); - void redo(QAD_Study* aStudy, const char* StudyFrameEntry); + + void undo( QAD_Study* aStudy, const char* StudyFrameEntry ); + void redo( QAD_Study* aStudy, const char* StudyFrameEntry ); /* selection */ - Handle(SALOME_InteractiveObject) FindIObject(const char* Entry); + + virtual Handle(SALOME_InteractiveObject) FindIObject( const char* Entry ); - /* display */ - void Display(const Handle(SALOME_InteractiveObject)& IObject, bool update = true); - void DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject); - void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool update = true); - void DisplayAll(); - void EraseAll(); - void Repaint(); + /* display */ + virtual void Display( const Handle(SALOME_InteractiveObject)&, + bool update = true); + virtual void DisplayOnly( const Handle(SALOME_InteractiveObject)& ); + virtual void Erase( const Handle(SALOME_InteractiveObject)&, + bool update = true); + virtual void DisplayAll(); + virtual void EraseAll(); + virtual void Repaint(); - /* Reimplemented from SALOME_View */ - void Display( const SALOME_OCCPrs* ); - void Erase( const SALOME_OCCPrs*, const bool = false ); - SALOME_Prs* CreatePrs( const char* entry = 0 ); - virtual void BeforeDisplay( SALOME_Displayer* d ); - virtual void AfterDisplay ( SALOME_Displayer* d ); - virtual void LocalSelection( const SALOME_OCCPrs*, const int ); - virtual void GlobalSelection( const bool = false ) const; - - - void AdjustTrihedrons( const bool forced = false ); - - // Method for activation of sub-shapes selection - - - protected: - void closeEvent(QCloseEvent* e); - void resizeEvent(QResizeEvent* e); - void keyPressEvent( QKeyEvent *k ); - - signals: - void vfTransformationStarted ( OCCViewer_ViewPort::OperationType ); - void vfTransformationFinished( OCCViewer_ViewPort::OperationType ); - void vfDrawExternal(QPainter* painter); - void vfMousePress(QMouseEvent*); - void vfMouseRelease(QMouseEvent*); - void vfMouseMove(QMouseEvent*); - void vfMouseDoubleClick(QMouseEvent*); - void vfKeyPress(QKeyEvent*); - void vfKeyRelease(QKeyEvent*); - void vfResize(QResizeEvent*); - void vfPrint(QPaintEvent*); - void vfViewClosing(QCloseEvent*); - void vfMoved (QMoveEvent*); - - public slots: - - void onViewPan(); - void onViewZoom(); - void onViewFitAll(); - void onViewFitArea(); - void onViewGlobalPan(); - void onViewRotate(); - void onViewReset(); - void onViewFront(); - void onViewBack(); - void onViewRight(); - void onViewLeft(); - void onViewBottom(); - void onViewTop(); - void onViewTrihedron(); - void onAdjustTrihedron(); + void AdjustTrihedrons( const bool forced = false ); + /* Reimplemented from SALOME_View */ + + virtual void Display( const SALOME_OCCPrs* ); + virtual void Erase( const SALOME_OCCPrs*, const bool = false ); + virtual SALOME_Prs* CreatePrs( const char* entry = 0 ); + virtual void BeforeDisplay( SALOME_Displayer* d ); + virtual void AfterDisplay ( SALOME_Displayer* d ); + virtual void LocalSelection( const SALOME_OCCPrs*, const int ); + virtual void GlobalSelection( const bool = false ) const; + + /* Own public methods */ + + void setViewPort( OCCViewer_ViewPort* ); + OCCViewer_ViewPort* getViewPort() const; + + void setViewer( OCCViewer_Viewer3d* ); + OCCViewer_Viewer3d* getViewer() const; + + void setVisible( const bool isVisible = true ); + + void setCursor( const QCursor& ); + QCursor cursor() const; + +signals: + + void vfTransformationStarted ( OCCViewer_ViewPort::OperationType ); + void vfTransformationFinished( OCCViewer_ViewPort::OperationType ); + void vfDrawExternal( QPainter* painter ); + void vfMousePress( QMouseEvent* ); + void vfMouseRelease( QMouseEvent* ); + void vfMouseMove( QMouseEvent* ); + void vfMouseDoubleClick( QMouseEvent* ); + void vfKeyPress( QKeyEvent* ); + void vfKeyRelease( QKeyEvent* ); + void vfResize( QResizeEvent* ); + void vfPrint( QPaintEvent* ); + void vfViewClosing( QCloseEvent* ); + void vfMoved ( QMoveEvent* ); + +public slots: + + void onViewPan(); + void onViewZoom(); + void onViewFitAll(); + void onViewFitArea(); + void onViewGlobalPan(); + void onViewRotate(); + void onViewReset(); + void onViewFront(); + void onViewBack(); + void onViewRight(); + void onViewLeft(); + void onViewBottom(); + void onViewTop(); + void onViewTrihedron(); + void onAdjustTrihedron(); + +protected: + + void initViewPort(); + void initialize(); + void cleanup(); + void closeEvent( QCloseEvent* ); + void resizeEvent( QResizeEvent* ); + void keyPressEvent( QKeyEvent * ); private: - bool getTrihedronSize( double& theNewSize, double& theSize ); + + bool getTrihedronSize( double& theNewSize, double& theSize ); + void redisplayAll( QAD_Study*, const bool = true ); - protected: - OCCViewer_Viewer3d* myViewer; // my owner - OCCViewer_ViewPort* myViewPort; // child viewport +private: + + OCCViewer_Viewer3d* myViewer; // my owner + OCCViewer_ViewPort* myViewPort; // child viewport }; #endif diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 9ea1b6828..68a73d4a5 100644 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -45,6 +45,7 @@ #if !defined WNT #include #endif + using namespace std; /*! @@ -84,7 +85,6 @@ void OCCViewer_ViewPort3d::onCreatePopup() if ( myPopup ) { QAD_Desktop* Desktop = (QAD_Desktop*) QAD_Application::getDesktop(); QAD_Study* myActiveStudy = Desktop->getActiveStudy(); - SALOME_Selection* Sel = SALOME_Selection::Selection( myActiveStudy->getSelection() ); QString theContext; QString theParent("Viewer"); diff --git a/src/OCCViewer/OCCViewer_Viewer3d.cxx b/src/OCCViewer/OCCViewer_Viewer3d.cxx index fae548a60..c79b20136 100644 --- a/src/OCCViewer/OCCViewer_Viewer3d.cxx +++ b/src/OCCViewer/OCCViewer_Viewer3d.cxx @@ -32,6 +32,8 @@ */ #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" +#include "OCCViewer_AISSelector.h" #include "QAD.h" #include "QAD_Config.h" #include "QAD_Desktop.h" @@ -61,6 +63,7 @@ #include #include #include + using namespace std; DEFINE_BASECOLLECTION( OCCViewer_CollectionOfIndexedMapOfShapes, TopTools_IndexedMapOfShape ) diff --git a/src/OCCViewer/OCCViewer_Viewer3d.h b/src/OCCViewer/OCCViewer_Viewer3d.h index dab77ab2a..f9433e290 100644 --- a/src/OCCViewer/OCCViewer_Viewer3d.h +++ b/src/OCCViewer/OCCViewer_Viewer3d.h @@ -29,9 +29,7 @@ #ifndef OCCVIEWER_VIEWER3D_H #define OCCVIEWER_VIEWER3D_H -#include "OCCViewer_ViewFrame.h" -#include "OCCViewer_AISSelector.h" - +#include "OCCViewer_ViewPort.h" #include "QAD.h" #include "QAD_Popup.h" #include "QAD_ViewFrame.h" @@ -41,6 +39,9 @@ #include #include +class OCCViewer_ViewFrame; +class OCCViewer_AISSelector; + class QAD_EXPORT OCCViewer_Viewer3d : public QObject, public QAD_PopupClientServer { Q_OBJECT diff --git a/src/PatchQt/BUGS_DESCRIPTION b/src/PatchQt/BUGS_DESCRIPTION new file mode 100644 index 000000000..ecd2a82be --- /dev/null +++ b/src/PatchQt/BUGS_DESCRIPTION @@ -0,0 +1,250 @@ +********************************************************************* +* File : BUGS_DESCRIPTION +* Project : PAL/SALOME +* Module : PatchQt +* Author : Vadim SANDLER +* Created : 03/11/2004 +********************************************************************* + +This file contains description of bugs found in Qt 3.0.5 classes and patches with bug-fixes and improvements done for Qt classes +in frames of PAL/SALOME project. + +Main principles of the patches creation: +* the original classes are renamed by adding "P" suffix to the class name; +* private Qt classes are copied to patched files in order to avoid compilation/linking problems; +* classes definitions are moved from *.cpp implementation to *.h header in order to avoid additional moc preprocessing for *.cpp files. + +********************************************************************* + +Bug: keyboard accelerators for actions (menu, toolbar, etc) are not disabled when action itself is disabled (grayed). + +Gravity: medium + +Patched file(s): +* qactionP.cxx: +1) void QActionPrivate::update() +- enable/disable key accelerator according to the action state + +********************************************************************* + +Bug: Wrong MDI behaviour +To reproduce in SALOME: +1. Create new study +- Window Study1#1 appears and becomes active +2. Create one more study +- Window Study2#1 appears and becomes active (Study1#1 becames inactive) +3. Minimize Study2#1 window +- Window Study2#1 is minimized, Study1#1 becames active +4. Minimize Study1#1 window +- Window Study1#1 is minimized but stays still active (highlighted title) +5. Menu command "File/Close" +- Study2 document is closed, but should Study1 !!! + +Gravity: high + +Bug: Crash on close study window +To reproduce in SALOME: +1. Launch application. +2. Create new study with any Viewer. +3. Create second new study. +4. Close second study. +-> crash + +Gravity: high + +Bug: crash when leaving a study +To reproduce in SALOME: +1. Create new study +2. Load VISU component +3. Menu Window / New Window / Plot2d Viewer +4. Miximize Study 1#2 window (with Plot2d viewer) +5. Menu File / Close +6. Press "Close w/o saving" button in "Close Active Study" dialog box. +-> crash + +Gravity: high + +Patched files(s): +* qworkspaceP.h: +- methods +void QWorkspace::activateNextWindow() +void QWorkspace::activatePreviousWindow() +void QWorkspace::activateWindow( QWidget* w, bool change_focus = TRUE ) +are made public + +* qworkspaceP.cxx: +- methods +void QWorkspace::childEvent( QChildEvent * e) +void QWorkspace::activateWindow( QWidget* w, bool change_focus ) +void QWorkspace::minimizeWindow( QWidget* w) +bool QWorkspace::eventFilter( QObject *o, QEvent * e) +void QWorkspace::activatePreviousWindow() +are modified to activate correct child window on maximizing/minimizing/closing etc operations and to avoid crashes. + +********************************************************************* + +Improvement: Add controls to allow collapse/expand parts of view frame. +The patch adds buttons with small arrows for splitter which allow to collapse/restore splitter in both (left/right or top/botton) directions. + +Gravity: medium + +Bug: Splitter is not shown in python console +To reproduce in SALOME: +1. Create new study +2. Open new window (VTK or OCC) -> python console and message console is hidden +3. Restore normal size of low frames (python and message consoles) by clicking corresponding splitter button. +-> horizontal scrolbars for this windows are not shown, i.e. python and message frames are clipped. + +Gravity: medium + +Bug: Splitter does not restore its original position after collapsing/expanding operations. +To reproduce try to collapse/expand repeatedly any splitter (e.g. that one between Python and Message consoles). + +Gravity: medium + +Improvement: Implement a functionality (for VISU module) to control the Viewers behavior from python console - concerning QSplitter it means a possibility +to show/hide different parts of view frame (Object Browser, Python Console, 3d/2d viewer, Python console, Message window). + +Gravity: high + +Patched file(s): +* qsplitterP.h +1) to process correctly resizing events: +- methods +QSizePolicy QSplitter::sizePolicy() const +QSizePolicy QSplitterHandle::sizePolicy() const; +are added + +2) to allow collapse/expand functionality: +- methods +bool QSplitter::isCompressEnabled() const; +void QSplitter::setCompressEnabled(bool on); +void QSplitter::compress(QWidget*); +void QSplitter::unCompress(QWidget*); +QSplitterHandle* QSplitter::getHandleAfter(QWidget* w); +QSplitterHandle* QSplitter::getHandleBefore(QWidget* w); +bool QSplitter::isCompressed( const QWidget* ) const; +QWidget* QSplitter::widgetBefore( int id ) const; +QWidget* QSplitter::widgetAfter( int id ) const; +QSize QSplitter::minSize( const QWidget *w ) const; +QSize QSplitter::maxSize( const QWidget *w ) const; +int QSplitter::hit( QPoint p ); +void QSplitter::updateSplitterHandles() const; +and +void QSplitterHandle::updateButtonState(); +void QSplitterHandle::compressAfter(); +void QSplitterHandle::unCompressAfter(); +void QSplitterHandle::compressBefore(); +void QSplitterHandle::unCompressBefore(); +void QSplitterHandle::onBeforeCompress(); +void QSplitterHandle::onAfterCompress(); +void QSplitterHandle::onBeforeUnCompress(); +void QSplitterHandle::onAfterUnCompress(); +are added + +- fields: +QWidgetList QSplitter::compressed_widgets; +bool QSplitter::compress_flag; +and +int QSplitterHandle::oldpos; +QPushButton* QSplitterHandle::left; +QPushButton* QSplitterHandle::right; +QPushButton* QSplitterHandle::unleft; +QPushButton* QSplitterHandle::unright; +are added + +- method +void QSplitter::setG( QWidget *w, int p, int s ); +is modified + +* qsplitterP.cxx: +1) to draw button arrows: +static const char* splitter_left_xpm[]; +static const char* splitter_right_xpm[]; +static const char* splitter_up_xpm[]; +static const char* splitter_down_xpm[]; +are added + +2) to process correctly resizing events: +- methods +QSizePolicy QSplitter::sizePolicy() const +QSizePolicy QSplitterHandle::sizePolicy() const; +are added + +3) to allow collapse/expand functionality: +- methods +bool QSplitter::isCompressEnabled() const; +void QSplitter::setCompressEnabled(bool on); +void QSplitter::compress(QWidget*); +void QSplitter::unCompress(QWidget*); +QSplitterHandle* QSplitter::getHandleAfter(QWidget* w); +QSplitterHandle* QSplitter::getHandleBefore(QWidget* w); +bool QSplitter::isCompressed( const QWidget* ) const; +QWidget* QSplitter::widgetBefore( int id ) const; +QWidget* QSplitter::widgetAfter( int id ) const; +QSize QSplitter::minSize( const QWidget *w ) const; +QSize QSplitter::maxSize( const QWidget *w ) const; +int QSplitter::hit( QPoint p ); +void QSplitter::updateSplitterHandles() const; +and +void QSplitterHandle::updateButtonState(); +void QSplitterHandle::compressAfter(); +void QSplitterHandle::unCompressAfter(); +void QSplitterHandle::compressBefore(); +void QSplitterHandle::unCompressBefore(); +void QSplitterHandle::onBeforeCompress(); +void QSplitterHandle::onAfterCompress(); +void QSplitterHandle::onBeforeUnCompress(); +void QSplitterHandle::onAfterUnCompress(); +are added + +- methods +QSplitterHandle::QSplitterHandle() +void QSplitter::setG( QWidget *w, int p, int s ); +QSize QSplitterHandle::sizeHint() const +void QSplitterHandle::setOrientation( Qt::Orientation o ) +void QSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) +void QSplitterHandle::paintEvent( QPaintEvent * ) +void QSplitter::init() +void QSplitter::setOrientation( Orientation o ) +QSplitterLayoutStruct *QSplitter::addWidget( QWidget *w, bool first ) +void QSplitter::setRubberband( int p ) +void QSplitter::drawSplitter( QPainter *p, QCOORD x, QCOORD y, QCOORD w, QCOORD h ) +void QSplitter::moveSplitter( QCOORD p, int id ) +void QSplitter::moveBefore( int pos, int id, bool upLeft ) +void QSplitter::moveAfter( int pos, int id, bool upLeft ) +void QSplitter::getRange( int id, int *min, int *max ) +void QSplitter::doResize() +void QSplitter::recalc( bool update ) +void QSplitter::styleChange( QStyle& old ) +are modified: + +********************************************************************* + +Bug: File names filter of the "Open" and "Save" dialog boxes is broken +To reproduce in SALOME: +1) start PAL/SALOME +2) open new study with the help of OCC Viewer and load Geometry module +3) Menu File / Import / BRep +4) Browse to any directory may be changed by yourself +5) Press "Create New Folder" button of the "Import" dialog box +6) Browse to created directory "New Folder 1" +7) Press "Create New Folder" button of the "Import" dialog box +8) Browse to created directory "New Folder 1" +9) Delete first created "New Folder 1" directory externally (e.g. from any terminal window) +10) Press "One directory up" button of the "Import" dialog box +11) Error message box appears: "Could not read directory .../New Folder 1/New Folder 1" - press OK button to close message box. +-> Result: "BREP Files (*.brep)" filter is set as "File type" in the "Import" dialog box, but non-BREP files are also visible and available for the selection +in the browser window of the "Import" dialog box +-> The same situation takes place for the "Export" dialog box. + +Gravity: low + +Patch: +* qfiledialogP.cxx: +1) methods +void QFileDialogP::urlFinished( QNetworkOperation *op ) +is modified to fix bug + +********************************************************************* + diff --git a/src/SALOMEDS/Makefile.in b/src/SALOMEDS/Makefile.in index a5f6b39e8..fdd88a832 100644 --- a/src/SALOMEDS/Makefile.in +++ b/src/SALOMEDS/Makefile.in @@ -70,6 +70,8 @@ LIB_SRC = \ SALOMEDS_AttributeDrawable_i.cxx \ SALOMEDS_AttributeSelectable_i.cxx \ SALOMEDS_AttributeOpened_i.cxx \ + SALOMEDS_AttributeFlags_i.cxx \ + SALOMEDS_AttributeGraphic_i.cxx \ SALOMEDS_AttributeExpandable_i.cxx \ SALOMEDS_AttributeTextColor_i.cxx \ SALOMEDS_AttributeTextHighlightColor_i.cxx \ @@ -89,6 +91,8 @@ LIB_SRC = \ SALOMEDS_SelectableAttribute.cxx \ SALOMEDS_ExpandableAttribute.cxx \ SALOMEDS_OpenedAttribute.cxx \ + SALOMEDS_FlagsAttribute.cxx \ + SALOMEDS_GraphicAttribute.cxx \ SALOMEDS_TextColorAttribute.cxx \ SALOMEDS_TextHighlightColorAttribute.cxx \ SALOMEDS_PixMapAttribute.cxx \ diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx new file mode 100644 index 000000000..ba29db2dc --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.cxx @@ -0,0 +1,121 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_AttributeFlags_i.cxx +// Author : Sergey LITONIN +// Module : SALOME +// $Header$ + +using namespace std; +#include "SALOMEDS_AttributeFlags_i.hxx" +#include "SALOMEDS_SObject_i.hxx" + + +/* + Class : SALOMEDS_AttributeFlags_i + Description : This class is intended for storing different object attributes that + have only two states (0 and 1). + + Avalable attributes: + + IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise). + This attribute is valid for active view only. +*/ + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::SALOMEDS_AttributeFlags_i +// purpose : Constructor +//======================================================================= +SALOMEDS_AttributeFlags_i::SALOMEDS_AttributeFlags_i( + const Handle(SALOMEDS_FlagsAttribute)& attr, CORBA::ORB_ptr orb ) +{ + _myOrb = CORBA::ORB::_duplicate( orb ); + _myAttr = attr; +} + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::~SALOMEDS_AttributeFlags_i +// purpose : Destructor +//======================================================================= +SALOMEDS_AttributeFlags_i::~SALOMEDS_AttributeFlags_i() +{ +} + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::GetFlags +// purpose : Get all flags as integer value +//======================================================================= +CORBA::Long SALOMEDS_AttributeFlags_i::GetFlags() +{ + return Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Get(); +} + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::SetFlags +// purpose : Set all flags as integer value +//======================================================================= +void SALOMEDS_AttributeFlags_i::SetFlags( CORBA::Long theFlags ) +{ + Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Set( theFlags ); +} + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::Get +// purpose : Get specified flag +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeFlags_i::Get( CORBA::Long theFlag ) +{ + return Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr )->Get() & theFlag ? true : false; +} + +//======================================================================= +// function : SALOMEDS_AttributeFlags_i::Set +// purpose : Set/Unset specified flag +//======================================================================= +void SALOMEDS_AttributeFlags_i::Set( CORBA::Long theFlag, CORBA::Boolean theValue ) +{ + Handle(SALOMEDS_FlagsAttribute) anAttr = + Handle(SALOMEDS_FlagsAttribute)::DownCast( _myAttr ); + if ( theValue ) + anAttr->Set( anAttr->Get() | theFlag ); + else + anAttr->Set( anAttr->Get() & ~theFlag ); +} + + + + + + + + + + + + + + + + + + diff --git a/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx new file mode 100644 index 000000000..6a0214545 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeFlags_i.hxx @@ -0,0 +1,67 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_AttributeFlags_i.hxx +// Author : Sergey LITONIN +// Module : SALOME +// $Header: + +#ifndef SALOMEDS_AttributeFlags_i_HeaderFile +#define SALOMEDS_AttributeFlags_i_HeaderFile + +// IDL headers + +#include "SALOMEDS_FlagsAttribute.hxx" +#include +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) +#include "SALOMEDS_GenericAttribute_i.hxx" + +/* + Class : SALOMEDS_AttributeFlags_i + Description : This class is intended for storing different object attributes that + have only two states (0 and 1). + + Avalable attributes: + + IS_VISIBLE - is equal to 1 if object is visible in 3D view (0 - overwise). + This attribute is valid for active view only. +*/ + +class SALOMEDS_AttributeFlags_i: public virtual POA_SALOMEDS::AttributeFlags, + public virtual SALOMEDS_GenericAttribute_i +{ +public: + + SALOMEDS_AttributeFlags_i( const Handle(SALOMEDS_FlagsAttribute)&, + CORBA::ORB_ptr orb ); + virtual ~SALOMEDS_AttributeFlags_i(); + + CORBA::Long GetFlags(); + void SetFlags( CORBA::Long theFlags ); + + CORBA::Boolean Get( CORBA::Long theFlag ); + void Set( CORBA::Long theFlag, CORBA::Boolean theValue ); + +}; + +#endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx new file mode 100644 index 000000000..f7610ae9a --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.cxx @@ -0,0 +1,99 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_AttributeGraphic_i.cxx +// Author : Sergey LITONIN +// Module : SALOME +// $Header$ + +using namespace std; +#include "SALOMEDS_AttributeGraphic_i.hxx" +#include "SALOMEDS_SObject_i.hxx" + + +/* + Class : SALOMEDS_AttributeGraphic_i + Description : This class is intended for storing information about + graphic representation of objects in dirrent views +*/ + +//======================================================================= +// function : SALOMEDS_AttributeGraphic_i::SALOMEDS_AttributeGraphic_i +// purpose : Constructor +//======================================================================= +SALOMEDS_AttributeGraphic_i::SALOMEDS_AttributeGraphic_i( + const Handle(SALOMEDS_GraphicAttribute)& attr, CORBA::ORB_ptr orb ) +{ + _myOrb = CORBA::ORB::_duplicate( orb ); + _myAttr = attr; +} + +//======================================================================= +// function : SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i +// purpose : Destructor +//======================================================================= +SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i() +{ +} + +//======================================================================= +// function : SALOMEDS_AttributeGraphic_i::~SetVisibility +// purpose : Set visibility of object in given view +//======================================================================= +void SALOMEDS_AttributeGraphic_i::SetVisibility( CORBA::Long theViewId, + CORBA::Boolean theValue ) +{ + Handle(SALOMEDS_GraphicAttribute) anAttr = + Handle(SALOMEDS_GraphicAttribute)::DownCast( _myAttr ); + if ( !anAttr.IsNull() ) + anAttr->SetVisibility( theViewId, theValue ); +} + +//======================================================================= +// function : SALOMEDS_AttributeGraphic_i::~SALOMEDS_AttributeGraphic_i +// purpose : Get visibility of object in given view +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeGraphic_i::GetVisibility( CORBA::Long theViewId ) +{ + Handle(SALOMEDS_GraphicAttribute) anAttr = + Handle(SALOMEDS_GraphicAttribute)::DownCast( _myAttr ); + return !anAttr.IsNull() ? anAttr->GetVisibility( theViewId ) : false; +} + + + + + + + + + + + + + + + + + + diff --git a/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx new file mode 100644 index 000000000..70644c609 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeGraphic_i.hxx @@ -0,0 +1,60 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_AttributeFlags_i.hxx +// Author : Sergey LITONIN +// Module : SALOME +// $Header: + +#ifndef SALOMEDS_AttributeGraphic_i_HeaderFile +#define SALOMEDS_AttributeGraphic_i_HeaderFile + +// IDL headers + +#include "SALOMEDS_GraphicAttribute.hxx" +#include +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) +#include "SALOMEDS_GenericAttribute_i.hxx" + +/* + Class : SALOMEDS_AttributeGraphic_i + Description : This class is intended for storing information about + graphic representation of objects in dirrent views +*/ + +class SALOMEDS_AttributeGraphic_i: public virtual POA_SALOMEDS::AttributeGraphic, + public virtual SALOMEDS_GenericAttribute_i +{ +public: + + SALOMEDS_AttributeGraphic_i( const Handle(SALOMEDS_GraphicAttribute)&, + CORBA::ORB_ptr orb ); + virtual ~SALOMEDS_AttributeGraphic_i(); + + void SetVisibility( CORBA::Long theViewId, + CORBA::Boolean theValue ); + CORBA::Boolean GetVisibility( CORBA::Long theViewId ); + +}; + +#endif diff --git a/src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx b/src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx new file mode 100644 index 000000000..96ed5bd5d --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_FlagsAttribute.cxx @@ -0,0 +1,162 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_FlagsAttribute.cxx +// Author : Sergey LITONIN +// Module : SALOME + +#include "SALOMEDS_FlagsAttribute.hxx" +#include +#include +#include + +using namespace std; + + +/* + Class : SALOMEDS_FlagsAttribute + Description : This class is intended for storing different object attributes that + have only two states (0 and 1). +*/ + +IMPLEMENT_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer ) +IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_FlagsAttribute, TDataStd_Integer ) + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::GetID +//purpose : Get GUID of this attribute +//======================================================================= +const Standard_GUID& SALOMEDS_FlagsAttribute::GetID () +{ + static Standard_GUID SALOMEDS_FlagsAttributeID( "866EEC9F-A517-4cb4-88E6-E208DB8FC96F" ); + return SALOMEDS_FlagsAttributeID; +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::Set +//purpose : Set value of the attribute +//======================================================================= +Handle(SALOMEDS_FlagsAttribute) SALOMEDS_FlagsAttribute::Set( const TDF_Label& L, + const Standard_Integer value ) +{ + Handle(SALOMEDS_FlagsAttribute) A; + if ( !L.FindAttribute(SALOMEDS_FlagsAttribute::GetID(),A ) ) + { + A = new SALOMEDS_FlagsAttribute(); + L.AddAttribute( A ); + } + + ( Handle(TDataStd_Integer)::DownCast( A ) )->Set( value ); + return A; +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute +//purpose : Constructor +//======================================================================= +SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute() +{ + TDataStd_Integer::Set( 0 ); +} + +SALOMEDS_FlagsAttribute::~SALOMEDS_FlagsAttribute() +{ +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::ID +//purpose : Get GUID of this attribute +//======================================================================= +const Standard_GUID& SALOMEDS_FlagsAttribute::ID () const +{ + return GetID(); +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::NewEmpty +//purpose : Create new empty attribute +//======================================================================= + +Handle(TDF_Attribute) SALOMEDS_FlagsAttribute::NewEmpty () const +{ + return new SALOMEDS_FlagsAttribute(); +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::Restore +//purpose : Assign given value to the attribute +//======================================================================= +void SALOMEDS_FlagsAttribute::Restore( const Handle(TDF_Attribute)& with ) +{ + Standard_Integer s = Handle(TDataStd_Integer)::DownCast( with )->Get(); + TDataStd_Integer::Set( s ); + return; +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::Paste +//purpose : Assign internal value to the given attribute +//======================================================================= +void SALOMEDS_FlagsAttribute::Paste( const Handle(TDF_Attribute)& into, + const Handle(TDF_RelocationTable)& RT ) const +{ + Handle(TDataStd_Integer)::DownCast( into )->Set( Get() ); +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::Set +//purpose : Set value +//======================================================================= +void SALOMEDS_FlagsAttribute::Set( const Standard_Integer v ) +{ + TDataStd_Integer::Set( v ); +} + +//======================================================================= +//function : SALOMEDS_FlagsAttribute::Get +//purpose : GetValue +//======================================================================= +Standard_Integer SALOMEDS_FlagsAttribute::Get() const +{ + return TDataStd_Integer::Get(); +} + + + + + + + + + + + + + + + + + + + + diff --git a/src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx b/src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx new file mode 100644 index 000000000..9163156c3 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_FlagsAttribute.hxx @@ -0,0 +1,72 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_FlagsAttribute.hxx +// Author : Sergey LITONIN +// Module : SALOME + +#ifndef SALOMEDS_FlagsAttribute_HeaderFile +#define SALOMEDS_FlagsAttribute_HeaderFile + +#include +#include +#include + +class Standard_GUID; +class TDF_Label; +class Handle(TDF_Attribute); +class Handle(TDF_RelocationTable); + + +/* + Class : SALOMEDS_FlagsAttribute + Description : This class is intended for storing different object attributes that + have only two states (0 and 1). +*/ + +DEFINE_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer ) + +class Standard_EXPORT SALOMEDS_FlagsAttribute : public TDataStd_Integer +{ +public: + +static const Standard_GUID& GetID() ; +static Handle(SALOMEDS_FlagsAttribute) Set( const TDF_Label&, + const Standard_Integer ); + + SALOMEDS_FlagsAttribute(); +virtual ~SALOMEDS_FlagsAttribute(); + +const Standard_GUID& ID() const; +void Restore( const Handle(TDF_Attribute)& with ); +Handle_TDF_Attribute NewEmpty() const; +void Paste( const Handle(TDF_Attribute)& into, + const Handle(TDF_RelocationTable)& RT ) const; +void Set( const Standard_Integer ); +Standard_Integer Get() const; + +public: + DEFINE_STANDARD_RTTI( SALOMEDS_FlagsAttribute ) +}; + +#endif diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index 87f76e105..8c6f980de 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -9,13 +9,14 @@ // Module : SALOME // $Header$ - #include #include #include "SALOMEDS_AttributeDrawable_i.hxx" #include "SALOMEDS_AttributeSelectable_i.hxx" #include "SALOMEDS_AttributeOpened_i.hxx" +#include "SALOMEDS_AttributeFlags_i.hxx" +#include "SALOMEDS_AttributeGraphic_i.hxx" #include "SALOMEDS_AttributeTextColor_i.hxx" #include "SALOMEDS_AttributeTextHighlightColor_i.hxx" #include "SALOMEDS_AttributePixMap_i.hxx" @@ -41,6 +42,8 @@ #include "SALOMEDS_SelectableAttribute.hxx" #include "SALOMEDS_ExpandableAttribute.hxx" #include "SALOMEDS_OpenedAttribute.hxx" +#include "SALOMEDS_FlagsAttribute.hxx" +#include "SALOMEDS_GraphicAttribute.hxx" #include "SALOMEDS_TextColorAttribute.hxx" #include "SALOMEDS_TextHighlightColorAttribute.hxx" #include "SALOMEDS_PixMapAttribute.hxx" @@ -54,8 +57,10 @@ #include "SALOMEDS_ExternalFileDef.hxx" #include "SALOMEDS_FileType.hxx" #include "Utils_ExceptHandlers.hxx" + using namespace std; -#define RegisteredAttributes 26 + +#define RegisteredAttributes 28 UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection); @@ -73,7 +78,9 @@ const char AttributesTypeNames[RegisteredAttributes][30] = { "AttributeStudyProperties", "AttributePythonObject", "AttributeUserID", - "AttributeExternalFileDef", "AttributeFileType" + "AttributeExternalFileDef", "AttributeFileType", + "AttributeFlags", + "AttributeGraphic" }; const Standard_GUID AttributesGUIDs[RegisteredAttributes] = { @@ -90,7 +97,9 @@ const Standard_GUID AttributesGUIDs[RegisteredAttributes] = { SALOMEDS_StudyPropertiesAttribute::GetID(), SALOMEDS_PythonObjectAttribute::GetID(), Standard_GUID("FFFFFFFF-D9CD-11d6-945D-1050DA506788"), - SALOMEDS_ExternalFileDef::GetID(), SALOMEDS_FileType::GetID() + SALOMEDS_ExternalFileDef::GetID(), SALOMEDS_FileType::GetID(), + SALOMEDS_FlagsAttribute::GetID(), + SALOMEDS_GraphicAttribute::GetID() }; void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) { @@ -192,6 +201,8 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute(CORB __ReturnCORBAAttribute(SALOMEDS_PythonObjectAttribute, AttributePythonObject); __ReturnCORBAAttribute(SALOMEDS_ExternalFileDef, AttributeExternalFileDef); __ReturnCORBAAttribute(SALOMEDS_FileType, AttributeFileType); + __ReturnCORBAAttribute(SALOMEDS_FlagsAttribute, AttributeFlags); + __ReturnCORBAAttribute(SALOMEDS_GraphicAttribute, AttributeGraphic); Handle(TDataStd_TreeNode) aNode = Handle(TDataStd_TreeNode)::DownCast(theAttr); if (!aNode.IsNull()) { diff --git a/src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx b/src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx new file mode 100644 index 000000000..0b858947e --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_GraphicAttribute.cxx @@ -0,0 +1,185 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_GraphicAttribute.cxx +// Author : Sergey LITONIN +// Module : SALOME + +#include "SALOMEDS_GraphicAttribute.hxx" +#include +#include +#include +#include + +/* + Class : SALOMEDS_GraphicAttribute + Description : This class is intended for storing information about + graphic representation of objects in dirrent views +*/ + +IMPLEMENT_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute ) +IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_GraphicAttribute, TDF_Attribute ) + +//======================================================================= +//function : GetID +//purpose : Get GUID of this attribute +//======================================================================= +const Standard_GUID& SALOMEDS_GraphicAttribute::GetID() +{ + static Standard_GUID SALOMEDS_GraphicAttributeID( "F17AE8F0-E354-4d6f-8E42-38385C36E67E" ); + return SALOMEDS_GraphicAttributeID; +} + +//======================================================================= +//function : SALOMEDS_GraphicAttribute +//purpose : Empty Constructor +//======================================================================= +SALOMEDS_GraphicAttribute::SALOMEDS_GraphicAttribute() +{ +} + +//======================================================================= +//function : ~SALOMEDS_GraphicAttribute +//purpose : Destructor +//======================================================================= +SALOMEDS_GraphicAttribute::~SALOMEDS_GraphicAttribute() +{ +} + +//======================================================================= +//function : SetVisibility +//purpose : Set visibility of object in given view +//======================================================================= +void SALOMEDS_GraphicAttribute::SetVisibility( const Standard_Integer theViewId, + const Standard_Boolean theValue ) +{ + if ( myVisibility.IsBound( theViewId ) && myVisibility( theViewId ) == theValue ) + return; + + Backup(); + if ( myVisibility.IsBound( theViewId ) ) + myVisibility.ChangeFind( theViewId ) = theValue ? 1 : 0; + else + myVisibility.Bind( theViewId, theValue ? 1 : 0 ); +} + + +//======================================================================= +//function : Get +//purpose : Get visibility of object in given view +//======================================================================= +Standard_Boolean SALOMEDS_GraphicAttribute::GetVisibility( + const Standard_Integer theViewId ) const +{ + return myVisibility.IsBound( theViewId ) ? myVisibility( theViewId ) : false; +} + + +//======================================================================= +//function : ID +//purpose : Get GUID of this attribute +//======================================================================= +const Standard_GUID& SALOMEDS_GraphicAttribute::ID () const +{ + return GetID(); +} + + +//======================================================================= +//function : NewEmpty +//purpose : Create new empty attribute +//======================================================================= +Handle(TDF_Attribute) SALOMEDS_GraphicAttribute::NewEmpty () const +{ + return new SALOMEDS_GraphicAttribute (); +} + +//======================================================================= +//function : SetVisibility +//purpose : Set visibility of object in all views +//======================================================================= +void SALOMEDS_GraphicAttribute::SetVisibility( const TColStd_DataMapOfIntegerInteger& theMap ) +{ + myVisibility = theMap; +} + +//======================================================================= +//function : SetVisibility +//purpose : Get visibility of object in all views +//======================================================================= +const TColStd_DataMapOfIntegerInteger& SALOMEDS_GraphicAttribute::GetVisibility() +{ + return myVisibility; +} + +//======================================================================= +//function : Restore +//purpose : Restore value of attribute with value of theWith one +//======================================================================= +void SALOMEDS_GraphicAttribute::Restore( const Handle(TDF_Attribute)& theWith ) +{ + Handle(SALOMEDS_GraphicAttribute) anAttr = + Handle(SALOMEDS_GraphicAttribute)::DownCast( theWith ); + + if ( !anAttr.IsNull() ) + SetVisibility( anAttr->GetVisibility() ); +} + +//======================================================================= +//function : Paste +//purpose : Paste value of current attribute to the value of entry one +//======================================================================= +void SALOMEDS_GraphicAttribute::Paste( const Handle(TDF_Attribute)& theInto, + const Handle(TDF_RelocationTable)& ) const +{ + Handle(SALOMEDS_GraphicAttribute) anAttr = + Handle(SALOMEDS_GraphicAttribute)::DownCast( theInto ); + + if ( !anAttr.IsNull() ) + anAttr->SetVisibility( myVisibility ); +} + +//======================================================================= +//function : Dump +//purpose : Dump +//======================================================================= +Standard_OStream& SALOMEDS_GraphicAttribute::Dump( Standard_OStream& anOS ) const +{ + anOS << "Visibility of object:" << endl; + TColStd_DataMapIteratorOfDataMapOfIntegerInteger anIter( myVisibility ); + for ( ; anIter.More(); anIter.Next() ) + { + char str[ 100 ]; + + if ( GetVisibility( anIter.Key() ) ) + sprintf( str, "Viewer ID = 0x%X State = VISIBLE\n", anIter.Key() ); + else + sprintf( str, "Viewer ID = 0x%X State = INVISIBLE\n", anIter.Key() ); + + anOS << str; + } + + anOS << "Integer"; + return anOS; +} + diff --git a/src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx b/src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx new file mode 100644 index 000000000..b70112bfc --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_GraphicAttribute.hxx @@ -0,0 +1,80 @@ +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDS_GraphicAttribute.hxx +// Author : Sergey LITONIN +// Module : SALOME + +#ifndef SALOMEDS_GraphicAttribute_HeaderFile +#define SALOMEDS_GraphicAttribute_HeaderFile + +#include +#include +#include +#include + +class Standard_GUID; +class TDF_Label; +class Handle(TDF_Attribute); +class Handle(TDF_RelocationTable); + + +/* + Class : SALOMEDS_GraphicAttribute + Description : This class is intended for storing information about + graphic representation of objects in dirrent views +*/ + +DEFINE_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute ) + +class Standard_EXPORT SALOMEDS_GraphicAttribute : public TDF_Attribute +{ + +public: + SALOMEDS_GraphicAttribute(); + ~SALOMEDS_GraphicAttribute(); + + static const Standard_GUID& GetID() ; + + void SetVisibility( const Standard_Integer, + const Standard_Boolean ); + Standard_Boolean GetVisibility( const Standard_Integer ) const; + const Standard_GUID& ID() const; + void Restore( const Handle(TDF_Attribute)& theWith ); + Handle(TDF_Attribute) NewEmpty() const; + void Paste( const Handle(TDF_Attribute)& theInto, + const Handle(TDF_RelocationTable)& ) const; + virtual Standard_OStream& Dump( Standard_OStream& anOS ) const; + + void SetVisibility( const TColStd_DataMapOfIntegerInteger& ); + + const TColStd_DataMapOfIntegerInteger& GetVisibility(); + +private: + TColStd_DataMapOfIntegerInteger myVisibility; + +public: + DEFINE_STANDARD_RTTI( SALOMEDS_GraphicAttribute ) +}; + +#endif diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index 125152fed..b5f8c37e2 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -67,6 +67,8 @@ #include "SALOMEDS_AttributeSelectable_i.hxx" #include "SALOMEDS_AttributeExpandable_i.hxx" #include "SALOMEDS_AttributeOpened_i.hxx" +#include "SALOMEDS_AttributeFlags_i.hxx" +#include "SALOMEDS_AttributeGraphic_i.hxx" #include "SALOMEDS_AttributeTextColor_i.hxx" #include "SALOMEDS_AttributeTextHighlightColor_i.hxx" #include "SALOMEDS_AttributePixMap_i.hxx" @@ -82,6 +84,7 @@ #include #include + using namespace std; #define USE_CASE_LABEL_TAG 2 @@ -561,6 +564,8 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA __FindOrCreateAttribute(SALOMEDS_StudyPropertiesAttribute, AttributeStudyProperties) __FindOrCreateAttribute(SALOMEDS_ExternalFileDef, AttributeExternalFileDef) __FindOrCreateAttribute(SALOMEDS_FileType, AttributeFileType) + __FindOrCreateAttribute(SALOMEDS_FlagsAttribute, AttributeFlags) + __FindOrCreateAttribute(SALOMEDS_GraphicAttribute, AttributeGraphic) if (strncmp(aTypeOfAttribute, "AttributeTreeNode",17) == 0 ) { Standard_GUID aTreeNodeGUID; diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index ac1763f4d..69bde6093 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -173,22 +173,22 @@ QPalette* QAD_Desktop::getPalette() return palette; } -/*! - Gets window ratio width/heght [ static ] -*/ -static double myWindowRatio = 1; -static double getWindowRatio() -{ - return myWindowRatio; -} - -/*! - Sets window ratio width/heght [ static ] -*/ -static void setWindowRatio(double aRatio) -{ - myWindowRatio = aRatio; -} +///*! +// Gets window ratio width/heght [ static ] +//*/ +//static double = 1; +//static double getWindowRatio() +//{ +// return myWindowRatio; +//} +// +///*! +// Sets window ratio width/heght [ static ] +//*/ +//static void setWindowRatio(double aRatio) +//{ +// myWindowRatio = aRatio; +//} /*! Constructor @@ -2924,7 +2924,6 @@ void QAD_Desktop::onDispatchTools(int id) QFileInfo fileInfo ; bool found = false; - char arg[256] ; bool libToolsGUI = true; if( QAD_XmlHandler::_bibmap[ id ].isEmpty() ) { diff --git a/src/SALOMEGUI/QAD_Study.cxx b/src/SALOMEGUI/QAD_Study.cxx index 1ad0b2112..34f9d3fff 100644 --- a/src/SALOMEGUI/QAD_Study.cxx +++ b/src/SALOMEGUI/QAD_Study.cxx @@ -232,9 +232,17 @@ void QAD_Study::removeStudyFrame( QAD_StudyFrame* sf ) aStudyBuilder->RemoveObject(fatherSF); if (aLocked) myStudy->GetProperties()->SetLocked(true); } - + updateObjBrowser( true ); } + + QAD_RightFrame* rightFrame = sf->getRightFrame(); + if ( rightFrame ) { + QAD_ViewFrame* viewFrame = rightFrame->getViewFrame(); + if ( viewFrame ) + emit supervStudyFrameClosing( viewFrame ); + } + myStudyFrames.removeRef( sf ); } } @@ -1330,7 +1338,7 @@ void QAD_Study::Selection( QString aSelection ) /*! Returns the name of current selection */ -QString QAD_Study::getSelection() +QString QAD_Study::getSelection() const { return QString (myTitle + "_" + mySelection); } diff --git a/src/SALOMEGUI/QAD_Study.h b/src/SALOMEGUI/QAD_Study.h index 4a41ee5d7..409b2aba4 100644 --- a/src/SALOMEGUI/QAD_Study.h +++ b/src/SALOMEGUI/QAD_Study.h @@ -48,6 +48,7 @@ class QAD_Application; class QMutex; class QAD_PyInterp; class TInitStudyThread; +class QAD_ViewFrame; class QAD_EXPORT QAD_Study : public QObject { @@ -145,7 +146,7 @@ public: /* selection */ void Selection( QString aSelection ); - QString getSelection(); + QString getSelection() const; /* python interpreter */ QAD_PyInterp* get_PyInterp(void); @@ -160,6 +161,7 @@ signals: void docClosing( QAD_Study* ); void docOperationTerminated( bool ); void closed(); + void supervStudyFrameClosing( QAD_ViewFrame* ); public slots: void onStudyFrameActivated( QAD_StudyFrame* ); diff --git a/src/SALOMEGUI/QAD_StudyFrame.cxx b/src/SALOMEGUI/QAD_StudyFrame.cxx index 92f5823d6..cfba6977e 100644 --- a/src/SALOMEGUI/QAD_StudyFrame.cxx +++ b/src/SALOMEGUI/QAD_StudyFrame.cxx @@ -214,6 +214,7 @@ ViewType QAD_StudyFrame::getTypeView() const void QAD_StudyFrame::onStudyFrameActivated ( QWidget* activeWindow ) { emit sfStudyFrameActivated( (QAD_StudyFrame*) activeWindow ); + getRightFrame()->getViewFrame()->Activate( getStudy() ); } /*! diff --git a/src/SALOMEGUI/QAD_ViewFrame.h b/src/SALOMEGUI/QAD_ViewFrame.h index 119490b63..cdc9961ae 100644 --- a/src/SALOMEGUI/QAD_ViewFrame.h +++ b/src/SALOMEGUI/QAD_ViewFrame.h @@ -90,6 +90,10 @@ public: virtual void EraseAll() = 0; virtual void Repaint() = 0; + /* activation */ + virtual void Activate( QAD_Study* ) {} + // this method is called when parent window of view frame is activated + protected slots: virtual void onViewPan() = 0; virtual void onViewZoom() = 0; diff --git a/src/SALOMEGUI/SALOMEGUI.cxx b/src/SALOMEGUI/SALOMEGUI.cxx index 6c2795394..81e91ae42 100644 --- a/src/SALOMEGUI/SALOMEGUI.cxx +++ b/src/SALOMEGUI/SALOMEGUI.cxx @@ -28,8 +28,8 @@ #include "SALOMEGUI.h" #include "QAD_Desktop.h" -using namespace std; +using namespace std; //============================================================================= /*! @@ -155,7 +155,8 @@ bool SALOMEGUI::ActiveStudyChanged( QAD_Desktop* parent ) * */ //============================================================================= -void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO ) +void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&, + QAD_ViewFrame* ) { } @@ -164,7 +165,7 @@ void SALOMEGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO * */ //============================================================================= -void SALOMEGUI::SupportedViewType(int* buffer, int bufferSize) +void SALOMEGUI::SupportedViewType(int* /*buffer*/, int /*bufferSize*/ ) { } diff --git a/src/SALOMEGUI/SALOMEGUI.h b/src/SALOMEGUI/SALOMEGUI.h index d823c6e41..3e3ede634 100644 --- a/src/SALOMEGUI/SALOMEGUI.h +++ b/src/SALOMEGUI/SALOMEGUI.h @@ -35,6 +35,7 @@ #include class QAD_Desktop; +class QAD_ViewFrame; class QAD_StudyFrame; class SALOME_Event; @@ -64,7 +65,8 @@ public: const QString & theParent, const QString & theObject ); virtual void DefinePopup ( QString & theContext, QString & theParent, QString & theObject ); virtual bool ActiveStudyChanged( QAD_Desktop* parent ); - virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO ); + virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO, + QAD_ViewFrame* = 0 ); virtual void SupportedViewType (int* buffer, int bufferSize); virtual void Deactivate (); diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx index 7bc439ab1..09c9227a7 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx @@ -1,4 +1,3 @@ -using namespace std; //============================================================================= // File : SALOME_PYQT_GUI.cxx // Created : mer jun 4 17:17:20 UTC 2003 @@ -338,7 +337,8 @@ bool SALOME_PYQT_GUI::ActiveStudyChanged( QAD_Desktop* parent ) * no call to python module.BuildPresentation() (not yet ???) */ //============================================================================= -void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO ) +void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)&, + QAD_ViewFrame* ) { } @@ -347,7 +347,7 @@ void SALOME_PYQT_GUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& * no call to python module.SupportedViewType() (not yet ???) */ //============================================================================= -void SALOME_PYQT_GUI::SupportedViewType(int* buffer, int bufferSize) +void SALOME_PYQT_GUI::SupportedViewType(int* /*buffer*/, int /*bufferSize*/ ) { } diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI.h b/src/SALOME_PYQT/SALOME_PYQT_GUI.h index 2e7617d5a..eb1ca4861 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI.h @@ -38,7 +38,8 @@ public: const QString & theParent, const QString & theObject ); virtual void DefinePopup ( QString & theContext, QString & theParent, QString & theObject ); virtual bool ActiveStudyChanged( QAD_Desktop* parent); - virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO ); + virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)& theIO, + QAD_ViewFrame* = 0 ); virtual void SupportedViewType (int* buffer, int bufferSize); virtual void Deactivate (); void initInterp(int studyId); diff --git a/src/SALOME_PYQT/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt.cxx index 370280259..863616548 100644 --- a/src/SALOME_PYQT/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt.cxx @@ -8,6 +8,7 @@ #include "SalomePyQt.hxx" #include +#include #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -19,6 +20,7 @@ #include "QAD_Config.h" #include "QAD_Settings.h" + using namespace std; QWidget* SalomePyQt::getDesktop() @@ -149,3 +151,12 @@ bool SalomePyQt::dumpView(const QString& filename) } return false; } + +QPopupMenu* SalomePyQt::getPopupMenu( const MenuName menu ) +{ + QMenuBar* mainMenu = QAD_Application::getDesktop()->getMainMenuBar(); + if ( mainMenu->findItem( menu ) ) { + return mainMenu->findItem( menu )->popup(); + } + return 0; +} diff --git a/src/SALOME_PYQT/SalomePyQt.hxx b/src/SALOME_PYQT/SalomePyQt.hxx index b70d39dfe..91c369aff 100644 --- a/src/SALOME_PYQT/SalomePyQt.hxx +++ b/src/SALOME_PYQT/SalomePyQt.hxx @@ -15,12 +15,23 @@ #include #include +enum MenuName { + File = 1, + View = 2, + Edit = 3, + Preferences = 4, + Tools = 5, + Window = 6, + Help = 7 +}; + class SalomePyQt { public: static QWidget* getDesktop(); static QWorkspace* getMainFrame(); static QMenuBar* getMainMenuBar(); + static QPopupMenu* getPopupMenu( const MenuName menu ); static SALOME_Selection* getSelection(); static int getStudyId(); static void putInfo( const QString& ); diff --git a/src/SALOME_PYQT/SalomePyQt.sip b/src/SALOME_PYQT/SalomePyQt.sip index fe6a9d43a..df84b3fc1 100644 --- a/src/SALOME_PYQT/SalomePyQt.sip +++ b/src/SALOME_PYQT/SalomePyQt.sip @@ -17,6 +17,16 @@ signals: void currentSelectionChanged(); }; +enum MenuName { + File = 1, + View = 2, + Edit = 3, + Preferences = 4, + Tools = 5, + Window = 6, + Help = 7 +}; + class SalomePyQt { %HeaderCode @@ -27,6 +37,7 @@ public: static QWidget* getDesktop(); static QWorkspace* getMainFrame(); static QMenuBar* getMainMenuBar(); + static QPopupMenu* getPopupMenu( const MenuName ); static SALOME_Selection* getSelection(); static int getStudyId(); static void putInfo( const QString& ); diff --git a/src/SALOME_SWIG/batchmode_salome.py b/src/SALOME_SWIG/batchmode_salome.py index c997d9fa6..87edd913b 100644 --- a/src/SALOME_SWIG/batchmode_salome.py +++ b/src/SALOME_SWIG/batchmode_salome.py @@ -215,24 +215,44 @@ def FindFileInDataDir(filename): # initialise the ORB orb = None -while orb == None: +step = 0 +while step < 100 and orb is None: orb = CORBA.ORB_init([''], CORBA.ORB_ID) + step = step + 1 + time.sleep(4) + +if orb is None: + print "Warning: ORB has not been initialized !!!" # create an LifeCycleCORBA instance lcc = LifeCycleCORBA(orb) -while lcc._catalog == None: +step = 0 +while step < 100 and lcc._catalog is None: lcc = LifeCycleCORBA(orb) - + step = step + 1 + time.sleep(4) + +if lcc._catalog is None: + print "Warning: LifeCycleCORBA object is incomplete !!!" + #create a naming service instance naming_service = SALOME_NamingServicePy_i(orb) # get Study Manager reference -obj=None -while obj == None: - obj = naming_service.Resolve('myStudyManager') +obj = None + +step = 0 +while step < 100 and obj == None: + obj = naming_service.Resolve('myStudyManager') + step = step + 1 + time.sleep(4) + myStudyManager = obj._narrow(SALOMEDS.StudyManager) +if myStudyManager is None: + print "Warning: SALOMEDS.StudyManager has not been created !!!" + # create new study aListOfOpenStudies = myStudyManager.GetOpenStudies(); myStudy = None; diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index 4e07ddf04..81d646b60 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -25,6 +25,9 @@ #include #include + +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + using namespace std; //============================================================================ @@ -249,7 +252,6 @@ SALOMEDS_Tool::PutStreamToFiles(const SALOMEDS::TMPFile& theStream, if(aBuffer == NULL) return NULL; - long aBufferSize = theStream.length(); long aFileSize, aCurrentPos = 4; int i, aFileNameSize, aNbFiles = 0; @@ -310,3 +312,102 @@ std::string SALOMEDS_Tool::GetDirFromPath(const char* thePath) { aDirString.ChangeAll('|','/'); return aDirString.ToCString(); } + +//======================================================================= +// name : GetFlag +// Purpose : Retrieve specified flaf from "AttributeFlags" attribute +//======================================================================= +bool SALOMEDS_Tool::GetFlag( const int theFlag, + SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj ) +{ + SALOMEDS::GenericAttribute_var anAttr; + if ( !theObj->_is_nil() && theObj->FindAttribute( anAttr, "AttributeFlags" ) ) + { + SALOMEDS::AttributeFlags_var aFlags = SALOMEDS::AttributeFlags::_narrow( anAttr ); + return aFlags->Get( theFlag ); + } + + return false; +} + +//======================================================================= +// name : SetFlag +// Purpose : Set/Unset specified flaf from "AttributeFlags" attribute +//======================================================================= +bool SALOMEDS_Tool::SetFlag( const int theFlag, + SALOMEDS::Study_var theStudy, + const char* theEntry, + const bool theValue ) +{ + SALOMEDS::SObject_var anObj = theStudy->FindObjectID( theEntry ); + + if ( !anObj->_is_nil() ) + { + SALOMEDS::GenericAttribute_var aGAttr; + if ( anObj->FindAttribute( aGAttr, "AttributeFlags" ) ) + { + SALOMEDS::AttributeFlags_var anAttr = SALOMEDS::AttributeFlags::_narrow( aGAttr ); + anAttr->Set( theFlag, theValue ); + } + else if ( theValue ) + { + SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder(); + SALOMEDS::AttributeFlags_var anAttr = SALOMEDS::AttributeFlags::_narrow( + aBuilder->FindOrCreateAttribute( anObj, "AttributeFlags" ) ); + anAttr->Set( theFlag, theValue ); + } + return true; + } + + return false; +} + +//======================================================================= +// name : getAllChildren +// Purpose : Get all children of object. +// If theObj is null all objects of study are returned +//======================================================================= +void SALOMEDS_Tool::GetAllChildren( SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj, + std::list& theList ) +{ + if ( theObj->_is_nil() ) + { + SALOMEDS::SComponentIterator_var anIter = theStudy->NewComponentIterator(); + for ( ; anIter->More(); anIter->Next() ) + { + SALOMEDS::SObject_var anObj = SALOMEDS::SObject::_narrow( anIter->Value() ); + if ( !anObj->_is_nil() ) + { + theList.push_back( anObj ); + GetAllChildren( theStudy, anObj, theList ); + } + } + } + else + { + SALOMEDS::ChildIterator_var anIter = theStudy->NewChildIterator( theObj ); + for ( ; anIter->More(); anIter->Next() ) + { + SALOMEDS::SObject_var anObj = anIter->Value(); + SALOMEDS::SObject_var aRef; + if ( !anObj->ReferencedObject( aRef ) ) + { + theList.push_back( anObj ); + GetAllChildren( theStudy, anObj, theList ); + } + } + } +} + + + + + + + + + + + diff --git a/src/TOOLSDS/SALOMEDS_Tool.hxx b/src/TOOLSDS/SALOMEDS_Tool.hxx index fed29bf55..ecc4df6bc 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.hxx +++ b/src/TOOLSDS/SALOMEDS_Tool.hxx @@ -10,7 +10,8 @@ #ifndef __SALOMEDS_Tool_H__ #define __SALOMEDS_Tool_H__ -#include +#include +#include // IDL headers #include "SALOMEconfig.h" @@ -50,5 +51,41 @@ public: // for an example: if thePath = "/tmp/aaa/doc1.hdf" the function returns "/tmp/aaa" static std::string GetDirFromPath(const char* thePath); + // Retrieves specified flaf from "AttributeFlags" attribute + static bool GetFlag( const int theFlag, + SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj ); + + // Sets/Unsets specified flaf from "AttributeFlags" attribute + static bool SetFlag( const int theFlag, + SALOMEDS::Study_var theStudy, + const char* theEntry, + const bool theValue ); + + // Get all children of object. If theObj is null all objects of study are returned + static void GetAllChildren( SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj, + std::list& theList ); + }; #endif + + + + + + + + + + + + + + + + + + + + diff --git a/src/TOOLSGUI/Makefile.in b/src/TOOLSGUI/Makefile.in index 03a986861..73a914c7f 100644 --- a/src/TOOLSGUI/Makefile.in +++ b/src/TOOLSGUI/Makefile.in @@ -35,7 +35,7 @@ VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ # header files -EXPORT_HEADERS= +EXPORT_HEADERS = ToolsGUI.h # .po files to transform in .qm PO_FILES = \ @@ -48,10 +48,10 @@ LIB = libToolsGUI.la LIB_SRC = ToolsGUI.cxx \ ToolsGUI_CatalogGeneratorDlg.cxx -LIB_MOC = ToolsGUI_moc.cxx \ - ToolsGUI_CatalogGeneratorDlg_moc.cxx +LIB_MOC = ToolsGUI_CatalogGeneratorDlg_moc.cxx -LIB_CLIENT_IDL = SALOME_Exception.idl +LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl \ + SALOME_Component.idl SALOME_Exception.idl # additionnal information to compil and link file diff --git a/src/TOOLSGUI/ToolsGUI.cxx b/src/TOOLSGUI/ToolsGUI.cxx index 7e98ad7b1..eb0b26b85 100644 --- a/src/TOOLSGUI/ToolsGUI.cxx +++ b/src/TOOLSGUI/ToolsGUI.cxx @@ -32,48 +32,112 @@ #include "utilities.h" #include + +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + using namespace std; +//============================================================================ +// function : runCommand +// purpose : Run command +//============================================================================ int ToolsGUI::runCommand(string & arg) { int res; - res = system(arg.c_str()); + res = system( arg.c_str() ); - if (res == -1) - MESSAGE("fork failed (system command result = 0x" << hex << res << ")" << dec) + if ( res == -1 ) + MESSAGE( "fork failed (system command result = 0x" << hex << res << ")" << dec ) else - if (res == 217) - MESSAGE("shell exec failed (system command result = 0x" << hex << res << ")" << dec) - + if ( res == 217 ) + MESSAGE( "shell exec failed (system command result = 0x" << hex << res << ")" << dec ) return res; } -bool ToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +//============================================================================ +// function : OnGUIEvent +// purpose : Process events +//============================================================================ +bool ToolsGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - QAD_Study* myActiveStudy = parent->getActiveStudy(); - switch (theCommandID) + switch ( theCommandID ) + { + case 5102 : { - case 5102 : - { - ToolsGUI_CatalogGeneratorDlg* aDlg = new ToolsGUI_CatalogGeneratorDlg(parent); - aDlg->exec(); - delete aDlg; - break; - } - - default: - MESSAGE (" No command associated with this id = " << theCommandID ) + ToolsGUI_CatalogGeneratorDlg* aDlg = new ToolsGUI_CatalogGeneratorDlg( parent ); + aDlg->exec(); + delete aDlg; break; } + + default: + MESSAGE ( " No command associated with this id = " << theCommandID ) + break; + } return true; } extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) + bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - //MESSAGE("ToolsGUI::OnGUIEvent "<< theCommandID); return ToolsGUI::OnGUIEvent(theCommandID, parent); } +} + +//======================================================================= +// name : GetVisibility +// Purpose : Verify whether object is visible or not +//======================================================================= +bool ToolsGUI::GetVisibility( SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj, + void* theId ) +{ + SALOMEDS::GenericAttribute_var anAttr; + if ( !theObj->_is_nil() && theObj->FindAttribute( anAttr, "AttributeGraphic" ) ) + { + SALOMEDS::AttributeGraphic_var aGraphic = + SALOMEDS::AttributeGraphic::_narrow( anAttr ); + return aGraphic->GetVisibility( (unsigned long)theId ); + } + return false; } + +//======================================================================= +// name : SetVisibility +// Purpose : Set flag visibility of object +//======================================================================= +bool ToolsGUI::SetVisibility( SALOMEDS::Study_var theStudy, + const char* theEntry, + const bool theValue, + void* theId ) +{ + SALOMEDS::SObject_var anObj = theStudy->FindObjectID( theEntry ); + + if ( !anObj->_is_nil() ) + { + SALOMEDS::GenericAttribute_var aGAttr; + if ( anObj->FindAttribute( aGAttr, "AttributeGraphic" ) ) + { + SALOMEDS::AttributeGraphic_var anAttr = SALOMEDS::AttributeGraphic::_narrow( aGAttr ); + anAttr->SetVisibility( (unsigned long)theId, theValue ); + } + else if ( theValue ) + { + SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder(); + SALOMEDS::AttributeGraphic_var anAttr = SALOMEDS::AttributeGraphic::_narrow( + aBuilder->FindOrCreateAttribute( anObj, "AttributeGraphic" ) ); + anAttr->SetVisibility( (unsigned long)theId, theValue ); + } + return true; + } + + return false; +} + + + + + + diff --git a/src/TOOLSGUI/ToolsGUI.h b/src/TOOLSGUI/ToolsGUI.h index 93f697881..bd4022f22 100644 --- a/src/TOOLSGUI/ToolsGUI.h +++ b/src/TOOLSGUI/ToolsGUI.h @@ -35,36 +35,24 @@ #include "QAD_Desktop.h" -class ToolsGUI : public QObject +#include +#include CORBA_SERVER_HEADER(SALOMEDS) + +class Standard_EXPORT ToolsGUI { - Q_OBJECT public : -// Methods PUBLIC -// - Standard_EXPORT static int ToolsGUI::runCommand(string & arg); -Standard_EXPORT static bool OnGUIEvent (int theCommandID, QAD_Desktop* parent); - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + static int runCommand( string& ); + static bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ); + static bool GetVisibility( SALOMEDS::Study_var theStudy, + SALOMEDS::SObject_var theObj, + void* theId ); + static bool SetVisibility( SALOMEDS::Study_var theStudy, + const char* theEntry, + const bool theValue, + void* theId ); }; #endif diff --git a/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx b/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx index c2ac9c3cc..276a5bc6d 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx @@ -171,6 +171,8 @@ VTKViewer_InteractorStyleSALOME::~VTKViewer_InteractorStyleSALOME() void VTKViewer_InteractorStyleSALOME::setPreselectionProp(const double& theRed, const double& theGreen, const double& theBlue, const int& theWidth) { + if ( myPreSelectionActor->GetProperty() == 0 ) + return; myPreSelectionActor->GetProperty()->SetColor(theRed, theGreen, theBlue); myPreSelectionActor->GetProperty()->SetLineWidth(theWidth); myPreSelectionActor->GetProperty()->SetPointSize(theWidth); @@ -835,7 +837,7 @@ void VTKViewer_InteractorStyleSALOME::onFinishOperation() rect = rect.normalize(); if (State == VTK_INTERACTOR_STYLE_CAMERA_FIT) { // making fit rect opeation - int w, h, x, y; + int w, h; m_Interactor->GetSize(w, h); int x1, y1, x2, y2; x1 = rect.left(); @@ -965,7 +967,7 @@ void VTKViewer_InteractorStyleSALOME::onFinishOperation() // vtkCamera *cam = this->CurrentRenderer->GetActiveCamera(); QRect rect(myPoint, myOtherPoint); rect = rect.normalize(); - int w, h, x, y; + int w, h; m_Interactor->GetSize(w, h); int x1, y1, x2, y2; x1 = rect.left(); @@ -1272,7 +1274,7 @@ void VTKViewer_InteractorStyleSALOME::onCursorMove(QPoint mousePos) { } } } - else if ( vtkPicker* picker = vtkPicker::SafeDownCast(aPicker) ) { + else if ( vtkPicker::SafeDownCast(aPicker) ) { if ( SActor ) { if ( myPreViewActor != SActor ) { if ( myPreViewActor != NULL ) { diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx index c7d3828a9..d8d86e86c 100644 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx @@ -575,7 +575,6 @@ void VTKViewer_RenderWindowInteractor::EraseAll() emit RenderWindowModified() ; } - void VTKViewer_RenderWindowInteractor::DisplayAll() { vtkActorCollection* aCollection = GetRenderer()->GetActors(); @@ -624,8 +623,39 @@ void VTKViewer_RenderWindowInteractor::Remove(const Handle(SALOME_InteractiveObj TIsSameIObject(theIObject), TRemoveAction(aRen)); - if(update) - emit RenderWindowModified(); + +} + +void VTKViewer_RenderWindowInteractor::Remove( SALOME_Actor* SActor, bool updateViewer ) +{ + if ( SActor != 0 ) + { + GetRenderer()->RemoveProp( SActor ); + if ( updateViewer ) + emit RenderWindowModified(); + } +} + +void VTKViewer_RenderWindowInteractor::RemoveAll( const bool updateViewer ) +{ + vtkRenderer* aRenderer = GetRenderer(); + vtkActorCollection* anActors = aRenderer->GetActors(); + if ( anActors ) + { + anActors->InitTraversal(); + while ( vtkActor *anAct = anActors->GetNextActor() ) + { + if ( anAct->IsA( "SALOME_Actor" ) ) + { + SALOME_Actor* aSAct = (SALOME_Actor*)anAct; + if ( aSAct->hasIO() && aSAct->getIO()->hasEntry() ) + aRenderer->RemoveActor( anAct ); + } + } + + if ( updateViewer ) + emit RenderWindowModified(); + } } diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h index eb4fdb004..99ef01e82 100644 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h @@ -68,7 +68,7 @@ class VTKViewer_InteractorStyleSALOME; class VTK_EXPORT VTKViewer_RenderWindowInteractor : public QObject, public vtkRenderWindowInteractor { - Q_OBJECT ; + Q_OBJECT ; friend class VTKViewer_ViewFrame; public: @@ -178,12 +178,14 @@ public: // Erase Display functions void EraseAll(); void DisplayAll(); + void RemoveAll( const bool immediatly ); void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true); void Remove(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true); void Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly=true); void Display( SALOME_Actor* SActor, bool immediatly = true ); void Erase( SALOME_Actor* SActor, bool immediatly = true ); + void Remove( SALOME_Actor* SActor, bool updateViewer = true ); // Transparency void SetTransparency(const Handle(SALOME_InteractiveObject)& IObject,float trans); diff --git a/src/VTKViewer/VTKViewer_ViewFrame.cxx b/src/VTKViewer/VTKViewer_ViewFrame.cxx index f16a93f4c..1dc5b8db4 100644 --- a/src/VTKViewer/VTKViewer_ViewFrame.cxx +++ b/src/VTKViewer/VTKViewer_ViewFrame.cxx @@ -40,6 +40,7 @@ #include "SALOME_Transform.h" #include "SALOME_TransformFilter.h" #include "SALOME_GeometryFilter.h" +#include "SALOMEGUI.h" #include "QAD_Settings.h" #include "QAD_Config.h" @@ -47,6 +48,8 @@ #include "QAD_Desktop.h" #include "SALOME_Selection.h" #include "SALOME_InteractiveObject.hxx" +#include "ToolsGUI.h" +#include "SALOMEDS_Tool.hxx" #include "utilities.h" @@ -476,10 +479,12 @@ Handle(SALOME_InteractiveObject) VTKViewer_ViewFrame::FindIObject(const char* th /* display */ void VTKViewer_ViewFrame::Display(const Handle(SALOME_InteractiveObject)& theIObject, bool update) { - QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOME_Selection* aSel = SALOME_Selection::Selection(aStudy->getSelection()); + QAD_Study* aQADStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOME_Selection* aSel = SALOME_Selection::Selection( aQADStudy->getSelection() ); + SALOMEDS::Study_var aStudy = aQADStudy->getStudyDocument(); m_RWInteractor->Display(theIObject,false); + ToolsGUI::SetVisibility( aStudy, theIObject->getEntry(), true, this ); aSel->AddIObject(theIObject,false); if(update) @@ -506,13 +511,17 @@ void VTKViewer_ViewFrame::DisplayOnly(const Handle(SALOME_InteractiveObject)& th SALOME_Selection* aSel = SALOME_Selection::Selection(aStudy->getSelection()); aSel->ClearIObjects(); - m_RWInteractor->EraseAll(); + //m_RWInteractor->EraseAll(); + EraseAll(); using namespace SALOME::VTK; ForEachIf(getRenderer()->GetActors(), TIsSameIObject(theIObject), TDisplayAction(aSel,theIObject)); + ToolsGUI::SetVisibility( + aStudy->getStudyDocument(), theIObject->getEntry(), true, this ); + Repaint(); } @@ -541,6 +550,9 @@ void VTKViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& theIObje TIsSameIObject(theIObject), TEraseAction(aSel,theIObject,m_RWInteractor)); + ToolsGUI::SetVisibility( + aStudy->getStudyDocument(), theIObject->getEntry(), false, this ); + if(update) Repaint(); } @@ -549,12 +561,42 @@ void VTKViewer_ViewFrame::Erase(const Handle(SALOME_InteractiveObject)& theIObje void VTKViewer_ViewFrame::DisplayAll() { m_RWInteractor->DisplayAll(); + + // update flag of visibility + QAD_Study* aQADStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOMEDS::Study_var aStudy = aQADStudy->getStudyDocument(); + QAD_Desktop* aDesktop = QAD_Application::getDesktop(); + const QString& aCompName = aDesktop->getComponentDataType(); + SALOMEDS::SObject_var aComponent = + SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) ); + + std::list aList; + SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList ); + + std::list::iterator anIter = aList.begin(); + for ( ; anIter != aList.end(); ++anIter ) + ToolsGUI::SetVisibility( aStudy, (*anIter)->GetID(), true, this ); } void VTKViewer_ViewFrame::EraseAll() { m_RWInteractor->EraseAll(); + + // update flag of visibility + QAD_Study* aQADStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOMEDS::Study_var aStudy = aQADStudy->getStudyDocument(); + QAD_Desktop* aDesktop = QAD_Application::getDesktop(); + const QString& aCompName = aDesktop->getComponentDataType(); + SALOMEDS::SObject_var aComponent = + SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) ); + + std::list aList; + SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList ); + + std::list::iterator anIter = aList.begin(); + for ( ; anIter != aList.end(); ++anIter ) + ToolsGUI::SetVisibility( aStudy, (*anIter)->GetID(), false, this ); } @@ -625,6 +667,16 @@ void VTKViewer_ViewFrame::Display( const SALOME_VTKPrs* prs ) { // just display the object m_RWInteractor->Display( salomeActor, false ); + + // Set visibility flag + Handle(SALOME_InteractiveObject) anObj = salomeActor->getIO(); + if ( !anObj.IsNull() && anObj->hasEntry() ) + { + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); + } + if ( salomeActor->IsSetCamera() ) salomeActor->SetCamera( getRenderer()->GetActiveCamera() ); } @@ -648,13 +700,27 @@ void VTKViewer_ViewFrame::Erase( const SALOME_VTKPrs* prs, const bool forced ) if ( !actors ) return; + SALOMEDS::Study_var aStudy = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + actors->InitTraversal(); vtkActor* actor; while( ( actor = actors->GetNextActor() ) ) { SALOME_Actor* salomeActor = SALOME_Actor::SafeDownCast( actor ); if ( salomeActor ) { // just erase the object - m_RWInteractor->Erase( salomeActor, forced ); + if ( forced ) + m_RWInteractor->Remove( salomeActor, false ); + else + m_RWInteractor->Erase( salomeActor, forced ); + + // Set visibility flag if necessary + if ( !forced ) + { + Handle(SALOME_InteractiveObject) anObj = salomeActor->getIO(); + if ( !anObj.IsNull() && anObj->hasEntry() ) + ToolsGUI::SetVisibility( aStudy, anObj->getEntry(), true, this ); + } } } } @@ -703,3 +769,89 @@ void VTKViewer_ViewFrame::AfterDisplay( SALOME_Displayer* d ) { d->AfterDisplay( this, SALOME_VTKViewType() ); } + +//========================================================== +/*! + * VTKViewer_ViewFrame::undo + * Redisplay all objects in viewer + */ +//========================================================== +void VTKViewer_ViewFrame::undo( QAD_Study* theQADStudy, const char* /*StudyFrameEntry*/ ) +{ + redisplayAll( theQADStudy, true ); +} + +//========================================================== +/*! + * VTKViewer_ViewFrame::redo + * Redisplay all objects in viewer + */ +//========================================================== +void VTKViewer_ViewFrame::redo( QAD_Study* theQADStudy, const char* /*StudyFrameEntry*/ ) +{ + redisplayAll( theQADStudy, true ); +} + +//========================================================== +/*! + * VTKViewer_ViewFrame::redisplayAll + * Redisplay all objects in viewer + */ +//========================================================== +void VTKViewer_ViewFrame::redisplayAll( QAD_Study* theQADStudy, const bool theToUpdate ) +{ + SALOMEDS::Study_var aStudy = theQADStudy->getStudyDocument(); + SALOME_Selection* aSel = SALOME_Selection::Selection( theQADStudy->getSelection() ); + QAD_Desktop* aDesktop = QAD_Application::getDesktop(); + SALOMEGUI* aGUI = aDesktop->getActiveGUI(); + const QString& aCompName = aDesktop->getComponentDataType(); + SALOMEDS::SObject_var aComponent = + SALOMEDS::SObject::_narrow( aStudy->FindComponent ( aCompName.latin1() ) ); + + if ( aComponent->_is_nil() ) + return; + + bool isTrhDisplayed = isTrihedronDisplayed(); + + m_RWInteractor->RemoveAll( false ); + //m_RWInteractor->EraseAll(); + + aSel->ClearIObjects(); + + if ( isTrhDisplayed ) + m_Triedron->AddToRender( m_Renderer ); + + std::list aList; + SALOMEDS_Tool::GetAllChildren( aStudy, aComponent, aList ); + + std::list::iterator anIter = aList.begin(); + for ( ; anIter != aList.end(); ++anIter ) + { + SALOMEDS::SObject_var anObj = (*anIter); + if ( ToolsGUI::GetVisibility( aStudy, anObj, this ) ) + { + Handle(SALOME_InteractiveObject) anIObj = new SALOME_InteractiveObject(); + anIObj->setEntry( anObj->GetID() ); + aGUI->BuildPresentation( anIObj, this ); + } + + } + + if ( theToUpdate ) + Repaint(); +} + + + + + + + + + + + + + + + diff --git a/src/VTKViewer/VTKViewer_ViewFrame.h b/src/VTKViewer/VTKViewer_ViewFrame.h index 7f67e444d..6a8d79b25 100644 --- a/src/VTKViewer/VTKViewer_ViewFrame.h +++ b/src/VTKViewer/VTKViewer_ViewFrame.h @@ -42,98 +42,108 @@ class VTKViewer_RenderWindow; class VTKViewer_RenderWindowInteractor; -class QAD_EXPORT VTKViewer_ViewFrame : public QAD_ViewFrame{ +class QAD_EXPORT VTKViewer_ViewFrame : public QAD_ViewFrame +{ Q_OBJECT; - public: - VTKViewer_ViewFrame(QWidget* parent, const char* name=0 ); - ~VTKViewer_ViewFrame(); + +public: + VTKViewer_ViewFrame(QWidget* parent, const char* name=0 ); + ~VTKViewer_ViewFrame(); - ViewType getTypeView() const{ return VIEW_VTK;}; - QWidget* getViewWidget(); - vtkRenderer* getRenderer() {return m_Renderer;} + ViewType getTypeView() const{ return VIEW_VTK;}; + QWidget* getViewWidget(); + vtkRenderer* getRenderer() {return m_Renderer;} - VTKViewer_RenderWindow* getRW() {return m_RW;} + VTKViewer_RenderWindow* getRW() {return m_RW;} VTKViewer_RenderWindowInteractor* getRWInteractor() {return m_RWInteractor;} - bool isTrihedronDisplayed(); + bool isTrihedronDisplayed(); - void setBackgroundColor( const QColor& ); - QColor backgroundColor() const; + void setBackgroundColor( const QColor& ); + QColor backgroundColor() const; - void SetSelectionMode( Selection_Mode mode ); + void SetSelectionMode( Selection_Mode mode ); /* popup management */ - void setPopupServer( QAD_Application* ); + void setPopupServer( QAD_Application* ); /* interactive object management */ - void highlight( const Handle(SALOME_InteractiveObject)& IObject, - bool highlight, bool immediatly = true ); - void unHighlightAll(); - void rename( const Handle(SALOME_InteractiveObject)& IObject, - QString newName ); - bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject ); - bool isVisible( const Handle(SALOME_InteractiveObject)& IObject ); + void highlight( const Handle(SALOME_InteractiveObject)& IObject, + bool highlight, bool immediatly = true ); + void unHighlightAll(); + void rename( const Handle(SALOME_InteractiveObject)& IObject, + QString newName ); + bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject ); + bool isVisible( const Handle(SALOME_InteractiveObject)& IObject ); /* selection */ - Handle(SALOME_InteractiveObject) FindIObject(const char* Entry); + Handle(SALOME_InteractiveObject) FindIObject(const char* Entry); /* display */ - void Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true); - void DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject); - void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true); - void DisplayAll(); - void EraseAll(); - void Repaint(bool theUpdateTrihedron); - void Repaint() { Repaint(true); } + void Display( const Handle(SALOME_InteractiveObject)& IObject, + bool immediatly = true ); + void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject ); + void Erase( const Handle(SALOME_InteractiveObject)& IObject, + bool immediatly = true ); + void DisplayAll(); + void EraseAll(); + void Repaint( bool theUpdateTrihedron ); + void Repaint() { Repaint(true); } + + virtual void undo( QAD_Study* aStudy, const char* StudyFrameEntry ); + virtual void redo( QAD_Study* aStudy, const char* StudyFrameEntry ); /* Reimplemented from SALOME_View */ - void Display( const SALOME_VTKPrs* ); - void Erase( const SALOME_VTKPrs*, const bool = false ); - SALOME_Prs* CreatePrs( const char* entry = 0 ); - virtual void BeforeDisplay( SALOME_Displayer* d ); - virtual void AfterDisplay ( SALOME_Displayer* d ); + void Display( const SALOME_VTKPrs* ); + void Erase( const SALOME_VTKPrs*, const bool = false ); + SALOME_Prs* CreatePrs( const char* entry = 0 ); + virtual void BeforeDisplay( SALOME_Displayer* d ); + virtual void AfterDisplay ( SALOME_Displayer* d ); //apply existing transformation on adding SALOME_Actor - void SetScale(double theScale[3]); - void GetScale(double theScale[3]); - void AddActor(SALOME_Actor*, bool update = false); - void RemoveActor(SALOME_Actor*, bool update = false); - - void AdjustTrihedrons( const bool forced ); - bool ComputeTrihedronSize( double& theNewSize, double& theOldSize ); - double GetTrihedronSize() const; - public slots: - void onViewPan(); - void onViewZoom(); - void onViewFitAll(); - void onViewFitArea(); - void onViewGlobalPan(); - void onViewRotate(); - void onViewReset(); - void onViewFront(); - void onViewBack(); - void onViewRight(); - void onViewLeft(); - void onViewBottom(); - void onViewTop(); - void onViewTrihedron(); - void onAdjustTrihedron(); - - private: - void InitialSetup(); - - double m_ViewUp[3]; - double m_ViewNormal[3]; + void SetScale( double theScale[3] ); + void GetScale( double theScale[3] ); + void AddActor( SALOME_Actor*, bool update = false ); + void RemoveActor(SALOME_Actor*, bool update = false); + + void AdjustTrihedrons( const bool forced ); + bool ComputeTrihedronSize( double& theNewSize, + double& theOldSize ); + double GetTrihedronSize() const; - vtkRenderer* m_Renderer; - VTKViewer_RenderWindow* m_RW; +public slots: + void onViewPan(); + void onViewZoom(); + void onViewFitAll(); + void onViewFitArea(); + void onViewGlobalPan(); + void onViewRotate(); + void onViewReset(); + void onViewFront(); + void onViewBack(); + void onViewRight(); + void onViewLeft(); + void onViewBottom(); + void onViewTop(); + void onViewTrihedron(); + void onAdjustTrihedron(); + +private: + void InitialSetup(); + void redisplayAll( QAD_Study*, const bool = true ); + void InsertActor( SALOME_Actor* theActor, + bool theMoveInternalActors = false ); + void MoveActor( SALOME_Actor* theActor ); + +private: + double m_ViewUp[ 3 ]; + double m_ViewNormal[ 3 ]; + vtkRenderer* m_Renderer; + VTKViewer_RenderWindow* m_RW; VTKViewer_RenderWindowInteractor* m_RWInteractor; + VTKViewer_Trihedron* m_Triedron; + SALOME_Transform* m_Transform; - friend class VTKViewer_RenderWindowInteractor; - void InsertActor(SALOME_Actor* theActor, bool theMoveInternalActors = false); - void MoveActor(SALOME_Actor* theActor); - - VTKViewer_Trihedron* m_Triedron; - SALOME_Transform* m_Transform; + friend class VTKViewer_RenderWindowInteractor; }; #endif