This is a library, built on top of Geometry3D, that offers tools for converting between Gcode and geometry. The following classes are available; please check their source for more detail:
Angle: an angle type to avoid confusion between radians and degrees.GPoint: a point in space. Can be instantiated from a line of Gcode.GSegent: a segment representing printed geometry or a move.GHalfLine: a half-line, or ray; useful for intersection tests.GPolyLine: a polyline made of a list ofGPoints, representable asGSegments.
There are a number of handy utility functions in utils.py.