Window facades

How to fetch the windows based on the facades in which they are in?

Can you be more specific?

The direction they face (FamilyInstance.FacingOrientation)?

The wall they are hosted in (Element.Inserts or FamilyInstance.GetHost)?

Basically, I want to find the distance between the mid point of the window and the normal facade next to it .

Here you can also find the picture!!kk

We are using the approach of bounding box and ray tracing but don’t know if that’s the right approach.

I would t go that way. Anytime ray tracing is involved I find you can usually do things faster by stepping back to the white board.

Assuming: all walls are straight as per your pic, and that geometry complexity is similar (ie: no walls that have variable length in plan) as per your pic…

  1. Get all windows
  2. Get their host
  3. Get the window locations
  4. Get the host’s locations
  5. Use a ‘Geometry.PointClosestTo’ node to find the point on the host location line closest to the window (directly below said window in the line)
  6. Split the curve at the point
  7. Find the length of your curves - this is how far each window is from the adjacent corners.