Topography import to Dynamo

Try this

http://dynamobim.org/forums/topic/how-to-make-solid-from-bif-amount-of-points/

thank you i tried this already but its not working for my toposurface

@maffler Using the text file you’ve uploaded above (upload.txt)
TextToTopo.dyn (12.2 KB)

//Text to Topo
str1=String.Split(str,"grenze");
str2=String.Split(str1,"
");
str3=String.Split(str2<1>,":");
crd1=List.Clean(String.ToNumber(Transpose(str3<1>)),false);
pnt1=Point.ByCoordinates(List.GetItemAtIndex(crd1<1>,0),
List.GetItemAtIndex(crd1<1>,1),List.GetItemAtIndex(crd1<1>,2));
pnt2=Point.PruneDuplicates(Flatten(pnt1),0.1);
T=Topography.ByPoints(pnt2);

//Convert Topo to Polysurface
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);

//Topo Base Solid
TopoMinPt=BoundingBox.ByGeometry(TopoPlySurf).MinPoint;
TopoMaxPt=BoundingBox.ByGeometry(TopoPlySurf).MaxPoint;
TopoBdr1=TopoPlySurf.PerimeterCurves();
TopoBdr2=TopoBdr1.Project(Plane.ByOriginNormal(TopoMinPt,
Vector.ZAxis()),Vector.ByCoordinates(0,0,-1));
TopoBdr3=PolyCurve.ByJoinedCurves(Flatten(TopoBdr2));
TopoSld1=TopoBdr3.ExtrudeAsSolid(Vector.ZAxis(),TopoMaxPt.Z-TopoMinPt.Z+100);
TopoSld2=TopoSld1.Split(TopoPlySurf)[1];
2 Likes

Thank you that looks great.

My problem is now that I can’t open your file because you have the version 1.1.1 and i 1.1.0 and i find no update. Dynamo says that its up to date.

My second problem is that if i copy your code in my dynamo 1.1.0 version i geht not de result like you.
Please see…

Switch off Preview for the code block. (Select code block, right click, uncheck Preview)

Thank you for the hint. That works perfect for me. You are great.

1 Like

I explored now that its only a surface but in the inside of the body there is no material.
Can i fill this body with a material. And is it possible to set the material parameter to sand or some sing else for this body?

Hello , if i want to add points to exist topography is there any way to do that?
I’m thinking to let the dynamo shape the excavation for foundations after reading the foundations and give the points the correct offset to get the excavation level.

Hello, could you please start a new thread with the appropriate title and a screenshot of your work? You can easily refer to any post you like this way:
Share-a-link-to-this-post
Thanks :slight_smile:

Thanks for your advice :slight_smile: