MoI discussion forum
MoI discussion forum

Full Version: Utility Scripts for analysis : FilterCurvesByLength

Show messages: All  1-11  12-20

From: mkdm
3 Oct 2017   [#12] In reply to [#8]
Hi Michael!

Thank you very much for your suggestion!

ASAP I'm going to try what you told me.

Also, thanks for "<moi:DistanceInput>". I already did it.

Have a nice day!
From: mkdm
3 Oct 2017   [#13] In reply to [#8]
Hi Michael end everyone.

Michael...your suggestion worked very well!!! Thanks a lot!!

I've done FilterCurvesByLength v. 0.3 beta!

Now I don't have time to explain all features and possible way of use my latest script,
but for the moment this is a screen capture of its UI :



Later I will post some video demostration.


Ciao!
From: mkdm
5 Oct 2017   [#14]
Hi Michael and everyone.

...Almost done !!!

This is the preview of my "FilterCurvesByLength" v. 0.4 beta.

It runs decent fast also with 50K-80K curves and edges. tested both with my laptop i7-4790K and Nvdia Quadro K3100M and my
PC deskotp i7-7700K with Gtx 1080 Ti.

For the moment I only have the time to post a brief demo video.

Please watch it at : http://take.ms/a7xuM




I only have to optimize the Js code a little bit.

ASAP I'm going to post the new version of the script.

Bye.
From: Frenchy Pilou (PILOU)
5 Oct 2017   [#15]
The store's case is like a "Copy" inside the ClipBoard ?

Selection(s) given by the slider can be Copied, Moved, Erased ?
From: mkdm
5 Oct 2017   [#16] In reply to [#15]
Hi Pilou.

@You : "...The store's case is like a "Copy" inside the ClipBoard ?..."

This is a surprise !
No...in all seriousness, I have already planned to write a brand new plugin : "SelectionMaster " !!

"SelectionMaster" will be a very useful tool. You will see....

@You : "...Selection(s) given by the slider can be Copied, Moved, Erased ?..."

I'm sorry but I didn't understand this question :)

The main purpose of "FilterCurvesByLength" is to give the ability to SELECT curves and edges based on their length.
All it does is to produce a selection of objects.
What you do later with that selected curves/edges is up to you.

Anyway, I'v already planned to add the chance to export the filtering information to a txt file :
"Shortest, longest, amount of filtered curves, etc..."

Stay tuned!

Ciao.

Marco (mkdm)
From: Frenchy Pilou (PILOU)
5 Oct 2017   [#17] In reply to [#16]
<< I'm sorry but I didn't understand this question :)
= Can we use the the selection for anything?

so you give the answer! :)

<< The main purpose of "FilterCurvesByLength" is to give the ability to SELECT curves and edges based on their length.
From: mkdm
5 Oct 2017   [#18]
Hi everyone.

Before upload the new version of the script, here's another use case : remove holes from surface

This is only a simple example.

Here's the video : http://take.ms/sDO3h



Bye!
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-11  12-20