Merge/Fuse/Combine existing points

I don’t use Rhino too often but I am wondering if there is a single command that would combine several points that overlay each other in the same position or even if they are just near each other and combine by averaging their positions together?

This is an ‘academic’ question, as what I want to do is not being hindered by not knowing how to do this. That’s why I only ask if there is a single command. I don’t want to get into doing a script or venturing into Grasshopper(if that’s where one would do this).

The program I’m going to export my work into will be able to do this for me if I want.
But again, out of curiosity I am wondering if this could be done with a single command in Rhino.

Thanks.

1 Like

SetPt

You can use SelDup
(found under Edit>Select Objects>Duplicate Objects)
for removing exact duplicate points.

2 Likes

thinking once more it appears that your question is a bit unclear, do you want to delete loose superfluous points, or are these on a curve?

SimplifyCrv will clean up straight lines and objects that geometrically are a circle.

for stray points that you actually want to delete i guess you could make a macro with both commands mentioned above, SetPt and Seldup as Daniel suggested.

Thanks guys. Both SetPt and SelDup work.

Just a couple observations though.

With SetPt I found I could not with CRTL + Z undo what SetPt did.

And with SelDup it is limited in that it will select all duplicate objects within the layer.
Although one can simply CTRL select the points/objects one does not want ‘merged/removed’ it can be hard to find all the points one does not want to ‘merge’. Meaning it doesn’t seem like one can simply select the specific points and just merge. However in cases where one does know where all the duplicates are SelDup works fine and just deleting the points SelDup selected is fine.

Well, their not really superfluous, they are reference positions at ends of straight line curves which overlap their end points.

So SimplifyCrv doesn’t ‘work’ in such a case.(The duplicate points remain in place).

SetPt for my case is the best choice since I can be specific more easily with the points I want to ‘merge’.

And as said before, I’m just interested if there is a single command, not wanting to do a macro/script.

that sounds like a bug, works fine here, which version are you running?

seldup will not only look for layer it will select any duplicates that overlay within a very very tight tolerance, sometimes its so picky that working on the same geometry it happens that it does not detect the duplicates anymore.

could you post a simple file that exhibits such a situation? there is also convert, that lets you basically rebuild/simplify such polylines if they are joined with a given tolerance.

well making a macro is really not a big deal, if its clear what you want i am sure people here can help you out, that one you just copy into your aliases or make an entire command.

Actually I must have been mistaken. SetPt doesn’t work at all when I tried it again.
Trying to combine Points that
were added to the ends of polylines.
I’m running Rhino 8

And like I said before, this is an academic question. I’m more interested in knowing if there is a single command for what I want to do. This is because I don’t use Rhino often enough to be familiar with knowing offhand what is and what is not available.
What I want to do is not a ‘problem’ per se that I wish to resolve. Again, just wanting to know if there is a command that I just may not be familiar with or know.
That’s why I’m not interested in macros/scripting.
Also, I’m using Rhino as a secondary program to the main program I am using. So there is a back and forth work flow of exporting/importing between the two. So what I do in Rhino for most Rhino users would not ‘make sense’. But just knowing the availability or not of the type of command I am considering, just helps in me sorting out how to or not work between the two programs. I can merge the points the way I want quickly in my main program - but if there is just as quick way in Rhino then that is an option I can remember to use.
Merge_Pts.3dm (58.2 KB)

And it seems so far - there is no actual command that does that. Even SelDup doesn’t do it(which is ok), as it just selects the duplicate position points, and you still have to take the next step and delete them.

I don’t understand what you are trying to do here (with the file above).

Note that SimplifyCrv will eliminate superfluous points in lines and linear segments of polylines. There is also ReducePolyline which will do the same but within a given tolerance, i.e. eliminate “between” points even if they aren’t exactly aligned, but within tolerance of being so.

1 Like

from what i understood now is that SelDup does in fact all you need or not? hitting delete should still be ok after that? or is that something you regularly encounter then a quick macro that implies deleting this could fix this.

_Seldup _Delete for instance. put that into your aliases call it SDD or whatnot and you are good to go. make an instant alias with the command TestInstantAlias for V8 and that beams those points into outer space in no time :slight_smile:

Trying to merge the extra points(which I plotted at the ends of the polylines) into a single point where they overlap.

I don’t want to remove them altogether.

1 Like

Yes and No.

I’m not able to isolate(SelDup) only a few points on the layer (one part of the scene). SelDup looks at all duplicates for the layer.

I don’t know how you make a polyline with stacked control points in Rhino. I tried but I couldn’t manage. It is of course possible to stack single point objects, as well as control points in freeform curves.

I’m not making control points - just plain reference points that happen to be placed at the end of polylines. And there may be more than one reference point added. Just wanting to combine them into one.

sorry to say but the entire thing is getting pretty obscure, the more we ask the more complicated it gets :smile:

how would you determine which points to select and which not? if they are on separate layers then you can simply lock the layer from those you want to keep, seldup will not grab them then you can also embedd that little detour into a macro if needed and invert selection etc., but i have trouble understanding how any automatic command would know what you would like to select

No, there are different ‘sets’ of ‘duplicate points’ in the same layer. (Separated in different locations but on the same layer). Like in the file I provided. Just hover over the different point locations. Some have one point, some 2 or 3.

Also SelDup will select everything that might be duplicated in the file, not just points. If you do an automatic SelDup Delete it might end up deleting unwanted stuff without you knowing it. To limit SelDup to just points, you would need to have the selection filter set to just points, or a script.

That’s good to know. Thank you.
But I was hoping to be able to further ‘filter’ to only a specific ‘set’ of overlapping points on a layer - not all the duplicate points on the layer.

So again, all your guys responses have been useful in helping me see what is capable and what is not in the manner I was hoping to know.

Again, it’s not about getting a solution - which is easy enough in many ways.
Was just trying to over turn ‘rocks’ to find out about a command I may not be familiar with.

Thanks again for every ones time and effort.

Here are a couple of scripts

Selected set of points
CullSelDuplicatePointObjects.py (919 Bytes)

All visible/selectable points in file
CullAllDuplicatePointObjects.py (857 Bytes)

Note it asks for a tolerance, which is by default the file tolerance, but can be made smaller or larger. If all you ever care about are dup points within file tolerance, this prompt can be eliminated.

1 Like

I was only looking to be able to do this with an already existing command where I select then apply.

I don’t want to get involved with further steps by implementing scripts/macros etc.

It’s a matter of reducing workflow as I use Rhino in a limited way. Scripting adds to that which I don’t want.

But thanks anyways since if I do decide to get further into Rhino at least I have some reference to my posts I can go back and look up and learn, modify, etc.