Is there a way to retrieve points of a room/space (corners)?

Tried the element.location node, but all it retrieves is the center reference point of a room/space. Was wondering how I can get the vertices of a room?

try to use Room.Boundary it will give you all the curves , then use start or end points to get the corner

Hi @WARTELLAD ,

Here is another way to find the vertice of the room.

Room vertice.dyn (8.4 KB)

Hi, yes it’s possible to extract any kind of information as long as you have the room “Solid”. I am not sure of what you mean by “Room vertices”. Here’s what i suggest :

  • Use the node “Explode” to split your single room solid
  • From the surface list you get exctract the local axes using the node PrincipalDirectionsAtParameter. It gives you a list of 2 vectors for each surface of your original solid.
  • Look at the X,Y or Z component of those vectors to determine wether you save or delete the associated surface. I suggest to use the FilterByBoolMask node to achieve this point.

I enclose here a little DesignScript code I did few weeks ago. Coments and variable names are in french… tell me if you want me to translate it to make it clearer. The aim of this script is to retreive only the floor and ceilling of the input rooms

CODEBLOCK

// Surfaces délimitant chaque pièce (volume murs/sol/plafond)
RoomSurf=RoomList.Explode();
RoomSurf=List.Flatten(RoomSurf,1);

// Couples de vecteurs directeurs de ces surfaces
VectList=RoomSurf.PrincipalDirectionsAtParameter(0,0);

// Composante Z de chaque vecteur directeur
ZComp=VectList.Z;
ZComp=Flatten(ZComp);

// Création de deux listes : index pairs et impairs
NbSurf=Count(Flatten(RoomSurf));
indexpairs=0…2NbSurf-1…2;
indeximpairs=1…2
NbSurf…2;

// Comparer les composantes Z des 2 vecteurs directeur de chaque surface
Z1=List.GetItemAtIndex(ZComp,indexpairs);
Z2=List.GetItemAtIndex(ZComp,indeximpairs);
Mask=Z1==Z2;

// Z identiques -> surface plane -> on la sauvegarde
ListeATrier=Flatten(RoomSurf);
CompareList=List.FilterByBoolMask(ListeATrier,Mask);
SurfPlan=List.GetItemAtIndex(CompareList,0);

// On conserve une seule des deux surfaces (sol ou plafond)
c=Count(SurfPlan);
index=0…c…2;
FinalSurf=List.RemoveItemAtIndex(SurfPlan,index);
Surface.PerimeterCurves(FinalSurf);

1 Like

Obviously what i suggest is just an example, you’ll probably need to adapt and change it.

So in a rectangular room, I’m getting 6 vertex points instead of just 4, got any ideas on how to clear the two ambiguous points?

Select the node Element.Geometry and switch from Graph preview to 3D Preview Navigation.
You will see the geometry of your room.

Your room is probably not a parallelepiped if it has more than 8 vertices.

Yes, you can look at the UV couple of vector for each of your 6 surfaces. As does the script I just post above