Hello,
How I can calculate the area of a wall opening. I can not delete any object.
Thanks,
Javi
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
Hi,
I cannot delete element even transitory. But thanks for your answer. Other alternative?
Javi
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.
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.
Can't find what you're looking for? Ask the community or share your knowledge.