Idea: Attach to nearest neighbor

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Idea: Attach to nearest neighbor

Post by dueyftw »

Script idea

Attach to nearest neighbor.

I find that when I'm drawing with add a point and other times when I think that all the points are connected but are not. I could use a script that looks at all the points that only have one connection, then connect to the nearest point. It would be given a range amount, so points wouldn’t be traveling across the screen.

Dale
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

It's there already.

It's called AutoWeld, and can be reached from the menu by Scripts/Other. It works on selected points, so just select all if you want.
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Post by dueyftw »

Ok, It only works on points that are really close. I need something with a little more range. Is there someone who could modified the script so points don't have to be on top of each other.

Dale
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

I agree dueyftw. The auto weld was a feature I suggested to Mike way back in the early Moho days to combat those darn loose points. The only roblem is it does'nt have an adjustable range. I wonder how hard it would be to adjust the existing script?

Cheers
D.K
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Autoweld could be modified pretty easy. Double, triple the current nearness for welds? Making it adjustable would require turning into a tool script or adding a popup menu.


But I just tested it, and it already does have a sort of adjustment. You see the estimation of nearness is based on screen coordinates. So if you select all and zoom way out, almost any points are now very close on the screen.

:D
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Wow!! sythsin75. You constantly astound me with your AS knowledge!!!

Thanks
D.K
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

:oops: I just enjoy the problem solving. Most of this stuff I don't know about until someone asks the right question and I go chasing after it. :wink:
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Post by dueyftw »

Thanks everyone. You think you know everything. Only to find you don't. Zooming in and out isn't a problem. I'll just use the slider on the wacom.

Dale
Post Reply