Topography import to Dynamo

Hello,

why is it impossible to draw a surface with these .txt file?
I am sorry i can not upload the txt file.

You could convert a Revit topography to a polysurface with this…
TopoSurfaces.dyn (4.0 KB)

iA=List.GetItemAtIndex(T.Mesh.VertexPositions,T.Mesh.FaceIndices.A);
iB=List.GetItemAtIndex(T.Mesh.VertexPositions,T.Mesh.FaceIndices.B);
iC=List.GetItemAtIndex(T.Mesh.VertexPositions,T.Mesh.FaceIndices.C);
//Surfaces
TopoSurf=Surface.ByPerimeterPoints(List.Transpose({iA,iB,iC}));
//Polysurface combining Surfaces
TopoPlySurf=PolySurface.ByJoinedSurfaces(TopoSurf);
1 Like

Hi Vikram, i get only points but no surface!
Please see…

the error message is > Warnung:Topography.ByPoints fehlgeschlagen.

One or more points shared the same XY location (even with different elevations). This is not permitted for topography surfaces.
Parameter name: points

Please upload a rvt file with your topo here.
Have you checked if it works on some other topography?

thank you i solved it with topography by lines

I don’t know why i can’t produce a Topography with these points!
Can you help me?

Yes with a other topo csv file it works

In that case, the issue is specific to the topo you are working with and to address the problem you would need to upload the relevant file/s.

The forum doesn’t allow me to upload csv files.

Hi, have you tried flattening the point list?

Yes and the Point Prune Duplicates node!

You can open it in notepad and copy/paste the contents here and format it with </>

If the problem is that multiple points share the same xy, prune duplicates will not work since the Z is different

Rename the csv file to txt,vthen you’ll be able to upload

I suggest setting the z to a constant for all points then pruning duplicates based on the indices of the constant z coordinates

Andrew

upload.txt (25.6 KB)

I have no error message and also no topography.

Refer below

The problem was points with same XY having multiple Z values
That’s my mental stimulation for the day, back to my job…

topo.txt (25.4 KB)
TopoCSVimporter.dyn (17.1 KB)

2 Likes

Thank you for your work.
I tried to run your code. But i get not the same result as you.

I used only your two files.

If the program finds duplicate values ​​who can guarantee then that the x and y values ​​get the appropriate z value like before .

It is difficult (if not impossible) to determine which is the ‘right’ or ‘wrong’ Z for a particular XY position.

So yes, if there were different Z values for each XY, this method would not be 100% reliable. I’d guess Prune.Duplicates removes the second occurrence it finds & it would be fairly easy to check.

In your case, they are exact duplicates, so it does not matter which value get pruned.

Thank you. You are awesome.

Is there a possibility to make from these topo a solid body? I searched for hours for a solution but i find nothing.