Generate point on surface

Hi Guys,

I am trying to automatically add rooms in a model which only contains out of generic models (rooms).
I allready managed to find the bottom faces of the generic models, and translate the perimiter to room separation lines. Now I want to automatically add rooms within the room separation lines using the ‘Room.ByLocation’ node.

However, when I find the center points of the rooms, some centerpoints fall outside of the room boundary (see picture). Is there a way to generate a point on each surface (does not neccicarily have to be the exact mid point), which always falls within the boundary?

Thanks in advance!

1 Like

@bhall ,

you mean like this?

I am now trying with a test model of 3 rooms. later i will do it for a model of 1000’s of rooms.
some rooms are shaped like a ‘U’, so i want to generate 1 point for every surface using 1 piece of script that will not create points outside of the room boundary.

@bhall ,

this way, you will struggle with Null-rooms…


Hi @bhall,

I already solved this problem of U shape of rooms.
You can use the Element Inner Centroid or Surface Inner Centroid nodes of the Genius Loci package.

1 Like

You can also utilize an isocurve, intersect that with the surface, gather the first resulting curve, and pull a point at parameter 0.5.

2 Likes