Posts Tagged ‘openscad’

Open Source FTW

OpenSCAD polygon editor (single HTML file) by Daid

OpenSCAD polygon editor (single HTML file) by Daid

As much as I enjoy using OpenSCAD to create 3D models, I do everything I can to build objects out of cylinders, spheres, and cubes.  Making a polygon is… challenging.  Thankfully, there are a number of people on Thingiverse who have sought to make building polygons in OpenSCAD much less painful.1  The latest OpenSCAD polygon tool by Daid is simple, intuitive, and a shining example of why open source projects are awesome.

As soon as I tried out Daid’s program, I knew it was great.  Quickly drafting a complex polygon would now be a breeze.  However, being able to upload and trace a picture of an object would make it infinitely more useful.  Within a few hours, Daid had responded to my feature request2 and within a single day Thingiverse citizen PieterBos had incorporated this feature into his own OpenSCAD polygon program.  Less than a day after that Daid added the ability to upload traceable images to his own original program.  All of this, the sharing of ideas for features, pushing and encouraging one another to be more awesome… this is what open source collaboration is about.

So, when’s the last time a proprietary closed source program developer knocked out a new feature you requested in three days?  Open source FTW!

I'm making extensive use of OpenSCAD. The only problem I found is that the polygon function is hard to use. I rather draw my polygons visual. So I created a simple polygon editor for OpenSCAD in Javascript+HTML. Following the idea from the "OpenScad Polygon Generator" by "PieterBos" thingiverse.com/thing:9290 But then working for any OS, any browser, without fuss. You don't even need to install anything! (might even work in mobile browsers) Online version can be found at:daid.mine.nu/~daid/3d/ Latest sources can be found at:github.com/daid/OpenSCAD-polygon-editor
This thing brought to you by Thingiverse.com
This i my new version of the polygon tool for openscad How it works ? See:youtube.com/watch?v=WKc6qX1RTyY It generates a openscad file but this time it writes modules so you can use it as a library. O there is also a online version protorabbit.nl/flash/polygonrabbit/PolygonRabbit.html You can now: move the points :-) delete points add point add points to a closed path(shift drag in add mode) add modules delete modules duplicate modules (handy) dont forget to set openscad in automatic reload for more fun instant update Please let me know what you think of it UPDATE:2011-11-29 Oeps the air updated te air app uploaded here from version 0.6 to 0.7 (0.6 should autoupdated but it did not have to look at that when i have time). So update the app with the file here or from my website.
This thing brought to you by Thingiverse.com
  1. Dang, the new awesome Thingiverse search features sure is awesome…  Thanks Marty! []
  2. For the ability to upload an image for tracing []
Tagged with , , , , , , , , Leave a comment
 

Tent Repair

Children's Tent Joiner by darthcarter

Children's Tent Joiner by darthcarter

Thingiverse citizen darthcarter has shared their designs for this Children’s Tent Joiner.  Darthcarter’s friend’s children had broken a corner bracket for their play tent and this quick printing fix is the solution.

What struck me about this fix is that I remember fixing a friend’s kid’s tent about two years before I had purchased my first 3D printer.  Unlike the elegant fix1 above, my solution was a mess of tape, plastic cut from a 2-liter bottle, was frustrating to create, and didn’t work very long at all. 2

What would you have fixed if only you had a 3D printer at your disposal?

A friend of mine has two young kids, and, as is normal some of their toys aren't indestructible. 3D printing to the rescue, and there is now a compatible corner part for "Free Time 4 Kidz" Tent. She also suggested the excellent category of "Replacements for stuff that kids break"
This thing brought to you by Thingiverse.com
  1. Seriously, that’s probably seven lines of code! []
  2. Then again, not much works for very long once you toss a 2-year-old inside… []
Tagged with , , , , , Leave a comment
 

MUGNY OpenSCAD Study Group Meeting on Thursday, Nov 17th from 6:30pm-8:00pm

OpenSCAD (Theoretical) Rocket Science -- Don't try this at home!

Just a quick post to remind all of the members of the MakerBot Operators Group New York (MUGNY) that the second meeting of the OpenSCAD Study Group will be this Thursday in the MakerBot Workshop. I have in almost all of the homework from last month’s event — quite the success, folks! — and we plan to share it back with those who have been participating so that we can launch these tips and tricks on Thursday!

Make sure to arrive as close to 6:30pm as possible, as many of those attending will be heading right up to the NYCResistor Craft Night immediately at 8pm. The next meeting will be held the third Thursday of December: Dec 15th!

What: MUGNY OpenSCAD Study Group Meeting

When: Thursday, Nov 17th from 6:30pm-8:00pm

Where: MakerBot Workshop, 314 Dean Street, Brooklyn NY

Who: MakerBot Operators, OpenSCAD users, and their allies!

There have been rumors (well, emails and plans and such) to start Study Groups in San Francisco and possibly Seattle. If you are hosting (or hungering for) a Study Group in your area, drop us a message to griffin at MakerBot dot com and I’ll make sure to spread the word!

Tagged with , , , One comment
 

OpenSCAD Gears Pro-Tip or The Importance of Flossing

Parametric Involute Bevel and Spur Gears by GregFrost

Parametric Involute Bevel and Spur Gears by GregFrost

Today I was trying to design something with one large and one small gear making use of Cbiffle’s awesome Spur Gear Fitter Script and Greg Frost’s Parametric Involute Bevel and Spur Gears script.  Unfortunately, whenever I tried to create a large and a small gear, I always ended up with the small gear having no teeth! 12

Cbiffle’s script is really useful if you don’t want to get too deep into the math of making gears, but do want gears with a certain gear ratio that will mesh well.  It basically takes care of all of the math you would normally need to get good fitting gears from Greg Frost’s script.

I asked Syvwlch for advice about my toothless gear problem.  He suggested there was a bug in the Spur Gears Script that would cause gear teeth to disappear in certain circumstances.  His way of getting around this problem was to use a non-integer for the number of teeth!  I tried 9.99 teeth (which failed) and then 10.001 which worked!

This OpenSCAD script provides modules for both Spur and Bevel Gears. It has some major enhancements over my original gear script thingiverse.com/thing:3534. It uses some of the spur gear nomenclature code from TheOtherRob github.com/TheOtherRob/MCAD with my own code for generating the involute teeth. The bevel gear is also my own work. Thanks also to elmom for some enhancements to my original gear script thingiverse.com/thing:3547. Enhancements include the Bevel gear module, backlash settings, parameterised number of facets for the involute curve and whole of tooth generation to avoid some of the issues the original script had when mirroring a half tooth. The STLs provided are not intended for direct use, but instead show examples of what can be done with the parametric script. Parametric Involute Spur Gears take the following parameters:number_of_teethcircular_pitch or diametral_pitch: controls the size of the teeth (and hence the size of the gear).pressure_angle: controls the shape of the teeth.clearance: The gap between the root between teeth and the teeth point on a meshing gear.gear_thickness: the thickness of the gear plate.rim_thickness: the thickness of the gear at the rim (including the teeth).rim_width: radial distance from the root of the teeth to the inside of the rim.hub_thickness: the thickness of the section around the bore.hub_diameterbore_diameter: size of the hole in the middlecircles: the number of circular holes to cut in the gear plate.backlash: the space between this the back of this gears teeth and the front of its meshing gear\'s teeth when the gear is correctly spaced from it.twist: for making helical gears.involute_facets: the number of facets in one side of the involute tooth shape. If this is omitted it will be 1/4 of $fn. If $fn is not set, it will be 5. Parametric Involute Profile Bevel (Conical) Gears take the following parameters:number_of_teethcone_distance: The distance from the pitch apex to the outside pitch diameter.face_width: The length of the teeth.outside_circular_pitch: The circular pitch at the outside pitch diameter.pressure_angle: Defines the shape of the teeth.clearance: Gap between the tip of the teeth on one gear and the root of the teeth on another meshing gear.bore_diameter: The size of the hole in the middle.gear_thickness: The thickness of the gear for bevel_gear_back_cone finish (see below). backlash: Makes the tooth width smaller to make a gap between teeth of correctly spaced gears to allow for manufacturing tolerances.involute_facets: As for spur gears.finish: Specify either bevel_gear_flat(0) or bevel_gear_back_cone(1). If you don't specify this parameter you will get a flat gear for pitch angles less than 45 degrees and a back cone gear for pitch angles greater than 45 degrees. The example shows both with the small gear being the flat one. Update: v5.0 Implements backlash for bevel gears (This was not working in v4.0).
This thing brought to you by Thingiverse.com
I've been working with Greg Frost's gear generator. Getting the gears to mesh requires some math, or trial and error. As a programmer, I don't like doing either one more than once. :-) This script lets you specify the axle spacing and gear ratio and get the circular_pitch parameter. It simplifies fitting gears together.
This thing brought to you by Thingiverse.com

http://store.makerbot.com/stepstruder-mk7-complete.html

  1. And, thus, the importance of flossing! []
  2. I included the flossing reference because it was amusing.  But, really flossing isn’t relevant if you’ve got a MK6 or MK7 extruder. []
Tagged with , , , , , , , , , 3 comments
 

Parametric TARDIS

Parametric Tardis by Gossamer

Parametric Tardis by Gossamer

If there’s something that’s even better than a regular TARDIS, it’s a parametric OpenSCAD TARDIS1  In the true spirit of Thingiverse, the designer Gossamer, shared their designs and source code.  Doing so allowed other users to join in, offer suggestions, and Gossamer immediately updated the TARDIS code to incorporate these improvements.

Here are two OpenSCAD pro-tips:

  • Best Programming Practices.  OpenSCAD for Windows tends to freak out when you don’t add a leading “0″ to a decimal.  By adding writing “0.5″ rather than “.5″ you can ensure compatibility across platforms.  Thanks Bluemetal!
  • Too Many Elements.  Sometimes OpenSCAD will complain that there are too many elements.  You’ll see this happen a lot more when you’ve got some “for loops” or lots of nested functions. By adding “render()” before a group of code, you force OpenSCAD to render and cache that group of code.  Each successive render will be a lot quicker. Thanks Tbuser!

What other OpenSCAD tips do you have to share?

None of the Tardises on here were quite what I was looking for, so i decided to make one myself. I tried to make it as parametric as possible, but you'll still find some things, such as the depth of the face impression, that are static. I'm working on an accompanying insert that will light up the light on top from the inside, I'll add that as a derivative as it develops. Let me know if you find any parameters that aren't scaling/re-sizing properly. EDIT: Per suggestions from Bluemetal and Tbuser I've added leading 0s to my decimal values and added render() to the face module, so it will now compile(F5) properly.
This thing brought to you by Thingiverse.com
  1. And, goodness knows, I feel compelled to blog anything Doctor Who related. []
Tagged with , , , , , , Leave a comment
 

MUGNY Launches OpenSCAD Study Group



MUGNY OpenSCAD Study Group

This Thursday evening at the MakerBot Workshop, the New York MakerBot User Group (MUGNY) will launch a monthly Study Group focusing on the parametric CAD application OpenSCAD. OpenSCAD is cross-platform and open-source, a phenomenally powerful tool that has been getting quite a bit of attention on Thingiverse and beyond. And if it is a wee bit under-documented, counter-intuitive, and eccentric, well….that is where a Study Group comes in!

Those of us pulling this study group together (Liz Arum, Jon Santiago, and Matt Griffin) believe strongly that a wider audience of MakerBot Operators (and Thingiverse Modelers) will embrace this tool and push it even further if many of us roll up our sleeves and do the footwork to compile and generate curriculum, tutorials, libraries, and example files that demonstrate practically how to use this application.

We will be kicking off by revisiting MakerBlock and Allan Ecker’s excellent tutorial series on the Thingiverse and MakerBot blogs, investigating in-development tools such as Marty McGuire’s OpenSCAD Polygon Output for Inkscape, experimenting and reporting on the many many OpenSCAD libraries you can grab from Thingiverse and beyond, and generally digging in deep to see what we can find.

If you are MakerBot Operator in the greater New York area and want to attend, please RSVP via Eventbrite for event location details.

Before you arrive to the first session, please take a look at MakerBlock’s OpenSCAD Basics tutorial series — and make sure to get OpenSCAD installed and ready to go before you arrive:

  1. OpenSCAD Basics: The Setup
  2. OpenSCAD Basics: 2D Forms
  3. OpenSCAD Basics: 3D forms
  4. OpenSCAD Basics:  Manipulating Forms

______

Start Yer Own Study Group

Members of MUGNY decided to jump into OpenSCAD for our Study Group, but there are quite a few topics and areas of research out there in the Thingiverse for other MakerBot User Groups to tackle.

If you’d like to start your own Study Group, please do so! Declare a meeting and get started with your investigations. But once you are underway, let us know what topic your group has picked and when you and your fellow MakerBot Operators and Thingiverse Modelers will be meeting for the second and later meetings so that we can share details here on the MakerBot blog to reach everyone in your area who might be available to chip in!

Some popular topics that MUGNY considered before selecting OpenSCAD:

  • “Finishing Techniques” — Your MakerBot wrapped up printing a part– now what else can you do with it? What paints, sandpapers, adhesives and solvents work best?
  • “Blender for Solid Modelers” — Blender has a reputation for being intimidating that might be shifting away with the release of 2.5 and 2.6. But still, with so many tools and modifiers and techniques — which are the best practices for using Blender for MakerBotting?
Tagged with , , , , Leave a comment
 

Designing for Parametrics in OpenSCAD

Part Catch Basket for Thing-O-Matic by dustinandrews

Part Catch Basket for Thing-O-Matic by dustinandrews

Designing 3D objects in OpenSCAD can be very quick and simple. 1  You can create some really amazing designs by just combining cubes and cylinders in a variety of ways.  However, making a design “parametric” isn’t always intuitive.  As an FYI, a parametric design in OpenSCAD is a design that accepts parameters.

There are a lot of OpenSCAD designs on Thingiverse where the author admits their design isn’t very “parametric.”  With a little effort and a few tips, it is possible to incorporate the power of OpenSCAD parameters into your own designs.  Since I learned some of these lessons when designing an OpenSCAD pirate ship, I’ll refer back to it for examples.

  1. Parameters first.  It is so much easier to make your designs parametric from the start.  Going back and making a design parametric can be as easy as find-and-replacing, but typically it is much more work than that.  If there’s any chance you might want to have a parametric version of your designs later – just design that way from the beginning.
  2. Prioritize.  Decide on the most important parameters first.  Most designs only have a few parameters that are really important.  For example, the two most critical features of the pirate ship were the ship’s scale, as in size, and the thickness of parts.  Once these two were known, most of the other features of the design needed to be modified to fit them.
  3. Dependents.  Try to make as many of the features of your designs dependent upon the initial parameters as possible.  The easiest way to do this is to design as much as possible in terms of the original parameters.  I like to do this by setting dependent objects as fractions of the original parameters.  In the example of the pirate ship, I made the largest sail on each of the masts equal to 1/2 the size of the masts themselves.  The other sails were even smaller fractions.  By making these features defined in relation to one another by fractions, they will always end up in the same appropriate locations with respect to one another.  Thus, the three sails on each mast should always line up together.  Throughout the design, I tended to design things in terms of 1/2, 1/4, 1/8, 1/16, 1/32, and 1/64.  These fractions are easier for me to manage than decimals.
  4. Mix it up.  While you’re designing, change some of the major parameters.  If your model suddenly goes haywire, you know you made a mistake somewhere – either by including a feature that doesn’t rely on your parameters or by a feature that is changed by your parameters in unexpected ways.
  5. Modularize.  Start by designing just one aspect of your idea at a time as a module.  Doing so will let you define whole regions of your designs in relation to one another.  For example, one of the modules I wrote for the pirate ship was for a single sail.  I wrote another module that would put together three sales of decreasing sizes and another module that added the large triangular sail and mast itself.  Yet another module collected all three sails.  Once the three sails could be created by a single module, I could move all of the sails around as a single piece.
  6. Cheat.  One of the parameters for the cylinder function is “$fn”.  This basically dictates how many facets the circumference of your cylinder will have.  A cylinder with 8 facets will look like an octagon and a cylinder with 128 facets would probably look almost perfectly circular.  I cheated by making triangles by creating cylinders with “$fn=3″ or just three facets.  There are a lot of shape libraries for OpenSCAD, but this was a quick and simple way to get an equilateral triangle.  Each of the sails is actually a cylinder, turned on its side, with just three facets along the circumference.

What other suggestions do you have for someone who wants to make their designs parametric?

  1. Thanks to dustinandrews for tagging their Part Catch Basket for Thing-O-Matic as with “openscadtutorial” on Thingiverse! []
Tagged with , , , , 2 comments
 

Buckyballs – Molecular Models by pmoews

buckyball!

Now that the days are growing shorter and the wind grows chilly, it’s normal for a young man’s thoughts to turn to…buckyballs.  And now, thanks to the dedicated work of pmoews, we have not only some lovely, printable .stls but also some lovely, parametric OpenSCAD models to generate as many different fullerenes as you could possibly imagine!

So, as the seasons change, you can start off your week printing the Dymaxion molecule!

Here's a simple molecular modeling program written in OPENscad. It's a derivative of the OPENscad program in "Protein Models". It contains two modules, "atom" and "bond". A call to atom makes a sphere and a call to bond makes a cylinder. Atom requires a radius and a set of atomic coordinates; bond requires two sets of atomic coordinates. For example to make a water molecule we could write: atom (.3, 0, 0, 0); // an Oxygen at the origin, .3 for its radius atom (.25, -.96, 0, 0); // for the first H atom, .25 for its radius atom (.25, .24, .93, 0); // for the second H atom bond (0,0,0,-.96,0,0); // for the first O-H bond bond (0,0,0,.24,.93.0); // for the second o-H bond To render it all together the above commands are included within a union statement. More details in makewater.scad. Once I had this program I began looking for coordinates of interesting molecules to print. I found a collection of fullerenes at ccl.net/cca/data/fullerenes/index.shtml Better known as "Buckyballs" you can read about the fullerenes on Wikipedia. The buckyball most discussed contains 60 carbon atoms but the coordinate collection has a range of sizes, from 20 to 540 atms.
This thing brought to you by Thingiverse.com
Tagged with , , One comment
 

OpenSCAD Challenge: Pirate Ship

Printable Parametric Pirate Ship by MakerBlock

Printable Parametric Pirate Ship by MakerBlock

SuperAmi’s parametric pirate hook reminded me that I’ve been wanting a printable pirate ship for a while.  My first attempt, designed in Sketchup, leaves a lot to be desired.  This time, I wanted something of which I could really be proud.  My designs use just cubes, cylinders, union, difference, intersection, translate, rotate, scale, and modules.  Since I’ve documented the sum total of all of my OpenSCAD knowledge in this blog, if you’ve followed along with tutorial series you should be able to design your own pirate ship too!  Thingiverse has a lot of rocket ships and space ships, but very few ship ships.  I’d like your help in changing this.

The challenge for you is as follows:

  • Design a pirate ship using OpenSCAD.
  • Upload an STL and OpenSCAD design file to Thingiverse.
  • Tag your design with “openscad pirate ship“.  Please also tag your design with “pirate ship” and “OpenSCAD,” to make it easier for others to find your designs in the future.

Eternal glory, the admiration of the citizens of Thingiverse, and 9,000 internet points await:

  • The first person to print an OpenSCAD pirate ship and post a picture of their print to Thingiverse
  • The first person to upload an OpenSCAD pirate ship
  • Any person who uploads an OpenSCAD pirate ship with additional details such as cannons, bowsprit, plank, rowboats, portholes
  • The first person to design, upload as a single STL, and print an OpenSCAD pirate ship inside an OpenSCAD Klein bottle
A printable OpenSCAD pirate ship. While it will definitely require support for the bow, the rest of the model should not. The OpenSCAD code isn't commented at all, so it may be difficult to follow. There are two main parameters - "shipscale" and "th." The first parameter "shipscale" is the size the entire ship is based on. It roughly corresponds to the overall height of the model. The second parameter "th" refers to the thickness of many of the features. The STL below has the thickness set to 0.6mm. It should probably be about 1mm or so for optimal printability. This ship features three masts with three sails each, a rudder, deck, captain's quarters, bow, and crow's nest. As an FYI, this pirate ship was made with just "cubes" and "cylinders."
This thing brought to you by Thingiverse.com
Tagged with , , , , , 3 comments
 

OpenSCAD Challenge – Klein Bottle – the winners so far!

Klein Bottle from simple primitives by MakeALot

Klein Bottle from simple primitives by MakeALot

First, I need to preface this by saying I can’t believe I overlooked coasterman’s low-polygon count Klein Bottle posted about a year ago.  Although created in Sketchup, this design is about as low-poly as you can get.  Now!  On to the imaginary awards show!

Building on the work of these fine designers, can you design a Klein Bottle in OpenSCAD that uses fewer lines of code, has fewer faces, or is even more traditional looking?

A more traditional looking Klein bottle made from torus halves and tubes.
This thing brought to you by Thingiverse.com
Quick, easy and dirty OpenSCAD to make a low poly klein bottle. Ehem... Quick? Not as much as I thought (1h-1h30) Easy? Easy would have been using cylinders $fn=3 instead of polyhedrons! Dirty? Yes! It looks like a parametric thing but it's NOT! Low Poly? Neither, OpenScad reports 40 faces but there's some misalignment that's adding 4 more than needed.
This thing brought to you by Thingiverse.com
Yes, I realize I declared this challenge and am entering it myself. ( makerbot.com/blog/2011/10/11/openscad-challenge-klein-bottle/ ) I didn't start designing this until well after I had already posted it. Since there are no real prizes, I figure you'll forgive me claiming the "first to upload", "fewest number of facets" and "most resembles either Kelsorj’s Klein Bottle ( thingiverse.com/thing:5217 ) or RotoScan’s Klein Bottle ( thingiverse.com/thing:11976 )" The bottle could be rendered with even fewer facets by just reducing the number of faces on the cylinders in the OpenSCAD file. Also, I hereby claim 9000 internet points! Mu-ah-ha-ha! Also, a shout-out to CloudSCAD is in order for letting me draft this up from my browser.
This thing brought to you by Thingiverse.com
Tagged with , , , , , , , , , One comment