-
Notifications
You must be signed in to change notification settings - Fork 1
Sven edited this page Mar 1, 2015
·
2 revisions
The following documentation describes the statements and modifiers that are possible to use with OpenScad2D.
- Primitives
- Modifiers
- [Scope Modifiers](#Scope Modifiers)
- [Translate](#Translation Scope)
- [Rotate](#Rotation Scope)
- [Scale](#Scale Scope)
- [Hull](#Hull Scope)
- Union
- Difference
- Intersection
circle( <radius>, [<resolution>] );
circle( r=<radius>, [$fn=<resolution>] );
circle( radius=<radius>, [$fn=<resolution>] );
rect( <width>, <height>] );
rect( w=<width>, h=<height>] );
rect( width=<width>, height=<height>] );
Not yet implemented!
path( <x1>, <y1>, <x2>, <y2>, ... );
Modifiers influence the following statement
translate( <x>, <y> );
translate( x=<x>, y=y );
rotate( <angle>, [<origin x>], [<origin y>], [<use radian>] );
rotate( a=<angle>, [x=<origin x>], [y=<origin y>], [rad=<use radian> );
rotate( angle=<angle>, [xorigin=<origin x>], [yorigin=<origin y>], [use_radian=<use radian> );
scale( <x>, <y> );
scale( x=<x>, y=y );
### Simplify
Produces a simplified geometry using the Douglas-Puecker algorithm.
Coordinates of the simplified geometry will be no more than the tolerance distance from the original.
Unless the topology preserving option is used, the algorithm may produce self-intersecting or otherwise invalid geometries.
```OpenSCAD
simplify(1, False)
circle(30);
Scope Modifiers influence all it's child statements.
translate(5, 10) {
rect(10, 10);
circle(30);
}
rotate(45) {
rect(10, 10);
circle(30);
}
scale(1, 2) {
rect(10, 10);
circle(30);
}
hull() {
rect(10, 10);
circle(30);
}
union() {
rect(10, 10);
circle(30);
}
difference() {
rect(10, 10);
circle(30);
}
intersection() {
rect(10, 10);
circle(30);
}