OpenSCAD User Manual/CSG Modelling

From Wikibooks, open books for an open world
< OpenSCAD User Manual
Jump to: navigation, search


The text in its current form is incomplete.


[edit] union

Creates a union of all its child nodes. This is the sum of all children.

Usage example:
union() {
        cylinder (h = 4, r=1, center = true, $fn=100);
        rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}


Union


[edit] difference

Subtracts the 2nd (and all further) child nodes from the first one.

Usage example:
difference() {
        cylinder (h = 4, r=1, center = true, $fn=100);
        rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}


Difference


[edit] intersection

Creates the intersection of all child nodes. This keeps the overlapping portion

Usage example:
intersection() {
        cylinder (h = 4, r=1, center = true, $fn=100);
        rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}


Intersection


[edit] render

Always calculate the CSG model for this tree (even in OpenCSG preview mode). The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering.

Usage example:
render(convexity = 1) { ... }
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export