Fixed the issues with boundary

Fixed the issues with boundary
Merge pull request #3363 from ramramps/Snapping-input-fix

Port Snapping defect