Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Why does boolean node include translation?

View previous topic View next topic Go down 
AuthorMessage
ChrisLT



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

PostSubject: Why does boolean node include translation?   Wed 15 Feb - 19:40

I don't see why some nodes, such as boolean, include translation. Is it just to reduce the number of nodes needed in a model? I note that the translation operation is built in to self.modulebegin. Is anything else built in to it?
Back to top Go down
View user profile
Admin
Admin


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

PostSubject: Re: Why does boolean node include translation?   Thu 16 Feb - 1:53

yes. it's to reduce nodes count. When i designed multicopter, i saw that translate node is often needed between each operation. graph is cleaner with this

self.modulebegin can deal with translation (tx,ty,tz), rotation(rx,ry,rz), scale (sx,sy,sz) and mirror (mx,my,mz), Take a look on transform nodes. In most cases default values of theses values are '0' (1 for scale), so no code is generated. with these parameters, it easy to add transform code in a node and maintain current matrix of object (usefull when you make transform in object local space).

generated code always output a module with nodename, and a function to get current matrix of this module.

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: Why does boolean node include translation?   Thu 16 Feb - 19:47

Thanks for the explanation. I had been wondering about creating a general purpose transform node to encompass all those operations, but it would have to perform them in a specified order, so perhaps wouldn't be any better than chaining together the existing nodes. However, it might be nice to be able to create a sort of macro transform node that could then be applied to many objects without first combining them. I don't have a specific use in mind - just trying to think what might be useful to others.
Back to top Go down
View user profile
Admin
Admin


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

PostSubject: Re: Why does boolean node include translation?   Thu 16 Feb - 23:24

yes it's possible. but a such node would have many inputs, and you never need to make all tranformation operation on an object. in fact, for people really knowing 3D maths, it could be interesting to have a 'matrix' tranform node. But even if i have been working in 3D for many years, i think a matrix node is a little bit hard to setup.
Back to top Go down
View user profile http://graphscad.forumotion.com
Sponsored content




PostSubject: Re: Why does boolean node include translation?   

Back to top Go down
 
Why does boolean node include translation?
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
» Forumactif Edge - Romanian Translation (Partial)

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