Parametric

Next
 From:  andras
8562.1 
Hi Michael,

I have a vision about a parametric script or plugin. It can be accomplished for Rhino by using c# and by javascript it might be possible in moi as well.

It would require three main feature;
1. Groups to group object together after new parameters are given.
2. Attach User texts to objects, surfaces, lines
3. Works parallel with modelling to update model.

I am talking about basic parametric features (not interactive methods) such as parametric Booleans, Loft etc. Basically a history time line that is stored in a script file. each parametric object would have a script file.

I would suggest that three features in moi v4.
  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
8562.2 In reply to 8562.1 
Hi andras, probably #1 and #2 will be possible to add in for MoI v4 during the beta test period. However your #3 is pretty vague and could require a large amount of work to design and implement. So I'm pretty unsure about that part. I would need a lot more specific details on what you need for that one before I'd be able to guess whether it would be possible in v4.

- 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:  andras
8562.3 In reply to 8562.2 
Hi Michael. I believe, alternatively a script timer can work as well. A script that calls the parametric script in every 0.5sec. I think it is feasible on script level.
I am just thinking on the idea. In rhino it is possible to create a plugin even script but in terms of user experience and modelling workflow, plugins can be a better choice.
I willing to create it in Rhino and then in moi.

EDITED: 24 Aug 2017 by ANDRAS

  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:  Michael Gibson
8562.4 In reply to 8562.3 
Hi andras you can actually set up a script timer now if you want, you can do it by using the HTML DOM on one of the UI panels. You can do anything that's available in HTML in those UI panels and that includes setting up timers same as how it works in script on a web page.

Here's an example that inserts a label element after the File menu button on the bottom command bar, and sets a timer that's triggered every 0.5 seconds to increment and update the label:

script: /* timer demo */ var dom = moi.ui.commandBar; var filebtn = dom.document.body.getElementsByTagName('moi:CommandMenuButton')[0]; var span = dom.document.createElement('span'); span.id = 'timerlabel'; var script = dom.document.createElement('script'); script.innerText = 'window.g_counter = 0; window.setInterval( function(){ timerlabel.innerText = g_counter++; }, 500 );'; filebtn.insertAdjacentElement( 'afterEnd', span ); filebtn.insertAdjacentElement( 'afterEnd', script );

One thing to note though is that having a script run continuously like this could have very negative performance consequences if it's doing any intensive calculations.

- 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
 

Reply to All Reply to All