Q&A from OpenSCad Class

Thank you to everyone that attended today.  I’ll try to be better prepared for the number of attendees next week.

A few questions and tips that came in today.

1. If you add an exclamation point then F5 (Preview), it’ll only run the line with the exclamation point on it.  It’s a good way to test a line and see if it does what you want it to do.

Example:

color(“green”){
    difference(){
        linear_extrude(height=50)
        square([178,100], center=true);
        translate([0,0,3])
        !linear_extrude(height=48)
        square([180, 94], center=true);
    }
}

This will run the line:

!linear_extrude(height=48)
        square([180, 94], center=true);

 

2.  Joe Duke recommended a tutorial here:

http://blog.cubehero.com/2013/11/19/know-only-10-things-to-be-dangerous-in-openscad/

Furthermore, if you google “Openscad tutorial” you’ll see a wonderful list of resources including some great videos.  If you want a little more than the introduction you got today, then I would encourage you to work through any of these tutorials.

3.  Can you create parameters in modules.  The answer is YES!  Here is an example:

I create a module with parameters width and radius.  Then, I can create a wheel with the parameters I want.  e.g. wheel(10, 25);

module wheel(width, radius){
    color(“red”)
        cylinder(h=width, r=radius);
       
    }
   
   
   
rotate([90,0,0]){
    translate([0,0,20]){
        wheel(7.6, 33.25);
    }
    translate([0,0,-20]){
        wheel(10,25);
    }
}

4.   Can you create a spiral?

Yes

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#Twist

linear_extrude(height = 10, center = true, convexity = 10, twist = -1000)
translate([2, 0, 0])
circle(r = 1);

5.  Does increasing the number of facets ($fn) make a difference in the 3d print? 

I did some experimentation on this.  The answer is yes.  If you have round shapes or curves, you may want to increase $fn before rendering and outputting as STL.  It will take longer to render, but you’ll get smoother curves.

 

For this week:

1.  Please experiment with OpenScad.

2.  Download the Sumobot SCAD templates on the bottom of this page and start experimenting.  Or try creating your own design.  You’ll have a several weeks to play around with your designs.  If you get stuck or have questions, just email me (your scad file) and tell me what you’re trying to do.  I’ll do my best to help!

 

For next Saturday:

Everyone will need to bring their laptop again.

1.  Darryl will give a quick how-to on Sketchup.  Sketchup is an alternative to OpenScad.  If you have a Windows or Mac, you can download it here.  I don’t think Sketchup is available on Linux.

2.  We’ll discuss how to take a model from OpenScad (or Sketchup) to a file that can be printed on a 3d Printer.   We’ll use Makerbot Desktop.  You can download it here for Windows, Mac, and Linux. 

3.  We’ll discuss some 3d printing considerations as you design your chassis.

Lab time will be dedicated to continuing to design your chassis.  If you have some cool ideas, please ping me and I’d love to have you share your design/ideas.

Advertisements

One thought on “Q&A from OpenSCad Class

  1. Pingback: Design your Sumobot Chassis using OpenSCad | Underground Engineering Club

Comments are closed.