How about a Cut-out tool?

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
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

How about a Cut-out tool?

Post by Rasheed »

If you have created a shape, you sometimes want to create a hole in that shape. At this moment, you have to remove the outline and fill of the shape, draw a new curve (for the cut-out hole) inside the closed curve, select all points of both curves and create a shape. This seems to me to be a chore for a tool script.

I'm warning you, if you scripting guys don't create it soon, I will ;)
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

To show what I really want, here some demo screenshots:
Image
original shape

Image
cut-out curve created (can also be an open curve) each next point with a single mouse click.

Image
when the mouse is double-cllcked this is the result (could also be pressing the spacebar, which is more "Moho-like")

Now I come to think of it, perhaps a menu script to cut out everything that is inside a selected curve might do just as well (of even better).

So, if possible, a directe cutting tool for shapes and a menu script for more elaborate cutting, using existing selected points (and their curves).
User avatar
mr. blaaa
Posts: 622
Joined: Sun Jul 31, 2005 12:41 am
Location: ---
Contact:

Post by mr. blaaa »

my support

it would definitely be a great addidtion and i hope someone can do it ;-)
Image
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

A 2D version of BOOLEANS!!! :D (or something so...) Definitely I like the idea and I think it can likes LM too! :)
User avatar
KenW
Posts: 129
Joined: Tue Jul 17, 2007 8:08 pm
Location: Virginia, USA
Contact:

Sounds like a good idea!

Post by KenW »

I realize this is a very old request but i find it could still be a quite useful script. Has anything like this been done in scripting ?.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This idea seems to have 2 different elements.

1) cutting holes without losing the fills and stroke shapes.

2) cutting THROUGH shapes and maintaining fills and strokes AND maintaining the curature of the shape (an assumption on my part since the example is peaked corners only).

The first one could be done I think. It would take some tricky coding. Whenever a line is cut or broken the shape "vanishes". Pooof! Gone. You would need to save that information in the script before breaking the shape... then add points, reconnect, create a new shape... add the settings from the old one... you can see what's involved. So that would be the FIRST option. It is doable and it most probably would work.

The second option however would be kind of difficult to do.

Well... it wouldn't be any harder to code the process of cutting and reconnecting as the first one but the BIG problem is the curves. If you "cut out" a section of a circle the circle will lose it's shape due to the nature of AS curves.

The hard part comes in when you want to keep that shape and try to figure out where to put NEW points to maintain the curvature. It would never match perfectly... the shape would ALWAYS change slightly or even more than slightly depending on the shape. This isn't Adobe Illustrator after all. ;)

If all you want is the ability to cut shapes without worrying about maintaining the curves then it would be possible.

At the moment, I have no dying need or desire for such a tool... so... my motivation to create it just isn't there. I am perfectly happy doing it the "hard way". I figure the amount of time saved by this script wouldn't really be as much for me as creating it... uh...

... well... okay maybe not. Fixing the shapes by hand is very easy... takes no brain activity, but just the thought of writing the script makes me very sleepy. ;)

Maybe someone else would like to take a stab at it.

p.s. If I get bored after finishing my current script list... I will take a look at this and see. Maybe a new version of AS will out by then. ;)

-vern
User avatar
KenW
Posts: 129
Joined: Tue Jul 17, 2007 8:08 pm
Location: Virginia, USA
Contact:

Post by KenW »

Thanks Vern,

i appreciate your thoughts and idea's on it. Its not an essential tool but would certainly help in some instances. thanks!
Post Reply