Categories
Software

OpenSCAD

openSCADlogo

OpenSCAD is a free, open-source, application for creating 3D CAD models and is available for Linux, MS Windows and Apple OS X. There’s also an online (cloud) version available that runs from within a WebGL enabled web-browser.

It introduces a different approach to creating 3D models as it’s not an interactive 3D modeller in the sense of being able to manipulate the model directly from a graphics window, rather it interprets instructions that describes the model and then renders the result.

A simple user interface is provided and includes a text editor, graphics and console windows.

A textual language is used to define geometric primitives and describes how they are modified and manipulated to create 3D models. Essentially, you are provided with a 3D CAD modelling programming language. The language is easy to understand and can be used by anyone – no specialist knowledge is required.

For example, create a cube with the command

cube(10);

Or create a variety of primitives using the following


// cube 
cube(10);

// box
translate([0,-15, 0]) { 
    cube([20,10,10]);
}

// sphere    
translate([-20,0, 0]) {
    sphere(10);
}

//cylinder
translate([20,5, 0]) {
    cylinder(h=10, r=5);
}

openSCAD Figure 1

OpenSCAD provides two types of 3D modelling, Constructive Solid Geometry (CSG) or the extrusion of 2D primitives into 3D.

Here’s a CSG example

openSCAD Figure 2

Here’s an example showing the extrusion of a profile

openSCAD Figure 3

There are lots of youtube videos showing how to use OpenSCAD for example

(original link at https://youtu.be/XNghpq9sKRc )

Models can be exported in various formats including STl, DXF, SVG and CSG. It is also possible for users to distribute CAD models as OpenSCAD (human-readable text) documents

Details about OpenSCAD can be found at

http://www.openscad.org/

It can be downloaded from

http://www.openscad.org/downloads.html

and documentation can be found at

http://en.wikibooks.org/wiki/OpenSCAD_User_Manual

Here’s a quick cheat sheet

OpenSCAD cheatsheet

The source code can be obtained either from the download area on the website, or directly from github

https://github.com/openscad/openscad

If you don’t want to download and install the program on your machine, there is also a version available which runs in a web browser that supports WebGL.

OpenScad openJSCAD

OpenJSCAD can be used directly from

http://OpenJSCAD.org/

Summary

OpenSCAD provides a powerful and unique tool for programmers and other users wishing to create 3D solid models. It can be used on your local machine either as an installed program or used directly via a version available on the web. With the ability to output models as STL files, it can be used to easily produce models the can be used for 3D printing. Although lacking in some features found in other CAD systems it nevertheless provides a useful tool in your 3D modelling toolkit and it will be interesting to see where it goes in the future.

Categories
Cloud Software

Onshape

Onshape

Onshape recently emerged from stealth mode and is now available in a Beta Version.

It’s a 3D CAD cloud-native application which runs in a web browser or on a mobile device using a device specific application. (Currently available for iPhones and iPads).

Created by a team of veterans from SolidWorks and other top professionals from the data center, security and mobile industries led by Jon Hirschtick.

The system requires a browser that supports WebGL and runs on most types of computers and operating systems. The officially supported browsers are Chrome, Firefox and Safari. It also needs an internet connection to work – there isn’t a version which runs in an off-line mode.

There is no software to install and updates occur seamlessly to ensure that all users are always on the latest version.

I’ve been using it for a couple of weeks and find it easy to use.

Here’s my first attempt, using sketches

Sketch

to create models (bodies) and assemblies.

FullHouse

One of the benefits of using cloud-native applications is the ability to limit or minimise the chance of losing data while you are working. The stored data is constantly updated as you are working on it so that hard disk crashes, machine glitches, power cuts or the odd cup of coffee spilt over your laptop should no longer mean that you’ve lost your work.

Another important feature is the ability to share documents and collaborate in real-time with other users during the model creation process.

Onshape offers a Free subscription plan $0/month or a Professional subscription plan available for $100/month (or the equivalent in your local currency).

The free plan provides 5GB storage space and you are limited to 5 active “Private” Documents at any one time. You can create an unlimited number of “private” documents but only 5 of these can be active at any one time. In addition, you can create an unlimited number of active “public” documents.

The professional plan provides 100GB storage space and an unlimited number of active documents.

A document is a multi-part container which can be used to keep all information related to a project in the same place. You can build and assemble parts in the same document. The document can contain 1 or more Part Studios (parts) Assemblies, CAD data from other systems, non CAD data files, PDFs, Images etc.

There are numerous features available in this initial Beta phase of the product.

Highlights include

  • Part Studios
  • Assemblies
  • History, Versioning
  • Imported Geometry
  • Direct Editing
  • Data Management
  • Sharing and Collaboration
  • Seamless Updates
  • On-line Help
  • Tutorials

For further details I advise you to read more at the Onshape website or better yet try it out for yourself by requesting an invite to join in at:

https://www.onshape.com

Categories
Cloud Software

Tinkercad

The traditional approach for designing a 3D representation of a real physical object is to use a CAD product on a desktop or laptop PC. Until recently, this was the best platform to use because of the resource requirements of the CAD product in particular, memory requirements, processing power and graphics needs.

WebGL and HTML 5 are just 2 of the components that have enabled a growing number of start-up companies to try and provide a CAD (Computer Aided Design) program in a web-browser. The front-end of the product can be built and run locally in the web browser, with the expected processing, memory usage and possibly some graphics capability provided via the “cloud”. I hope to discuss in a later article, how such a product can be architected, but in the meantime, lets take a look at Tinkercad.

Tinkercad is a web-based 3D modeler which was originally targeted towards the growing market of enthusiasts interested in using low cost 3D printers. These users are seeking something different from the traditional CAD system – something that is quick, easy to use (I’m not looking for an exciting “experience” I just want to get the job done) and most importantly not difficult to learn!

tinkercad

The user interface consists of 3 basic steps:

  1. Place a shape in your workspace. A shape can either “add” or “remove” material and you can work with pre-existing shapes or create your own.
  2. Shapes can be moved, rotated and adjusted to your exact requirements.
  3. Group together a set of shapes to build more complex shapes to create detailed models.

and there you have it. From the simple to the more complex:

sample

The application runs in a web-browser and to get started, simply visit the website at

https://tinkercad.com/

Register for  an account and get building.

Other interesting points worth a mention are:

Tinkercad provides an interface for the user to create shapes using JavaScript programs.

https://tinkercad.com/developer/api-procedural.html

The writer can define parameters which are made available to the user. Parameter values are used to adjust the dimensions of the defined 3D shape.

The geometry kernel, is a major par of any CAD system and Tinkercad uses a custom in-house built kernel called Gen6. This has been designed to run in a cluster of servers (in the cloud) utilizing potentially thousands of CPU cores, that allows computations that may take minutes or hours using other geometry kernels to execute in fractions of a second. Learn more at:

https://tinkercad.com/developer/gen6-intro.html

Then, Tinkercad recently announced (in March) that they were closing down.

http://blog.tinkercad.com/2013/03/26/announcing-airstone-and-the-closure-of-tinkercad/

They stated their intention to concentrate on a new project called Airstone – an interactive simulation environment (powered by a supercomputer) providing real-time 3D design and physics simulations for product designers and engineers.

http://airstonelabs.com/press/announcing-airstone

A couple of months later (May) Autodesk stepped in and acquired Tinkercad

http://blog.tinkercad.com/2013/05/18/autodesk_tinkercad/

Autodesk has purchased all the core technology necessary to operate Tinkercad, so its good news for users of the system.

Categories
Code Snippets WebGL

WebGL on the iPad

I recently wanted to access some WebGL based web-sites from my iPad and quickly discovered that WebGL is currently NOT supported, or at least not enabled, in the iPad’s version of Safari.

However, Nathan de Vries discovered that the UIWebView class does seem to have in-built support for WebGL. Read all the details at

http://atnan.com/blog/2011/11/03/enabling-and-using-webgl-on-ios/

This work evolved into GoWebGL, which  is an example of how a simple WebGL supported browser can be written for iOS5 devices

https://github.com/gauthiier/GoWebGL

In the example app, simple gestures and inputs are provided allowing a user to enter a required URL in a text edit box launched using a two finger double-tap, to browse forward by a swipe left or browse backwards with a swipe right.

Support for WebGL in UIWebView is enabled as shown in the following code extract

//-> init + setup UIWebView (from Nathan)
    UIWebView* webView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    id webDocumentView = [webView performSelector:@selector(_browserView)];
    id backingWebView = [webDocumentView performSelector:@selector(webView)];
    [backingWebView _setWebGLEnabled:YES]; //<-- !!!

Because this is an undocumented feature, using it is unlikely to be approved by Apple. It does enable me, however, to explore and research the potential for using WebGL applications on the iPad. In the future, I have no doubt that Apple will provide official support for using WebGL on the iPad.