Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenSCAD - what is a node?

Tags:

openscad

I have noticed that the OpenSCAD documentation does not clarify whether the terms 'objects' and 'nodes' refer to the same thing or not. Objects are defined as 'building blocks', 'created by 2D and 3D primitives' and end with semi colons On the other hand nodes are operated on by transforms (e.g. child nodes; ). But since objects are also operated on by transforms it creates the perception that both terms refer to the same thing.

Please could someone define an OpenSCAD node and whether it is synonymous with a 2D or 3D object?

Regards

like image 367
awyr_agored Avatar asked Aug 16 '26 21:08

awyr_agored


1 Answers

When a scad file is compiled, the compiler interprets the script as a tree (often called a syntax tree). Nodes are components of this tree. Nodes can include primitives that directly produce objects, or they can include operations like translate that operate on objects.

Objects refer to stuff that gets rendered and the primitives that they come from. This includes the output of nodes in the tree.

like image 143
RagingRoosevelt Avatar answered Aug 19 '26 13:08

RagingRoosevelt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!