It's obviously not optimized yet. As mentioned, it's kinda baselined
peek and poke just to get the function crystalized in my head. Does the
snipped you wrote draw the entire (to this point) construction?
On 12/5/20 12:54 AM, lar3ry wrote:
Well, it's definitely not the way I would go about it, so here's what I would
do.
You'll have to play with the values, and you are certainly welcome to put
them into variables.
Note the pound sign (#). It will help you see where the line puts the
object.
difference() {
union() {
translate([0,18,0])
cube([37,16.67,4]);
translate([22,18,0])
cube([6,16.67,30]);
translate([28,0,0])
cube([9,19,4]);
}
translate([13,22,-.001])
translate([31,4,-.001])
}
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
What function does the # indicate in OpenSCAD?
And what does the -0.001 do for us?
David
On 12/5/20 12:54 AM, lar3ry wrote:
Well, it's definitely not the way I would go about it, so here's what I would
do.
You'll have to play with the values, and you are certainly welcome to put
them into variables.
Note the pound sign (#). It will help you see where the line puts the
object.
difference() {
union() {
translate([0,18,0])
cube([37,16.67,4]);
translate([22,18,0])
cube([6,16.67,30]);
translate([28,0,0])
cube([9,19,4]);
}
translate([13,22,-.001])
translate([31,4,-.001])
}
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
skypuppy wrote
It's obviously not optimized yet. As mentioned, it's kinda baselined
peek and poke just to get the function crystalized in my head. Does the
snipped you wrote draw the entire (to this point) construction?
What function does the # indicate in OpenSCAD?
And what does the -0.001 do for us?
You have made it (to my way of thinking) more complicated by starting off
with a large cube, putting all your values into variables, and cutting away
a lot of things.
Yes, my program draws the entire (to this point) construction. I did not
bother trying to figure out the exact values, but rather created an STL
file, imported it, and then created an approximate duplicate by overlaying
cubes and subtracting cylinders, each one using the # character to see when
I had the dimensions close enough.
When you put the # in front of a line, it highlights the part drawn in
translucent red so you can see what the line is doing, when you preview the
drawing. Just put the program into OpenSCAD and you'll see. Try putting it
in front of the first cube(). I purposely made the cube the size I made it
to show you something.
The -.001 moves the bottom of the cylinder .001 below the bottom of both
cubes. try replacing one of them with a 0, and rotate the preview until you
can see the bottom. You'll see a difference in the two holes. The shimmering
is caused by having two surfaces in the same plane. In either case, the hole
will be fine when it's rendered.
Just paste that into OpenSCAD and play with it.
--
Sent from: http://forum.openscad.org/