Return to Blog List

Creating walls from cad(Upgraded!!!)

Blog Image 1

I used Dynamo to create a script before, the purpose is to create the wall from cad file.

Later, according to the update of Dynamo, the behavior of boundingbox node changes so I have to update my script for compatibility issue.I used a new method, that is, the method of using rectangles, and the old script only uses boundingbox node.

At present, both methods can still be used, and the method of using rectangles is more compatible with the new version of dynamo.If you're using revit 2024 2025 I think the newer script is more compatible.

However, one shortcoming of the both script is that it can only handle horizontal and vertical walls in an orthogonal state. When deal with inclined line or circles it won't generate correct walls.

Because even if the relatively newer script which I use rectangle as a method, the rectangle is created by using the maximum vertex of the boundingbox, that is, the vertex in the upper right corner, and also the minimum point which is the vertex in the lower left corner, then intersecting the boundingbox with the XY plane. In this case, the generated wall positioning line is horizontal and vertical.

In order to solve this issue to meet more scenarios, especially the situation where a CAD has a inclined line that I am currently facing, I decided to update my previous script.

There are two ways to do it.

First of all, . In the new version of dynamo that comes with Revit 2023 or higher, there is a node called “BoundingBox.ByMinimumVolume”. However, there is a problem that when we want to get the correct isoline from the planes . Because the surface is created by intersection with the boundingbox and the xy plane, so the software cannot determine the UV. direction of the surface. So one way to deal with it is to use the four side lines of the boundingbox,and then select two short sides. The line connecting the midpoints of each side is the correct wall positioning line. I successfully did one.

However, there is a problem with this method. It cannot solve the circle, because the arc line cannot be grouped by parallel node which comes from the spring package, so there would be incorrect group of lines. The inner circle and the outer circle will be grouped together, not the correct group of two semicircles.

For this reason, I finally came up with the idea of grouping by the distance between the midpoints of the lines we get from cad file, and then regrouping and sorting all the lines picked up by the CAD by the index of the midpoints, and then using the loft function to create the surface, and finally get the midline, that is, the isoline with a value of 0.5. In this case, the positioning line obtained can handle all wall lines, whether it is a straight line, inclined line or an arc.

The following is the demonstration content.

Return to Blog List