Community

Revit API Forum

Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.
Translate

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Message 1 of 5

Anonymous

777 Views, 4 Replies

03-20-2018
01:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

03-20-2018
01:55 AM

Area of a wall opening

Hello,

How I can calculate the area of a wall opening. I can not delete any object.

Thanks,

Javi

4 REPLIES 4

Message 2 of 5

03-20-2018
02:27 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

03-20-2018
02:27 AM

Dear Javi,

You can delete an object temporarily inside a transaction that is never committed, so the changes are never stored in the database.

http://thebuildingcoder.typepad.com/blog/2015/03/calculating-gross-and-net-wall-areas.html

Cheers,

Jeremy

Message 3 of 5

03-20-2018
03:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

03-20-2018
03:36 AM

Hi,

I cannot delete element even transitory. But thanks for your answer. Other alternative?

Javi

Message 4 of 5

08-16-2023
01:51 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

08-16-2023
01:51 AM

Below is a possible solution except for ruled faces.

So how do you find the opening area in a ruled face?

There must be a mathematical approximation similar to below.

Generally, for other types of faces you can find the inner loops of the face and use Edge.GetCurveUV to create a loop in the dimensions of the face parameters. Unfortunately, there is no tessellate for CurveUV but you can evaluate points along the loop to get a set of ordered UVs. Each U & V can then be multiplied based on how the face is parameterised in that direction i.e. for a planar face it 1 in both directions but for cylindrical face the U is based on angles so instead you have to multiply it based on radius to get the segment length (V is still in length so can use 1). Prior to the existence of CurveUV you would likely have had to have used Edge.EvaluateOnFace to create the tessellated points.

Once you've multiplied the UV's you can create a polygon and use the shoelace formula etc. to find the area of the polygon and so the surface area of the opening. https://en.wikipedia.org/wiki/Shoelace_formula

It is hard for faces with normalised parametrisation (such as ruled faces) because the multiple used to convert normalised to raw in one direction changes along the other direction. e.g. if you have a ruled surface between two lines of different length one at the base (Vmin) and one at the top (Vmax) the length varies from base to top so how you convert U to raw parameter isn't constant but varies according to the height of V where U is being measured.

How we measure openings in surfaces can also be a bit subjective to a degree. If you have a cylindrical wall then the area for the same opening on the outer face will be larger than the inner but neither I suspect will likely be the thing that is useful to an MEP engineer. I assume they would likely want the projected (flat opening area). For this you would probably have to take the worst case (inner area) and project it onto a plane to establish what can fit into that 2d area (or how much ventilation you have).

Another method I used in the past for 2d is to tesselate the perimeter and fill the opening with a grid of points, then use Delaunay triangulation etc. adding up sum area of resulting triangles. The area is always slightly underestimated for concave edges and slightly overestimated for convex edges. Smaller triangles obviously improves that but increases processing time.

Message 5 of 5

08-16-2023
09:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

08-16-2023
09:43 AM

The other option I forgot to mention is to create a single faced solid over the opening with one of the shape builders. Some surface types are not supported by all shape builders however.

You can then extract the surface area of those.

I think walls are quite simple compared to floors. In shaped floors especially you don't always get inner loops. For example in the below there are no inner loops. The thing you do know however is that the actual outline edges always have vertical faces adjacent. Therefore fold edges always contain two horizontal or quasi-horizontal faces. So by elimination of those that way you are left with the outline edge curves and it is then just a case of ordering them into loops and determining if they are outer or inner. You can't rely on direction of curve for that because in reality they are all outer edges to their face.

So there isn't a universal solution to these things.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Can't find what you're looking for? Ask the community or share your knowledge.