Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix importPart. Refresh imported parts fail when there is no Shape #157

Merged
merged 1 commit into from
Nov 5, 2018
Merged

Conversation

mnesarco
Copy link
Contributor

@mnesarco mnesarco commented Nov 5, 2018

  1. I have created two parts from imported SVG files.
  2. Then I have created an assembly importing that two parts.
  3. Then I have modified the original part files.
  4. Then when I click on "Update parts imported into the assembly", the script fails:
Running the Python command 'assembly2_updateImportedPartsCommand' failed:
Traceback (most recent call last):
  File "/home/u/.FreeCAD/Mod/assembly2/assembly2/importPart/__init__.py", line 230, in Activated
    importPart( obj.sourceFile, obj.Name,  doc_assembly )
  File "/home/u/.FreeCAD/Mod/assembly2/assembly2/importPart/__init__.py", line 59, in importPart
    obj_to_copy.Shape =  muxObjects(doc)
  File "/home/u/.FreeCAD/Mod/assembly2/assembly2/utils/muxAssembly.py", line 21, in muxObjects
    faces = faces + obj.Shape.Faces

Fcstd_Property_List instance has no attribute 'Shape'

So I have edited the muxAssembly.py adding two simple checks. It works.

@hamish2014 hamish2014 merged commit af72bbe into hamish2014:master Nov 5, 2018
@hamish2014
Copy link
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants