Urban Plannig via Dynamo (BiMorph Curves from CAD Layers)

If you have existing buildings in your DWG you could try downloading an OSM file and make objects from that with Dynamo.

2 Likes

The suggested method works but the problem I encountered is that when there’s more than one polyline (building) dynamo takes all curves and bundles them up in a single list, thus resullting in many errors. I’m trying to figure out how to sort through them.
Thanks for the suggestion!

I will definitely try this, although I fear that it won’t work very well for my region. Will update when I try it.
Thanks for the suggestion!

Today it was suggested to me that I use the curves to create floors in Revit. It worked for the most part, aside from the problem that when there is more than one polyline (building), the way dynamo sorts the curves prevents the script from working as they all get bundled up in a single list.
Does anyone know how to sort the curves and split them?

Hey,

Great work, there is an Archi-lab Superjoin node in Chinamo you could try?

It would be fantastic to get that flux functionality back… in the uk we have LIDAR surveys of cities so you can get heights too…

Edit: Does this still work?! https://www.google.co.uk/amp/s/dynamonodes.com/2016/04/26/workflow-building-masses-from-osm-files/amp/

Hope that helps,

Mark

2 Likes

So here’s my attempts…

One of the nodes in Marcel’s link required some kind of sign-up to google with credit card details… it wasn’t a route i wanted to go down, so I got lat/long coords from a different website and plugged them in. No big deal.

I’m importing to a family environment, this keeps the nasty cad metadata away from my project file, it is very fast and if I partially explode, it’s very easy to push and pull the import. Creating the buildings from lofted curves worked out the most robust, I got issues extruding patched surfaces.
The only stuff I’m really missing is roads, not sure why!


Here’s a different route using QGIS (free) if you have LIDAR it’s a bit more involved but would get you accurate heights from GIS data…

Hope that’s interesting…

Mark
GIS2BIM-2.dyn (923.1 KB)
QGIS Building Heights.dyn (28.6 KB)

4 Likes

So…
A bit of an update on my part that ofc comes with a bunch of new questions.

This looks good, but I do have a cad file with all the information like building footprint, height, streets, etc. Therefore my aim is to use it, as it is the most accurate.

I had a bit of success with the proposed method, however I do get some errors due to overlapping polylines that I don’t know how to fix.

It was suggested by a lecturer who happened to have done a similar script in the past that the buildings can be some type of generic mass or in-place models (don’t quite remember tbh) in order to have the desired height (his actually read some exploded text representing the number of storeys, but creating them eludes me.

Moreover I can really use some recommendations as to how I can optimize the script for a large number of objects. I am uploading a fraction of my cad buildings (roughly around 1/10th of them) so you can get a feel for the amount. As I am writing this it came to me that I can change the scale from meters to something smaller to lighten the load. Will update on that account.
halp.dwg (172.6 KB)

Thank you all for the help!

Hi @h.hristov31 I’m just peeking into this thread, but the gist I’ve got is:

  1. You are attempting to convert a CAD ImportInstance into Dynamo curves
  2. You want to group curves together which represent a ‘thing’, e.g. a building
  3. You want to join these curves then simply extrude them to create a 3D model from your 2D CAD file in Revit

If that is the case, then you can do some simple pre-processing of your CAD file, then take advantage of the natural sorting (or ‘grouping’ so-to-speak) of the curves CurvesFromCADLayers already does. Basically you need to run a LISP routine in Autocad (dont ask me about this as I dont use Autocad) which places the ‘things’ onto their own layer. Next, bring this file into Revit and simply input it into the CurvesFromCADLayers node and as it sorts curves by layer automatically, you will immediately have all your required curve groups.

There was a video of a very similar workflow which adopted this approach for CAD room boundaries which later are converted to Revit slabs on the Autodesk Knowledge Network:

Thank you for the suggestion! I will try the LISP routine in the morning even though I have this sneaking suspicion that it will cause my pc to combust hahaha. Will update you tomorrow!

That sort of thing would be quickest for computation:

But you’ll have problems with the buildings that are not closed loops like that one:


In that case even Group Curves won’t help since it will group all of those lines in a single group.

So I got this result with your file:

I suggest that you think about how to make the rest as closed loops

1 Like

Hey @h.hristov31 ,

As I am writing this it came to me that I can change the scale from meters to something smaller to lighten the load.

The units won’t help, it’s the amount of geometry that’s the issue, not the size. The files are big, but pretty clean. I think in reality some trimming in Autocad is going to work out fastest, it’s just a couple of trim’s in a few of the buildings, as opposed to trying to rebuild stuff in Revit.

The info from GIS or OSM seems better, they are explicitly defining building footprints. if you could extract that, it might be the fastest of all.

@viktor_kuzev’s method for getting the lines is great, it’s really fast!

in order to have the desired height (his actually read some exploded text representing the number of storeys, but creating them eludes me.

If you do have some height information in AutoCAD I would think we can get it out.

Hope that’s of interest,

Mark

I decided to use a not so sophisticated method of achieving that, inspired by this the video @Thomas_Mahon suggested, namely to separate the overlapping polylines into other layers.

However I found an issue with the created shapes. No matter what category the shapes are, I can not seem to host them on a toposurface. Although what i need is for each one to move up or down on the Z axis so it can intersect the toposurface and maybe dip a bit so it’s a bit more convincing. None of the revit features that any category posesses are in any of the shapes.

tl;dr:
Is there a way to translate each shape up or down in order for it to intersect with the selected toposurface?


the errors are some null values that are autocad polylines that I have missed.


Family features/parameters?
Dynamo file:
32.dyn (342.5 KB)

1 Like

Hey,

I don’t think you can properly host them, but you can maybe use a raybounce then move them up that distance, a bit like this thread?

A randomise node could improve the naturalism of the heights.

Hope that helps,

Mark

If you can get the toposurface as a solid, there is the command ProjectInputOnto that might work. Haven’t worked with it yet but it might be worth a shot.

Similarly there is Project command if you use the base curves and the toposurface as a surface.

Avoid PullOntoSurface as it uses the surface normal as the direction, which in a slanted surface will give you incorrect XY positions.

Hi Kenny,

There is a also a surface version, :slight_smile: unfortunately it failed for me, possibly because it’s a polysurface?
I tried with a solid with the same result…
Project by point worked though :slight_smile:
There’s a springs topography node which crashed my dynamo, the battlebim one works though…I also dropped in the randomise…


ProjectCADToTopo.dyn (841.6 KB)

Hope that’s useful,

Mark

2 Likes

When runnig the script I get a bunch of empty lists starting at the Point.Project node.


trying to troobleshoot atm

once the base layer of the script is complete (creating the shapes and hosting them on the topo) I will start looking for a way for the shapes to read the storey number thats inside each polyline as a text note in autocad and elevating to the correct height.

EDIT:
The empty list issue is present with any projection node I use

Hmm… there’s nothing coming out of your Point Project, maybe it’s struggling with your topo?

My topo had just 4 points, 2 @ 1m and 2 @ 50m (I can’t get the file to upload it’s too big).

Perhaps test it with that? Or could you upload your Topo?

Cheers,

Mark

Restarted Dynamo and revit;
Created a new topo;
It no longer returns an empty list, however it does some weird thing where I have 205 solids and translates only 104.
8
Moreover they don’t appear to move in different directions depending on the position of the topo, rather in the same Z direction.


Normal extrusions

Translated
5
Translation issue
6
Translation only in a positive Z direction

Translation only in a positive Z direction

RVT + DWG files
When importing dwg set LAYERS to VISIBLE
https://we.tl/t-t0x3MtyIPT

EDIT:
restarted again and the same issues are present, I think the first one with the empty lists was a fluke and this is it’s final error form

1 Like

Unfortunately I’m not in Revit 2019 :frowning: sorry

You are only getting 104 points out, so something is going wrong there…
Maybe this is a clue? If the conversion to polysurface is missing some of your topo?

Perhaps have a fly around in dynamo and see what you’re getting? If you right click on the other nodes and unclick ‘preview’ you should be able to just see the returned geometry from that node…

This would help keep your lists consistent…

I believe this may in fact be the issue with the Z translations.

Will try to figure it out…

I don’t think it is a Revit 2019 specific issue. The topo is just a random toposurface with some negative and some positive height values. Surely it’s the same in 2017, 2018, etc.

this is how i came upon the issue.

Thank you for your help!