Get Midpoints of Curtain Panel Edges

Ultimately, I’m aiming to create a report of the Highest glazing point in each Exterior room & compare it to the Room’s ceiling height (creating another graph to take Lowest ceiling measurement of those rooms). Using the Basic Arch Sample project to test it in.
So (not too familiar when it comes to dealing with geometry in Dynamo) on Exterior facing Rooms I’m wanting to grab the Openings (CP’s) with Exterior Glazing materials (object containing the material) using Clockwork’s “Element.Materials+” from what I’ve found so far on the forum. I’ve been looking to find a way to gab the Mid-point of its edges, but then be able to document the height from it’s Base Level.
Right now my script is portioned out to simply grab all CP’s.
I’d like to have it “group” by Lines instead of coordinate of each point so that I may then get all those mid-points within a List quicker/easier, which I’ll filter it out to a new list by the one with the largest Z value from the associated Room (but in this graph it’ll eventually be by its wall base level).
I’m stuck here…


Extract Geometry from Materials.dyn (123.1 KB)

Curve.PointAtParameter is usually best for a midpoint. Just use 0.5 as the parameter. Also, don’t flatten your list of curves. You want to keep each panel grouped.

Once you have the midpoints of each curve and their respective Z-coordinates, use GroupByKey to group the points (or possibly the Z-coordinates depending on the final result you’re looking for) by Z value. That will give you the top, side, and bottom curve midpoints. You can then take the points you want (or remove the ones you don’t want) to get the results you’re looking for.

1 Like

Element.BoundingBox and a BoundingBox.Max will likely be a bit more effective here as they’ll reduce the complexity by a good bit.

The issue I see with using Bounding Boxes is, in Revit, Bounding Boxes are axis-aligned and will most definitely result in error if you encounter any curtain wall panel that is not perfectly orthogonal.

Except the exercise is about the elevation only, and therefore the X and Y value are being discarded.

¯\(ツ)

1 Like

I still wouldn’t use BBoxes to be honest.

1 Like