add segment and poly