pick the non-infinite coordinates from 1d gate as the cut points to construct refGate. Issue #20