MoI discussion forum
MoI discussion forum

Full Version: Utility Scripts for analysis : FilterCurvesByLength

Show messages: All  1-18  19-20

From: mkdm
11 Feb 2018   [#19]
Hi everyone!

The very interesting new thread by Brian "Curve Explorer, MoI4 only" (at http://moi3d.com/forum/index.php?webtag=MOI&msg=8818.1) reminded me that many months ago I have started to code a never finished new custom command dedicated especially to 2D workflows : "FilterCurvesByLength"

I recovered now the latest alpha version that I was coding months ago.
It was never finished but was at a very good stage, so now for the moment I want to publish here a demo of its actual state and as soon as I can, I want to clean up its code a little bit and publish the latest alpha.

Of course anyone will be free to use it for whatever reason or inspiration because I don't know if I will have time to finish its coding.

This little project was only a first attempt to create a very complex and universal "Selection Master", a plugin that I have in mind for a very long time,
dedicated to filtering almost everything in Moi, based on various rules and inputs : mass of solid, length of curves, area of surfaces, and so on....

But I think I was a little bit too "upbeat" because I think that actually this kind of plugin goes beyond my possibilities :)

Anyway...it's an idea that I wanted to share with you.

Maybe there's someone that want to put his hands on keyboard and start to coding :)

But... cut to the chase! This is the demo of the current version of "FilterCurvesByLength".

During next days I will post also the code.

Here's a demo video (114 Mb) : http://take.ms/mDpcW

And this is a screenshot.



The bottom section of the UI is currently reserved to two custom scrollable listview showing many statistic data of the current filtering.
At the time of my latest coding of the command, I planned also to allow the user to save the results of the filtering in a txt file in order to read it later.
Also I planned to give the user the chance to save "filtering configs" so instead configuring every time a combination of filters, the user can load the desired config.

All idea that I never implemented :)

Ciao!

Marco (mkdm)
From: mkdm
14 Feb 2018   [#20]
Hi everyone!

This is the zip file of my "FilterCurvesByLength" custom command, alpha version v. 0.5, Oct 07 2017.

http://take.ms/rwm9Q

It works on both V3 and V4.

For V3 and V4 you can unzip the archive and copy the two files into the standard "commands" folder of Moi

For V4 you can decide to copy the two files into the new C:\Users\<user>\AppData\Roaming\Moi\commands

To use this custom command you have to select at least 1 edge or curve.
It works on both kind of entities.

Keep in mind one thing before playing with this command.

As you can see, its UI needs a minimum amount of room to be shown properly, on my default Windows 10 config with default fonts, this room is "21em".

This size is related to the width of the "flex_vbox" into the file "C:\Program Files\MoI 4.0 beta Feb-9-2018\ui\SidePane.htm"







This custom command has almost nothing special as I said, and its Javascript code has no fancy in it.

It's already pretty fast but it could be optimized much more.

Anyway, besides its usefulness (I've written this plugin with 2D workflows in mind) it has at least one special feature :)
If you will test it you will see.

As you can see its UI has two main sliders, "Min" an "Max", referring to the length that we want to use as main "filter"

Well, the tricky thing is that the lower and upper limit of both sliders are automatically calculated when the command starts, based on the selected entities.

That's all.

Keep in mind that I never finished the coding of this plugin and it has for sure some hidden bug.
But for what I've tested so far it worked very well.

Enjoy!

Show messages: All  1-18  19-20