Hey everyone I am trying to create some walls based on an autocad drawing. The walls will of course be placed on centerlines and the DWG only shows the thickness. Corners of walls are also joined in the DWG.
I managed to create some closing off lines by start a line at the normal direction at the start and end point of each line. However this also means that some end lines go the wrong way. How can I reverse that so I can create good pairs of lines that are the 2D walls and just properly enclose them?
(Some unattached nodes are there for deletion etc - I don’t know Python and I am not looking into coding nodes with it. I am new to dynamo as of 2 months)
The trick with this workflow is to isolate all curves longer than a wall end, group them by parallelism and try to pair them/reject one, then make walls by finish exterior/interior. It’s a fairly complex workflow and depends highly on how clean the CAD file is (e.g. are there heaps of overlapping lines, are doors interrupting walls).
The best place to look into potential solutions is this megathread, but I’ve never seen anyone solve this in a way that isn’t limited by how the CAD is set up, or works on any project perfectly:
Ah thank you Gavin. I wasn’t aware of that megathread and now I’ve learned about a couple more nodes
I didn’t know I could group lines by parallel.
Alright this sort of works, but I also get the problem that most walls (but not all) need to be flipped or that they don’t extend all the way.
At least it saves me a lot of clicks
I’ve been trying different methods and looked at the megathread but I can’t find anything that suits something like the below. These are all lines rather than polylines and there are 58 of them …
I abandoned the approach because of inaccuracies between Revit and AutoCAD, especially around wall junctions. It also depends too much on how well the DWG layers are organized — if those aren’t perfect, the workflow breaks.
Instead, I now clean up the DWG to keep just one wall line per wall, which makes it easy to place Revit walls directly on those lines using Dynamo. In the end, it’s a choice between manually clicking lines in Revit or simplifying the DWG before running the script.
Many thanks for getting back to me. At the moment I am doing the same and cleaning up the dwg first to get a clean polyline from which I’m generating grids, walls and views.