Cannot Export to IFC with 0.19_pre

This forum section is only for IFC-related issues
romainbonjour
Posts: 10
Joined: Wed May 13, 2020 1:49 pm

Cannot Export to IFC with 0.19_pre

Post by romainbonjour »

Hi,

I have an error message when trying to export my Model to IFC (file / export / IFC). In the report view, I get:
Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Users\RBr\FreeCAD_0.19\Mod\Arch\exportIFC.py", line 264, in export
b = Draft.getCloneBase(o,strict=True)
<class 'AttributeError'>: module 'Draft' has no attribute 'getCloneBase'
In order to check if I had a problem with my model, I have also tried with “house.FCStd” from Yorik's Tutorial. The log from above is from this trial.

Hope you can help!

Thanks in advance,
Romain
PS:I am new to FreeCAD, and I love it. I would probably not use the other CADs I have... Thanks everyone.

--- some info about my config.
When I put “import ifcopenshell” and “from “ifcopenshell import geom”, I do not get errors. Seems fine.
Freecad downloaded from https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
ifcopenshell was « updated » (I have replaced python files) from http://ifcopenshell.org/python . but this does not help.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20943 (Git)
Build type: Release
Branch: master
Hash: ceb23799c76df3ebfa7be4b9fe83bb62de60bc6c
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: Cannot Export to IFC with 0.19_pre

Post by fc_tofu »

I confirm.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20943 (Git)
Build type: Release
Branch: master
Hash: ceb23799c76df3ebfa7be4b9fe83bb62de60bc6c
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Chinese/China (zh_CN)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Cannot Export to IFC with 0.19_pre

Post by vocx »

romainbonjour wrote: Wed May 13, 2020 2:13 pm ...
<class 'AttributeError'>: module 'Draft' has no attribute 'getCloneBase'
...
Version: 0.19.20943 (Git)
...
You need to update your version. The problem was corrected in git commit 64619a615, 0.19.21031.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
romainbonjour
Posts: 10
Joined: Wed May 13, 2020 1:49 pm

Re: Cannot Export to IFC with 0.19_pre

Post by romainbonjour »

Hum, meaning I have to compile from Source... I will try that!
Thanks
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Cannot Export to IFC with 0.19_pre

Post by bernd »

romainbonjour wrote: Thu May 14, 2020 9:30 am Hum, meaning I have to compile from Source... I will try that!
Thanks
or use conda build which is on 0.19.21049 or wait a few days.
romainbonjour
Posts: 10
Joined: Wed May 13, 2020 1:49 pm

Re: Cannot Export to IFC with 0.19_pre

Post by romainbonjour »

Thanks a lot!

I lost 1 day trying to compile, while I just needed to put 3-4 lines in my Conda env...

:-)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Cannot Export to IFC with 0.19_pre

Post by bernd »

the dev version is on 0.19.21068 means it should word with it
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: Cannot Export to IFC with 0.19_pre

Post by fc_tofu »

bernd wrote: Fri May 15, 2020 7:48 am the dev version is on 0.19.21068 means it should word with it
Thank you.
I tested in latest build, with "house.FCStd" from @yorik.
At this time export to .ifc succeed without error msg. But when importing-back, partial model is lost. Prompt msg in Report View.

Code: Select all

Width & OverrideWidth & base.getWidths() should not be all 0 or None or [] empty list 
Error: Invalid base object
Failed to rebuild a valid solid for object  Component
Failed to rebuild a valid solid for object  Component001
Failed to rebuild a valid solid for object  Structure
Failed to rebuild a valid solid for object  Structure001
Failed to rebuild a valid solid for object  Structure002
Failed to rebuild a valid solid for object  Structure003
Failed to rebuild a valid solid for object  Structure004
Failed to rebuild a valid solid for object  Structure005
Failed to rebuild a valid solid for object  Wall
Failed to rebuild a valid solid for object  Window
Finished importing.

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21049 (Git)
Build type: Release
Branch: master
Hash: 9c27f1078e5ec516fe882aac1a27f5c6c6174554
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Chinese/China (zh_CN)
Attachments
test.ifc
(35.37 KiB) Downloaded 75 times
fsc_2020-05-15_162318.jpg
fsc_2020-05-15_162318.jpg (101.49 KiB) Viewed 3929 times
fsc_2020-05-15_162302.jpg
fsc_2020-05-15_162302.jpg (134.55 KiB) Viewed 3929 times
Last edited by fc_tofu on Fri May 15, 2020 9:00 am, edited 1 time in total.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Cannot Export to IFC with 0.19_pre

Post by Syres »

I get a much more complete but not perfect import (both export and import done with 0.19.21068):

Code: Select all

failed to compute placement 
failed to compute placement 
failed to compute placement 
failed to compute placement 
failed to compute placement 
Loading Drawing module... done
Failed to rebuild a valid solid for object  Component
Failed to rebuild a valid solid for object  Component001
Finished importing.
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21068 (Git)
Build type: Release
Branch: master
Hash: 92fe9adebbff910c5a10d6230785a6b58935b677
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Attachments
House.ifc
(21.38 KiB) Downloaded 87 times
l_pereztato
Posts: 17
Joined: Thu Mar 22, 2018 8:28 am
Contact:

Re: Cannot Export to IFC with 0.19_pre

Post by l_pereztato »

I have the same problem when importing House.ifc

OS: Ubuntu 20.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 472c09cd09a02209e1179d25e0a727db5d374ebb
Python version: 3.8.10
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United Kingdom (en_GB)
Post Reply