Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

module example001() root_chain: vector of polyset, matrices, types and labels

{ root_norm_term highlights_chain
background_chain o dump()
function r_from_dia(d) = d / 2; highlight_terms CsgTerm DIFF o make cache ID
background_terms root_raw_term
o Check cache
module rotcy(rot, r, h) {
o Render node
rotate(90, rot)
o Update cache
cylinder(r = r, h = h, center = true);
}

difference() { CSGTermEvaluator
CsgTerm DIFF CsgTerm P
sphere(r = r_from_dia(size));
"n13" CGALEvaluator
rotcy([0, 0, 0], cy_r, cy_h);
rotcy([1, 0, 0], cy_r, cy_h); * a cache ID must
rotcy([0, 1, 0], cy_r, cy_h); be available for
} each node (i.e.
dump+cache)
size = 50; CsgTerm DIFF CsgTerm P
hole = 25; "n10"

cy_r = r_from_dia(hole);
cy_h = r_from_dia(size * 2.5); CsgTerm P CsgTerm P AbstractNode absolute_root_node
root_node
} "n4" "n7" "" root_inst

example001();
AbstractNode
last_compiled_doc
example001

CsgNode
parse() evaluate()
difference
root_ctx

PrimitiveNode AbstractNode AbstractNode AbstractNode


sphere rotcy rotcy rotcy

Module
root_module
main TransformNode TransformNode TransformNode
rotate rotate rotate

ModuleInstantiation PrimitiveNode PrimitiveNode PrimitiveNode


Module example001 cylinder cylinder cylinder
example001

Function Module ModuleInstantiation


r_from_dia rotcy difference

sphere rotate rotate rotate

cylinder cylinder cylinder

You might also like