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

 

 New switchcase node autosized and autorouted, not changable; meaning of bottom expression?

Go down 
3 posters
AuthorMessage
Kpacnaja_Shapotshka




Messages : 8
Date d'inscription : 2017-02-11

New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitimeMon 13 Feb - 1:53

Hi,

as I played around with the switchcasedemo example, I tried to insert another switchcase node .

The new switchcase node was autosized (number of cases) and autorouted means connected to random object nodes depending on the position I inserted the node. Strange and imo too much auto.

I see, you generate code on the fly and you cant have an unconnected switchcase node, but autoconnecting to random objects should be ommitted.

An alternative to autoconnecting to random object nodes would be to have a "system dummy autoconnect" object which every newly created switchcase node is connected to. After creation the user/programmer can alter the graphs and connect to the nodes, she wants to.

The number of cases should be asked from the user before creation or you create a "standard" switch case with one expression, a true and  a false input object (like  the if node) and possibility of adding cases (input expressions) with an e.g. plus button at the top of the node.
Removing unused (empty) expressions should also be possible.

What is the meaning of the bottom expression? I would have expected an "other" input object there, which is used, when none of the expressions are true.

Kpacnaja_Shapotshka
Back to top Go down
Admin
Admin



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

New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitimeMon 13 Feb - 22:27

if you leave last expression to blank, it's a 'true'.

if(exp1)
{
}
else if (exp2
{
}
else if(exp3)
{
}
else if(true)
{
}

AUtoconnect relies on initial position of the node and try to connect nearby inputs of same type.... not really smart and sometime confusing.... the best solution is perhaps to by in 'move' mode after creation of a node, showing 'future' connections.... realize that it's not a very interesting feature....
Back to top Go down
https://graphscad.forumotion.com
ChrisLT




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

New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitimeMon 13 Feb - 23:39

But, if you leave the last expression blank, you cannot enter an object for the 'else' case. You must edit it, then the yellow input object connector appears.
By the way, it would be a lot clearer if, instead of labelling the inputs 'expression1', 'expression2',... 'expression3' you labelled them 'if', 'else if' ,... 'else'.
Back to top Go down
Admin
Admin



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

New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitimeTue 14 Feb - 20:00

will fix that. Thx ;-)
Back to top Go down
https://graphscad.forumotion.com
Admin
Admin



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

New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitimeThu 16 Feb - 1:54

fixed. will be cool in next version
Back to top Go down
https://graphscad.forumotion.com
Sponsored content





New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Empty
PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Icon_minitime

Back to top Go down
 
New switchcase node autosized and autorouted, not changable; meaning of bottom expression?
Back to top 
Page 1 of 1
 Similar topics
-
» How to create new node types
» Idea: Colour by name node
» Node view not zoomable and navigatable on 2-button-mouse laptop
» resize node auto feature
» Proposed node type: val_to_text

Permissions in this forum:You cannot reply to topics in this forum
Graphscad :: Issues-
Jump to: