Create a solid from a topography

Hi guys¡¡

Im triying to create a solid from a topography…i have used the package of @Vikram_Subbaiah to convert the topography to a polysurface. Then i am triying to create a solid and the cut this solid with the polysurface of the topography with the nodes geometry.trim or geometry.split, but it doesn´t work…how can i get a solid topography??
The problem is not as easy as take the surface curves of the topography and extrude them as solids because as u can see i have a underground level in the house and the solid would cover this undergorund level…

I am triying to 3d print this house :D:D

Thx. Some images explaining my problem

After you create the topography solid…

  • Extract the profile of the building pad
  • Extrude it to a height that matches/exceeds the max point of the topo
  • Use Solid.Difference to subtract this extruded solid from the topo solid
1 Like

I upload the dynamo file and also the revit file
@Vikram_Subbaiah i think that i dont understand properly your method or it doesn´t work

Thanks guys¡

MAQUETA_ML.dyn (28.9 KB)
MAQUETA MIGUEL LUENGO.rvt (1.9 MB)

topoSolid.dyn (5.7 KB)

@JAVIER_FQG You could refer to the script below and build this with just nodes too.

//Topography to PolySurface
tm1=topo.Mesh;
vp1=tm1.VertexPositions;
iG=tm1.FaceIndices;
lst1=List.Transpose({iG.A,iG.B,iG.C});
lst2=List.GetItemAtIndex(vp1,lst1);
srf1=Surface.ByPerimeterPoints(lst2);
srf2=PolySurface.ByJoinedSurfaces(srf1);

//Solid Topography
pln1=Plane.ByOriginNormal(srf2.BoundingBox.MinPoint,Vector.ZAxis());
per1=srf2.PerimeterCurves().Project(pln1,Vector.ByCoordinates(0,0,-1));
per2=PolyCurve.ByJoinedCurves(Flatten(per1)).Translate(Vector.ZAxis(),-1000);
sld1=per2.ExtrudeAsSolid((srf2.BoundingBox.MaxPoint.Z-srf2.BoundingBox.MinPoint.Z)+2000);
sld2=sld1.Trim(srf2,srf2.BoundingBox.MaxPoint);
sld3=sld2.Difference(bld.Geometry());
6 Likes

Amazing @Vikram_Subbaiah…really thanks a lot for all your support. the file is ready for printing…really thanks a lot

3 Likes

Hi All,

So after trying really hard to reverse engineer Vikram’s great code block using Nodes, I got it working however the Solid.Difference seems to “flip” halfway up the toposurface…
Any ideas why? and how to resolve it?

Thanks!

any ideas to the above please?

Vikram, thanks for all the great code… Quick question… Is there a way to use Difference with more than one solid (for the buildings) … For example, if you have multiple buildings that are not joined? Thanks!

1 Like

Don’t know if I got your question right, @The_Revit_Kid, but something like this?

5 Likes

Dude, you are the man! Thanks! I was using “Difference” when I needed “DifferenceAll”… Muwhahaha!

1 Like

@Shaun_Hutchinson Really late (sorry), you’ve probably resolved the issue.
Was pick point on Geometry.Trim to blame?

Sorry to be replying to a dead thread, but is it possible to do the reverse. Is it possible to to create a toposurface from a polysurface/ solid/ triangulation data without re-triangulating all the points like revit currently does?

PS: I didn’t want to start a new thread for this just yet.

Hi All

Please excuse my naivety, we are desperately trying to 3D print a topo surface with very limited Dynamo knowledge, although I am trying to learn! I seem to get tripped up on the first box, the topo surface is not selecting? Thanks! Screen shots attached6 5|690x330

You will have to select something. Click on the Change buttons and select topo and building respectively. You can try my script above as well. If you download the MeshToolkit you can convert the resulting solid from your script to a mesh and then export it to .obj/.ply etc.

1 Like

Oh my gosh, it’s almost worked! I’m working on the Dynamo intros but need to get this out first. How do I accept the solid / mesh in Revit once the script has run? Thanks for bearing with a complete beginner!

I’ve managed to get an output with the script from The Revit Kid, thanks! I would still love to know what the yellow mass is and how to select and delete it.

The topo and buildings I’m trying to print is this one: https://we.tl/hI8KujL4RP

@AndycMac You might need to change Settings > Geometry Working Range … to Large

Also small changes to allow selection of multiple buildings
topoSolid.dyn (5.6 KB)

//Topography to PolySurface
tm1=topo.Mesh;
vp1=tm1.VertexPositions;
iG=tm1.FaceIndices;
lst1=List.Transpose({iG.A,iG.B,iG.C});
lst2=List.GetItemAtIndex(vp1,lst1);
srf1=Surface.ByPerimeterPoints(lst2);
srf2=PolySurface.ByJoinedSurfaces(srf1);

//Solid Topography
pln1=Autodesk.Plane.ByOriginNormal(srf2.BoundingBox.MinPoint,Vector.ZAxis());
per1=srf2.PerimeterCurves().Project(pln1,Vector.ByCoordinates(0,0,-1));
per2=PolyCurve.ByJoinedCurves(Flatten(per1)).Translate(Vector.ZAxis(),-1000);
sld1=per2.ExtrudeAsSolid((srf2.BoundingBox.MaxPoint.Z-srf2.BoundingBox.MinPoint.Z)+2000);
sld2=sld1.Trim(srf2,srf2.BoundingBox.MaxPoint);
sld3=sld2.Difference(Solid.ByUnion(Flatten(bld.Geometry())));
3 Likes

Vikram, thank you very much! The script worked and created the solid in Dynamo. However, how do I get the solid back into Revit? I can’t select the yellow mass and there doesn’t seem to be anything else there. The reason to put it back into revit is to print the buildings and topo at the same time.

Thanks again!

Can someone kindly help me in this?
Very new to dynamo, revit world.
Trying to create a topography from x,y,z coordinates.
Having trouble with the solid form.
It is not connected. I do not understand

1 Like

Hey,

Maybe this helps?

image
image