Topography colouring

<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.

</div>
<span style=“color: #222222;”>The idea is that we want to analyze which area is good for construction and where we cannot build.

Screen Shot 2015-06-18 at 1.10.49 am
</span>

1 Like

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…)

Bilde uten tittel

topo colorization

1 Like

Wow, why cudn’t I think of ‘plane’ instead of surface/face :frowning: .

Anyways, thanks a lot for this suggestion Jostein :slight_smile: … 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.

File: TopoColor

20150619-2

Ahh, Vikram. So tidy, so organized! :wink:

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!

1 Like

Thanks Jostein.

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.

1 Like

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.

File: TopoColor-nodes

20150620-1

20150620-2

20150620-3

 

 

 

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… :slight_smile:

Isoline Analysis

Toposurface Isoline Analysis

3 Likes

@Dieter_Vermeulen

Thanks for sharing. Is there a way i can see that Script you have posted because the image doesn’t enlarge. I want to check where i am going wrong. Thanks again… :slight_smile:

Hey, Can you Please share better image as i cant look into that image provided. I want to compare my script with this. Thanks!

Hi Dieter,
You have done an interesting work here. I have a topography that I want to do the exact thing you have done, i.e. to color the topo by height. Would you please share the script or screenshot of what you did?
Thanks.

1 Like

@esmaeili.iraj1990
find his blog, it might be the answer is there somewhere

Thank you Marcel, I’ll look for his blog.

Hi Dieter. Would you please share the script or screenshot of what you did?