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

 

 resize node auto feature

Go down 
2 posters
AuthorMessage
ChrisLT




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

resize node auto feature Empty
PostSubject: resize node auto feature   resize node auto feature Icon_minitimeThu 16 Feb - 1:13

The current resize node does not implement OpenSCAD's auto feature. I have extended it to do so. This allows dimensions to be unchanged, set to specific sizes or scaled proportionally to some other dimension.
For instance, to set an object's x extent to 15, scale in y proportionally to that, leave z unchanged, you resize([15,0,0],auto=[true,true,false])

It is well described in the OpenSCAD manual. I have tried to put a brief description in the hover text.
I have also added a second line of description to the scale node to make clear that it scales by specified scale factors, whereas resize sets absolute size.
I have no idea what the world/object/local flag does.
Attachments
resize node auto feature Attachmentresize_node.zip
ChrisLT's resize node with auto scaling feature, also scale node with edited hover text.
You don't have permission to download attachments.
(2 Kb) Downloaded 1 times
Back to top Go down
Admin
Admin



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

resize node auto feature Empty
PostSubject: Re: resize node auto feature   resize node auto feature Icon_minitimeThu 16 Feb - 2:12

ok. will fix that and check about local and object space.

theoricaly, a cube rotated of 45 deg in Z axis and in world space should be scalable in local x axis.
Look at picture : world scale after rotation give different result than scale in object space after rotation.

This is true for each transfom, and very powerfull (in multicopter example, i can 'post' tilt motors with local rotation, without worrying of previous tranforms (rotations of arms around center).
with openscad, all tranforms are always in 'world' space.... and it leads to headache when you have a cascade of previous heterogeneous transforms (rotation and translations).

To be able to have this functionnality, graphscad always generate code to be able to get current transform matrix (4x4) of an object node in the graph.

It allows creation of nodes like 'lookat', that deal with previous transformation to make a correct aiming, even if you object is rotated, and not in center of world.

when you make some joining operations (typicaly a boolean), current matrix of output node will be the matrix of first input object connected to the node.


resize node auto feature Object10
Back to top Go down
https://graphscad.forumotion.com
ChrisLT




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

resize node auto feature Empty
PostSubject: Re: resize node auto feature   resize node auto feature Icon_minitimeThu 16 Feb - 19:34

Interesting explanation. So, these spaces are to allow you to operate on an object as though it was still in its original orientation. I thought they must implement a feature of OpenSCAD that I had not learned, but actually it is a new feature you are adding on top of OpenSCAD. I guess this explains all the matrix functions that GraphSCAD creates.
I haven't looked at lookat. I will do so.

Back to top Go down
Admin
Admin



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

resize node auto feature Empty
PostSubject: Re: resize node auto feature   resize node auto feature Icon_minitimeThu 16 Feb - 23:19

yes. this is a feature asked in openscad for long now. but still not present. It's not possible just cause openscad can't do it cause it's not really a procedural language : all is globally evaluated, and it s not possible to get intemediate results to use them. That why variable assignation is so hard to understand in openscad.
Back to top Go down
https://graphscad.forumotion.com
Sponsored content





resize node auto feature Empty
PostSubject: Re: resize node auto feature   resize node auto feature Icon_minitime

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

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