# Is there a way to extract the vertex of ... say a rectangle object type from an IFC file?

**URL:** https://forums.buildingsmart.org/t/is-there-a-way-to-extract-the-vertex-of-say-a-rectangle-object-type-from-an-ifc-file/2039
**Category:** Developers
**Created:** [November 20, 2019, 2:59am UTC](https://forums.buildingsmart.org/t/is-there-a-way-to-extract-the-vertex-of-say-a-rectangle-object-type-from-an-ifc-file/2039 "2019-11-20T02:59:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bruwong](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@bruwong](https://forums.buildingsmart.org/u/bruwong)
#### Post date: [November 20, 2019, 2:59am UTC](https://forums.buildingsmart.org/t/is-there-a-way-to-extract-the-vertex-of-say-a-rectangle-object-type-from-an-ifc-file/2039/1 "2019-11-20T02:59:08Z")

</div>

Is there a way to do this from an IFC file and an external program or need to go to the source of the IFC file say…Revit?

---

<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: [November 20, 2019, 3:30am UTC](https://forums.buildingsmart.org/t/is-there-a-way-to-extract-the-vertex-of-say-a-rectangle-object-type-from-an-ifc-file/2039/2 "2019-11-20T03:30:33Z")

</div>

As shown in the other thread, there are a few ways to represent a rectangle. Some of these may use the concept of an `IfcFacetedBrep`, which has “vertices”, but some may not. If your IFC program defines a rectangle using a geometric representation which uses a rectangular profile, then it will not be possible to extract a single “vertex”, as a single “vertex” doesn’t exist. However, you can extract the original profile and do a bit of geometric math to figure out the coordinates of that vertex if you’d like.

If, however, the export uses a geometric representation which does use vertices, such as in Blender, then it is quite easy to extract the vertex. IfcOpenShell can help you do this.

I have written an article which guides you on how to do this - at the bottom I give a brief introduction on how to interrogate geometry:

[https://thinkmoult.com/using-ifcopenshell-parse-ifc-files-python.html](https://thinkmoult.com/using-ifcopenshell-parse-ifc-files-python.html)

Out of curiosity, what is your objective in doing this?
