Create a solid from a topography

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

Actually first I tried with -1000 and 2000, then my solid becomes like a big column and the points are hidden inside and I couldn’t see it. Then I tried to just arbitrarily chnage those values. Still it is not helping.

Maybe because you have greater slopes in yours?

The principle is that you need a bigger + than -

Try -7 & + 20 :slight_smile:

You could improve the script by using values which relate to the topo Z values…

Hope that’s helpful,

Mark

Yaa like my slope has a difference of 4m.
To improve the script I need a good knowledge and I have just started working on it.
I don’t know what to do.

I don’t know what to do.

Instead of +2, try +20? :slight_smile:

It is always good to start simple… Once you’ve got something working, increase the complexity…


Great… How does the Watch 3D look? :slight_smile:

Right now you are previewing everything there… both the big extrusion, and the final split surfaces, so it’s hard to see whether the split worked ok…


Is this what you wanted?
Here it connects actually.
Why does it show like a big chunk in the above image (in the preview window)?

1 Like

So the sequence you did above…

Create Solid
Split

Both of those steps are visible in the background.

So you plug a Watch 3D in and see the result only of your output.

If you were doing this with nodes, you would right click and ‘unPreview’ the bits you don’t want to see…

image

As a new user, it would be really useful for you to try and rebuild Vikram’s code using nodes… He is obviously an expert, for us mortals, reading code makes it more difficult to understand (part of the reason he has done it in code is to make it run faster).

2 Likes

You simple way of writing is really helpful for me to understand. Thankyou very much.
So that means the final result I will always have to look back on the Revit window after plugin the watch 3D node?
Yess I will try to rebuild “Vikram’s Code” using nodes.

1 Like

@lupamudrasharma.88 The second last line in the code block needs to be a little more specific

sld1 = per2.ExtrudeAsSolid(Vector.ZAxis(),(srf2.BoundingBox.MaxPoint.Z-srf2.BoundingBox.MinPoint.Z)+0.5);

Here is a file that works with your .txt file…
solidTopo.dyn (29.8 KB)
Topographylage.txt (4.3 KB)
topoSolid

I want to ask another question:
How can I choose from the list of coordinate points a set of four coordinates say which will be my plot boundary (closed loop say a 2D plane if I do not choose the z). Then that boundary I extend it to touch the topography, so that I can evaluate the 4 values of z

.
I am choosing 4 coordinates randomly now and trying to project that 2D plane to touch the topography below. Eventually i need the values of z. Ultimately I want to know cutting/filling of the depth to build a house in a hilly terrain.