Swig bind createSegment