remove duplicates from a list not removing all duplicates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Friends !
very new to AUTOLISP and need some help .. I am using Lee Mac's wonderful LM:Unique function (the iterative version) to remove duplicates from a list.
For some reason the vl-remove doesn't remove all the instances of the duplicate.
Here is the list i am sending to the function:
(19.625 19.8125 19.1875 19.375 18.75 18.5625 18.125 18.9375 18.3125 19.8125 19.625 19.8125 19.8125 19.625 19.375 18.9375 19.375 19.1875 18.9375 18.75 18.3125 18.5625 18.125 18.3125 18.5625 19.1875 18.75 19.375 18.9375 18.125 18.3125 17.1875 17.75 17.375 16.8125 16.4375 17.75 17.1875 17.375 17.375 16.8125 16.8125 16.4375 16.4375 16.4375 16.8125 17.1875 17.75 17.375 17.75 18.5625 19.1875 19.375 18.75 18.9375 16.8125 17.1875 19.625 19.8125 17.375 18.125 18.3125 17.75 16.4375 16.25)
Here is the result:
(19.625 19.8125 19.1875 19.375 18.75 18.5625 18.125 18.9375 18.3125 18.5625 18.75 18.9375 17.1875 17.75 17.375 16.8125 16.4375 16.25)
And after sorting the results:
(19.8125 19.625 19.375 19.1875 18.9375 18.9375 18.75 18.75 18.5625 18.5625 18.3125 18.125 17.75 17.375 17.1875 16.8125 16.4375 16.25)
As you can see there are 3 instances where the duplication remains.
I just cant figure out why vl-remove sees them as different.
Any help would be greatly appreciated.