Import step export ifc

This forum section is only for IFC-related issues
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Import step export ifc

Post by yorik »

bernd wrote: Mon Nov 04, 2019 7:12 pm Does ifcos support export too?
Yes of course... That's what we use since the beginnning
But it's rather simple, it basically allows you to construct IFC entities. It's up to you to know what you are constructing.
The serializer is a much more advanced feature. It basically takes an OCC shape, any shape, and tries to build an Ifc Shape representation from it, the best it can (IfcFacetedBrep in most cases, IfcAdvancedBrep is there are nurbs surfaces, but it can also do 2D objects). So all you need is to create an IfcProduct and attach the representation to it.

But of course this is a rather simple bulk geometry conversion. It doesn't go into the detail of building extrusions, booleans, etc...

In our IFC exporter, if you turn the serializer option on, it will be used only for shapes where we can't make a better choice ourselves (extrusions for ex). It will basically be used where we otherwise would triangulate curved surfaces.
endu
Posts: 2
Joined: Mon Feb 14, 2022 8:53 am

Re: Import step export ifc

Post by endu »

Hey fellas,

sorry for digging out this old topic.. I´m currently trying to import STEP files (from CATIA) in FreeCAD and export them as IFC files.
Somehow the geometry changes in a undesired way during the transfer (as you can see in the attached picture).

Has anyone noticed something similar and maybe has a solution for this problem? :)

Thank you!
Attachments
BIM Schraube DIN 921 M8x100 TEIL.stp
(18.64 KiB) Downloaded 92 times
freecadgeometryproblem.jpg
freecadgeometryproblem.jpg (55.69 KiB) Viewed 5187 times
User avatar
thomas-neemann
Veteran
Posts: 11915
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Import step export ifc

Post by thomas-neemann »

endu wrote: Mon Feb 14, 2022 9:01 am
As far as I know, roundings are replaced by polygons. With large components, such as in architecture, it is hardly noticeable, with small parts, such as in mechanical engineering, it is very noticeable
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
endu
Posts: 2
Joined: Mon Feb 14, 2022 8:53 am

Re: Import step export ifc

Post by endu »

Thank you for your answer!

But shouldn´t it be possible to export curved surfaces via IFC?
I´m refering to this post on osArch https://wiki.osarch.org/index.php?title ... IFC_export
ifcOpenShell v0.6 onwards features a serializer able to create IfcAdvancedBrep objects, that can contain curved surfaces. if using the correct version, and the use of the serializer is turned on in the FreeCAD IFC export preferences, IfcAdvancedBrep objects will be created for objects that contain curved faces. Otherwise, they will be triangulated and exported as IfcFacetedBrep
Even though I got ifcopenshell Version 0.6.0b0 it does not seem to work.

Has anyone else made different experiences? :)
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Import step export ifc

Post by heda »

workaround...

make mesh with mesh wb, make again a shape out of that and use that for the export.
(if you have a lot of parts this should be scripted...)
results in file, also with default settings which roundtrips to a nice squared bolt.

another way is to check DAE tessellation, but at least on my box the built-in mesher gives nothing, the mefisto errors out, the netgen works, but does not always make pleasant to view meshes, but they are good for simulations...
Attachments
ifc_decent_import_export.FCStd
(92.51 KiB) Downloaded 89 times
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Import step export ifc

Post by yorik »

The problem here is likely that the rounded surfaces are imported from the STEP file as generic nurbs curves and not as circles. The IFC exporter currently tesselates all nurbs surfaces, that's the result you are obtaining.

If you are using a recent enough version of ifcopenshell, it contains a serializer that is capable of saving nurbs surfaces to IFC nurbs surfaces. You enable that by going in FreeCAD preferences -> import/export -> IFC -> enable serializer.

However 1) you must use IFC4, not IFC2x3, 2) the serializer is not well tested so bugs can occur, and 3) very few IFC apps out there support nurbs (so far i'm afraid only ifcopenshell...) so it won't be easy to test...

At some point of course it would be good to have a mechanism that can detect a circle from a circular nurbs. But that's shape approximation, a whole research area, and I don't think there is a usable tool out there yet.
User avatar
thomas-neemann
Veteran
Posts: 11915
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Import step export ifc

Post by thomas-neemann »

yorik wrote: Wed Feb 16, 2022 11:12 am ping
because ifc is only a referencing model, in my opinion it is sufficient as it is now.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Import step export ifc

Post by yorik »

Yes, in many cases, you actually WANT this tessellation. Many times when working between FreeCAD/Revit/Blender when a curve got nicely tessellated in a nice, regular polygon I found it better, like "at least here I am sure there won't be any more degradation possible"
User avatar
thomas-neemann
Veteran
Posts: 11915
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Import step export ifc

Post by thomas-neemann »

if you e.g. want to export to Blender with arbitrary precision, is better suited stl in my opinion
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Import step export ifc

Post by bernd »

Post Reply