Filter duct on orientation

Hello all,

I have been working on my own ‘tag all’ function. I just wish to be able to filter the input of elements.

First: I wish to be able to filter on length. I got this working my self.
Second: I wish to filter on orientation. I want to be able to do this for tag position. i want to place tags as seen below:

So basicly i need to filter the list below for my element input, just no idea where to start… (basicly i wish to say: if a duct has a line for wich the start and end point from curve have the same x-axis, place tag above centerpoint. and so on for all 4 orientation posibility’s)

**Third:**I wish to be able to filter vertical ducts and after that if they are going through story level below, or sory level above or if it runs through story level below and above. (for going up/down or coming from above/down tags.)

All tips are very welcome!

Hi @l.rozendaal ,
one possible way to do it is to test wether the X,Y or Z coordinates of the strat and end points of a curve are equal, then use the boolean to filter you list of curves :

1 Like

Or build vectors from those curves and compare their angles with the x vector (1,0,0) .

1 Like

Thnx for your response!

I think i figured it out. I got my script working for round and rectangular ducts and for Pipes. It’s just that it has become massive…

In the pic. u can see the part for round ducts, basicly the scipt is over 3times as big just for tagging …
In the future I’ll try smalling it down. for now I’m just happy it works >.<