Orientation of workpiece or tool, surface sensor