andrewjrobinson/FreeCAD_sf_master — pull request #7 by DavidNicholls (2013-06-25 23:25:59+00:00)
Title: Paths classes additions and some operator<< methods for the ToolPath class

The Paths.cpp/h holds wrapper classes I've used in HeeksCNC to help traverse TopoDS_Edge objects. It has intersection methods, sorting methods (both for position and for concentricity) and lots of other utilities that I've used both for GCode generation and for generating ramping tool entry movements. I've added what I THINK will be the right way to feed Part::Feature objects into it but I can repair any faults that are there later on when we start feeding graphics into it. It also holds methods that convert to/from the libArea graphics representations. To this end, I have wrapped the libArea code in an 'area' namespace so that the header files could be included in other parts of the Cam module. i.e. there is a Paths::Offset() method that converts the lists of TopoDS_Edge objects into libArea graphics, calls the libArea offset routine and then converts back to the TopoDS_Edge objects. It also handles any rotations necessary to marry the 3D TopoDS_Edge objects with the 2D representations used within the libArea code. I know all this code works because I've been using it in my version of HeeksCNC.