This is a fairly detailed model of an iPhone 4 GSM according to case design specification from apple.com
I'm new to openscad, so surely a few hundred things could be done better, and I'm willing to learn so I welcome any feedback.
This utilizes the roundedRect function (with modifications) - http://www.thingiverse.com/thing:9347 - by WilliamAAdams.
The model inserted into an openscad iphone dock - http://www.thingiverse.com/thing:10270 - by jag is shown in one of the images. This shows how you use the model to see if you block any of the phone's features with your design.
- setting the color as parameter - to be fixed. Current color RGB[.4,.4,.4] - the 3 screen shots were done before the color was set, so they are the default yellow - DONE
- Getting suggestions and acting on them... :)
The iPhone is copyright of Apple inc. and this design should not be reproduced for any other purpose than allowed by law on copyright and design rights.
Please see: http://developer.apple.com/resources/cases/ which is the source of the drawing used.
Someone already did this long before me - please look at http://www.thingiverse.com/thing:3392 by whosawhatsis (Thanks for the message).
Include the iphone4_model.scad and then write iphone4();
That will create a simple set of slaps of the outer geometry, very useful as a negative geometry for cut outs etc.
Also a set of arguments is available for adding details:
singleColor = [-1,-1,-1])
//show_connector = true;
//show side buttons
//show_buttons = true;
//show front items - button and speaker
//show_front = true;
//show/hide all flush components e.g. camera, flash, scren
//show_flush = true;
//show misc side items, speaker, mic, sim etc..
//show_misc_side = true;
//show the entire device in one single color. Example done by:
//iphone4(true, true, true, true, true, [0,.7,0]);
//singleColor [0.x, 0.x, 0.x];