Experimenting with coordinate systems
This commit is contained in:
22
test.scad
22
test.scad
@@ -1,5 +1,21 @@
|
||||
use <fcad/fcad.scad>;
|
||||
|
||||
fDrawX(fCylinder(10, r1=5, r2=2))
|
||||
fDrawX(fSphere(10))
|
||||
fDrawX(fCube(10));
|
||||
module testAxes(translation=[0, 0, 0], rotation=[0, 0, 0]) {
|
||||
color("red") fDraw(fTranslate(fRotate(fRotate(fCylinder(h=100, r=1), "start", [0, 90, 0]), "start", rotation), translation));
|
||||
color("green") fDraw(fTranslate(fRotate(fRotate(fCylinder(h=100, r=1), "start", [-90, 0, 0]), "start", rotation), translation));
|
||||
color("blue") fDraw(fTranslate(fRotate(fRotate(fCylinder(h=100, r=1), "start", [0, 0, 0]), "start", rotation), translation));
|
||||
}
|
||||
|
||||
testAxes(translation=[0, 0, 200], rotation=[0, 0, 0]);
|
||||
testAxes(translation=[200, 0, 0], rotation=[0, 180, ]);
|
||||
testAxes(translation=[0, 0, -200], rotation=[180, 0, 0]);
|
||||
testAxes(translation=[-200, 0, 0], rotation=[0, -90, 0]);
|
||||
testAxes(translation=[0, 200, 0], rotation=[-90, 0, 0]);
|
||||
testAxes(translation=[0, -200, 0], rotation=[90, 0, 0]);
|
||||
|
||||
|
||||
//result = fAttach(fCube(10), "top", fCube(5), "bottom5");
|
||||
//result = fRotate(fCube(5), "front", [0, 360, 360]);
|
||||
|
||||
//echo(result);
|
||||
//#fDraw(result);
|
||||
Reference in New Issue
Block a user