m(Updated white space and line returns and capitalised all occurrences of 'Inkscape')

(3 intermediate revisions by the same user not shown)

Line 1:

Line 1:

==TL;DR==

==TL;DR==

−

How to deal with problem inkscape files

+

How to deal with problem Inkscape files:

−

Per layer:

+

* Per layer:

−

* Select all

+

** Select all

−

* Path-> objects to paths

+

** Path-> objects to paths

−

* Object -> Fill and Stroke -> Set fill to None

+

** Object -> Fill and Stroke -> Set fill to None

−

* Path -> Combine

+

** Path -> Combine

−

Note that for complicated paths, it may also be necessary to use the "Unite curves" feature of the laser cutter software. Some engraving may not work at all unless this is used.

+

Note that for complicated paths, it may also be necessary to use the "Unite curves" feature of the laser cutter software. Some engraving may not work at all unless this is used.

See also the [[#Alternative_method|alternative method]].

See also the [[#Alternative_method|alternative method]].

Line 15:

Line 15:

==Some laser cutter basics==

==Some laser cutter basics==

−

===Engrave vs cut===

+

===Engrave vs cut===

Engrave involves filling in the shapes. It is non trivial to decide if a point is inside or outside a shape and should be engraved or not.

Engrave involves filling in the shapes. It is non trivial to decide if a point is inside or outside a shape and should be engraved or not.

−

In the laser cutter software it does it by taking a vertical line and and then seeing where it intersects with your shapes lines. The first line it comes to it switches the laser on, when it comes to another line it switches off.

+

In the laser cutter software it does it by taking a vertical line and and then seeing where it intersects with your shapes lines. The first line it comes to it switches the laser on, when it comes to another line it switches off.

This allows for unengraved things inside engraved sections. It also means that if you overlap two objects on the same engrave layer then it will not engrave twice but stop engraving.

This allows for unengraved things inside engraved sections. It also means that if you overlap two objects on the same engrave layer then it will not engrave twice but stop engraving.

This is also why the software complains if the sections that you are engraving aren't continous, it might find a section that is open and engrave for ever.

This is also why the software complains if the sections that you are engraving aren't continous, it might find a section that is open and engrave for ever.

−

Cut is straightforward. It just follows the lines you have made. Joining the lines helps somewhat the crazy cut order it makes.

Cut is straightforward. It just follows the lines you have made. Joining the lines helps somewhat the crazy cut order it makes.

−

==Inkscape basics==

==Inkscape basics==

−

===Why use inkscape?===

+

===Why use Inkscape?===

It can intersect and do path operations on curves and can trace bitmaps, which I haven't been able to do on qcad.

It can intersect and do path operations on curves and can trace bitmaps, which I haven't been able to do on qcad.

Line 46:

Line 44:

This selects object, and allows you to then move them by clicking and dragging or scaling them with arrows around the edge. If you click the object again you can rotate or skew the object with the arrows on the side of the object.

This selects object, and allows you to then move them by clicking and dragging or scaling them with arrows around the edge. If you click the object again you can rotate or skew the object with the arrows on the side of the object.

−

===Arrow and Curve(Object Editing)===

===Arrow and Curve(Object Editing)===

Line 55:

Line 52:

Curves are specified by 3,4 points. There are two end points (which can be diamonds,squares or large circles) and 1-2 control points (small circles with lines connecting them to the end points). The control points tug at the curve, the further away they are from the straight line the more the curvy the curve becomes.

Curves are specified by 3,4 points. There are two end points (which can be diamonds,squares or large circles) and 1-2 control points (small circles with lines connecting them to the end points). The control points tug at the curve, the further away they are from the straight line the more the curvy the curve becomes.

−

There are lots of useful tools in the tool bar. The first two are add and remove points (which are very useful for adding detail or clearing up a scan). To add a point select two (or more) connected end points and press the first button (+ with a square and line through it), deletion just requires the selection of an end point.

+

There are lots of useful tools in the tool bar. The first two are add and remove points (which are very useful for adding detail or clearing up a scan). To add a point select two (or more) connected end points and press the first button (+ with a square and line through it), deletion just requires the selection of an end point.

There are a few different types of end points. You can change the type by pressing the 7-10th buttons.

There are a few different types of end points. You can change the type by pressing the 7-10th buttons.

−

7th button: diamonds are corners: The control points for the curves are unconnected. So ou can have crazy angles.

+

7th button: diamonds are corners: The control points for the curves are unconnected. So ou can have crazy angles.

8th button: The first square (smooth). The control points are 180 degrees away from each other.

8th button: The first square (smooth). The control points are 180 degrees away from each other.

9th button: The second square (symmetric). The control points are 180 degrees away from each other and they are the same distance away.

9th button: The second square (symmetric). The control points are 180 degrees away from each other and they are the same distance away.

Line 72:

Line 69:

===Changing objects into paths===

===Changing objects into paths===

−

DXF files do not have some of the primitives in svg like text or the curvy edged boxes that inkscape generates. This means you need to convert these objects into things the DXF format understands.

+

DXF files do not have some of the primitives in svg like text or the curvy edged boxes that Inkscape generates. This means you need to convert these objects into things the DXF format understands.

This can be done with object to path.

This can be done with object to path.

Path -> Object to Path (Shift-Ctrl-C)

Path -> Object to Path (Shift-Ctrl-C)

−

===Fill and stroke===

===Fill and stroke===

Line 85:

Line 81:

Object -> fill and stroke

Object -> fill and stroke

−

This allows you to change the appearance of the object. Fill is the color inside the line. Stroke is what colour the line is (and a various other things that aren't useful for laser cutting).

+

This allows you to change the appearance of the object. Fill is the colour inside the line. Stroke is what colour the line is (and a various other things that aren't useful for laser cutting).

''Inkscape has a variety of built-in palettes (some copied from Gimp). More palettes can be added by installing palette files in the directory share/palettes. The files use the Gimp palette file structure where colors are defined in terms of a triplet of numbers in a RGB format.''

+

+

Instructions for install are also on the Nottingham Hackspace wiki (linked to above).

==Useful things for laser cutting==

==Useful things for laser cutting==

Line 112:

Line 120:

===Layers and Ordering===

===Layers and Ordering===

−

Layers are ways of separating out objects in Inkscape. However these are not supported exporting to dxf and importing into the Lasercut software. Colours are supported, if the same pallette of colours are used that the LaserCut software uses. Black (0,0,0), Red (255,0,0), Blue (0,0,255) and Green (0,255,0) correspond to automatically creating layers in LaserCut, allowing you to select which coloured layer is a cut or an engrave and reducing setup time.

+

Layers are ways of separating out objects in Inkscape. However these are not supported exporting to dxf and importing into the Lasercut software. Colours are supported, if the same pallette of colours are used that the LaserCut software uses. Black (0,0,0), Red (255,0,0), Blue (0,0,255) and Green (0,255,0) correspond to automatically creating layers in LaserCut, allowing you to select which coloured layer is a cut or an engrave and reducing setup time.

−

Hiding layers also seems to be unsupported, with hidden layers being saved into the dfx. Better to prepare a duplicate (copy, new, paste) of your design with nothing but the design in (no empty layers or guides) before an export.

+

Hiding layers also seems to be unsupported, with hidden layers being saved into the dfx. Better to prepare a duplicate (copy, new, paste) of your design with nothing but the design in (no empty layers or guides) before an export.

Once imported into the Laser software menu:

Once imported into the Laser software menu:

Line 139:

Line 147:

They can mainly be found here. I'll cover the laser cutting view of things.

They can mainly be found here. I'll cover the laser cutting view of things.

This is tested and working. Colours from the original SVG file persist through the conversion process, so this can be an easy way to set up layers for the laser cutter software.

This is tested and working. Colours from the original SVG file persist through the conversion process, so this can be an easy way to set up layers for the laser cutter software.

Line 174:

Line 182:

The imported DXF will end up being tiny (something like 1/10 of its Inkscape size), and will also be positioned a long way off the left and bottom of the on-screen laser bed. The size *might* be fixable by using the <code>-mm</code> argument:

The imported DXF will end up being tiny (something like 1/10 of its Inkscape size), and will also be positioned a long way off the left and bottom of the on-screen laser bed. The size *might* be fixable by using the <code>-mm</code> argument:

−

pstoedit -dt -f 'dxf:-polyaslines -mm' somefile.eps somefile.dxf

+

pstoedit -dt -f 'dxf:-polyaslines -mm' somefile.eps somefile.dxf

this is tested and works well. There are also arguments for rotating, translating, and scaling the output of <code>pstoedit</code>, but those need further experimentation.

this is tested and works well. There are also arguments for rotating, translating, and scaling the output of <code>pstoedit</code>, but those need further experimentation.

−

==Useful Plugins==

==Useful Plugins==

===Vector Fonts===

===Vector Fonts===

−

[http://www.evilmadscientist.com/2011/hershey-text-an-inkscape-extension-for-engraving-fonts/ Hershey Text] renders text as a vector line. This allows for a faster "cut" than engraving our outlining a raster font.

+

[http://www.evilmadscientist.com/2011/hershey-text-an-Inkscape-extension-for-engraving-fonts/ Hershey Text] renders text as a vector line. This allows for a faster "cut" than engraving our outlining a raster font.

Some laser cutter basics

Engrave vs cut

Engrave involves filling in the shapes. It is non trivial to decide if a point is inside or outside a shape and should be engraved or not.

In the laser cutter software it does it by taking a vertical line and and then seeing where it intersects with your shapes lines. The first line it comes to it switches the laser on, when it comes to another line it switches off.

This allows for unengraved things inside engraved sections. It also means that if you overlap two objects on the same engrave layer then it will not engrave twice but stop engraving.

This is also why the software complains if the sections that you are engraving aren't continous, it might find a section that is open and engrave for ever.

Cut is straightforward. It just follows the lines you have made. Joining the lines helps somewhat the crazy cut order it makes.

Inkscape basics

Why use Inkscape?

It can intersect and do path operations on curves and can trace bitmaps, which I haven't been able to do on qcad.

I do use qcad to check the files that are output by this method though.

Setting the scale

In the menubar choose mm instead of px. This sets the measurement of objects to millimetres. It has been fairly accurate, I did my laptop stand this way.

Important tools

Arrow (Object Selection)

This selects object, and allows you to then move them by clicking and dragging or scaling them with arrows around the edge. If you click the object again you can rotate or skew the object with the arrows on the side of the object.

Arrow and Curve(Object Editing)

If you want to do further editing of a path type object then select it and
then alter the points.

Curves are specified by 3,4 points. There are two end points (which can be diamonds,squares or large circles) and 1-2 control points (small circles with lines connecting them to the end points). The control points tug at the curve, the further away they are from the straight line the more the curvy the curve becomes.

There are lots of useful tools in the tool bar. The first two are add and remove points (which are very useful for adding detail or clearing up a scan). To add a point select two (or more) connected end points and press the first button (+ with a square and line through it), deletion just requires the selection of an end point.

There are a few different types of end points. You can change the type by pressing the 7-10th buttons.

7th button: diamonds are corners: The control points for the curves are unconnected. So ou can have crazy angles.
8th button: The first square (smooth). The control points are 180 degrees away from each other.
9th button: The second square (symmetric). The control points are 180 degrees away from each other and they are the same distance away.
10th button: The circle (auto-smooth) The control points are set in such a way as to make it smooth. You can edit this after if you want.

The next two are fairly self explanatory (segment to line, segment to curve). Mousing over is recommended.

Creating objects

I'm not going to spend too much time on this as there are plenty of tutorials on the web for this sort of thing. Experimentation is good!

Changing objects into paths

DXF files do not have some of the primitives in svg like text or the curvy edged boxes that Inkscape generates. This means you need to convert these objects into things the DXF format understands.

This can be done with object to path.

Path -> Object to Path (Shift-Ctrl-C)

Fill and stroke

If you want to visually distinguish different objects.

Object -> fill and stroke

This allows you to change the appearance of the object. Fill is the colour inside the line. Stroke is what colour the line is (and a various other things that aren't useful for laser cutting).

Custom Palette for making cut lines appear as layers in LaserCut v5.3

Nottingham Hackspace have made a custom Palette for Inkscape, both with the seven colours that appear to survive the DXF export process and all the colours from the LaserCut v5.3 software:

Inkscape has a variety of built-in palettes (some copied from Gimp). More palettes can be added by installing palette files in the directory share/palettes. The files use the Gimp palette file structure where colors are defined in terms of a triplet of numbers in a RGB format.

Instructions for install are also on the Nottingham Hackspace wiki (linked to above).

Useful things for laser cutting

Scanning a bitmap

File -> Import

Select the bitmap you want to import in the file dialog. And chose embed. Then select the bitmap and trace it using.

Path -> Trace Bitmap (Shift-Alt-B)

This brings up a dialog box. You can try to scan it with the default settings. This will work if it is a high contrast image. For lower contrast images fiddle with the threshold, updating to see how it changes. You might want to scan multiple colours. If so use the multiple scana. Turn off smoothing and stack scans unless you want to be stacking engraving on top of engraving.

Alternative Trace

Using the above method provides an outline of the bitmap. For tracing letters or line art, AutoTrace provides a centerline trace option.

Layers and Ordering

Layers are ways of separating out objects in Inkscape. However these are not supported exporting to dxf and importing into the Lasercut software. Colours are supported, if the same pallette of colours are used that the LaserCut software uses. Black (0,0,0), Red (255,0,0), Blue (0,0,255) and Green (0,255,0) correspond to automatically creating layers in LaserCut, allowing you to select which coloured layer is a cut or an engrave and reducing setup time.

Hiding layers also seems to be unsupported, with hidden layers being saved into the dfx. Better to prepare a duplicate (copy, new, paste) of your design with nothing but the design in (no empty layers or guides) before an export.

Once imported into the Laser software menu:

Go to 'Tools/Unite lines' and accept the defaults.

Then manually select each segement, and "colour" it to the appropriate layer.

As an alternative for complicated layers

Create a rectangle around the whole design

Save as svg

open original svg

delete all but one layer, and the bounding rectangle

save as dfx

repeat until all layers are available

Open lasercut software

Import a dxf file

Go to 'Tools/Unite lines' and accept the defaults

"colour" it to the appropriate layer

Align bounding rectangle

Repeat until all layers imported

Delete bounding rectangles

Path operations

They can mainly be found here. I'll cover the laser cutting view of things.

Joins the paths together. This is very useful for building up shapes all to be cut the same way.

Path -> Difference

Removes the higher one from the lower one (in layer terms). This is good for cutting out shapes, like a bite from an apple.

Path -> Cut Path

This is useful if you are cutting shallow lines in an object and you don't want to do it twice.

Path -> Combine

This is useful as it can fix problems exporting rotated or translated objects (as dxfs don't store transformations). Combining all the pieces into one object solves this problem because it transforms the points of the object and no transformation is stored for the whole object ( as there were two initial objects it would be hard to know how they were transformed). If you want to have multiple layers, combining them all removes all that information. So create dummy objects on each layer and combine them with you desired layer and then remove the points. If you are having problems with combining objects set all their fills to 0.

Alternative method

According to the OpenSCAD manual, you can get sensible DXFs from SVGs by doing this on the command line:

This is tested and working. Colours from the original SVG file persist through the conversion process, so this can be an easy way to set up layers for the laser cutter software.

Note that for this to work you might have to save the SVG file as a 'standard svg' file in Inkscape first, rather than an the default, which is an 'Inkscape SVG' file Oskar Pearson

The imported DXF will end up being tiny (something like 1/10 of its Inkscape size), and will also be positioned a long way off the left and bottom of the on-screen laser bed. The size *might* be fixable by using the -mm argument:

pstoedit -dt -f 'dxf:-polyaslines -mm' somefile.eps somefile.dxf

this is tested and works well. There are also arguments for rotating, translating, and scaling the output of pstoedit, but those need further experimentation.

Useful Plugins

Vector Fonts

Hershey Text renders text as a vector line. This allows for a faster "cut" than engraving our outlining a raster font.