poisond has quit [Remote host closed the connection]
souvlakeeb has joined #openscad
<souvlakeeb>
Hello, this is my first hour with openscad. I'd like to make a simple part for which the tutorial hasn't given me all the tools I need. I want to make a simple keyboard switch tester. The shape is a rectangle with one row of 4 square holes in it. Each square hole is 14x14.
<souvlakeeb>
Each square hole is 5 away from the next edge-to-edge and 5 away from the top and bottom edges of the rectangle, if viewing from the top and longest dimension is running left to right.
<souvlakeeb>
The leftmost and rightmost edge of the rectangle have an additional 5 of material, making the leftmost and rightmost hole 10 away from the rectangle edge, edge-to-edge
<souvlakeeb>
I hope I explained it well, a picture would have been easier
<souvlakeeb>
Ah okay! I didn't realize I could repeat translates in the same difference call
<souvlakeeb>
Is there a concept of creating variables? Say I want to set spacing to 5 and reuse that throughout
<Virindi>
foo = 5;
<Virindi>
translate([foo,0,0]) ......
<souvlakeeb>
too cool!
<Virindi>
there are loops as well of course
<souvlakeeb>
Thanks for the help! That should be all I need!
<Virindi>
each 'module' (such as cube()) can have any number of modifiers in front of it (such as translate(), rotate(), scale(), etc)
<Virindi>
:)
<souvlakeeb>
Very nice!
<souvlakeeb>
Is there a way to use an external editor?
<Virindi>
window->hide editor, design->automatic reload and preview
<Virindi>
I use geany, there is a syntax highlighting definition for it somewhere online
<souvlakeeb>
I use spacemacs, there might be a package. Thank you very much for the guidance!
<Virindi>
if you plan to 3d print this object, remember to add extra dimensions to the size of your holes to account for 3dp wall error. generally a hole should be 0.15 to 0.3mm larger than the object which must go into it
<Virindi>
(the exact amount depends on your printer and how tight you want the fit to be)
<souvlakeeb>
That's good advice thank you!
<souvlakeeb>
The part will be laser cut
<souvlakeeb>
I will be using sendcutsend. Putting together a split keyboard design if I can manage it
<souvlakeeb>
Yes there seems to be an emacs package: scad-mode!
<souvlakeeb>
Is there a way to print a variable value to make sure it's correct?
<InPhase>
souvlakeeb: echo(x);
<Virindi>
if you are not using a super fast computer then you may also find it helpful to install a recent openscad and enable vertex buffer preview, which is in the preferences
<souvlakeeb>
Okay great! Thank you both!
<souvlakeeb>
If I can find the answer to this question in the documentation please let me know, but I haven't found it. How does grouping work? Say I want `foo = (1 + 2) * 3;`. I'm getting complaints about the parens