Create floor by room

Hi all ! I’m trying to create floor. the first image is my script and the second is the beginning of a problem.

When I select this large room including columns. It make 3 outline. so It result null.

but when I try this script after removing columns located center of this room, it works well.

is there a way to solve this problem? such as extract only outermost outline except outline of column…

please help me. thanks you !

This is a common issue. Here is one method I’ve found for trying to work around it:

curves;
srfs = Surface.ByPatch(curves);
areas = srfs.Area;
volume = Autodesk.Solid.ByUnion(srfs.Thicken(1)).Volume;
DSCore.List.FilterByBoolMask(curves,areas==volume)["in"];

Paste this into a code block. It patches all the perimeter curves to surfaces, thickens them, then joins them into a single solid. You can then check the volume of the solid against the surface areas to find the one that matches, aka the “boundary” curve.

Sorry I’m too late… I tried it just before.

but it doesn’t work. could you tell me more detail about it??

Can you show your graph using the code block I pasted? It would be easier to explain if I knew what you were doing.

Use the room boundary node to find the boundaries of the room then use first item to get the first item in your list to use are your floor sketch.

1 Like

Or the longest perimeter. Is the first always the outermost set of curves?

From my experience. Yes. This is actually how the old CASE addin Rooms to Mass works as well. In the file located here, lines 288-306 demonstrate this logic. (Thought I would share the link in case you were interested.) :slight_smile:

2 Likes

No pun intended, I assume? :wink:

1 Like