Categories
Uncategorized

DXF for LaserCut 5.3

lc014

I’ve been using LaserCut 5.3 to control a G.Weike LC1390N Laser Cutter, and since I use Inkscape to create my files, I thought I’d go over a few of the settings I use so that in the future when I forget I can read this post.

I won’t go too deep into using Inkscape for laser cutting, as it’s a topic I’ve covered before, and besides having to use DXF files instead of PDF files, nothing else has really changed.

lc000-inkscape

In the image above you’ll see a file being exported from Inkscape as a DXF file for a “Desktop Cutting Plotter” which, I guess, is one way to describe a laser cutter. :) I’ve avoided selecting the ROBOMASTER option, as that does strange things to DXF files. I’ve also avoided the LWPOLYLINE option. While the LWPOLYLINE option sometimes works, it sometimes causes issues. Don’t select either option when outputting from Inkscape to import into LaserCut 5.3.

I create my files using millimeters for units, and then export the DXF with pixels (px) specified. I believe there is still a bug in Inkscape that will screw things up if you choose millimeters for the export. (We’ll double check the imported size later to make sure it worked properly.) One more nice thing about Inkscape is that it’s easy to switch between millimeters and inches (or other units) on the fly while drawing.

lc001

When importing the DXF file into LaserCut 5.3 it may show some weird dialog. Ignore it. Files seem to import fine even when this shows up. Also, occasionally LaserCut 5.3 will not import a file, or will get an error. If that happens, just quit and relaunch it. That usually fixes it.

lc003

Our file has imported and looks okay. You’ll notice that the lines in the file are all black, well, actually they are all red here, as they are highlighted because they are selected. (Anyway, I forgot to set colors for some objects, but we’ll touch on that later.)

lc006-scaled

After importing your file you can check the size of it using the “Size” button in the toolbar to bring up the size dialog when your object is selected. It will show the length and height (well, it calls them both “length”) and some boxes where you can type in new values.

lc007.png

Pro-tip: If you fill in one value to scale your object, you can scale it proportionately by clicking the ‘…’ button on the other value. Here I’ve typed “100” in the x value box and then clicked the ‘…’ button on the y value box.

lc010

The other trick I’ve learned from the folks at Brown Dog Gadgets is to use the “Unite Lines” feature.

lc012

I just use the default settings it presents…

lc013

This combines the individual line segments that the DXF file is made up of into continuous lines, like a real vector file. It helps the laser cut things in a way that makes sense instead of jumping all around the object.

lc015

Here’s what I forgot to do in the above example. I’ve set specific items to specific colors in Inkscape, so that when I bring the DXF file into LaserCut 5.3 I can use the colors to change the order of cutting operations.

lc016

Here’s our DXF file imported into LaserCut 5.3 with the colors of the lines showing. Up in the right corner you can see where LaserCut 5.3 recognizes all of the colors in the file and allows you to choose individual settings as well as the order. Typically you want to cut inside pieces first and then outside pieces.

Finally, I’ve relied heavily on the work of others, and here are some links that might prove helpful when using LaserCut 5.3 and a G.Weike laser cutter. (And yes, some of it may conflict with what I’ve posted here. Again, if I got anything wrong, please let me know.)

Categories
Uncategorized

Screw/Bolt Diameters

Borrowing a bit from our friends at Bolt Depot, their chart showing US Machine Screw Diameters is helpful, but often I’m designing with Metric units (or a unit-less system that outputs in millimeters) and I need to convert Imperial units to mm. (I tend to do a lot of work using OpenSCAD and Inkscape for 3D printing.)

The chart below allows me to specify screws and bolts and then design holes that will work. For instance, I used a lot of #4 screws, and the chart tells me I need a hole diameter of approximately 2.794mm. Handy!

Size Thread Diameter
Decimal Nearest Fractional Metric
#0 0.06″ 1/16″ 1.524mm
#1 0.07″ 5/64″ 1.778mm
#2 0.08″ 3/32″ 2.032mm
#3 0.09″ 7/64″ 2.286mm
#4 0.11″ 7/64″ 2.794mm
#5 0.12″ 1/8″ 3.048mm
#6 0.13″ 9/64″ 3.302mm
#8 0.16″ 5/32″ 4.046mm
#10 0.19″ 3/16″ 4.826mm
#12 0.21″ 7/32″ 5.334mm
#14 0.24″ 1/4″ 6.096mm

See Also: Millimeters, Inches, Fraction, Decimals

Categories
Uncategorized

Barcode Binary Card Reader

Sensors

I recently prototyped a device to read cards (physical cards with printing on them) for a project. I used five SparkFun Digital Line Sensor Breakout Boards attached to a 3D printed mount and wired up to an Arduino.

Card and Sensors

The cards have five blocks at the bottom, which are either black or white, representing 1 or 0. Using ones and zeroes allows us to create a binary encoding scheme, so with five positions we use 1, 2, 4, 8, 16 for the values and can represent any number from 1 to 31.

Sensor Mount

I started by grabbing the image of the sensors from the SparkFun product page and dropping them into Inkscape (sized appropriately) so I could design the barcode part of the card, and so I could design the mount for the sensors.

Sensor Mount

Once I had a 2D design in Inkscape I exported it as a DXF file and used the linear_extrude command in OpenSCAD to create a 3mm tall plate, and then added another plate. It wasn’t perfect, but it was fast. I started the 3D printer while I got to work soldering…

Sensors

Sensors

Sensors all soldered up, mounted to the plate with 3mm screws, and wired to an Arduino via a breadboard. All of this is still prototyping stage. It doesn’t look pretty, but it worked and it was enough to test things out and do a demo.

Cards with Barcodes

Here’s an example of some card templates. Can you determine what number is being passed by reading it in binary? Since we’ve got 5 positions we can have 31 different cards… If you needed 63 cards, you would need 6 positions (and one more sensor.) 127 cards? That would be 7 positions and two more sensors. Any more than that and you might consider using the SparkFun Line Follower Array which has 8 sensors on a single board.

Card and Sensors

The total time to create this prototype was just a few hours from starting a design in Inkscape to 3D printing a piece, soldering up and mounting the sensors, and writing the code. (I also wrote a simple Processing application which read the serial output from the Arduino to display the card data on screen.)

Categories
Uncategorized

Milling Recycled HDPE – Workflow

Make

I wanted to document how I did the artwork and toolpaths for the MAKE thing I make on the Shapeoko CNC router at BAMspace recently…

Make

I started with my old MAKE design in Inkscape and set it to the size I wanted. I also placed it on the canvas as if it were on the piece of stock, knowing that the lower left corner would be the home position on the CNC router.

Make

After I saved out my SVG file, I loaded it into MakerCam. Now, you can go to www.makercam.com and use that, or you can load up the SWF, and save it locally to run on your own machine. (Flash is required either way. I guess the source code is also available, but you probably need Adobe’s Flash development tools to do anything with it.)

If you’re using Inkscape, you need to set the prefs to 90ppi instead of 72ppi before you open your SVG file. Oh, make sure you check out the MakerCam tutorial, help, and about pages.

Make

In MakerCam I created two profiles, one to cut the inside pieces, and one to cut the outside of the entire piece.

Make

These setting worked fairly well. I would up the feedrate or the step down on our machine if using 1/2″ HDPE. This job definitely took a while to run…

Make

Once I had the toolpaths all set in MakerCam I exported the G-Code into a single file, and then loaded that file into OpenSCAM to run a simulation. (Looks like OpenSCAM recently rebranded as CAMotics… guess I should grab the latest version!) Running the simulation allows you to see the toolpaths and check how many passes it will take to cut through the material. I guess you could also use math, but sometimes I prefer visualizations…

That’s pretty much my workflow for 2.5D toolpaths; create art in Inkscape, load it into MakerCam and generate G-Code, load G-Code into OpenSCAM (CAMotics) and see how it looks.

Categories
Uncategorized

2D to 3D to 2D

Parts

There comes a time when every designer who designs things in two dimensions that get assembled into something that has three dimensions wants to have a diagram with some… dimensions.

Above is a dimensional illustration of the parts of the mount for the shaft for the machine I am building.

If I were to provide assembly instructions I’d probably want such a drawing. Here are some notes on the process, so I can do it again next time.

Parts in Inkscape

In Inkscape, each piece must be an object. The ‘holes’ cannot be separate objects, but must be cut out (differenced) from the main object. (This is the same method needed when bringing a 2D drawing into OpenSCAD, so nothing new there.)

Sadly, Rhino cannot import SVG files. (Mini-rant: I’m always surprised at the number of applications that do not support SVG. The SVG specification has been an open standard from the WC3 since 1999!) Rhino can import PDF files, so export your Inkscape file as a PDF. Your PDF should be a vector PDF, by default. Inkscape should do the right thing unless you’ve done something silly to your file. (Which is possible, I’ve done it.)

Parts in Rhino

Our vector file is now in Rhino! Double-check to make sure each line/object did not get doubled-up. I’ve had it happen a few times but could not conclusively determine what causes it. It may be the width of the stoke of the objects in Inkscape.

You can now extrude your object(s) in Rhino. I make them the height of the material I am using. Oh, I’ll be laser cutting these pieces with 4.45mm acrylic. YMMV.

Solids in Rhino

Change the view in Rhino from wireframe to solid and you’ll see your new 3D object(s)…

Extruded in Rhino

Make sure the holes are really holes! If not, re-read the part above about objects and holes and such. You need to difference any cut out things!

Make2D in Rhino

Now you can move your new object(s) because the original vector lines we imported in are probably sitting right underneath them. Swing your object(s) into the view you want… get that angle just right, and then choose “Make 2-D Drawing” from the “Dimension” menu.

2D from 3D

You should now have a 2D version of your 3D object. Rhino should also select it by default, so you can use the “Export Selection” menu to save it out as… A DXF file. :( Sadly, Rhino cannot export as an SVG or vector PDF, or even an EPS file. Rhino can export as an Illustrator file (.ai) but Inkscape cannot open those. The AI file it exports starts with “%!PS-Adobe-3.0” which is probably a format from that was popular in the 1990s.

3D/2D in Inkscape

Anyway, we can certainly import that DXF file back into Inkscape and work with it, and make it look like a nice vector drawing. Mostly. Sort of. I mean, if you want to just fill it with a color or change the stroke, it’s not quite that easy. If you just want a line drawing that isn’t too fancy, mission accomplished!

Oh, and not that I want to turn Inkscape in a 3D application, but I could see great value in being able to extrude and change the view angle of a vector drawing… maybe through an extension?

Note: Lots of comments about this post are on Facebook.