Welcome to LibLathe¶
LibLathe Tooling¶
Turning inserts¶
LibLathe tooling are based around turning inserts for more information refer to Turning Inserts.
Geometry¶
LibLathe uses a simplified geometry representation which consists of a single type; the segment. This geometry is used throughout LibLathe to hold the part and path representations.
The Segment¶
The segment is the fundamental representation of LibLathe geometry. The segment can represent one of two basic forms; A line segment or an arc segment.
Grouping the geometry into a single type is possible as both lines and arcs can be defined by three components:
- Start Point
- End Point
- Bulge
This method of segment representation is inspired by a technical paper titled An offset algorithm for polyline curves by Xu-Zheng Liu et al, ISBN: 0166-3615
Line Segments¶
Line segments are represented by two points; a start point and an end point, the buldge value is always equal to zero for line segments.
The Segment Group¶
The segment group is a container object that holds a collection of segments, usually representing a ‘pass’. The segment group can perform a set of operations on the segments such as:
- Offsetting
- Converting to gcode
- Analysis for use with a selected tool
Bulge¶
LibLathe uses a simplified geometry representation which consists of a single type; the segment. Segments consist of 3 bit of data:
- Start Point
- End Point
- Bulge
These 3 bits of data give Liblathe all the information required to calculate the position, size and direction of lines and arcs.
bulge = tan(theta/4)
Direction:
bulge > 0 = CCW
and bulge < 0 = CW
Parameters:¶
Name | Description |
---|---|
theta | included angle |
eta | half included angle |
epsilon | quarter included angle |
phi | pi - epsilon |
gamma | pi - eta |
tau | see phi |
radius | distance between start and end / 2 |
sagitta | arc height |
apothem | radius - sagitta |
GCode¶
The fundamental purpose of LibLathe is to generate a program code or tool path commonly referred to as GCode.
GCode is typically a sequential list of commands that explain to the machine where to move the current tool in order to create the desired shape.
Common Lathe GCodes G0 Rapid Motion G1 Linear Motion G2 Clockwise Arc G3 Anti-Clockwise Arc G18 Reference Plane XZ G20 Inch Units G21 Metric (mm) Units G28 Return to Home Position G32 Constant Lead Threading Cycle G70 Canned Finishing Cycle G71 Canned Roughing Cycle G72 Canned Facing Cycle G73 Canned Pattern Cycle G74 Canned Peck Drilling G75 Canned Grooving Cycle G76 Canned Threading Cycle G98 Feedrate/Minute G99 Feedrate/Cycle Canned Cycle: Canned cycles are preprogrammed operations that are created from variables. Canned cycles usually perform repeative tasks such as peck drilling or threading where a number of repeat passes are made.
Example GCode File:
Lathe Operations¶
- Roughing
- Facing
- Profile
- Grooving
- Boring
- Chamfer
- Threading
- Drilling