7.

Computer-Controlled Machining

Home

Assignments

group project:
test runout, alignment, speeds, feeds, and toolpaths for your machine

make (design+mill+assemble) something big

Corona Virus = no group assignment, yet.

Unfortunately COVID-19 has closed our Fab Lab last week and therefore we were not able to do the physical assignments.

It didn't stop us to do the design for "something big" but I didn't have time as I had to adapt all this situation with my colleagues, work, etc.

As for my final project I am hesitating between doing either a Smart Window or some Furniture x Plants, I thought I'd wait until I decide.

Download files

Here are the download files for this assignment, it includes the DXFs from Slicer, PNGs for Mods, and the .nc G-Code file. It doesn't include the Blender file as it is 19MB.

Download all files

Designing the armchair

Design #1

I had different ideas for the design. I’m basing a lot of my decisions on the current armchair I have in my living room - it is very comfortable because it has nice cushions but also good measurements; for example the armrests are at the right height and good width, your legs do not dangle in the air as it is quite deep.

alt_text

I wanted to try and keep the shape and functionality of it, so keep a similar design. I did a few sketches but wasn’t sold on it.

Sketches

I like the design of the traditional armchair, a bit like this one.

alt_text

Although obviously it’d be narrower, and not just parallel lines but have the waffle patterns. The separation between the slices would wider as well, which might affect the looks and structural integrity of it.

alt_text

My crappy sketches

Attempt at designing it in Blender

Because I wanted the design of this armchair to be organic and curvy I decided to use Blender. I find it allows for more creative freedom.

Note //
I have used Rhino in the past but find it to be more geared towards engineering and precise measurements. I will be using to make the plastic hook for the plant pots.

I followed this absolutely incredible Blender tutorial playlist by CGBoost on YouTube, which I’ve been sending to everybody since I found it. It’s explained super clearly, covers the basics and more advanced features, gives you the shortcuts, covers materials, textures, lighting. It’s amazing.

Useful tools

A few of the main tools to keep in mind, for me, were the Loop cut (Cmd+R) and Knife Cut (K) which allows you add geometry to the model without changing it’s shape.

Still, I tried to make it in Blender to see if it could look better. Parts of it looks nice, but I’m not 100% sure in general… there’s a bit too many features. It should be simpler.

Something that drove me mad was that after Extruding (E) it would create Edges and Vertices that would overlap and therefore make the shape have very sharp areas.

I (FINALLY) solved by going to Edit Mode (Tab) and select Vertices and moved them around to see which ones were duplicate or not. I started deleting Edges until there were holes.

To fill those holes you select 3 (or more) edges that create closed loop and press F for Fill.

alt_text

I want to keep the back of the armchair quite deep so that it has space to host plants.

In the end I wasn’t a big fan of it... The “feet” look a bit like the rocket in Tintin (which I guess isn’t that bad of a thing).

Design #2

I had a video chat with my friend and he drew something super quick without really thinking about it, but it looked cool, a simple sphere where you sit. He also added a net which was a good idea.

alt_text

The only thing with a spherical armchair it’s an awkward shape for armrests. You can’t put your arms on the side and keep there, they’d probably slide down.

alt_text

I looked at these designs when I thought: “If it’s deep enough then why not have the armrests inside the armchair’s boolean difference (can’t think of the right word).

Sketched something else down.

alt_text alt_text

Then started playing around with Blender.

Blender

I used two techniques to get an original shape to then take out from

Technique #1

In technique one I created a sphere and then use scale to flatten it’s bottom and change the scale to give change the shape.

  1. Shift + A to add an object
  2. Select UV Sphere
  3. Tab into Edit mode
  4. Use 1 to select Vertices mode
  5. Select some Vertices
  6. Press S + Z to Scale and constrict on the Z axis
  7. Type 0 to flatten it
  8. Press G + Z to move it on the Z axis
  9. Optionally press O to activate Proportional Editing
  10. Drag it up to the desire place

Now we the main body of the armchair, we add another sphere to use as a boolean object. With a Boolean Difference you can take OUT some “material” from another object.

Boolean Difference

It looks cool, but the modifier doesn’t let you see the effect when in Edit mode… aaargh.

alt_text
Note //
I used this GitHub for booleaning: https://github.com/jayanam/fast-carve/tree/fast-carve-2-8 - it allows you to create a pending boolean and see both object in Edit mode. Before if you didn’t hide the object you used to extract from the target element, it would be in the way.
alt_text

When happy with it, Apply Boolean. I’m not a massive fan of applying booleans, because you can’t come back and change the position of the sphere. In this case I shall Cmd + Z this (cancel the apply boolean operation) and leave it as a modifier… but before doing that, I noticed something.

When you do apply the boolean, you have very ragged edges… Which becomes even worse when you have a Subdivision Surface modifier… I somehow need to add a shell, or some thickness to the main body so that the edges aren’t sharp.

alt_text

I think I’m going to create an empty sphere, give some volume somehow and then do the boolean?

Adding the Solidify modifier

The Solidify modifier seems to do what I want. You input a thickness, I put 15mm as it’s the plywood thickness, although it shouldn’t really affect the design.

I also added a Subdivision Surface modifier on both spheres and it looks better. Let’s apply the boolean… oh, god… what I have created?!

alt_text

Also I realise that solidifying doesn’t work, because now we only have a very thin shell. We need a full sphere like before… but with edges that aren’t sharp… I guess I have to modify the sphere I’m using to extract…

Maybe let’s try with an icosphere? (sphere made out of triangles.). Makes the computer crash if you have too much divisions. Try with less divisions and do the boolean.

alt_text

Ah! I thought… it looks good before applying it… why not after? I was adding Subdivision Modifiers to both spheres before doing the boolean, but not applying these subdivisions… which means when I did apply the Boolean Difference, it used the “low poly spheres”.

Ok… that’s fixed.

Changing the shape of the extracting sphere

I want the back tall people to be able to use that chair, and therefore have the back/top “open” so a head can stick it out.

Below the chair might be a bit too deep (or wide if we look it at that angle).

I could also cut more into the bottom back of the chair to save material, make the the chair lighter and breathable.

I’ve add an idea of having a flower bed below the user, and then it can grow up through the hole with these climbing plant (like the Ivy or Creeping Fig).

alt_text

Like I mentioned above, I made it a little bit deeper. I did this by:

  1. Tab into Edit Mode
  2. Switching to the side view (Numpad 3)
  3. Go into Faces selection
  4. Enable the Proportional Editing (Key O)
  5. Moved it around with G
alt_text

I’ve left some space at the back to have the vertical plant pots.

I thought it was a bit too deep in the Y axis, so I narrowed, and then scaled it down to a real world scale.

alt_text

I like how it looks, the only thing is it doesn’t have much space at the back for extra plants…

Visualising it with AR

It is surprisingly easy, follow these steps:

  1. From your phone visit this link: https://bit.ly/2JOKiW1 (or open and scan this QR code)
  2. When prompted accept to use your camera
  3. Point your phone to the image saying Hiro below

Note: Click on the image to make it full screen. Click anywhere to come back to page.

Making the waffle pattern

Bible of Computer Controlled Machining. (not Neil’s)

I was planning to do this in Rhino and Grasshopper as I had found a script and adapted for my needs… the problem is… Blender exports a Mesh, and the script needed a BRep.

I found this video that basically breaks down the Mesh into Faces and then restitches them together as a BRep. I did it, but because the mesh is super smooth it has 1000s of surfaces and is not happy as a BRep. It is super slow and Rhino crashed, so doesn’t seem like a viable way.

I either have to have a lower amount of faces (which should be doable by not Subdividing Surfaces in Blender), but then the edges are all messed up.

IDEA! What about cutting the spheres in half and then joining the two other half together… yes it should work.

Using Grasshopper

When I have my BRep ready I can import into a Grasshopper script to cut into the waffle slices to CNC cut.

The Grasshopper script was found here, I modified it because the original script took a value, for example 6, and divided the geometry into 6 equal parts. I prefer to be able to say how big I want the holes of the waffle designs to be, so that I can insert the 3D printed plant pots in it.

I need to also add to the script the thickness of the material.

This documentation of a previous Fab Academy student is pretty cool.

Actually… doing in it Blender

There is an awesome addon for Blender called Sverchok which enables similar options that Grasshopper on Rhino. It works with nodes and you can connect them to create geometries. The only downside is that there isn’t many tutorials available online, but it is so simple that I actually managed to make it work quite quickly without having to check any out.

This technique isn’t great to actually create the slices needed for the milling, but it’s good to have a visualisation of what values you need.

I had first wanted to use holes that are 150x150mm to allow ample space for plant pots… but after a first design I realised it was way too big…

Let’s track back and see how in only three steps we can create a waffle design object.

Launching Sverchok

To add as an addon, download the zip file from the GitHub above, in Blender go to Edit > Preferences, click on Install and select the zip file that you downloaded.

To access Svechok, click on the Editor Type icon and select Sverchok.

alt_text

Click on New to create a new Note Tree.

Visualisers

First things first, in Sverchok you need to add a viewer that display what you are doing into the Blender 3D viewport.

Like everywhere on Blender, press Shift + A to add something to the view, in our case a node.

Viewer Draw Mk3 displays the geometry, but it can’t interact with existing objects in the viewport, like for example the armchair in my scene. It has the option to Bake the shape in, but then if you apply any changes you’d have to delete the previous bake and rebake it. I only use this node to preview what I’m doing in Sverchok.

Viewer BMesh displays the geometry in the viewport, and it can actually be used for operations, such as using it as an object in a Boolean Modifier (which is what I will do in a second). It seems it is slower to update changes though.

Adding geometries

Let’s create a plane
Shift + A > Generator > Plane
Give it some thickness
Shift + A > Modifier Make > Solidify
Let’s get the armchair from the Scene
Shit + A > Scene > Object in
Select the armchair in the scene and click Get selection
For these objects to show on the scene we need to add a Vizualiser.
Shift + A > Viz > Viewer Draw Mk3

Adding a boolean

Let’s look for something to do a Boolean operation.

Shift + A > Search > Boolean … select the only option: CSG Boolean 2 (script available here)

Let’s connect the nodes together. It crashed. It crashed again. It keeps crashing… I tried different ways, and it crashes everytime… but fear not! I have found a solution.

When using the Viewer BMesh node, a layer in the Collection is created, in my case called Alpha.0000. (I noticed if you add multiple nodes they are named Beta, Gamma, etc.)

Going back to my Armchair layer, I can add a Boolean Modifier, select the Intersect operation and select that Alpha.0000 layer as an object and tada! A slice is created.

alt_text

Good! Getting there.

Let’s try and create a grid of planes now… or maybe creating a grid and extruding it? Let’s see.

Something to do with a grid

I’ve managed to create a Polygon Grid, select the size and number of squares I want in the grid, and Extrude it so it has height, but I can’t seem to add volume to the Edges. The Solidify Modifier doesn’t work either.

alt_text

Ah! After some playing around I noticed that if you modify the scale it create spacing between the squares.

alt_text

Then if you do Shift + A + S (for Search) + “Extrude” you find Extrude Separate Faces

alt_text

Finally use the Viewer BMesh to have it in the viewer, and Bool Difference it with the Armchair object and tada!

alt_text

Creating the contours

The thing is, for milling we need curves of the contours… so this technique is cool for visualising, but it isn’t great for the actual making.

Note //
It’s also not great because with the grid we use the scale of the size of the squares to define the material thickness which is not good. We need preciseness.

I’m looking for keywords that could be useful to search. I’ve found a node called Contour 2D, another interesting one called Plane Intersection (actually no, it’s only the intersection between two planes, so it’d only be a line… except if one of the planes is all the face of the geometry?).

… or follow a tutorial?

Oh, I found a tutorial. It does slices on one side, but that’s it though. It doesn’t create the notches so that they slide into each other.

Actually… back to Grasshopper

I switched back to Grasshopper. Blender is great for precise designing, but it was getting impossible to 1. design it like I wanted, 2. then cutting it into pieces to use for cutting it.

I switched back to Rhino and did a really quick design by creating two spheres, boolean difference them.

In Grasshopper I had found a script to do the waffle design, but it was messy, and to be honest, I think it wasn’t very well done. With two components I managed to replaced about 10 the original script did…

Let’s write down the steps we want to do:

  1. Take the BRep shape
  2. Cut slices out of it
  3. Get where they where they intersect
  4. On X plane create a rectangle with thickness of material on x axis, and half the height the slice and positioned at the bottom half of the slice
  5. On Y plane create a rectangle with thickness of material on x axis, and half the height the slice and positioned at the top half of the slice
  6. Cut that rectangle out of the slice
  7. Cut contour of the slice

Making the slices

Contour Component

Add a Contour component which creates curves out of slices a BRep. Give it the Brep, the direction of the cut and the distance between the contours. It’s great it means I can decide the size of the flower pots.

I need to add the thickness of the material divided by 2 so that the gaps are the right size.

Boundary Srf Component

It creates surfaces out of these edges

Brep | Brep (BBX) component

Feed the two boundary components from above and flatten the output of one of them. That gives you lines where the slices intersect

… sorry, I mean Slicer

I enjoyed playing with Grasshopper, but I was only creating the script for a model that would be designed in Rhinoceros, which isn’t what I wanted to do. Rhinoceros isn’t as… free as Blender. In Blender you can change each vertices, edges, make it the perfect shape you want it to be.

When I presented my final project to Neil, Madison from Boston jumped in to say she did something very similar to my idea. She explained she designed in Blender and the slicing in Slicer… that’s perfect! Slicer! That’s what I want.

alt_text

Very cool, I’m glad somebody else did it and it looks as nice as I had imagined it.

I downloaded and installed Slicer and, wow, it is so much easier! No superfluous options, no messing around, you just import the shape, give it the right size, set your material size, thickness, choose what style of slicing you want (there are some I hadn’t even thought about), and boom, it’s all done. Even your DXF files. It’s almost too easy…

Let’s go more in depth

As Slicer is concentrated on only doing that it’s pretty simple to use. Just import your 3D model. I noticed I had to change the up-axis of the mesh to Z when selecting in the Finder window.

alt_text

Then I created a new material with the size of 2400x1200x15mm as these are the plywood boards we have at the lab.

I then set the measurements unit to millimeters, set the width of my model to a multiple of 77.5mm. I did that because I want the squares to be 70x70mm so that I can fit my plant pots in it. I then added half the width of the material so 7.5mm.

I then selected the type of construction technique I want (you have the option between stack slices, radial slices, curve and more. alt_text

Finally enter the settings for those slices. Like I mentioned before I want the squares to be 70mm in width. I select by Distance as the Method and then set the distance. For some reason this section isn’t in mm but in inches, so I had to convert 70mm to inches. 77.5 / 25.4 = 3,05mm. For some reason it also rounds it down to the nearest integer… great. Nice a precise measurements here.

Next I changed the Relief Type (which is how you want the end of the slots in your slices to be) to Vertical. If you zoom in the picture you can see what I mean, it’s where you do the dog bone, or T-junction or whatever they are called.

alt_text

Finally click on Get Plans, select your preferred file type and measurements and click Export to My Computer, and that’s it!

Note //
For some reason the software doesn’t let you save or sign-in. It’s buggy and Autodesk doesn’t plan to fix it.

Creating the CAM toolpath

Now we have the DXF files, let’s create a toolpath.

There’s a few ways to achieve that:

  • PyCAM, a Python library for creating G-code from STL, DFX or STL files.
  • mods with a PNG, SVG or STL file.
  • Paying softwares like RhinoCAM, Fusion 360, VCarvePro (nope)
  • FreeCAD Path, but it crashes all the time (nope)
  • Dxf2gcode freeware found online

Using FreeCAD

Enabling importing DXFs: https://wiki.freecadweb.org/FreeCAD_and_DXF_Import

Create a new Sketch

Import the DXF file

Aaaand, I don’t even know how to select multiple lines together. I hate this software.

It crashed… Re-opening and re-importing the Box Selection… nope, even that doesn’t work. That’s lovely. God I hate this program. Nothing works.

It crashed again when I tried to do a boolean union. Let’s abandon.

Using mods

Mods only accept a PNG or SVG file for 2D milling, so I have to convert the DXF first.

Nesting and converting to SVG in Illustrator

I imported all the DXFs in Illustrator and put them nested better. Make sure they are at least 6mm away from each other to leave space for profiling.

Note //
I forgot to add some rectangles to hold it together when it cuts it so it doesn’t fly away. Bridges?
alt_text

Then I exported to SVG.

In mods I did right click > programs > open server programs > Shopbot > mill 2D svg

Problem is when I export to SVG to import in mods, mods doesn’t get the width and height of the SVG file and so can’t do the path...

alt_text

Instead I imported in Photoshop as a PNG, made the inside white and the outside black and then exported it (with DPI at 72).

Settings in mods

I used these settings for the spindle speed, etc. http://fabacademy.org/2020/labs/barcelona/local/#material/week07/#rhino

Spindle speed: 18000RPM
Cut speed: 4500 mm/min, or 75mm/s

alt_text

The material is 15mm deep but Edu advised to cut it to more as it can vary so I changed the max cut depth to 15.5mm and then cut in increments of 3mm (half the width of the endmill).

When I was happy with the settings I clicked calculate in the mill raster 2D module.

alt_text

The path rendered by mods. That seems about right. It has 5 height which is what I expected.

Checking the G-code it generated

I opened the file in Sublime Text to see if it seemed right, and because I’m curious.

alt_text

All looks pretty good to me.

  • G17 selects the XY plane
  • G21 sets unit to mm
  • G40 doesn’t do anything in Marlin so not sure what language we’re looking at
  • G49 neither
  • F20.0000 is the feed rate speed (seems quite slow no?)
  • S18000 is the spindle speed
  • etc.
  • G01 tells to move to the X,Y,Z defined positions

I found this NC G-code path viewer online where you can enter your generated g-code and simulate it.

alt_text

... and tada! You can see it move.

Download files

Here are the download files for this assignment, it includes the DXFs from Slicer, PNGs for Mods, and the .nc G-Code file. It doesn't include the Blender file as it is 19MB.

Download all files

Have you?