Wall vertices - in and out

I have some walls in Revit:

image

I want to get the verticies of the walls - internal ones and external ones. Badly illustrated :
image

maybe I could actually do it by using surfaces?

Was trying to do it like this:

Anyone got any fun/ good suggestions?

Trying it with geometry…
Was looking promising.
1 - Joined all the lines up and grouped them for inner and outer walls (won’t work if any walls touch the outer wall though…)

2 - I thought the groups of lines would be simply divided by 2 to get inside and outside lines

3 - Nope, because I have different wall thicknesses in the outer walls the line lengths are not the same.

I’m trying to grab start/end points and match but it’s going a bit slowly :frowning:

So… anyone got better suggestions I’ll happily hear them!

Can you clarify which points you want to grab for a wall which starts on the exterior and runs into the interior?

That I don’t know…

I’m just experimenting with the image I’ve currently drawn.

I’ve shelved more difficult questions into, “will think about that… maybe… er… some other unspecified time” .

Basically I want a list of vertices designating the outer boundary.

And I want a core of some kind.

This might be of use then, but it will get a single solid. Might have some link instances to convert to active model elements though.

Note that it won’t grab the points on the inside of the wall by default, but you could create a thin shell of the solid with a reasonable inner offset and grab any point which intersects that should you want those.

1 Like

This is pretty hacky but it looks to get what your image shows.

Python Script
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
from Revit.Elements import *

items = UnwrapElement(IN[0]) if isinstance(IN[0], list) else [UnwrapElement(IN[0])]

allHorizEdges = []

opt = Options()
opt.ComputeReferences = True

for item in items:
    for obj in item.get_Geometry(opt):
        if isinstance(obj, Solid):
            horizEdges = []
            for edges in obj.Edges:
                if round(edges.AsCurve().GetEndPoint(0).ToPoint().Z, 10) == round(edges.AsCurve().GetEndPoint(1).ToPoint().Z, 10):
                    horizEdges.append(edges.AsCurve().ToProtoType())
            if horizEdges:
                minZ = min(edge.StartPoint.Z for edge in horizEdges)
                lowestZEdges = [edge for edge in horizEdges if edge.StartPoint.Z == minZ]
                allHorizEdges.append(lowestZEdges)

if isinstance(IN[0], list):
    OUT = filter(None, allHorizEdges)
else:
    OUT = filter(None, allHorizEdges)[0]
1 Like

Amepersand <3 What a glorious node!!