Skip to content

Commit

Permalink
fix position center and trace
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithSloan committed Aug 25, 2020
1 parent 3e5fc2b commit fcbe92c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions freecad/gdml/GDMLShared.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def getRef(ptr, name) :
def getMult(fp) :
unit = 'mm' # set default
# Watch for unit and lunit
print('getMult : '+str(fp))
#print('getMult : '+str(fp))
if hasattr(fp,'lunit') :
trace('lunit : '+fp.lunit)
unit = fp.lunit
Expand Down Expand Up @@ -233,10 +233,9 @@ def processPlacement(base,rot) :


def getPositionFromAttrib(pos) :
print('getPositionFromAttrib')
print('pos : '+str(ET.tostring(pos)))
print(pos.attrib)
#print('pos attrib : '+str(ET.tostring(pos.attrib)))
#print('getPositionFromAttrib')
#print('pos : '+str(ET.tostring(pos)))
#print(pos.attrib)
#if hasattr(pos.attrib, 'unit') : # Note unit NOT lunit
#if hasattr(pos.attrib,'name') :
# name = pos.get('name')
Expand Down Expand Up @@ -264,7 +263,7 @@ def getDefinedPosition(name) :
# get Position from define section
pos = define.find("position[@name='%s']" % name )
if pos != None :
print('Position : '+str(ET.tostring(pos)))
#print('Position : '+str(ET.tostring(pos)))
trace(pos.attrib)
return(getPositionFromAttrib(pos))
else :
Expand Down

0 comments on commit fcbe92c

Please sign in to comment.