How to remove duplicate pts


#1

Folks

Im stuggling to do something in rhino due to my lack of experience…I have some poor curve data imported as dxf and I have extracted points. There appears to be a lot of point on point very typical.

The data is roads and parking areas for mine site. Im interested in creating clean surfaces from the points extracted from the roads and parking. The roads need to show the rise and falls so accuracy important.

Id like rhino to delete duplicate point but Seldup or SeldupAll is not removing all the duplicates and I dont know any other way to remove so I can create a clean mesh of the roads. At the moment the mesh generated is terrible as it create self intersections and Rhino cant clean this up only reports on the errors.

So I have to start with clean inputs…Can more experienced Rhino Jokes help out

Id really appreciate it being under pressure

Thx Phil


#2

SelDup should actually select all duplicates, if not then they are not exactly on top of each other… and SelDupAll will not help only if you want to delete the last point, maybe there is still a chance to extract some curves and polylines from that dxf file before you make millions of dots. if it allows you do submit the file or at least part of it that one could have a look on how to possibly proceed.


(Pascal Golay) #3

Hi Phil - I’m a Rhino Joke, I’ll see if I can help! My guess is the points are not exact duplicates - select a couple that appear to the same, and type List and Enter. - the coordinates must be identical to be dups.
How are you using the points to make your surfaces? How many points are we talking about?

-Pascal


#4

@Phil3,

i got this old python script, it is not super fast but if you only have a few thousand points to cull its ok. Just pre-select your points, start the script and enter the minimum allowed distance between points (tolerance).

CullDuplicatePts.py (703 Bytes)

c.


#5

another way which i just have found out if its interesting, rhino seems to have some sort of tolerance towards how exact duplicates are being selected. even objects which are not 100% on top of each other and i know that changing the absolute tolerance can sometimes have positives effects on if something works or not, unfortunately i could not get that working, what i could get working though is when you shrink all objects down about a magnitude it magically finds duplicates again, after that you just resize it back to its initial state.


#6

Hey thanks guys for commenting. Yes when I look at the point sets some are not quite on top of each other but others are after I zoom in significantly…I also check by checking each point coordinate and they were exactly the same in xyz.

Problem is i have quite a lot to deal with and would take a long time deleting manually…


#7

Thanks clement I’ve never run a script in rhino before so I’ll give this a try. Much appreciated.

Will it run in Rhino 5 64bit??

Phil


#8

Pascal there are 27000 points but a lot are duplicates and I dont need them…

I am attempting to create a mesh patch or mesh throu pts or deluaney point set. Failing that I have tried patch to create best fit surf thru points

I know u can do it but not sure how to attached my file to this thread


#9

There is a command called MeshFromPoints that you should give a try.
For some silly reason it is not included in Rhino by default and has to be downloaded manually and then you have to replace the file on your computer with this one:

https://www.rhino3d.com/download/Rhino/5.0/meshfrompointsV5x64


#10

Hi @Phil3, yes it was written in Win7 X64. To run it, there are various ways. The simplest is to save the script somewhere on your harddrive then create a dedicated new toolbar button in Rhino using this text in the button command field:

! _-RunPythonScript "C:\YourPathToTheScript\CullDuplicatePts.py"

Note that in the above text, you have to change the "C:\YourPathToTheScript" part into the path on your harddrive.

Alternatively you can just drag and drop the script on rhino to run it or use the _LoadScript command.

Before creating a _MeshPatch from your duplicate points, i would suggest to reduce them using the script. 27000 points should take 2-3 seconds depending on your system speed. Btw. you might as well just try the _Patch command to fit a Nurbs surface to the points.

c.


#11

Thx Holo I already tried meshfrompoints butstill ended up with a very dirty mesh with self intersections…Ill try it again thou


#12

Clement I did try patch and I didnt take it further because I couldnt get the accuracy a need…At the center of the 6m wide road theere is a fall of about 100mm lover than the edges of the road. I need the patch surface to show this fall but struggle to the right U and V combinations but I could also be entering the wrong values.

I have had some limited success with mesh but buy using a cleaner data set as my source. I will try the script because I also need to repeat the process on earthworks…

I need a water tight surface from rhino to go into solid edge errror free so I can generated a solid from it. Cheers
Phil