# Curvilinear volumes in IFC2x3 and IFC4 (newbie question)

**URL:** <https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608>\
**Category:** Developers\
**Tags:** ifc2x3, ifc4\
**Created:** [April 13, 2020, 5:56pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608 "2020-04-13T17:56:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![giovanniv](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@giovanniv](https://forums.buildingsmart.org/u/giovanniv)\
**Post date:** [April 13, 2020, 5:56pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/1 "2020-04-13T17:56:59Z")

</div>

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](https://standards.buildingsmart.org/documents/Implementation/IFC2x_Model_Implementation_Guide_V2-0b.pdf) 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](https://forums.buildingsmart.org/t/ifc4-geometry-for-a-curved-mass/2217) 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?

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [April 13, 2020, 11:00pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/2 "2020-04-13T23:00:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stefkeB](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/stefkeb/32/1755_2.png) [@stefkeB](https://forums.buildingsmart.org/u/stefkeB)\
**Post date:** [April 14, 2020, 7:27pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/3 "2020-04-14T19:27:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [April 14, 2020, 10:23pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/4 "2020-04-14T22:23:29Z")

</div>

@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? 🙂

@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](https://forums.buildingsmart.org/uploads/short-url/lWyswYEh1ZJxH8vVS4rCDY8DhhI.ifc) (2.5 KB)

In short, it is a true circle.

![image](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/2X/c/c756fec1d4ca03e872afe8806e0f8a5828067337.png)

You will see in XBim that it is faceted:

![image](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/2X/a/a34895792b632904111f7f060d227a5c67a0b992.png)

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

---

<div class="post-metadata">

**Author:** ![Hans\_Lammerts](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/hans_lammerts/32/835_2.png) [@Hans\_Lammerts](https://forums.buildingsmart.org/u/Hans_Lammerts)\
**Post date:** [April 15, 2020, 8:27am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/5 "2020-04-15T08:27:36Z")

</div>

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…

 ![perfect circle](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/2X/b/bcc1477d280c7007f6deb48e3d696b7a3133c06a.jpeg)

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

 ![not a perfect circle](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/2X/0/0eed328edb2d609b4990af1b4df50ce5e6200025.jpeg)

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.

 ![ACA](https://us1.discourse-cdn.com/flex016/uploads/buildingsmart1/original/2X/a/ab8c8db4a214f8548beba3252b88dfafd4d40682.jpeg)

---

<div class="post-metadata">

**Author:** ![giovanniv](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@giovanniv](https://forums.buildingsmart.org/u/giovanniv)\
**Post date:** [April 15, 2020, 3:19pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/6 "2020-04-15T15:19:43Z")

</div>

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

[prova-ellissoide.ifc](https://forums.buildingsmart.org/uploads/short-url/nmfFlvWmb5XOqBKisP0pqvwClij.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.

---

<div class="post-metadata">

**Author:** ![Hans\_Lammerts](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/hans_lammerts/32/835_2.png) [@Hans\_Lammerts](https://forums.buildingsmart.org/u/Hans_Lammerts)\
**Post date:** [April 15, 2020, 7:22pm UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/7 "2020-04-15T19:22:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [April 16, 2020, 12:38am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/8 "2020-04-16T00:38:51Z")

</div>

@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.

> [@Why are CSG representations mandated for DTV?](https://forums.buildingsmart.org/t/why-are-csg-representations-mandated-for-dtv/2311):
>
> At the risk of going slightly off-topic here, I’d like to debate the applicability of MVDs. As @jwouellette states, tessellation of walls are not in scope for a DTV. However, in Blender, where BReps are the native format, tessellated walls are exactly what Blender wants to do a design transfer. In fact, if we received walls in CSGs, I would find it much less convenient. Especially in complex environments (old tunnels, in my experience, and scan to BIM), I would explicitely tell consultants to n…

@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?

---

<div class="post-metadata">

**Author:** ![jwouellette](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jwouellette/32/2140_2.png) [@jwouellette](https://forums.buildingsmart.org/u/jwouellette)\
**Post date:** [April 16, 2020, 1:21am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/9 "2020-04-16T01:21:19Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jwouellette](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jwouellette/32/2140_2.png) [@jwouellette](https://forums.buildingsmart.org/u/jwouellette)\
**Post date:** [April 16, 2020, 1:26am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/10 "2020-04-16T01:26:36Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Inuyashahan](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@Inuyashahan](https://forums.buildingsmart.org/u/Inuyashahan)\
**Post date:** [April 29, 2020, 12:28am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/11 "2020-04-29T00:28:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [April 29, 2020, 3:06am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/12 "2020-04-29T03:06:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Inuyashahan](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@Inuyashahan](https://forums.buildingsmart.org/u/Inuyashahan)\
**Post date:** [April 29, 2020, 3:36am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/13 "2020-04-29T03:36:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [April 29, 2020, 3:38am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/14 "2020-04-29T03:38:57Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![Inuyashahan](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@Inuyashahan](https://forums.buildingsmart.org/u/Inuyashahan)\
**Post date:** [April 29, 2020, 3:52am UTC](https://forums.buildingsmart.org/t/curvilinear-volumes-in-ifc2x3-and-ifc4-newbie-question/2608/15 "2020-04-29T03:52:26Z")

</div>

I see, Very much thanks!!
