Page MenuHome

Curve Remove doubles
Closed, ResolvedPublic

Description

Curve remove doubles addon for Blender 3D

Adds comand "Remove Dobles" for curves in Blender 3D

Sometimes in exported curves in Blender, you can note bugs: some of the curve may not be traced, or artifacts on the extruded wall:

This is becouse of nearby points of Bezier curve. Of course, you can manually delete these points, restore the guides, but there is a faster and more efficient way: add-on "Curve Remove Doubles".

The addon glues nearby points on a single Bézier curve. In fact it is an analogue of the usual Remove Doubles on a mesh, but it is for a curve. But unlike the mesh one, it does not connect the points from different parts of the curves, even if they are on the ends of the two curves. To glue such points, you must first connect them with F-button.

https://github.com/crantisz/blender-curve-remove-doubles-addon

How to use

Fixing curves

Let we have a curve with troubles:

Select all poins, than press W -> Remove Doubles:

Look at result:

Connecting two curves with preservation of guides

Let we have some curves to connecting

First, make segment with F-button. Next W -> Remove Doubles:

If the points don't stuck together - probably they are further than the established limit, press F6 and increase the limit until they are stuck together:

Look at result:

Details

Type
Patch

Event Timeline

Seems like useful functionality, are you able to port this is Blender's C code?

Some tools as add-ons are fine but this seems like it would fit better as a built-in operation.

Vuk Gardašević (lijenstina) triaged this task as Normal priority.Nov 21 2017, 7:04 PM

could this be ported to 2.8 or made into a quick hack for c code?

could this be ported to 2.8 or made into a quick hack for c code?

you can grab 2.8 version it on my github: https://github.com/crantisz/blender-curve-remove-doubles-addon/releases

@Michael Soluyanov (crantisz)
hi again, It seems this is very useful, the issue is how to fit it in and make best use of the addon. Would it work to merge it into the simplify curves addon? Both seem related given they work to optimize/clean up curves?
What do you think? Would you be happy with this?

I added this addon to curve_tools. https://developer.blender.org/diffusion/BAC/browse/master/curve_tools/
But I would like to see it in the main assembly.

And ideally, I would like to see in the main assembly a combine from this add-on
+ https://github.com/Lichtso/curve_cad
+ https://developer.blender.org/diffusion/BAC/browse/master/curve_tools
+ some of the functions from https://developer.blender.org/diffusion/BA/browse/master/add_curve_extra_objects/add_curve_simple.py

P.S. I can do this. Waiting for an order.

hi, @Spivak Vladimir (cwolf3d) you would need permissions off https://github.com/Lichtso/curve_cad
I've kept curve tools around for years because it holds some good functionality, it was great to see your activity there.
I think it would be good to start a new task about curve tools so we can work out how to proceed.
I think for now we could add curve remove doubles to simplify curves in release and work out how to proceed with curve tools in the new task.
something like this in the bl_info might work:

"location": "Add Curve > Simplify Curves/ Curve Edit Context Menu",
"description": "Simplify F-Curves/ 3d View: Simplify/Removed Doubles",

Thanks again.

@Michael Soluyanov (crantisz)
hi again, It seems this is very useful, the issue is how to fit it in and make best use of the addon. Would it work to merge it into the simplify curves addon? Both seem related given they work to optimize/clean up curves?
What do you think? Would you be happy with this?

It would be nice, I think

hi again, i'm having some trouble here.
Add a bezier curve, duplicate it in place
Run your addon.
No points are removed.
Adjusting the parameters makes both curves a straight line and removes no doubles.
I would have expected the addon to simply remove/merge the double points as they are overlaying.
I could be misunderstanding what's expected from the addon but felt it's needed to raise this point.
Tested in nightly build from here: https://builder.blender.org/download/

@Brendon Murphy (meta-androcto) read the description:

The addon glues nearby points on a single Bézier curve. In fact it is an analogue of the usual Remove Doubles on a mesh, but it is for a curve. But unlike the mesh one, it does not connect the points from different parts of the curves, even if they are on the ends of the two curves. To glue such points, you must first connect them with F-button.

Merging points from two different curves looks impossible, because it may require points, connected with more than 2 points, that doesn't supports by Bezier

The typical situation, than it very useful is clearing imported vectors:

thanks for reply, I wonder if Curve Clean Up would be a better name? I was concerned that users may confuse what the addon does with the way mesh remove doubles works.
Let me know. It only took me a few min to add to curve simplify addon, I will be moving the addon forward shortly.

As for me, the work of this addon is similar to the work of the remove doubles mesh. The name Remove Doubles here fits best. Well, you can also call "Merge nearby vertices" or "Merge vertices by distance"

Actually, remove doubles renamed to merge by distance, so Merge vertices by distance will be better

Brendon Murphy (meta-androcto) raised the priority of this task from Normal to Confirmed, Medium.Wed, Jun 12, 7:54 AM

Raising Priority,
We can merge this easily with Simplify Curves for 2.8 release.


@Michael Soluyanov (crantisz) I changed name to merge by distance and it works really well. I also did some better tests and it's really a great tool. Thank You.
@Spivak Vladimir (cwolf3d) I've made a few adjustments here to the bl info It's ok? Probably needs some clean up too.
Simplify curves seems to be bugging out? error in main with to many positional arguments? Can this be confirmed?
Next issue would be location in the menus. Although simplify curves has a long standing appearance in the add curve menu, It really does not not belong there. I would think both could be in the context menu as 2 entries prepended,
They could also be appended into the edit mode Curve menu.
At a later stage or if time permits, simplify curves also needs an operator menu, it would be nice to add some options such as edit/object mode, remove or keep original object.
Let me know what you think.

@Brendon Murphy (meta-androcto) All your comments about Simplify Curves are absolutely correct.

@Brendon Murphy (meta-androcto) Can you change autor from crantisz to Michael Soluyanov?

I got permission from Lichtso https://github.com/Lichtso/curve_cad.
At the weekend I will work on a large addon for working with curves (+curve_cad +curve_remove_doubles +curve_tools +some of the functions from add_curve_simple).
I will change autor from crantisz to Michael Soluyanov.

@Michael Soluyanov (crantisz) Added your name.
@Spivak Vladimir (cwolf3d) great news, I will make a new task shortly.
Closing this task as resolved.