I’ve found a Python script on this forum to help me read properties from connectors in pipes and ducts. In an attempt to use this, I’ve extracted all positions and directions, and let Dynamo place a dot on all connectors with direction In.
Sadly, this revealed that this direction property doesn’t appear to be set correctly. In half the cases it appears that the connector set to In is actually on the side where the medium is leaving the duct or pipe, which seems illogical to me.
Has anyone seen this behavior before, or does someone know a way to reliably get the flow direction in ducts and pipes using Python?
Seems to be working fine for me: in the picture below the open end of the labeled duct, shows ‘false’ in my script indicating it’s the open end on the duct and the corresponding index for the direction is set to ‘In’ which is also correct.
This is the Dynamo script I’ve made. Each of the Python nodes are very similar. The bottom one extracts the connector direction, the three above respectively the x, y and z co-ordinate for its position (and then converted from feet to millimeters).
No fabrication parts. Just regular ducts, duct fittings, an air terminal configured as an extraction fan, and on the right side pipes, a pipe fitting, and a plumbing fixture configured as a drain. Both have a flow, both show a flow direction in the inspector. test stroomrichting.rvt (1.4 MB)
(Warning: Dutch content ;))
Dutch is geen probleem
There must be something wrong with your workflow. I did a little check and expanded upon my previous code and also extracted the corresponding location of the connectors:
Fixed it. Combined the 4 Python scripts into one, so probably the same script doesn’t always treat the connectors in the same order (although it didn’t affect the connector positions).
Probably not the most efficient way to extract the products of the co-ordinates, but it was the quickest way I could think of to use the output for new co-ordinates.
This does what I want, the issue is now resolved. Thank you for your time.