Page 1 of 1

Curvature tool with numerical display.

Posted: Mon Nov 15, 2004 4:47 am
by 7feet
AcouSvnt asked for it, and it's a handy thing, so here it is. I added a numerical display to the tool to let you know exactly what the curvature is on any point. Even if you have multiple points selected, you can find the curvature of any particular point by clicking near it. Also, you can modify the curvature by entering the value in the number box. This works for single and multiple points. While dragging will still progressively add or subtract curvature from each selected point, entering a number will set all selected points to the same curvature.

There were a few other things I did. First, I upped the maximum amount of curvature that you could give a point while dragging. It was set to .667, but I kicked it up to 3.0. If you go really high with the number, curves will start curling around themselves and doing all sorts of strange things, but it might be handy for some special purposes. When you enter a number, you can make it any ol' thing you want, and things can get really wierd. Your choice. For that matter, you can enter negative curvature values if you felt like it, but that goes south immediately and I won't guarantee that it won't crash Moho, or make you're file unreadable, or any other sort of evil.

Also, <ALT> clicking will deselect all points if you had multiple points selected. <CTRL> click will select all points on the layer. The point group dropdown works as usual.

I made up 2 files. The first:
SF_Curvature.zip
is to use as a separate tool.

the second:
lm_curvature.lua
is for using as a straight replacement for the default Curvature tool script. It seems just as stable as you'd like, but I'd still make a backup of the original.

--Brian

Posted: Mon Nov 15, 2004 5:37 am
by AcouSvnt
Man, you rock! Thanks!

Posted: Mon Nov 15, 2004 5:40 am
by sherlock
Thanks a million, Brian.

Posted: Tue Jan 10, 2006 1:31 pm
by Rai López
:shock: ...HEY! I NEVER said you THANK YOU for this?? :? I can't belive it...

Posted: Tue Jan 10, 2006 4:04 pm
by Rasheed
Yes, thanks a million.

It isn't like the usual handles as in most "draw" programs, but at least you now have a more exact measure what you are doing, even if you only use the numerical input as a visual cue. I think I understand why LM hasn't incorporated visible handles in the program, but this is the next best thing.

Including scripts in Moho is probably one of the best choices LM has ever made. I hope that some of the scripts will be included in the next release of Moho, so new users don't have to search the script forum or encounter seemingly limitations that were already lifted by these nifty scripts.

Posted: Wed Jan 11, 2006 4:42 am
by 7feet
I agree with you Rasheed. And I've already given LM my permission to use anything I've done in anyway he sees fit, including putting any of my scripts in the distribution. Maybe I should send him an actual letter to that effect. I'd actually really like some of these neat things being there out of the box. As more people start writing scripts, there's more and more ridiculously useful scripts around.

And I'm sorta surprised some of y'all never noticed this one. I put it up over a year ago, fer cryin' out loud ;)

Posted: Wed Jan 11, 2006 5:18 am
by bupaje
Thanks Brian. It works great.

Posted: Wed Jan 11, 2006 1:25 pm
by Rai López
HEY! I use it since the first day and all the days :)