Hi, T. Raykoff wrote:
Well you asked for it, here is a [lengthy] comparison
My computational geometry (CG) needs are for a CAM application; generating machine toolpaths for a laser that will expose photoresist on PCB trace patterns. The PCB file (Gerber format) is loaded, it is parsed into polygons (using libgerbv), and then polygon operations are used to generate the toolpaths. The operations needed are fairly basic: 1.) Basic Booleans on simple polygons (with holes) 2.) Minkowski sum of a single poly over a line segment 3.) Internal offsets 4.) Clean and simplify
The environment is C++, making heavy use of C++11 features, and will be housed in a Qt application for cross-platform deployment. I did a trial combining all of these operations using CGAL, boost::polygon, and Angus Johnsons clipper library. The trial execed a stress test of a loop of randomized operations on 1-4 above, which was output into a text file and viewed using R. In short, my observations are: 1. CGAL: Overkill for this need. 2. Boost::polygon: Nice API, but a bit buggy 3. Clipper: Easy and fast, no issues found yet.
Thanks for the broad explanation. Though I wonder what's the reason of not taking the Boost.Geometry into the consideration? Regards, Adam