buildingSMART Forums

Curvilinear volumes in IFC2x3 and IFC4 (newbie question)

I’m trying to develop a Java program which performs conversion of 3D models from a proprietary format to IFC. I received no indications on which version of the IFC specification I should use.
Some of the objects I have to convert are half ellipsoids and cylinders, and I don’t understand if it’s possible to do so without losing detail, i.e. without having to approximate surfaces of revolution with polygons.

I started by reading the IFC4x1 specification, but it seemed a bit confusing, so i opted for reading the IFC2x3 Model Implementation Guide instead.
To familiarize with the format I downloaded FreeCAD and IfcOpenShell, created an ellipsoid and exported it as an .ifc file. However, after importing the file it didn’t look like a perfect ellipsoid, instead I got a polyhedron which approximates an ellipsoid. When looking at the content of the file I noticed that the schema used is IFC2X3, and that the entities used in the file are mostly IFCCARTESIANPOINT, IFCPOLYLOOP, IFCFACEOUTERBOUND and IFCFACE. I wasn’t sure if this was FreeCAD, IfcOpenShell or IFC2x3’s fault, but after seeing this post I’m getting the impression that it’s not possible to have curved surfaces in IFC2x3, however it seems possible in IFC4. Is this true? If it is, are there any IFC4 implementation guides online?

It is possible to have curves in IFC.

It is possible that your viewer may convert curves into a faceted polygon in order to view it, but this doesn’t mean that the data isn’t stored correctly in the IFC.

If you post your IFC file here we can investigate it.

I highly recommend to implement IFC4 - IFC2X3 is ancient. It is possible to also support IFC2X3, but please “start” with IFC4.

Which MVD was used upon export? That may impact the geometry generation from the CAD software.

@stefkeB I believe FreeCAD doesn’t follow the MVDs like how other BIM authoring tools follow it. Instead, it is up to the user to define what they want in an export, and even which representation each individual object should take. With great power comes great responsibility, eh? :slight_smile:

@giovanniv, That said, by default, even though FreeCAD labels exports as “coordination view” for IFC2x3 (this can be changed - but I’m trying to matchyour settings) it does retain as much parametric shapes and doesn’t facet as much as possible.

I’ve attached a simple extruded cylinder below. It is exported as a extruded area solid using a circle profile definition.

freecad-cylinder.ifc (2.5 KB)

In short, it is a true circle.

image

You will see in XBim that it is faceted:

image

This is simply how XBim processes IFC geometry, but does not mean that the geometry is incorrectly stored :slight_smile:

In DWG using BricsCAD this ifc comes in nice @moult. Perfect cicle definition here. I surely don’t hope quality of geometry is determined by the choice of MVD setting. I always thought this was about the selectionset of metadata that was being exported with the 3D entities. Not the (LOD) quality…

Same ifc but now imported in GstarCAD. (What needs to be said is this module is in Beta stage)

AutoCAD Architecture with it’s new IFC core gives a nice round Wall. The parameters are there but do not react. The biggest obstacle in AutoCAD Architecture is its absolute absurd long time to get 1 object imported.

1 Like

Here is the IFC I got after exporting the file in FreeCAD:

prova-ellissoide.ifc (28.6 KB)

I’m not really familiar with the format, but as I mentioned in my first post, even when looking at the code of the IFC file it seems that polygons are being used. Anyway thanks for clarifying that it’s possible to have curves.

I recorded your file being imported in the AutoCAD Architecure 2021! version of things. Grab a beer and some chips … :stuck_out_tongue:

3 Likes

@giovanniv In that particular file, yes, it is exported as a faceted brep. If it were modeled in another way, perhaps a revolved solid, then it might retain its curved nature.

@Hans_Lammerts actually yes, quality of geometry is determined by MVD. That was in part why I raised this question in the thread below, as I disagree with the notion of an ISO MVD requiring a particular representation type. FreeCAD also seems to disagree with this notion, hence their ability to allow the user to define whatever they want.

@jwouellette it would seem that the post linked in @giovanniv 's first post cannot be accessed. Is there a private part of this forum that is hidden to public users?

Do you get the “discobot” as well? That is nearly the oddest thing I’ve seen, yet (aside from Ehsan’s posts).

I don’t know what happened. Let me look into it further…

@Moult turns out it was a truncated URL, it was just missing the last character of the URL (a ‘7’). I went ahead and fixed it.

1 Like

Hallo, I wanna ask if it’s possible to export Ellipsoid to ifc, I’ve explored the definitions but only found IfcSphere, but I wanna Ellipsoid with three different axis parameters and not facet.

@Inuyashahan You want IfcEllipse and IfcRevolvedAreaSolid with a revolution angle of 180 degrees around one the center axis of the IfcEllipse curve.

What if I wanna go with three different axis values, the method you provide can only construct Ellipsoid with two same axis values.

IfcRevolvedAreaSolidTapered can do it, but you are wandering into uncharted territory.

Here there be dragons.

An alternate, limited approach, would be to use a mapped representation and apply a non uniform transformation to scale the ellipse along an axis.

I see, Very much thanks!!