Boolean difference for road mesh objects (for 3D printing)

I have a model of buildings and roads brought in primarily from open data sources such as openstreetmaps and shapefiles. They primarily came in as .obj objects and ended up as meshes. I’m trying to do sort of an extrusion for all the road layers, and then boolean difference with the base, so that when i 3D print the entire thing it will give a “negative extrusion” effect on the base showing the roads. I know it’s not straightfoward, and I have tried ways such as converting the meshes to polysurfaces, but they don’t work. Would like to ask if there is a way to do all of these at one go, and not have to manually draw the roads, or manually select pieces to convert. Any help will be greatly appreciated. Thank you.


test.3dm (3.2 MB)

that is never an easy one click task, however using MeshOutline after you have selected all the street fragments outputs a pretty good base already. with a few minutes of cleaning up to delete the inner loops or points which have been pulled inwards you should be good to go.

1 Like

A heightfield might work for you from viewcapturetofile with only the road layers visible.

h2

3 Likes

This looks great. If you don’t mind, could you outline the steps you took to create this? I attempted viewcapturetofile and heightfield but did not get such beautiful results. I got either a mesh or some points. Many thanks, appreciate it.

Sure,

Viewcapture to file - Scale 10

Crop image in a photo editor

Heightfield - settings used
c4

Here is the file: test (1)-cadwax.3dm (10.0 MB)

Regards,
Keith

1 Like

Thanks! one issue i faced with this is that it became a mesh with over 20,000 faces though, tried converting to nurb/surface but it either hanged my computer or rhino just crashed. Using less sample points, i get roads that are not too defined. Nevertheless, it’s a good alternative to manually processing everything

Hi - yes, that is to be expected with a mesh like that - see the warning in the help file:
https://docs.mcneel.com/rhino/6/help/en-us/index.htm#commands/meshtonurb.htm

Typically, when working with terrains, you will only use meshes and not convert those to NURBS.
-wim

in this case he actually is working on the street. imho i would not even use heightfield. for a flat base a plain extrusion/boolean with nurbs with a bit cleaning as described may be still a better alternative with less hassle, specifically when he is trying to print that afterwards with a crisp edge.

1 Like