How to calculate the surface area of air duct fittings? --- 如何计算风管管件表面积?

Hello everyone, I’ve encountered a rather tricky problem: I need to calculate the surface area of ​​duct fittings, such as elbows, tees, and crosses.

Looking forward to your replies.

ORIGINAL

大家好,我遇到一个比较棘手的问题,需要计算风管管件的表面积,例如弯头、三通、四通等。?
期待得到大家的回复

Hello @samYF and welcome. The language on this forum is English, so please translate your post (and topic title) next time.

Google translate

Hello everyone, I’ve encountered a rather tricky problem: I need to calculate the surface area of ​​duct fittings, such as elbows, tees, and crosses.

Looking forward to your replies.

Also :right_arrow: How to get help on the Dynamo forums.

That being said. Look for / into Solid, Geometry, Faces and Surface nodes.

1 Like

Yea as mention by Bas the forum is in english, so we had a change for understand each other and we can find it when seach…another reason and probably worse, is we could risk Jacob start up answer in swedish :wink: :wink: :wink:

So please translate your post in the future before post,

1 Like

Try something here

Hej, min fråga är hur man beräknar ytan av rörledningsdelar, till exempel tre, armbågar, fyra och andra rörledningsdelar

hahaha ja vi kunne bare begynde at svare på vores modersmål, og ja jeg forstår svensk og tænker jeg har forstået spørgsmålet også…men os stoppe det her og fortsætte i engelsk…tak

Gaan we dit echt doen? :sweat_smile: :innocent:

Hello, I tried, but it’s not feasible. May I ask where went wrong?

1 Like

area =Area

It still doesn’t seem feasible~~~

What I am currently calculating is this pipe fitting

looks for me its duct elbow, right ?

Yes, I just need to calculate the surface area of these fittings and import it into the detailed list. Do you have any methods to achieve this? Thanks

Look closely at @sovitek Code Block.

a.Area

So;
.a
Capital A
rea

Or just use the node Surface.Area.

1 Like

Hello, I don’t have a good way to calculate the surface area quantity for this complex pipe fitting. Looking forward to your reply very much.

Yes guess you mean area without connectors area, right??? if that the case then try get connectors area and substract from full area ?

Yoy can try as here maybe…

import clr, math
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
from Autodesk.Revit.DB import ConnectorProfileType

el = UnwrapElement(IN[0])
area = 0.0

conns = []
if hasattr(el, "MEPModel") and el.MEPModel:
    conns = el.MEPModel.ConnectorManager.Connectors
elif hasattr(el, "ConnectorManager"):
    conns = el.ConnectorManager.Connectors

for c in conns:
    if c.Shape == ConnectorProfileType.Round:
        r = c.Radius * 0.3048
        area += math.pi * r**2
    elif c.Shape == ConnectorProfileType.Rectangular:
        w = c.Width * 0.3048
        h = c.Height * 0.3048
        area += w * h

OUT = area

Hello, I have succeeded! Thank you very much for your help! May God bless you

Maybe mark @sovitek answer as a (the) solution.
That would be helpful to people having the same
problem and looking for a solution. :innocent: