Showcase: Legofy your Civil 3D Surface

Totally useless, unless someone thinks otherwise. I was doing some Surface manipulation and I thought it would be fun to “legofy” a TIN Surface, just because we can. The result:

Preparations:
You need a block with the size 1x1x1 (not actually a real Lego brick but it is easier to do calculations with it. Also object colors inside block need to be set to ByBlock.
And you need the Arkance Systems Node Library.

The graph:
The Graph contains a few nodes, and at the left (the blue group) there are some nodes you need to set for yourself. Which Surface, which block, the grid size and the colors for the Color Scheme.

The Surface is resampled to the grid size, this results in a list of points. The Z value is rounded to an elevation that corresponds with the block height. Then the blocks are placed on these points and scaled to the grid size (this is why 1x1x1 is a perfect definition size). After that the bricks are colored according to the elevation. A dictionary is used for that.

Resources:
Block and graph.

lego.dwg (60.0 KB)

LegoSurface.dyn (54.5 KB)

Have fun! Oh btw, the drawing gets easily very heavy, so start with a high grid size.

18 Likes

That’s pretty fun, @Anton_Huizinga!

Thank you :slight_smile:

Hello, no if it generates an error and it doesn’t allow it to work
DICTIONARY.CREATEDICTIONARY

LegoSurface.dyn (65.6 KB)
Drawing2.dwg (3.9 MB)

Looks like the result of the List.Sort isn’t a string. Try adding a String.FromObject node to see if that clears it up.

the error is not corrected

You have duplicate keys. You can only use each key once, so you’ll have to reduce the six 1305 values and the three 1350 values to one of each. List.UniqueItems should work, but my guy system you want to slice the values differently.

I thought it was very interesting but unfortunately I couldn’t do it.

Do you know if this is the same concept as the “voxel” package for revit?

@jacob.small once mentioned the voxel package. I never tried but I think it might be necessary to do a Boolean intersection with a large solid generated from a tin surface

I never used Revit, so I don’t know if it is the same as a voxel package. I can’t imagine legofying objects is package worthy :slight_smile:

Same concept, and very much package worthy - in fact our research team has a great package of said concept, which is called VASA.

More info here: https://www.youtube.com/watch?v=wE4gk0FYWDw

2 Likes

:smiley:

Cool! Didn’t know of that, but watching the video, it makes a lot of sense.

1 Like