MoI discussion forum
MoI discussion forum

Full Version: Scripts for 2D Workflows

Show messages:  1-20  21

From: mkdm
26 Oct 2017   [#1]
Hi Moiers!!

Finally!! :)

After many tests and with the precious advice and suggestions from Michael I can release the 1.0 beta version of these two scripts :

1) SelectCurvesByContainer

2) LassoSelectCurves

I wrote them pointing at in particular to 2D workflows involving Moi and any vector graphic software, like for example Affinity Designer,
just to name my favorite :)

Both scripts has no UI, because they're scripts and not commands, and both perform almost the same tasks but in two different ways.

You can run them using custom buttons or shortcuts.

Each script can be used in 4 different modes, common to both :

Mode 1) : Holes
Mode 2) : Open Curves
Mode 3) : Closed Curves Partially Projected
Mode 4) : ALL

----------------------------------------------------------------------------------
START OF "IMPORTANT SECTION"

Before using these script, please keep in mind these things :

1) To find what and what not can be considered enclosed, totally or partially, into the "container" curve or into the "lasso" curve, I'm using
the "Project" command with "Direction" method.
For the moment I'm using a very coarse and simple way to calculate the direction.
This implies that if the "lasso" curve that has been drawn or the "container" curve that was selected, is not parallel to a standard plane (standard views)
then the "project" will not be executed and the execution of the scripts will not produce any results.

For the next version of the scripts I think I should calculate the "normal" of the target surface of the "project"


2) Keep in mind that these scripts, as I said, where designed for 2D workflows. Only curves are taken into account.

3) I hope that many users will download and test these scripts in many situations.
Please, give me a feedback of errors and/or strange behaviors.
YOUR SUPPORT IS VERY ESSENTIAL :)

END OF "IMPORTANT SECTION"
----------------------------------------------------------------------------------

Ok!

This is where you can get the scripts : http://take.ms/P1g5y

Unzip the file and you will get these two folders :


This is the contents of the folder "repository2dworkflow"


This is the contents of the folder "scripts"


Copy both folders into your Moi installation directory.
You will be asked to overwrite the "scripts" folder.
Click "yes". It contains the 8 files that will be added to your "scripts" folder.



*******************************************************************
Tomorrow I will post the detailed instructions and descriptions for all the scripts.

For the moment I let you these short instructions :

1) How to use SelectCurvesByContainer variants :

SelectCurvesByContainer_ALL.js
SelectCurvesByContainer_ClosedCurvesPartiallyProjected.js
SelectCurvesByContainer_Holes.js
SelectCurvesByContainer_OpenCurves.js

Deselect all, then select one single "container" curve. This curve MUST be planar.
Then select ALL other curves that you want to check.
Then run the scripts.
At the end of elaboration, if something was found, you will have the "container" curve selected along with all the curves that "passed" the test.


2) How to use LassoSelectCurves variants :

LassoSelectCurves_ALL.js
LassoSelectCurves_ClosedCurvesPartiallyProjected.js
LassoSelectCurves_Holes.js
LassoSelectCurves_OpenCurves.js

Deselect all, RUN the script.
In one of the standard Moi's views draw a "lasso" curve. If the curve is open it will be automatically closed.
At the end of elaboration, if something was found, you will have the "lasso" curve in faint mode and all the curves that "passed" the test will be automatically selected.

You can also preselect something before run the script.
If you do so then the "lasso" curve will check ONLY the preselected curves.
This method is much faster if you have thousands of curves in scene or if your computer is slow.



Anyway, that's all for the moment!

******************************************************************
********************* IMPORTANT ***********************************
******************************************************************

This is the demo video : http://take.ms/qC0pH

Other demo and use cases will follow

And this is a screenshot :






Ciao!!
From: moritzbock (MORITZ)
27 Oct 2017   [#2] In reply to [#1]
Hallo Marco,
die gepackten Scripts (.ZIP) lassen sich leider nicht öffnen.
Beste Grüße
moritz

Hello, Marco,
the packed scripts (. ZIP) cannot be opened.
Best regards
moritz

Image Attachments:
Bildschirmfoto 2017-10-27 um 15.09.00.png 


Message 8649.3 was deleted


From: mkdm
27 Oct 2017   [#4] In reply to [#2]
Hi MORITZ and everyone!

----------------- IMPORTANT -----------------


I noticed that I'm having some issues with zip files and my Monosnap account.

Here's a sharable link on my Google Drive where you can get the package without problems :

https://drive.google.com/open?id=0BwR81vxCXRhSZXVhSEtidTVqVHc

Now all should be fine.

Please, let me know if you have any issue.


Ciao!

Marco (mkdm)
From: mkdm
28 Oct 2017   [#5]
Hi everyone!

I wrote this short PDF containing short instructions on how to use the 2D Workflows scripts.

The document echoes the things I wrote into my first post, but in this way you can get all in one place without the need to find that post.

You can get the PDF here : https://drive.google.com/open?id=0BwR81vxCXRhSR0xkVHk2NlpCNzg

Have a nice day.

Ciao!
From: mkdm
16 Feb 2018   [#6]
Hi everyone

"provoked" :) by the latest thread of Ralf ("Is there a plugin script to... at http://moi3d.com/forum/index.php?webtag=MOI&msg=8828.1)
I post here other two old scripts that I've done many moths ago, especially dedicated to 2D Workflows, but you can use it in any way.

The scripts are :

1) ExtractCurvesControlPoints
2) ExtractCurvesSharpControlPoints

Here's the zip file : http://take.ms/0ks1P

They are based on "Max Smirnov's DelCorners, v.1.0.2015.09.09" with some slight modification.

The names are self-explanatory :)

1) Given a bunch of curve (not edges) selected, single or joined curves, the scripts create the "points" that represent the actual "control points" of the input curve.
You can select one ore more curves as input.

2) Given ONE (only one) curve (not edges) selected, single or joined curve, the scripts create the "points" that represent the actual "SHARP control points" of the input curve.

Here's the zip file : http://take.ms/0ks1P

Unzip and copy the to scripts into the Moi's "scripts" folder.

I use these scripts often to generate point to use as input in Node Editor's node for further elaboration.
You can do thousands of different things with these scripts :)

Here's a demo video : http://take.ms/Sud3l


Ciao!
From: mkdm
16 Feb 2018   [#7] In reply to [#6]
P.> ...forgot to say...
They works well both with V3 and V4.
From: Frenchy Pilou (PILOU)
16 Feb 2018   [#8]
Can you put a little concept image ? ;)

It's better than an arrid text for explain in half second what is the plugin! ;)
From: Franz
16 Feb 2018   [#9] In reply to [#8]
Hi Marco!

Thanks for posting, but I think I have done something wrong...
Please give me some instruction.



Thanks
Franz

Image Attachments:
Selection_.jpg 


From: mkdm
16 Feb 2018   [#10] In reply to [#8]
Pilou, if you see my most recent posts you will find almost always a video tutorial in them, that are better than a simple image.
It can show things in action :)
From: mkdm
16 Feb 2018   [#11] In reply to [#9]
Hello Franz and everyone!

Here's and updated version of my "SelectCurvesByContainer" familiy scripts.

It is updated to "Nov 02 2017" and it's the most recent version that I wrote before abandoning the project for lack of free time :)

Please, follow these instructions :

If you have previous version of these scripts this shouldn't be a problem because these files have same names, so they will be overwritten,
but if you want to be sure to clean up everything, first delete every files inside the "scripts" folder whose name starts with "SelectCurvesByContainer",
and then delete the "repository2dworkflow" folder.

Then, follow these steps :

1) Download this zip files : http://take.ms/IIZyA

2) Unzip and you will get these four files :
SelectCurvesByContainer_ALL.js
SelectCurvesByContainer_ClosedCurvesPartiallyProjected.js
SelectCurvesByContainer_Holes.js
SelectCurvesByContainer_OpenCurves.js

Copy them inside the Moi's "scripts" folder


3) Download this zip files : http://take.ms/hYGfL

4) Unzip and you will get this folder : "repository2dworkflow"

Copy it inside the Moi's root folder, at same level of folders "commands", "scripts", "ui" as shown by this image :







That's all folks! :)


Let me know if you have still problem.

Ciao!
From: Frenchy Pilou (PILOU)
16 Feb 2018   [#12] In reply to [#10]
<< that are better than a simple image.

Sure for the use but not for the subject!:

Advantage of an image :
I a glanze you can see if you are interested against read a text or launch a video! ;)
When you make thousend things in the same time, any times winned is free times for make other things!
From: mkdm
16 Feb 2018   [#13] In reply to [#12]
Ok, Pilou.

Next time I will post also some images.

Ciao!
From: mkdm
16 Feb 2018   [#14]
Hello Franz and everyone!

Here's also and updated version of my "LassoSelectCurves" family scripts.

It is updated to "Nov 02 2017" and it's the most recent version that I wrote before abandoning the project for lack of free time :)

Please, follow these instructions :

If you have previous version of these scripts this shouldn't be a problem because these files have same names, so they will be overwritten,
but if you want to be sure to clean up everything, first delete every files inside the "scripts" folder whose name starts with "LassoSelectCurves",
and then delete the "repository2dworkflow" folder.

Then, follow these steps :

1) Download this zip file : http://take.ms/x4PyQ

2) Unzip and you will get these four files :
LassoSelectCurves_ALL.js
LassoSelectCurves_ClosedCurvesPartiallyProjected.js
LassoSelectCurves_Holes.js
LassoSelectCurves_OpenCurves.js

Copy them inside the Moi's "scripts" folder


3) Download this zip files : http://take.ms/hYGfL

4) Unzip and you will get this folder : "repository2dworkflow"

Copy it inside the Moi's root folder, at same level of folders "commands", "scripts", "ui" as shown by this image :





Ciao!
From: Frenchy Pilou (PILOU)
16 Feb 2018   [#15]
<< Next time I will post also some images.

Cool! A Gif animated is also an "image"!
Nothing to load for the user!
Maximum efficacity!
From: Mindset (IGNITER)
16 Feb 2018   [#16] In reply to [#1]
Holy Wonderful!
Marco, Thank you SO VERY MUCH!
From: Franz
17 Feb 2018   [#17] In reply to [#14]
Thanks Marco, everything's working now!
From: mkdm
17 Feb 2018   [#18] In reply to [#17]
Perfect!!

If you want to write everything related to "Lasso Select and SelectCurveByContainer", please use the new thread I created yesterday, instead writing to the old thread "Scripts for 2D Workflows" that I won't follow anymore.

The new thread is at : http://moi3d.com/forum/index.php?webtag=MOI&msg=8830.1

Thanks and have a nice day :)

Marco (mkdm)
From: mkdm
17 Feb 2018   [#19]
...little mistake in my previous post....

not "If you want to write anything..." but "If you want to write everything..."

:)
From: Franz
23 Feb 2018   [#20] In reply to [#1]
Hallo Marco!

Thanks for your advice. I especially like the utility-list and command+script-history you use. Can you give me a tip where I could get this?

Thank you in advance.
Franz

Image Attachments:
History_.jpg 


Show messages:  1-20  21