JMG1 / ExplodedAssembly

FreeCAD workbench to create exploded views and animations of assemblies
GNU Lesser General Public License v2.1
115 stars 27 forks source link

Errors when using assembly workbench #18

Closed EvanLF6768 closed 3 years ago

EvanLF6768 commented 3 years ago

If trying to use this tool with an assembly workbench (eg. Assembly 3) always fails with:

Running the Python command 'CreateSimpleGroup' failed:
Traceback (most recent call last):
  File "/home/evan/.FreeCAD/Mod/ExplodedAssembly/EAInit.py", line 71, in Activated
    ea.createSimpleDisassemble()
  File "/home/evan/.FreeCAD/Mod/ExplodedAssembly/ExplodedAssembly.py", line 213, in createSimpleDisassemble
    dir_vector = selection[-1].SubObjects[-1].normalAt(0, 0)

function takes exactly 1 argument (2 given)Running the Python command 'CreateSimpleGroup' failed:
Traceback (most recent call last):
  File "/home/evan/.FreeCAD/Mod/ExplodedAssembly/EAInit.py", line 71, in Activated
    ea.createSimpleDisassemble()
  File "/home/evan/.FreeCAD/Mod/ExplodedAssembly/ExplodedAssembly.py", line 245, in createSimpleDisassemble
    plm = an_object.Placement

'NoneType' object has no attribute 'Placement'

This appears to be because selecting a face in an assembly selects the face inside the of the part hierarchy (eg. on a pad), instead of the face on the part itself.

OS: Arch Linux (i3//usr/share/xsessions/i3) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.21911 +2545 (Git) AppImage Build type: Release Branch: LinkStage3 Hash: 04c80c99eee0f7d2f761bdc7d8b32c077adefdec Python version: 3.7.8 Qt version: 5.12.1 Coin version: 4.0.0 OCC version: 7.4.0 Locale: C/Default (C)