Make something
Email yourself a 10% off coupon
Send
Coupon sent! Check your email
Loading

[be sure to always have downloaded the latest version!] OpenSCAD is a wonderful means to forget about time. I love programming with it and am almost adicted to do design in the mathematical way. But, also being well acquainted to some more professional IDEs like Eclipse and VisualStudio, I must admit that one day I got really tired about having to type always the same stuff like difference(){ rotate([0, 0, 45]) translate([0, 0, 4]) cylinder(r = 100, h = 10, center = true]); rotate([0, 0, -45]) translate([0, 0, 4]) cylinder(r = 100, h = 10, center = true]); } My solution was to write a private shortcut library which speeded up my coding drastically. And it is so much fun to write libraries, because one gets into contact with the more advanced language features. In this little project I am presenting you my 'best of' library. A collection of my most used shortcuts and extended primitives for MUCH faster programming. The most important shortcuts are the transformations and logical operations: To enhance translate([x, y, z]) I defined T(x = 0, y=0, z=0) Tx(x=0) Ty(y = 0) Tz(z =0) Similar abbreviations exist for rotate() and scale(). Logical operators difference() and union() are aliased by D() and U(). If you miss intersection(): I couldn't make it work. If you find a solution, please let me know. Primitives also have aliases cylinder() -> Cy() cube() -> Cu() circle() -> Ci() square() -> Sq() sphere() -> Sp() with usable defaults, like being CENTERED. Using primitives not being centered by default is so time consuming. Additionally I put some extended primitives into this library that are for daily use, like ring() -> Ri() ring_half() -> RiH() ring_segment() -> RiS() cylinder_half() -> CyH() cylinder_segment() -> CyS() or Pie() circle_half() -> CiH() circle_segment() -> CiS() sphere_half() -> SpH() To know what's in the lib you get a 'cheat sheet' in the console from help() To make the lib available for your code, copy ShortCut.scad into your OpenSCAD libaries folder or current project folder and reference it with include in your code. I use this library for fast, sloppy and sketchy programming and it saves me lots and lots of time. Of course when it gets more and more into reusable programming, these shortcuts might be to cryptic. Also for publishing code. This might be a draw back, but it forces one to rethink the code and make it even better, when transcoding it back to the commonly readable format. By the way, did you miss SpS() ? I hardly ever use it. But if you do, please, let me know your implementation. Anyway, have fun with enlarging the lib.

OpenSCAD - faster coding with ShortCuts library and new primitives
Delivery address
This field is required.
This field is required.
Please enter a valid email.
This field is required.
This field is required.
This field is required.
This field is required.
This field is required.
Pay with credit card or debit card
or pay with
Place order
Order summary
OpenSCAD - faster coding with ShortCuts library and new primitives
Color:
Quantity:
Subtotal
$
Delivery (May 01 - May 03)
Free
Total
$