Create Toposurface from Floor

Hi everyone
I have managed to create a definition that from Floors selected gather all the top point, and for precision adds some point along the curves.
But I am having a lot of troubles with filtering the outcome, so I don’t end up with point having the same XYZ or same XY but not same Z coordinates. As the toposurface can’t share same exact location or can have same XY with different Z…

CreateTopographyFromFloors_v6.dyn (75.5 KB)

Can anyone help - or guide me in a direction…?

I have not looked into your script yet but have you tried converting the revit xyz to dynamo points then using the prune duplicates node?

Note: you will have to make sure the list input does not contain any sublists.

Little unsure how to check just xy right now though.

I’m not at a PC right now, but i’ve solved something similar in the past by introducing some randomization to the xyz of the points. the factor of randomization was enough to stop Revit from complaining but small enough to not pose any threat to tolerances. I’ll see if I can find the script.

Sounds like you haven’t got familiar with this node - Point.PruneDuplicates. it should do the job!

You’ll have to decide which point to keep if you have similar points with varying Z coordinates, but you can look for points with the same X and Y coordinates with a little filtering.

This piece of a graph is pretty old and was originally wrapped in a custom node so you can probably do some cleaning up but it should get you started.

Hi @Brendan_Cassidy - yep, did prune point. Did some of the trick. But the coordinate with same XY, can have a Z - with a distance greater than the tolerance.

Hi @jostein_olsen I am not sure the randomisation would work. But would like to see the script…

@Jesper_Wallaert thanks. But as you can see in the picture of the script. I am familiar with prune points… And no, unfortunately it didn’t work…

@Nick_Boyts Thanks. I think it might have worked. But it kept giving me Nulls after the List.Map from All.True.
But after some work, and some ideas from that script, I found Dimitars first answer to this problem ( . Which kind of did it…
Well at least for getting rid of the double Z.

Cant get the Definition to work with a lot of elements. :expressionless:

Ill update if I find a good solution…

1 Like

That graph was originally for a list of grouped points not just a list of all points, so you might have to rework some of the list management.

Working with a lot of points could be problematic as you’re probably checking each point against all the others. You can probably use python to run through your list of points sequentially. Example: Point1 looks at Point2 and on, Point2 looks at Point3 and on, Point3 looks at Point4 and on, etc. so that you’re not constantly reevaluating your entire list of points. Just thinking out loud at this point.

Have a look at the below video of something i have been creating to get landscape site floor points into civils 3d.

The principles i have used is getting the “SlabShapeEditor” information of the floors then from this you get the SlabShapeCreaseArray and SlabShapeVertexArray" section of the floor “SlabShapeEditor”. If you are happy with just points then you do not need the creasearray and you just require the vertex elements. If you do want the creases(lines) then it will get more troublesome.

Once you have all these points from the vertex you can utilize the below two python coding to flatten all the points into one list then do the other one to prune all duplicate points

Couldn’t find the script unfortunately, but I think it was something along the lines of this.
CreateTopographyFromFloors_Nojool.dyn (42.8 KB)

Very quick and dirty and I removed some parts that I figured were uneccesary. Try it out and let us know.

1 Like

You could use Springs’ “Points.PruneDuplicates+” to remove the offending points: