you need to cast to `Edge` class because there are `Line2` and `Line3` (not in current codes but in the future)