Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Proposed node type: multiple variables

View previous topic View next topic Go down 
AuthorMessage
ChrisLT



Messages : 45
Date d'inscription : 2017-01-30
Localisation : Newbury, Berkshire, England

PostSubject: Proposed node type: multiple variables   Sat 18 Feb - 23:59

I like the way the boolean node expands to allow more than two inputs.
You often need more than one variable, so I have extended node_variable and node_variable2d to behave the same way.
I call the new nodes node_variables and node_variables2d. Imaginative, eh?
The attached zip file contains the .py files to go into the plugins folder
Also .png files that go in the icons folder. These, by the way, show the $ prefix that all variables declared in this way need.

I note that global parameters declared with node_parameter have global scope, and the control variables ('i' to 'n') of node_for are passed as parameters to their input objects (and their parents...) so do not need to be 'special variables' with a $ name prefix.
But the way to pass parameter values to modules and functions in other circumstances is to use 'special variables', identified by having names starting with '$'. This is why the existing node_variable and my node_variables force variable names to start with $.
Incidentally, node_variable creates local variables, not globals as it claims.
Variable names declared in a node_variable (or variables or 2d) can be reused elsewhere in the model. The scope of each is only the objects, operations and transformations that form the input to that variable node.
Attachments
variables node.zip
ChrisLTs proposed nodes that declare multiple variables in one node
You don't have permission to download attachments.
(14 Kb) Downloaded 4 times
Back to top Go down
View user profile
Admin
Admin


Messages : 59
Date d'inscription : 2017-01-08

PostSubject: Re: Proposed node type: multiple variables   Sun 19 Feb - 23:25

that very cool. happy to see some new nodes . Can i include this in the next version chris ?
Back to top Go down
View user profile http://graphscad.forumotion.com
ChrisLT



Messages : 45
Date d'inscription : 2017-01-30
Localisation : Newbury, Berkshire, England

PostSubject: Re: Proposed node type: multiple variables   Mon 20 Feb - 12:31

Certainly, please include it and any other nodes or examples I have submitted here.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Proposed node type: multiple variables   

Back to top Go down
 
Proposed node type: multiple variables
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» two variables in one variable
» I need solution for Multiple FCK Editor for Selenium IDE...
» Setting & getting variable values
» [Help] how to add multiple testcases in a TestSuite through Selenium IDE
» how execute multiple tests in TestNg using ant?

Permissions in this forum:You cannot reply to topics in this forum
Graphscad :: show your creations-
Jump to: