Copying physical volume makes volume invalid
After copying a selection (physical volume) in FreeCAD, the pasted part cannot be exported, with the following error:
17:01:54 ====> Start GDML Export 0.1
17:01:54 File extension : .xml
17:01:54 clean name : LowerBoxPhys
17:01:54 returning name : LowerBoxPhys
17:01:54 Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 2208, in export
exportGDML(first,filepath,'.xml')
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1954, in exportGDML
exportWorldVol(first, fileExt)
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1905, in exportWorldVol
processVolume( cnt, vol, xmlVol, xmlParent, parentName, False)
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1829, in processVolume
idx = processObject(cnt, idx, vol.OutList[idx], \
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1650, in processObject
solidCnt, solidxml, solidName = processSolid(obj, True)
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1330, in processSolid
solidxml, solidName = processGDMLSolid(obj, True)
File "C:\Users\shang\AppData\Roaming\FreeCAD\Mod\GDML\freecad\gdml\exportGDML.py", line 1207, in processGDMLSolid
while switch(obj.Proxy.Type) :
<class 'AttributeError'>: 'GDMLBox' object has no attribute 'Type'
This is not showing up in the list of Open issues? I only know about it because of an email about it. Do you know why that might be.
Anyway Type is set as follows in the GDML objects definitions.
self.Proxy = self self.Type = 'GDMLBox' # as appropriate
This is my understanding of the way one is supposed to determine the class of a Parts::PythonFeature.
I suspect the copying action has not copied the details across. Have asked in the FreeCAD forum about this. I could set as a hidden property but given the number of defined GDML objects it would be a large change and I don't want to go down that route unless necessary. wmayer would be the best person for me to ask, but as FreeCAD 0.19 is now in feature freeze prior to release he is likely to be VERY busy.
FreeCAD forum post https://forum.freecadweb.org/viewtopic.php?f=22&t=55118
Just noticed that this is an issue raised with old repro. Does the problem occur with https://github.com/KeithSloan/GDML
Looking at error messages it does. Please could you raise in https://github.com/KeithSloan/GDML