Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

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

View previous topic View next topic Go down 
AuthorMessage
Kpacnaja_Shapotshka



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

PostSubject: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   Mon 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
View user profile
Admin
Admin


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

PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   Mon 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
View user profile http://graphscad.forumotion.com
ChrisLT



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

PostSubject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression?   Mon 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
View user profile
Admin
Admin


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

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

will fix that. Thx ;-)
Back to top Go down
View user profile http://graphscad.forumotion.com
Admin
Admin


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

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

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




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

Back to top Go down
 
New switchcase node autosized and autorouted, not changable; meaning of bottom expression?
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Tree View: Expanding a node by searching for element by text using xpath
» WebArtz Story Writing Contest [Winner-Dawn]
» how to use Regular expressions in Web driver along with xpath???
» Ntshe yuav txog caij rov mus tsev lau.
» How do youe close friends (meaning relatives, significant others) deal with the migraine issues?

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