I'm going to talk about design for 3D printing
3D printers are now quite common
lots of information about them
from the hobbyist end that extrudes plastic
to professional machines that directly sinter metal powder with a laser
I got to see one of these in action
at the Harwell open day last year
Diamond's engineering group
making real, useful things
So how do we design something?
You could take a standard design, but that's unlikely to be useful
lots of info about printing - less about creating design
I thought this would be easy
even if I can't remember which is 1st angle and which is 3rd angle projection
How do you design a 3D model?
2 basic ways:
First is Direct/Explicit modelling
Blender's a good example of this.
It's a great tool for making some things (chameleons?), but …
design is stored (not just displayed) as mesh of polygons
To me this loses essence of design
E.g. cylinder – radius/length are implicit not explicit
I want to be able to specify the properties of the thing I'm designing in such a way that I can change them & edit my design.
The software analogy is that I want to edit the source code & recompile, rather than edit the machine code.
term for this = “parametric modelling”
So, why am I interested in doing this? What started me on this journey?
I had a specific use case here – a colleague was working on a device to remind dementia sufferers to do their daily tasks, and I was helping with the electronics
We'd found a nice light-up button we could put graphics in, but rather than put it in an ugly square box, I thought it would be nice to do something slicker
I was doing this on my own time & started looking at the tools available
the industry standard software is rather expensive
outlay similar to one of those bundles
& it runs on a platform I don't generally use
Is there an alternative?
? maybe free or even better an open source version
The first parametric modelling (among other things) tool that I found is FreeCAD.
This is a GUI tool, so you drive it with a mouse. This is one of the subassemblies
& it'll call povray to make cute raytracings of the output
Anyway, back to CAD
To me, there's really 4 fundamental operations.
Firstly, you can create solids: Here's a cone
And a sphere
2nd fundamental operation - you can combine them
in this case a union
An intersection
A difference
Or the other difference.
I can use this to demonstrate parameterised modelling; you could edit, say the sphere diameter
… & the intersection recalculates.
This is theoretically enough, but it'd be tedious to do this for complex parts. And it doesn't encapsulate the way we think about some type of designs.
So here's a real-world example. It's the mount for a microswitch in our dementia device. Even something this simple would be tedious to do by boolean operations on solids.
We start with a solid, again
On this we draw what's called a 'sketch'
This is our third fundamental operation
In this case, the sketch is defined by 4 lines (the green ones in this view); these don't have coordinates – instead they're constraints (in red); in this case 4 distances & 2 parallel.
I've done it by doing distances from the edges, but I could equivalently have said make the green rectangle 3mm wide & put it in the centre. Actually that might have been better!
Once we've defined the sketch
We can extrude it
… and draw another sketch
This one's more involved
… and this time we're going to do the opposite of extrude – which is called “pocket”
& make it deep enough to go all the way through
& duplicate this
& finally we add a fillet to smooth the transition & make it stronger (I think of this as the 4th fundamental operation), munging the output.
Doing fillets & chamfers can make the end product more robust & look nicer. Actually this is one of the joys of 3D printing; it'd be hard to do by conventional means & makes up for the fact that the materials often aren't as tough
We looked at one GUI tool – but there's another more programmery one
It's still doing the same types of operations, but instead of using a mouse, it's defined in code.
Using code sounds less sophisticated, but there are advantages & I'm coming across to this as a way to work:
- let's you express in more hierarchical & reusable way
- text is transparent – you can look at the file & understand it directly; you can put comments in it, & see diffs/history in source code control
(this is a caffeine molecule)
Here's a simple example – it's a torus that I used as an attachment point
I've defined some variables; the thickness & radius of revolution of the torus
We start with a circle of the correct radius (it's displayed as a cylinder of unit length)
We offset it from the origin (that's the radius of revolution)
& revolve it about the origin
In this case, the operations I'm doing are combining – each one operates on the result of the previous one
We're programmers here & like code reuse
So let's make this a function
& obviously we need to instantiate the function
The guff at the top is just to stop it looking like this
Actually there's some tweaking involved in getting the detail to come out at an appropriate level in a non-trivial design
Here's the finished design
Contains the torus
- example of code/text motivation, the 2 rings are done by iteration, & take an array of pairs- sphere size (rep. Carbon/nitrogen)- bond: single/double
I'll pass round the final printed model
So:
- talked about the 2 types of 3D modelling (explicit/direct vs parametric)
- 4 building blocks of parametric modelling
- couple of different tools
(if time; materials, producers)