Graphscad
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeLatest imagesSearchRegisterLog in

 

 Proposed node type: multiple variables

Go down 
2 posters
AuthorMessage
ChrisLT




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

Proposed node type: multiple variables Empty
PostSubject: Proposed node type: multiple variables   Proposed node type: multiple variables Icon_minitimeSat 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
Proposed node type: multiple variables Attachmentvariables 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
Admin
Admin



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

Proposed node type: multiple variables Empty
PostSubject: Re: Proposed node type: multiple variables   Proposed node type: multiple variables Icon_minitimeSun 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
https://graphscad.forumotion.com
ChrisLT




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

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

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





Proposed node type: multiple variables Empty
PostSubject: Re: Proposed node type: multiple variables   Proposed node type: multiple variables Icon_minitime

Back to top Go down
 
Proposed node type: multiple variables
Back to top 
Page 1 of 1
 Similar topics
-
» Proposed node type: debug_aid
» Proposed node type: val_to_text
» How to create new node types
» Idea: Colour by name node
» Why does boolean node include translation?

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