~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_py/geometry/CADImport.py

  • Committer: Durga Rajaram
  • Date: 2014-07-16 15:13:05 UTC
  • mfrom: (659.1.92 cand)
  • Revision ID: durga@fnal.gov-20140716151305-q27rv1y9p03v9lks
Tags: MAUS-v0.9, MAUS-v0.9.0
MAUS-v0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
                                          elem.prop('z')+' '+\
213
213
                                          elem.prop('lunit')+'\n')
214
214
                        break
 
215
                trd      = datafile.xpathEval("gdml/solids/trd")
 
216
                for elem in trd:
 
217
                    if elem.prop("name") == solid[0].prop('ref'):
 
218
                        result.append('Volume Trapezoid\n')
 
219
                        result.append('TrapezoidWidthX1 '+elem.prop('x1')+'\n')
 
220
                        result.append('TrapezoidWidthX2 '+elem.prop('x2')+'\n')
 
221
                        result.append('TrapezoidHeightY1 '+elem.prop('y1')+'\n')
 
222
                        result.append('TrapezoidHeightY2 '+elem.prop('y2')+'\n')
 
223
                        result.append('TrapezoidLengthZ '+elem.prop('z')+'\n')
 
224
                        break
 
225
                            
215
226
                intersection = datafile.xpathEval("gdml/solids/intersection")
216
227
                for elem in intersection:
217
228
                    # if the solid name matches the element name, we leave
285
296
                           or elemtype == 'TrapezoidWidthX2'\
286
297
                           or elemtype == 'TrapezoidHeightY1'\
287
298
                           or elemtype == 'TrapezoidHeightY2'\
288
 
                           or elemtype == 'TrapezoidLength'\
 
299
                           or elemtype == 'TrapezoidLengthZ'\
289
300
                           or elemtype == 'NbOfBars':
290
301
                        result.append('PropertyDouble '+elemtype+' '+value+"\n")
291
302
                    # Extract double typed elements with units