How to get the geometry of Opening
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-01
09:56 AM
- last edited on
‎2023-08-03
11:50 AM
by
Doreena Deng
I need your help.
I created an Add-on, and try to export the geometry data from ArchiCAD12. But I met a problem.
As you know, when I draw a door or window onto the wall, an opening will be created too. At this moment, I can get the geometry data or wall, door and window, which combines by lots of polygons, edges and vertices.
But how can I get the geometry data of opening, include the vertices, edges, polygons, GUID, material, and so on?
Thank you in advances.
Mike
- Labels:
-
Add-On (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-01 10:15 PM
Mike wrote:If I understand the question properly, this is not (directly) achievable. When you place a window into a wall,
But how can I get the geometry data of opening, include the vertices, edges, polygons, GUID, material, and so on?
However, you could infer the opening faces based on surface normals etc. This would be easy for ordinary window types, but may be near impossible in the worst cases.
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-02 03:58 AM
Ralph wrote:Dear Ralph Wessel,Mike wrote:If I understand the question properly, this is not (directly) achievable. When you place a window into a wall,
But how can I get the geometry data of opening, include the vertices, edges, polygons, GUID, material, and so on?allthe geometry arising from that relationship is found in the bodies of the wall and window elements. There is no 'opening' body.
However, you could infer the opening faces based on surface normals etc. This would be easy for ordinary window types, but may be near impossible in the worst cases.
It looks so worse, and it is really not a good idea to calculate the geometry data of opening by ourselves, and it is so difficult to calculate the worst case. I think the API can provides the some methods for us to get it. Wish you can provide some solutions.
Thank you in advance.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-02 12:22 PM
Mike wrote:I completely agree with you. This is a poor way to calculate opening data, but there is no easy solution with the API. Sorry - I've spent a long time looking into this in the past and didn't come away with a good answer.
It looks so worse, and it is really not a good idea to calculate the geometry data of opening by ourselves, and it is so difficult to calculate the worst case. I think the API can provides the some methods for us to get it. Wish you can provide some solutions.
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-13 12:57 PM
For windows and door:
1. Collect all vertices of door or window object
2. Transform them to xy-plane (side projection of object).
3. Calculate convex hull of the points
4. Make an extrusion geometry using the points and wall thickness.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-13 07:33 PM
Matti wrote:This is what I was suggesting earlier, but it's not the kind of solution you'd expect via the API. It isn't 100% reliable either, because the geometry of the door/window might not be telling you anything about the opening, particularly if the object incorporates additional detailing for the wall surrounds that should not be considered part of the 'opening'. For example, it is quite possible to create doors/windows that don't have any opening at all, e.g. a niche, but it is impossible to determine that just by analysing the geometry of the object.
3. Calculate convex hull of the points
4. Make an extrusion geometry using the points and wall thickness.
I've also generated opening profiles by clipping a polygon the full size of the joinery against the wall faces, the remainder presumed to be the opening. But this is also prone to error for the reasons described above and because it assumes the top or bottom of the wall hasn't been clipped (by a roof or SEO for example).
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-14 09:19 AM
It is sad that there is no 100% reliable way to obtain opening geometry.
Currently, this is the only way to obtain information on holes in walls. Look for polygons which have a horizontal normal vector perpendicular to the reference line of the wall.
Do you know is there any help using Neigs?
#define API_NeigFlg_HoleSel 0x0001
#define API_NeigFlg_Extra3D 0x0002
APINeig_Wind = 9, // hotspots in the window object
APINeig_WindHole = 10, // corners of window hole
APINeig_Door = 11, // hotspots in the door object
APINeig_DoorHole = 12, // corners of door hole
APINeig_Wind3D = 63, // 3d hotspots in the window object
APINeig_Door3D = 64, // 3d hotspots in the window object
ACAPI_Goodies (APIAny_NeigToCoordID,&neig,&coord);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-14 11:47 AM
Matti wrote:Yes, it is sad. But what is "opening geometry" seems not so simple question.
It is sad that there is no 100% reliable way to obtain opening geometry.
Imagine two adjacent windows, so actually opening hole will be only one.
Or window placed partially over top of a wall. A geometry may be real geometry this window in this wall, or it may be abstract geometry same window in a some wall, where this opening one and is not partial.
If a task is not like export and you can to change the project. May be will work the trick.
Create a temporary wall, same as parent of the opening.
Create a temporary opening exactly as required in this wall.
Get opening geometry. There is only one opening.
Delete the temporary wall.
Fot real geometry, create a wall same height etc and place opening same level and position. For "abstract" geometry, create a big wall and place an opening in middle.
PS: Just an idea. I am not sure this will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-14 01:06 PM
Oleg wrote:Correct - this question rises above the level of simple geometry, and ArchiCAD has no facility for that kind of data. I have even greater problems exporting data for thermal modelling for this reason, coupled with the fact that ArchiCAD models have no material data, e.g. thermal properties.
But what is "opening geometry" seems not so simple question.
Central Innovation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-07-14 01:39 PM
It is not geometry actually but some values. A and B parameters is not actual width and height as there is concept of gaps. But this gaps are scripted formulas. And I dont know how to get this gaps calculated.
So I have to use ACAPI_Element_GetQuantities to get something like this.
But it is like a trick and limited.