DOCUMENTATION - LASER #
Welcome to the Laser Magic tool documentation.
This is an open-source and free software designed to simplify the preparation of files for laser engraving or cutting machines. Primarily oriented towards communication with machines running on the GRBL protocol, it can be easily extended to support other laser controller models. To download the latest version of the software, you can go there
The tool allows vectorized elements to be converted into commands for the machine, whether for cutting or engraving. It also supports advanced options to optimize the quality and precision of laser work.
Main Features
- Operation Types Management: Cutting and Engraving
- Laser Cutting: Converts vectorized objects into cutting paths, with appropriate power and speed management for different materials.
- Laser Engraving: Converts vectorized or rasterized objects into engraved patterns, with precise control of laser power.
- Engraving Customization: Power and Speed
You can configure various power levels and different speeds depending on the material’s requirements and the desired outcome (e.g., deep engraving or light engraving).
- Image Rasterization
This software allows the conversion of images into black and white (rasterization) for precise reproduction during laser engraving. Each pixel of the image is converted into a point or line engraved based on the desired intensity and contrast.
- Overscanning
Overscanning is a technique that disables the laser just before the engraving head slows down at the edges of the image or path. This prevents excessive burning and overly defined edges, ensuring a cleaner and more uniform result.
- Air Assist
The Air Assist feature blows air during engraving or cutting, helping to reduce burns and residue buildup on the material. The directed airflow also removes debris and improves the quality of cutting or engraving, which is especially useful for sensitive materials.
- Fill Algorithm Selection
The software offers several fill algorithms to optimize the engraving of solid areas:
- Printer Fill: Traditional line-by-line filling, similar to the operation of a printer.
- Flood Fill: A filling method based on a propagation algorithm, useful for irregular areas.
- Span Fill: Optimizes movement to fill areas more efficiently, reducing engraving times while maintaining uniform quality.
- Extensibility to Other Protocols
While the software primarily works with the GRBL protocol, it is designed to be modular and adaptable to other laser machine control systems. This allows for great flexibility and future support for other machine models. To help you get started, we have created a tutorial to assist you in preparing your file and sending it to your preferred machine. All testing has been done on the Sculpfun S9 and S30, but other machines can be used as well.
Reminder of the steps necessary for the smooth progress of engraving production. #
This tutorial will cover everything needed to produce your first engraving on your machine.
We will divide this tutorial into different steps:
- Preparation of your SVG
- Using Inkscape
- Managing speed by color
- Managing power by opacity
- Vector drawing, best practices
- CASE STUDY: Vectorization
- Creating your .ngc file
- Via the terminal
- Via graphical interface
- Preparing your file via the Plugin
1.1 Prepare your SVG #
For this documentation, we will be using the open-source software Inkscape. There are other vector drawing software options available, such as Illustrator.
1.2 Managing Speed by Color #
- Red represents the fastest speed for engraving and cutting (last row of the matrix). Red indicates that you have chosen to apply 100% of the speed specified in the .ngc preparation settings.
- Blue represents the slowest speed for engraving and cutting (first row of the matrix). Blue indicates that you have chosen to apply 10% of the speed specified in the .ngc preparation settings.
1.3 Managing Power by Opacity #
- 100% opacity will be expressed as 100% of the power specified in the .ngc preparation settings (right column).
- 10% opacity will be expressed as 10% of the power specified in the .ngc preparation settings (left column).
The color palette is called “Laser,” and you can install it by running the following in the plugins folder:
- For Windows: MakeFile.bat
- For Linux: make install
It’s imperative to use colors from this range; otherwise, the path will not be considered when creating the .ngc file, which is used by the laser.
1.4 Drawing #
Your shapes/drawing must consist only of “Paths.”
When creating your drawings, remember to simplify and make them as clean as possible (fewest independent “paths” possible). A simple tip for this is to use the “Union” option in the “Path” menu to remove all intersecting paths, preventing the laser from passing over the same spot multiple times.
If the elements don’t touch, they should remain as independent paths in your drawing. If you use the “Union” function to make them into a single path, the slicer may have problems calculating the path to take, making the process longer. Use the “Split path” option in the path menu to extract paths that do not touch.
1.5 Case Study: Vectorization #
After vectorizing your image, the different parts of your image are combined into a single path. However, as mentioned earlier, when our shapes are separate, for the sake of efficient path calculation, it’s better for each shape to be an independent path.
Path > split
1.6 Error Case #
1.6.1 Incorrect Color #
If the color you’ve chosen isn’t in the “MATLAB” color range, you’ll receive an error message on that path when converting to .ngc with Magic Laser.
To display warnings:
On Windows:
set RUST_LOG=warn
On Linux:
export RUST_LOG=warn
The path with the wrong color won’t be processed and won’t appear in UGS.
2. CREATING YOUR .NGC FILE #
You’ll need to download the latest releases of the tool from here. For beginners we advise to begin with inkscape plugin method
2.1 VIA TERMINAL (laser-magic-cli): #
- Navigate to the desired folder for creating your laser files.
- Use the –help function to understand how to use the executable and its options.
1/ Basic command
2.2 Via Graphical Interface #
Launch the laser-magic-ui executable.
To open a .svg file prepared according to the instructions above, press the Open
button.
Then, fill in the values according to your needs and materials. You also have the option to choose between different algorithms.
Flood fill and Span fill are both diffusion algorithms designed to speed up engraving execution.
The Span fill algorithm should be slightly more efficient for file generation, but it’s advisable to experiment with the different outputs to choose what you prefer.
You can now generate your .ngc file by pressing the Generate
button.
A terminal window will automatically open, showing the progress of the file processing and any errors.
2.3 Prepare Your File via the Plugin #
The advantages of this method are:
- The print settings are already present in the file. You no longer have to worry about forgetting the print settings if you open the file in six months.
- If you share the file, the recipient will also have the print settings directly integrated into the file.
Installation #
Windows #
- Download: “plugins lasermagic windows installer” here
- Double-click to install
- That’s it
Linux #
- Download: “plugins lasermagic linux” here
- Extract the archive
- Run the “installer.sh” script as root
- That’s it
Use #
-
Group the paths into groups. Each group will have print characteristics.
-
Once the extension is installed, you can go to Extensions > Laser > Prepare Laser.
-
Open the XML option of your file Edit > XML Editor or the icon.
Once the window is open, by selecting the group of your paths, you’ll find in the XML editor the different parameters for laser processing.
After preparing your file:
When you want to generate your gcode file you can go to Extension -> Export -> Export Laser or save your file and use the cli or the ui as explain above.
Advanced Options Settings #
Images #
Images are natively supported by the software, without requiring any additional action from the user. The image is automatically converted into a suitable rendering for engraving using rasterization, which allows for an accurate black-and-white representation of the original.
The current method used for image rendering is rasterization, but improvements are planned, notably the addition of dithering. This technique will offer enhanced rendering, especially on less uniform materials, providing better gradation management and a visually more pleasing result.
Here is another example of engraving, this time on a finalized object.
Overscanning #
- What is overscanning?
Overscanning is a technique used in laser engraving systems to avoid excessive burns and imperfections on the edges of engraved designs. When a laser engraving head stops or changes direction at the end of a pass, there can be an accumulation of energy at those points, creating overburnt areas or overly defined edges.
Overscanning solves this problem by ensuring that the laser head continues to move beyond the design limits before slowing down and changing direction. During this overshoot phase, the laser is already turned off. This allows the head to decelerate outside the engraving area, preventing speed variations from affecting the quality of the engraved edges.
- How does it work in lasermagic ?
In Lasermagic, overscanning is controlled by a floating-point value overscanning. This value determines the additional distance the engraving head must travel after the laser has been turned off, before slowing down or changing direction.
The formula used to calculate this distance is:
Distance to travel = Speed × Overscanning
- Speed: The speed at which the engraving head moves during the operation.
- Overscanning: The floating-point value defined by the user, which corresponds to the factor by which the overshoot distance will be multiplied. For example, a value of 0.1 means that the laser head will continue to move 10% of the initial speed before beginning to decelerate.
- How to use overscanning in Lasermagic?
To adjust overscanning in your project, you need to set an appropriate value based on the speed and type of engraving you are performing. Here are the steps to use overscanning optimally:
- Set the engraving speed: First, define the speed at which the engraving head will move. This depends on the material being engraved and the required level of detail.
- Determine the overscanning value: Next, choose an overscanning value that controls the additional distance the head will travel after the laser has been turned off. A higher value (e.g., 0.2) will result in a larger overshoot, while a lower value (e.g., 0.05) will reduce the distance traveled.
For example, if the speed is set to 100 mm/s and overscanning is set to 0.1, the engraving head will travel 100 mm/s × 0.1 = 10 mm beyond the laser stop before slowing down.
- Optimize based on material: Overscanning can be adjusted depending on the material type and desired results. For sensitive materials like wood or leather, a higher value will minimize marks at the edges. For more resilient materials, a lower value may be sufficient.
- Example of use
Suppose you are engraving a design on wood at a speed of 150 mm/s and notice that the edges are slightly burned, even when the laser is set correctly. To improve engraving quality at the edges, you can adjust the overscanning.
- Speed: 150 mm/s
- Overscanning: 0.1
The overshoot distance will be: 150 mm/s × 0.1 = 15 mm.
This means that the laser head will continue to move 15 mm beyond each edge before starting to decelerate. Since the laser is off during this overshoot, the edges will be cleaner and without overheating.
Fill Patterns #
- What is fill for laser engraving?
Fill (or hatching) is a method used in laser engraving to cover solid areas of a design or image with engraved lines. Unlike cutting, where the laser follows outlines to cut material, laser engraving involves filling entire areas with an engraved pattern, which requires a strategy for moving the laser efficiently across the surface. The goal of fill is to maximize efficiency (reduce engraving time) while maintaining engraving quality (uniform coverage on solid surfaces).
In Lasermagic, the algo-fill parameter allows you to choose from several fill algorithms by entering specific text (such as printer, spanfill, or floodfill), each with unique characteristics.
- Different fill algorithms There are several fill algorithms you can use to tailor the engraving based on the specific needs of your project. Here’s a detailed explanation of each algorithm available:
a) Printer Fill Algorithm
Description: The Printer Fill works in a linear fashion, engraving line by line, similar to how an inkjet printer operates. The laser moves from side to side across the engraving area, following horizontal or vertical lines, and systematically engraves the surface.
Advantages:
- Easy to implement.
- Suitable for full and regular surfaces.
- Provides predictable and uniform coverage.
Disadvantages:
- Can be slower than other algorithms for complex areas.
- Requires a lot of movement in areas where the laser doesn’t engrave.
When to use:
- Recommended for large and simple areas.
- Ideal for regular shapes where engraving time is not a major concern.
b) Span Fill Algorithm
Description:
Span Fill is designed to minimize laser movement time by optimizing paths over the engraving area. Unlike Printer Fill, which moves the laser across the entire length or width of the object, Span Fill uses shorter segments, engraving only the necessary areas without unnecessary movement.
Advantages:
- Optimizes laser head movement to reduce engraving time.
- Faster than Printer Fill, especially for complex or non-continuous areas.
Disadvantages:
- May be slightly more complicated to configure for some projects.
- Risk of visible marks if the material reacts differently to trajectory variations.
- Requires more computational power.
When to use:
- Ideal for complex or detailed designs.
- Efficient on irregular surfaces or cut-out areas where traditional linear coverage would be ineffective.
c) Flood Fill Algorithm
Description:
Flood Fill works similarly to the fill algorithm found in graphic software, where the laser “fills” the area by following a path based on the shape and contours of objects. It usually starts from the center of an area and progressively fills it based on the borders.
Advantages:
- Very effective for complex and irregular shapes.
- Reduces unnecessary laser movements in areas where there is nothing to engrave.
- Can be faster than other methods in cases where designs are highly irregular.
Disadvantages:
- Less intuitive than Printer Fill for users who prefer linear filling.
- May result in engraving variations if settings are not properly adjusted.
When to use:
- Recommended for complex shapes with irregular edges.
- Effective for engraving non-contiguous areas or shapes with detailed contours.
- How to use fill in Lasermagic?
In Lasermagic, selecting the fill algorithm is managed via the algo-fill parameter. This parameter takes a text input, and you can select one of the three mentioned algorithms (printer, spanfill, floodfill) by simply specifying the algorithm name. Here’s how to use this parameter:
Set the fill algorithm: Adjust the algo-fill parameter based on the type of design you’re engraving and the requirements of your project. For example, for a large and regular area, you can use Printer Fill (algo-fill = printer). For complex designs, opt for Span Fill or Flood Fill. Test and optimize: It’s recommended to experiment with the different algorithms to determine which offers the best results based on the complexity of your design, the material used, and the available engraving time. Each algorithm has advantages in specific situations, and the optimal choice often depends on the project type. Practical example If you’re engraving a simple logo on a wooden plaque, you might choose Printer Fill to ensure uniform engraving across the entire surface. If you’re working on a detailed design with irregular shapes, such as a complex vector image, using Flood Fill or Span Fill will reduce engraving time while maintaining high precision in the engraved areas.
Air Assist #
- What is Air Assist?
Air Assist is a feature used in laser engraving and cutting to improve the quality of work and protect the material. This feature works by projecting a constant high-pressure air stream directly onto the area where the laser is engraving or cutting.
This airflow serves several purposes:
- Reducing burns: It helps cool the area affected by the laser, reducing the risk of excessive burning or charring of materials like wood, paper, or acrylic.
- Removing debris: Air Assist blows away the debris (smoke, dust, particles) generated by the laser during engraving
Air Assist is particularly useful for cutting thick or flammable materials, as well as for fine engraving where precision and cleanliness are crucial.
- How does Air Assist work in lasermagic?
In Lasermagic, activating Air Assist is simple. It is a binary parameter (true/false) that can be controlled through the air-assist option.
When you enable this option (air-assist = true), the software sends a command to trigger Air Assist during the engraving or cutting operation. This airflow is synchronized with the laser activity, meaning air is projected onto the work area only when the laser is active.
Flammable materials: Air Assist is particularly recommended for materials like wood, leather, paper, and some plastics, where engraving or cutting residues can easily ignite or burn. Detailed engraving: If you’re working on projects requiring high precision (such as fine engraving on sensitive surfaces), Air Assist helps keep the engraving area clean and free of debris that could interfere with the laser beam. Cutting thick materials: During the cutting of thick materials, Air Assist helps clear accumulated debris from the cut, allowing the laser to pass through more effectively and produce a cleaner cut.
- Check your equipment:
To ensure Air Assist works properly, make sure your laser machine is equipped with a compressed air system or dedicated air pump that can provide a stable and sufficient airflow. This airflow must be directed at the laser head to be effective.