
We really want to take only two steps:
a. select the shape you want to break off
b. execute some script to separate the compound shape into two shapes
At the moment, you'll have to take these steps:
1. copy the style of the shape you want to break off
2a. select the points of this shape
3a. copy and past the curve
4a. fill the curve, to create a shape
5a. paste the style from step 1 to this new shape
2b. delete the first connecting line segment
3b. delete the second connecting line segment
4b. select the points of the now separate curve
5b. delete the separate curve
That is a lot of steps, which takes a lot of time. It would be nice if we had some menu script to do only steps a and b. Now, that is just the plan for the new script we are going to write.
The user has selected the points of a curve which have to be converted into a separate curve and then the script has to sort out the rest and create two separate shapes. Of course, the script has to be intelligent enough not to delete all the selected points, but rather follow a recipe like in the steps 1, 2a-5a, 2b-5b.
I will not go into the script any further. I just wanted to let you know what I was preparing as a new tutorial for the Scripting forum.
Edit: I changed the title of this post, because it is really an announcement, not the actual tutorial. I think I'll create a Lua section in my homespace and put some general Lua and Moho scripting theory in there as well. That will save LM some bandwidth.