How to create G-Code with CorelDraw Plugin (example)
After setting up gCode Generator you can create and save G-Code from your contours and shapes in CorelDraw.
The first thing to do is select the profile that we have previously defined. We see the name of the profile that we have defined. Select “XYZ machining”. The surface of the docker adapts automatically to the profile and selected postprocessor.
Next, we enter the workpiece dimensions and set the XY zero point. After entering the dimensions, a page is automatically created. You can choose if the workpiece shape is rectangular or round. This is due to a flat machining postprocessor. For rotational machining other options are available.
Add drawing objects
After the plugin has created the page/design area, you can add drawing objects (text or shapes). In this example we are adding a text box. To do this, select the "Text" menu. All the necessary text settings can be made here. Select a font, set the font size and enter the desired text in the input field. The plugin automatically creates a text field with the entered text and centers it in the workpiece.
The next step is to enter the cutting data. These can be defined in the "Cutting data" menu and are:
Safety height (safety height between the contours)
Plunge height (from this height the plunge feed is used for smoothly plunging in the material)
Start height (start height of the machining à mostly 0 when machining starts on the workpiece surface)
Final depth (end height of the machining à mostly less than 0)
Cutting depth (way for a single cutting plane à greater than 0)
Feed rate (machining feed rate for contour)
Plunge rate (feed rate for plunging)
Spindle speed (spindle speed in rpm)
Each contour on the drawing sheet can be optimized with a node algorithm integrated in the plugin. This is in the "Node" menu. A difference can be made between dynamic and static algorithms. The dynamic algorithm checks the contour and decides whether a node should be added in the middle of the segment or not. The static algorithm always adds a node in the middle of each segment.
The dynamic algorithm requires two parameters: segment length and curvature factor.
Segment length is the distance between the nodes. If the actual distance between the nodes is greater than the segment length parameter, a node is added in the middle. Otherwise not.
The curvature factor is the amount of curvature in a curve. The stronger the curvature of a contour, the more nodes are usually required.
For optimal results you must play around with both parameters a little. The algorithm is also dependent on the contour length.
Parameters used in this example:
Segment length = 2.0 mm
Curvature factor = 0.05
Important: To apply the algorithm on single contour: Select the contour, set the parameters and click on the minus / plus button. To apply the algorithm on all contours on the actual page before G-Code creation: Select Checkbox “Increase number of nodes” in menu “Create and save”. With the slider next to it you can decide how often the node algorithm is used. Now every contour on the page is optimized before the G-Code is generated.
The last step is to create the G-Code. This can be done in the menu "Create and save". Simply enter your tool number and choose if you want to use the node algorithm and click on “Create G-Code” button. This can take a while. After the G code has been created, it is displayed in three dimensions (NC viewer). In this way, possible input errors are recognized immediately. To export the G-Code / CNC program click on “Save G-Code as” button. A save dialog opens.