An Adaptive Automatic Mesh Generation Scheme for CSG Models