<div style=”color: #222222;”>
<div>Someone at my office had developed some scripts in Grasshopper to color code a topography surface. My boss gave me those files and a contour DWG file and see if something similar could be done in Dynamo. The slopes aren’t very steep. I seem to have stuck at this point where am not able to use a node “Display.ByGeometryColor”. It isn’t available anymore I guess or maybe there’s some other way to color a face/surface. The expected output of this exercise is the following.
1. As per the various slope, colors should be generated.</div>
2. If possible, we try to get area of these colored toposurface.
<span style=”color: #222222;”>The idea is that we want to analyze which area is good for construction and where we cannot build.
Not sure if you can color topography. I haven’t explored the coloring options much, but I suppose breaking up the topography into surface components could be a start..
If the topography (in Revit) was created from a regular grid of points you can try using the points and their corresponding normal (ideally from the surveyors raw data) to generate a series of surfaces (with surface dimensions based on grid spacing) to approximate the topography. If you have a dense regular grid, it should work alright.
Alternately, you could also convert the topography to a mesh in Dynamo and see where that takes you.
I dont know why my screenshot is coming up blurred but I got the same idea as yours. The problem is am just not able to make surfaces. Curve.ClosedLoopThroughPoints when noded into Surface.ByPatch isn’t yielding the desired result.
Something along the lines of this? I cant get the coloring of geometry in Dynamo to work so I temporally import all my surfaces into Revit and color them there. Hopefully the coloring in Dynamo will be more stable in near future.( Large conversions to surfaces from topo eats RAM for breakfast, lunch and dinner, though..)
Wow, why cudn’t I think of ‘plane’ instead of surface/face 🙁 .
Anyways, thanks a lot for this suggestion Jostein 🙂 … This might work out as a starter but am kinda afraid to try now as am using a MacBook Air to run my Revit+Dynamo. My topo is pretty densely populated with points. Will try on a faster system at office and share the resulting screenshots.
Managed to do this in Dynamo.
Ahh, Vikram. So tidy, so organized! 😉
I don’t know what I did wrong or maybe it’s the build I was working on, your definition seems to work. and it quite fast as well!
Your image with the colored mesh prompted me to explore meshes and the mesh indices.
No problem. Yes, my bottom picture does something like your graph, but codeblocks are much more tidy.
The crucial difference is the use of Mesh Vertex Indices to generate surfaces. Results in a fairly uncomplicated process.
Below is the same file with nodes. This should give a better idea of the work flow compared to the Design Script version.
I managed to add colors to Revit using Model Lines and a double color range. Only works in 0.8 as Mesh Toolkit is used and not yet working on 0.8.1. So had to find a workaround for adding multiple color ranges. See files in attachment. The reason of this approach is because I want to see a more detailed color range in Revit. The problem I see with the Topography.Mesh is that it is not really a refined mesh. So used a (I must admit slow way) solution where Mesh Toolkit cuts the topography with planes (ie. 100 planes between top and bottom of topo). This cut delivers polycurves which can be transferred to Model lines. Tricky: element.coloroverride is not working on Model Lines. So had to adapt the clockwork element.overridetransparency node from Andreas Dieckmann in order to color the Model Lines. See what you can do with it. Will post later more info on my blog on this.
Any suggestion on mesh refinement is welcome… 🙂
This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.