Results 31 to 33 of 33
-
09-11-2020, 09:30 AM #31
I'll put it here in case anyone else is interested.
width = 76;
height = 130;
draw_one();
translate([0, 0, (height/2)-0.01])
rotate([0, 0, 45])
draw_one();
module draw_one() {
hull() {
cube([width, width, 0.01], center=true);
translate([0, 0, (height/2)])
rotate([0, 0, 45])
cube([width, width, 0.01], center=true);
}
}
When you run it with the OpenSCAD customizer, you'll get a very simple user interface where you can specify the width and height in millimeters.
customizer.JPG
Edit: Sorry the code lost its formatting when I uploaded it
-
09-11-2020, 09:41 AM #32
Here's what the code should look like:
Griffenmcg2.JPG
-
09-11-2020, 09:45 AM #33
lol thought someone who wasn't broke would do that.
Clever way to do it too - way simpler than my method.
If only i understood geometry :-)
Added another variable to give you control over the angle of rotation, makes some interesting shapes :-)
width = 76;
height = 130;
ar=100; // angle of rotation
module draw_one() {
hull() {
cube([width, width, 0.01], center=true);
translate([0, 0, (height/2)]) rotate([0, 0, ar]) cube([width, width, 0.01], center=true);
}
}
draw_one();
translate([0, 0, (height/2)-0.01]) rotate([0, 0, ar]) draw_one();Last edited by curious aardvark; 09-11-2020 at 09:50 AM.
Qidi X Plus 3 Paper thin first...
05-27-2024, 01:15 AM in General 3D Printing Discussion