Extent Points of a surface

Apologies if this subject has been previously addressed. I have an irregular surface. For simplicity sake, lets just say it is U shaped. I want to get the outer most 4 points and omit the inside points. Any suggestions would be greatly appreciated.

Can you give an illustration?


The highlight is the face/surface outline. What is circled in red are the only points I want.
Thanks

Try something like this:
Sort points by the Z value. Get the first and last of the resulting sublists to pull only the highest and lowest Z value points and lowest sublists.
Sort the sublists of points by the X value. Sort the sublist of sublists of points by their Y value.
Flatten the sublists.
Get the first point in each sublist. The first sublist point is the lowest left corner. The second sublist point is the upper left corner.
Get the last point in each sublist. The first sublist point is the lowest right corner. The second sublist point is the upper right corner.

Depending on how many shapes your walls have, you can try the convexhull2D node from spring nodes.

1 Like

Hi @staylor

Possible to share only this :point_up_2: revit file?

Thanks Jacob. I ended up using your idea to an extent. I sorted all of the coordinates in three separate groups (x,y,z) and then wrote a python script to give me the first two and the last two values in each group, which would be the minimum and maximum of x, y and z.

Funny note: I just started taking Python classes and it is already paying off.

1 Like

A convex hull sounds just like what you need but that node expects points that lie in the xy plane. That’s fairly easy to overcome: