refactor in FlattenInteraction to use LinePointPair