Imposing boundary conditions to match a CAD virtual geometry for the mesh curving problem