Categories
Cloud Software Techniques

Decorative Panels using Variables in Onshape

Recently, I noticed some decorative wood panelling and thought it would be an interesting exercise to create them, or something similar, as a 3D model using Onshape. The technique I’m going to use could be equally applied when creating fretwork or trellis.

DecorativeWoodPanel

I’ll take advantage of the symmetry in the design to simplify the geometry that I need to create and use the recently introduced “Variables” feature in Onshape as parameters to control the overall size and allow different designs to be easily created.

My design consists primarily of intersecting circular arcs which will be extruded to create a flat panel. A basic shape will be created and use the “Linear Pattern” feature to create the panel. Due to the symmetry in the basic shape, I only need to create a quarter which can then be mirrored to produce the basic shape.

Use the Variable command from the toolbar

VariableCommand

to create variables for:

Diameter – the overall size of the basic shape, initially set to 100mm.

VariableCreation

and

Thickness – the thickness of lines used in the shape, set to 2mm.

VariableFeatures

Note:
Variables are created as features and referenced by #name, in this case #Diameter and #Thickness. The value entered for the variable can use expressions, such as #Radius = #Diameter/2 but it remains unclear how extensive these can be (experiment for yourself).

Create a sketch, I’ve used the “Top” plane and will use the top right quadrant (origin at bottom left) to define the geometry.

Create horizontal and vertical construction lines and dimension their distance from the origin specifying the variable #Dimension as the value for the dimension. The dimension will be displayed showing the value of the variable.

Dimension

Note:
Dimensions defined using variables will be displayed showing the result of the expression. Click on the dimension to view/modify the value of the variable.

Proceed to create the remain geometry. Adding dimensions as necessary to ensure that the sketch is fully constrained.

dimension2

Dimension3

Dimension4

Extrude the sketch to create a solid

Quarter

Mirror the part to create half the shape.

half

Mirror the part to create the basic shape ready for patterning

Full

For the panel create 2 additional variables

#Horizontal – the number of basic shapes to pattern in the “x”-direction set to 2.

#Vertical – the number of basics shape to pattern in the “y”-direction set to 2.

and use the Linear Pattern tool to create the final pattern.

Vertical

Change the panel by sinply modifying the variables to create different results

FinalPanel

Modify the sketch to create more complex patterns

Sample2Outline

Sample2

Here’s the finished Panel matching (or at least close to) the original image

Complete

Summary

Variables are a useful addition to the functionality available in Onshape and could have been implemented to form the basis for a future fully featured macro programming language which may be made available for users. They can be used to simplify the process for non CAD literate users when modifications are required to the model.

Categories
Software

FreeCAD

freecad-logo

FreeCAD is a free open-source parametric 3D CAD system and can be used by anyone to create 3D models.

http://www.freecadweb.org/

The current version of FreeCAD (0.15) was released on April 8, 2015 and runs on Microsoft Windows, Mac OS X and Debian based Linux systems.

It has been developed since 2001 and uses Open CASCADE[1] as it’s geometric modelling kernel.

To install the program, download the relevant package for your machine and follow the installation instructions.
http://www.freecadweb.org/wiki/index.php?title=Download

Then go to the getting started page for a quick introduction to the available tools.
http://www.freecadweb.org/wiki/index.php?title=Getting_started

There are a number of workbenches available for you to use. They are designed to present the tools you are likely to use when modelling for various particular purposes. You can also customise any of the workbenches to suit your own particular needs.

workbenches

  • Use the PartDesign workbench for creating mechanical models or any small scale object.
  • For working in 2D use the Draft or Sketcher workbench.
  • The Arch workbench is the one to use for Architectural models
  • Designing ships? then use the Ship workbench
  • etc.

Here’s an approach for creating a simple model,

  • Start the program
  • Select the Part Design workbench
  • Create Sketch
  • Create some Geometry

  • Close the sketch
  • Select “pad” command
  • Specify the length required

freecad3

  • Select a face of the model
  • Create Sketch
  • Create some geometry
  • Close the sketch

freecad6

  • Select the “create pocket” command
  • Specify the length
  • Close the dialog

freecad7

  • Select a face
  • Select the make fillet” command
  • Specify the fillet radius
  • Close the dialog

freecad5

There are lots of features available in FreeCAD, one that caught my eye is the FEM (Finite Element Analysis) module. This module supports the linear analysis of isotropic (uniform in all directions) material and the calculation of resulting stress (v.-Mises) and displacement. This module uses the Calculix[2] free, open-source Finite Element Analysis application.

FEM

Another interesting module is the Robot workbench although I haven’t tried this one out (yet)

http://www.freecadweb.org/wiki/index.php?title=Robot_Workbench

FreeCAD also offers an alternative approach to driving FreeCAD using the in-built scripting language. Python[3] is used as the scripting language and this allows you to enter modelling commands directly into the python console window.

FreeCAD source code is also available[4] and can be downloaded if you need it.

Footnotes:

  1. Open Cascade In 1993, Matra Datavision first created a software development platform for developing CAD applications called CAS.CADE – Computer Aided Software for Computer Aided Design and Engineering. Matra Datavision have a long history in CAD software dating back to the 1980’s and are perhaps best known for a CAD system called Euclid. In 1999 they published CAS.CADE as open-source software known as Open CASCADE and later, in 2004, it was renamed Open CASCADE Technology. Read more about the history of Open Cascade Technology at
    http://www.opencascade.org/about/profile/history/
  2. Calculix Find out more about Calculix at:
    http://www.calculix.de/
    http://www.dhondt.de/
  3. Python Read more about python in Wikipedia
    http://en.wikipedia.org/wiki/Python_%28programming_language%29
    or on the python web-site at
    https://www.python.org/
  4. Compiling the source code Detailed instructions for compiling the source code are available from the FreeCAD website.
    http://www.freecadweb.org/wiki/index.php?title=Compiling
    http://www.freecadweb.org/wiki/index.php?title=CompileOnWindows
    http://www.freecadweb.org/wiki/index.php?title=CompileOnUnix
    http://www.freecadweb.org/wiki/index.php?title=CompileOnMac
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
Software Tools

PhantomJS

In re-visiting a request to provide an application to capture a web page as an image, I remembered phantomJS which is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. currently at version 1.9 Find it at:

http://phantomjs.org/