i tried to skip some failing geometries without much sucses.
Now i want to try another method.
I have 670 elements in the Wall category, but those are not all “normal walls”, so i want to filter them down to just straight (line based 2 pts) walls. So no in place, face based, slanted walls or other geometries.
Could you show how “weird” can those wall be ? Which nodes do not work with those ?
If all you walls could be defined by a sweep, an idea would be to comapre the distance between the two main surfaces that define the wall (i.e. the two biggest surfaces) and between the two corresponding faces of the smallest bounding box containing the wall. If the two matches, the wall is straight.
I thought you could use element.geometry. My mistake.
I do not know that much about Revit, but what about checking the walls parameters ? Maybe the “normal” walls and the “weird” walls have some distinctice parameters…
I used element.location, filtered with a boolean everything that started with Line(startpoint…)
Then filtered everything that has no value for Unconnected Height
After that i still found some that started with Arc.
Filtered them too
Now my graph is running fingers crossed
[1] Get the location of the Wall
[2] Get the Start and End Points of the Location Curve
[3] Re-build another line from said Start and End Points
[4] Check the length of the origin location line versus the newly created line
[5] If they are the same length it is straight :)
[3] Get the distance between start and end point
[4] Check that the difference between the distance
on [3] and the original curve length is less than a
safe value (0.001)
Avoiding an extra geometry will improve performance on large sets and floating point error is a pain