realthunder / FreeCAD

Link branch FreeCAD
Other
798 stars 46 forks source link

[Problem] exportIFC.export cannot be called in freecadcmd command line #1040

Open 3xxx opened 1 month ago

3xxx commented 1 month ago

Is there an existing issue for this?

Version

0.21 (Development)

Full version info

FreeCAD-Link-Stable-Linux-x86_64-py3.11-20241003.AppImage

Subproject(s) affected?

None

Problem description

I used the command line debugging in the linux (centos) system, and found that in the link(FreeCAD-Link-Stable-Linux-x86_64-py3.11-20241003.AppImage) version of freecadcmd, exportIFC.export cannot be called, while the version of [FreeCAD-Link-Stable-Linux-x86_64-py3.11-20240407.AppImage] if fine.

import FreeCAD
import exportIFC
......

objs = doc.Objects
__objs__ = []
for obj in objs:
    if hasattr(obj, 'Shape'):
        obj.Shape.tessellate(0.5)
    if obj.Name[:4] == 'Body' or obj.Name[:4] == 'Part':
        __objs__.append(obj)
exportIFC.export(__objs__, output_file)

微信图片编辑_20241024214207

Anything else?

No response

Code of Conduct