I’ve made a graph that will tag all the walls in a given list of views. I only want to tag the walls that are being elevated so I was filtering that walls using their bounding box x points. If the distance between those points is less than 300 remove the wall from this list. This worked well in one view direction but in a view 90 degrees to that view it would now have to filter by their y points.
Does anyone know of a way to filter the walls out that are perpendicular to the view?
From the help file I read, it returns a bounding box for the model geometry if the view parameter is null, and otherwise the view specific geometry. Even if I use the bounding box node from clockwork that accepts a view parameter I’m still getting the bounding box for the model geometry
I would have thought that this should return the element’s bounding box in the view but I’m still getting the model bounding box. Any ideas?
What if you get the view plane and the walls’ location curve and intersect the two? That way if a list is empty, the wall is in elevation? Tho if that doesn’t work for you, I’ve included the syntax for an element’s BB in a specific view.
Cheers Dimitar, I like the idea of intersecting with the view plane, but I think I prefer the bounding bounding box method. Only because there will often be walls behind the elevated wall that I also would like to omit, not only walls infront that are being cut by the view. At least it would eliminate half of the unwanted walls though!
I tried using your code for getting the bounding box but it’s still giving the same result (albeit in feet)
Sorry, I didn’t convert the XYZ coords to a Dynamo point for brevity. If you do and you also get the max point, you can attempt to recreate the bounding boxes in Dynamo. Keep in mind that the BoundingBox encapsulates all visible parts of that element in the view( that is all elements in the view range box of the view), so if your view has a large depth, elements hidden behind another element will also be included.
Here’s the full code for fetching the extents and converting them to a Dynamo BB:
My view is deep, so a large part of the walls is included. If you convert the BB to a cuboid and extract it’s volume however, you will see that it’s smaller than the volume of the model BB because not all of the wall is in the view range box.
I’ve got a new idea for you. What if we extract the view’s right direction and then the wall curves and finally we compare the angle between the two vectors? That way anything over a certain value will be in “section” and everything else will be in elevation?
Love the idea! Sounds like it should account for everything I’m after. Could you please post the python script?
Cheers Dimitar! Just some quick tests so far, but seems to be doing exactly what I need.
It’s so close to working!
I edited the python script from the get angle from vectors node out of the clockwork package so that it would accept a list of vectors (my view vectors) and get the angle between that and the nested list of vectors (each wall within the view). It seems to work for most of the vectors for the views but some of them error as below. By chopping the list you can see it works fine for some of them.
Any idea what this error is and how to fix it?
I had thought using the AngleTo method may be easier. But I’m unsure how exactly to use it.
Does anyone know how to convert a vector to an XYZ? I would have thought the below should work given from what it says in the help file:
Returns the angle between this vector and the specified vector.
Perfect! Cheers for your help Dimitar. Everything’s working perfectly and all my walls in all views are being tagged!