More about G-code
G-code stands for “Geometric Code”, a programming language for CNC (Computer Numerical Control) machines, and is an essential component in automating the coring process of a crystal. It translates model data into a set of machine instructions that can be used to precisely control cutting operations.
For G-code functionality within Yield, the software requires two key elements: a completed crystal scan and at least one defined core.
Setting Up a Basis
A basis is a visual object created in the References Tab and is fundamental to generating G-code. The basis consists of two key reference points and an axis that serves as the coordinate system for cutting. It establishes the orientation and location of the core, ensuring that the machine’s cutting tool aligns perfectly with the model’s geometry.
### Here’s how you set up a basis:
Add Basis: Navigate to the References Tab and click “Add Basis.” This prompts you to define two reference points within the model.
Select Two Points: The first point serves as the origin of the basis, and the second determines the X-axis direction. Yield will use both to create a corresponding axis. The basis compiles the system’s coordinates specific to the coring of the crystal.
Select Coring Axis: Once the two points are selected, the next step is to choose the Z-axis. This axis (the coring axis) will serve as the guide for your cutting tool, ensuring it moves parallel to the basis. The drilling tool will align along this axis during the cutting process.
Turn the Model: After creating the basis, Yield will offer the option to rotate the model along the newly created axis, allowing you to visualize how the coring will be aligned. This is an important step for verifying that the core placement and orientation are correct. Use the number “7” key to focus the view on the first point in the basis, providing a clear starting perspective.
Ensuring Coordinates Match
To guarantee the precision of the coring operation, it’s crucial that the coordinates in Yield match the ones input into the coring machine. Any discrepancies between the two can result in misaligned cuts, leading to material waste or damage to the crystal. Double-check the model coordinates and input them into the machine before generating the G-code.
Generating G-Code
Once your basis and core have been defined and aligned, click the G-code button. This will open a new window where you can adapt and refine several parameters before finalizing the code.
Choosing the Basis: In the G-code window, you can manually select from any of the existing bases that have been created. This allows flexibility if you have defined multiple bases and need to choose the appropriate one for the cutting operation.
Adjust Parameters: The window also allows for adjusting parameters, including tool diameters. Since the diameter of the core and the drill bit can vary, Yield lets you specify these dimensions to ensure compatibility with the equipment you plan to use. Each G-code operation is tailored to the specific tool and core diameter you’ve selected.
Finalizing the G-Code: Once all the necessary parameters are defined, Yield will generate the G-code, ready for export. This file can then be input directly into your cutting machine to perform the coring operation with micrometer precision.
By setting up the basis and aligning the model correctly, Yield ensures that the G-code you generate is highly accurate and tailored to your specific cutting needs.
Note
To see the demonstration of G-code, read User Case 2 (fix link).