Remove tiny face on object
 1-4  5-24  25-32

Previous
Next
 From:  Michael Gibson
8604.25 In reply to 8604.24 
Hi Marco,

> I was referring to the "hypothetical" script that doesn't exist yet :)

Ok, but I'm sorry it's not practical for me to do a lot of work to optimize something that's just hypothetical.


> Anyway, let's get rid for the moment of the area calculation and let's say that I simply want to
> filter a set of curves based by length (in range).

Is this just another hypothetical situation again though? What modeling task are you trying to accomplish where you need to do this?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8604.26 In reply to 8604.25 
@You : "...Is this just another hypothetical situation again though? What modeling task are you trying to accomplish where you need to do this?..."

No Michael. It's not hypothetical :)

This is very frustrating...

Unfortunately you don't speak Italian and I'm forced to use English that is not my language.

If only I could speak with you in Italian I can say that in less than 5 minutes I could explain what I want to do.

It's very difficult to me to write always in English (or trying to do so).

Please remember that in one of my previous message I said that I was attempting to create
a script that should have filter a bunch of surfaces based on their area, within a loop and with fast execution.

This is because I want to create a useful script for cleaning up models with very tiny surfaces.

And also I want to create some utility script to find and select super tiny edges or curves,
very useful also for cleanup purposes.

And to do all that things I need to execute code in loop as fast as possible.

Is for this reason that I asked you to expand actual Moi's Api with some pre-compiled new filtering methods.

I hope this way I made myself clear :)

Thanks.

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8604.27 In reply to 8604.26 
Hi Marco,

re:
> And to do all that things I need to execute code in loop as fast as possible.

But no, this isn't correct - if you are doing that just a couple of times a day it is not necessary for the code to execute as fast as it possibly can, it only needs to execute in a reasonable time for accomplishing the task at hand.

For example if it currently takes 1 second to execute the script, optimizing it down so it's instantaneous will only save you a tiny amount of time if it's only performed infrequently.

So the actual practical usage is an important factor, it's not worthwhile to put a lot of effort into optimizing things that are not causing an actual problem in real life use.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8604.28 In reply to 8604.27 
@You : "...So the actual practical usage is an important factor, it's not worthwhile to put a lot of effort into optimizing things that are not causing an actual problem in real life use.

...For example if it currently takes 1 second to execute the script..."

If I want to use the script I'm attempting to create in order to cleanup a model made by thousands of curves (or edges),
specifying the length (in a range) dragging a slider, I don't think that we are talking about 1 second...I think much longer.

Anyway, I want to thank you for your suggestion and I will write here the results of my speed test of this kind of codes (loop).

Please consider that execution time in loop is very important if I want later to translate this cleanup scripts into nodes
for P. Elephant.

There, usually we drag slider to easily input values, and when you drag a slider and the code is not optimized,
the slowness is very evident.

This is what I want to do.
First write this cleanup script and then translate them for P. Elephant.

Thanks a lot for your support.

Marco (mkdm)

EDITED: 29 Sep 2017 by MKDM

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8604.29 In reply to 8604.28 
Hi Marco, so for the slider case it should definitely work to get the lengths once when it first starts up, and then refer back to that when the sliders are manipulated rather than doing it every time.

And if a loop through the cached lengths is taking significant time for the loop itself it should also be possible to optimize the script in other ways that are specific to its own particular needs. For example after gathering the lengths it could sort them so it could do a binary search rather than a full loop. But I would recommend a simple approach first.

These methods are appropriate to implement within the script itself, I would not expect to implement them in MoI's API directly. The stuff at the API level is more for general purpose stuff that may be used by many different scripts.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8604.30 In reply to 8604.29 
@You : "...For example after gathering the lengths it could sort them so it could do a binary search rather than a full loop..."

Yes! I was thinking about this solution too.

Thanks a lot for suggestion.

@You : "...I would not expect to implement them in MoI's API directly..."

OK Michael. Understood :)

I hope that for V4 you could add at least "getArea()" method.....but I hope more...

Thank you very much for this very interesting conversation.

Have a nice day.

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8604.31 In reply to 8604.30 
You're welcome Marco!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  mkdm
8604.32 In reply to 8604.31 
Hi Michael.

So...after the long conversation I've produced some little thing.

I hope that this is only the first step :)

Please read it at http://moi3d.com/forum/index.php?webtag=MOI&msg=8608.1

Thanks a lot.

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-4  5-24  25-32