We're excited and proud to launch Thingiverse Apps. Learn More about what this means to you.
This OpenSCAD script will generate a 2 part fit together packaging for a device of user selectable size. Any amount of various shaped cutouts, support posts, engraved text and logos can be easily placed on any face using special array variables. Check out the instructions below as well as the examples and comments in the code for more information on how to use them.
Author: Mark Gaffney
Version: 2.6c (versions d e & f are slight modifications for a specific item without proper controls but these will be included in v2.7)
add user controllable flanges and interlocking lip features
Some combinations of values, shapes and locations etc. may lead to an invalid or non-manifold shape beign created, preventing you from exporting a .stl
If this happens try to remove or change some of the features or values until you get a valid shape and then add them back gradually until you find the offending item, then change it so it doesn't cause a problem
Note: This thing uses HarlanDMii's"write.scad" module http://www.thingiverse.com/thing:16193 which you will need to have downloaded and located in the directory if you want to run this on your PC The version I had did not properly implement spacing on 'writecube', a modified version that implements this is included here... Generating text can be very slow! When generating a stacked layout it may look like the top is taller than it should be, this seems to be a visualisation bug in OpenSCAD, if you create a .STL it will be perfect
Changes from previous versions:
v2.3 2013-03-23 (AKA cutouts_on_faces_for_loop-v0_3.scad)
v2.2 2013-03-22 (AKA cutouts_on_faces_for_loop-v0_2.scad)
based on My own structure
v2.1 2013-03-22 (AKA cutouts_on_faces_for_loop-v0_1.scad)
This starts with the user entering some basic values:
Next the user can modify the data structures that create holes, posts and text on each face of the packaging. These are complicated and may require you te play around with values or read some of the comments further down in the code
The engraved text used on the packaging (text=[])
format for each piece of text [face_name, text_to_write, shape_position[x_pos,y_pos,x_offs,y_offs,rotate,align], shape_size[depth,font_height,font_spacing,mirror]] Note: for silly reasons mirror must be 0 or 1 corresponding to false and true in this version
Which of the 6 sides of the packaging do you want this feature on? (face_name, T,B,N,E,W,S)
"T", The Top or Z+ face
"B", The Bottom or Z- face
"N", the North or Y+ face
"E", the East or X+ face
"W", the West or X- face
"S", the South or Y- Face
Where on the face do you want this feature (shape_position [x_pos,y_pos,x_offs,y_offs,rotate,align] )
x_pos, how far along the face do you move in X
y_pos, how far along the face do you move in Y
x_offs, where along the face do you take measurements from in X
y_offs, where along the face do you take measurements from in Y
rotate, how much do you want the object rotated in degrees
if you do not use any of the above please set them to 0! do not just leave them empty!
align, do you want the object aligned with the "inside" or the "outside" of the packaging face
What shape do you want? (shape_name, Cone/Ellipse/Cylinder/Round_Rect/Square/Rectangle/Nub_Post/Dip_Post/Hollow_Cylinder)
What are the shape's dimensions (shape_size[depth,,,])...you will need to read the section below as they are different for each shape
"Square" shape_size[depth, length_breadth]
"Rectangle" shape_size[depth, length, breadth]
"Round_Rect" shape_size[depth, length, breadth, corner_radius, corner_sides]
"Cylinder" shape_size[depth, radius ,sides]
"Ellipse" shape_size[depth, radius_length, radius_breadth, sides]
"Cone" shape_size[depth, radius_bottom, radius_top ,sides]
"Nub_Post" shape_size[depth, radius_bottom, radius_top, depth_nub, sides]
"Dip_Post" shape_size[depth, radius_bottom, radius_top, depth_dip, sides]
"Hollow_Cylinder" shape_size[depth, radius_outside, radius_inside ,sides]
A string of text you want to have carved into a face (text_to_write)
for text shape_size[depth,font_height,font_spacing,mirror]
Once the user has provided this data the shape is made as follows:
OpenSCAD Parametric Packaging Script v2 by M_G is licensed under the Creative Commons - Attribution license.
So what's this mean?
We're sure M_G would love to see what you've printed - take a photo and share it on Thingiverse as a Make.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. You can also download the Thingiverse Mobile app (available via Google Play and Apple App Store) to take a photo and upload your Make right from the app!