A foundational C++ geometry kernel for robust 2D/3D primitives for CAD/CAM and mesh-processing applications