FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

This forum section is only for IFC-related issues
chavan.vjti
Posts: 2
Joined: Wed Jan 17, 2018 6:37 am

FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

Postby chavan.vjti » Wed Jan 17, 2018 9:13 am

Hello,

Followings are the details of my copy of FreeCAD;

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


Now, the main query is, I created a cylinder in FreeCAD and saved it in .FCStd file format
Test_FreeCAD.FCStd
(2.48 KiB) Downloaded 15 times
then I exported the CAD model in .IFC file format.
TestIFC_FreeCAD.ifc
(32 KiB) Downloaded 30 times
Next when I opened the same IFC model in FreeCAD, it showed me some approximated or faceted CAD model over cylindrical surface though the original CAD model (.FCStd) had smooth cylindrical surface.
Any suggestions on why there is change in cylindrical surface from smooth to faceted surface?
Thank you!
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

Postby jmaustpc » Wed Jan 17, 2018 12:45 pm

chavan.vjti wrote:
Wed Jan 17, 2018 9:13 am
Version: 0.16.6706 (Git)
your FreeCAD version is out of date, a bug fix version 0.16.6712 was released last year. But even then, IFC in any 0.16 was at an early stage of development. For any at all serious IFC work, you have to use a snapshot of the current Development version 0.17. which is now well over 6000 commits of code beyond 0.16 and is very soon about the become the next release version.
chavan.vjti wrote:
Wed Jan 17, 2018 9:13 am
Any suggestions on why there is change in cylindrical surface from smooth to faceted surface?
It sounds like IFC must convert solids to a Mesh. Like all exchange formats IFC will have its limitations and complications. Exporting to any exchange format and then re-importing into FreeCAD will always loose data in some many or another.
chavan.vjti
Posts: 2
Joined: Wed Jan 17, 2018 6:37 am

Re: FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

Postby chavan.vjti » Wed Jan 17, 2018 1:16 pm

Thank you very much for your suggestion.

jmaustpc wrote:
Wed Jan 17, 2018 12:45 pm
It sounds like IFC must convert solids to a Mesh.
I am a newbie to IFC, is this your quote definitely true?
jmaustpc wrote:
Wed Jan 17, 2018 9:13 am
Exporting to any exchange format and then re-importing into FreeCAD will always loose data in some many or another.
If this is the case, then will you please suggest me any other software where I can create the CAD model and save it directly with IFC file extension?
I tried it with FreeCAD but it's unavailable.

Kind regards,
Siddhesh
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

Postby jmaustpc » Wed Jan 17, 2018 1:38 pm

chavan.vjti wrote:
Wed Jan 17, 2018 1:16 pm
jmaustpc wrote: ↑
17 Jan 2018, 20:13
Exporting to any exchange format and then re-importing into FreeCAD will always loose data in some many or another.

If this is the case, then will you please suggest me any other software where I can create the CAD model and save it directly with IFC file extension?
You seem to miss-understand what I am saying. Any exchange format file will by definition loose data from any and all CAD applications. It is the Exchange Format file that looses the data not the CAD applications, all the Exchange formats are limited in what data they can hold in some way or another. At the very least an exchange format will loose all your modelling history.
chavan.vjti wrote:
Wed Jan 17, 2018 1:16 pm
I tried it with FreeCAD but it's unavailable.
No you have not really, you have only tried in an now very old FreeCAD version. As I said before, if you want to work with IFC in FreeCAD then you have to use the development version 0.17 as IFC support was very new in FreeCAD 0.16 and hence very limited.

As I said before 0.17 has well over 6000 commits of code beyond 0.16 so is very much more advanced in many areas.
chavan.vjti wrote:
Wed Jan 17, 2018 1:16 pm
jmaustpc wrote: ↑
17 Jan 2018, 23:45
It sounds like IFC must convert solids to a Mesh.

I am a newbie to IFC, is this your quote definitely true?
I don't know, I am not an expert on IFC.

Try the latest 0.17 snapshot release, it will run without being installed, just unzip with 7zip and run the FreeCAD executable file. If you edit a 0.16 FreeCAD file in 0.17 then it is possible that the file will have issues/limitations if you then later want to open it in 0.16 so it is a good idea to work with copies. This is simply because 0.16 could not understand any new feature from 0.17 because it did not exist back then, so full file compatibility could only ever fully go in one direction.
User avatar
yorik
Site Admin
Posts: 11552
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: FreeCAD file (.FCStd) exported in .IFC gives a faceted approximation for cylinder

Postby yorik » Wed Jan 17, 2018 1:46 pm

As of FreeCAD 0.17, the IFC exporter will try its best to recognize if an object is based on an extruded profile, and if yes, export it as a profile + extrusion. This garantees correct geometry. But when the exporter fails to detect an extrusion, it will fall back to faceted objects. This is basically what most other software does...

If you are using a very new version of IfcOpenShell, enabling the serializer in the IFC preferences of FreeCAD, might give a much better result, since the IfcOpenShell serializer is able to reconstruct faces much better than our exporter. But not all software already supports the advanced stuff that the serializer produces.