Select vertical elements and horizontal elements

Hi All, is there a way to select only elements that extend vertically and not horizontally? I want to try select the bars that extend in this direction on the floor plan

  1. Select all the bars
  2. Get the location line of the biars
  3. Curve.NormatAtParameter to pull the orientation of the bars as a vector
  4. Select the edge you want to get bars parallel to
  5. Curve.NormalAtParameter to pull the orientation of that edge.
  6. Vector.AngleWithVector to get the angle between the target vector and the bar vectors.
  7. Modulo function (% node) to pull the remainder after dividing that angle by 180.
  8. < to check if the values is less then a given tolerance, which will allow for “almost parallel”.comparison.
  9. List.FilterByBoolMask where the list is the original bars from #1 and the mask is the booleans from #8.
1 Like

@jacob.small I came up with the idea to deconstruct the points. Do you know how to make a value positive? I cant use absolute value for point coordinates

No need for points; you’ll be up against floating point errors going that route.

Almost there. But its not quite filtering the bars. I tried list flatten which seems to do something but that doesnt filter the rebar list

What is the warning when not flattened?

It is dereferencing a non pointer

I think the problem is that the matrix is not the same. There are sublists which means its not matching the corresponding list numbers with the elements.

When you flatten it it comes up with 45 outputs when the number of rebars is 38

Post your RVT and dyn here

layering.dyn (39.4 KB)
You can ignore the other stuff I got going on there in the dyn file

I found out what the problem was. Its to do with the sublists. We have to obtain the first item in the sublist and do away with the rest