intersect(shape) {
        if (shape instanceof Flatten.Point) {
            return this.contains(shape) ? [shape] : [];
        }

        if (shape instanceof Flatten.Line) {
            return Intersection.intersectLine2Polygon(shape, this);
        }

        if (shape instanceof Flatten.Circle) {
            return Intersection.intersectCircle2Polygon(shape, this);
        }

        if (shape instanceof Flatten.Segment) {
            return Intersection.intersectSegment2Polygon(shape, this);
        }

        if (shape instanceof Flatten.Arc) {
            return Intersection.intersectArc2Polygon(shape, this);
        }

        if (shape instanceof Flatten.Polygon) {
            return Intersection.intersectPolygon2Polygon(shape, this);
        }
    }
/**
     * Return array of intersection points between polygon and other shape
     * @param shape Shape of the one of supported types <br/>
     * @returns {Point[]}
     */
Return array of intersection points between polygon and other shape
@param shape Shape of the one of supported types 
@returns {Point[]}
Return array of intersection points between polygon and other shape @param shape Shape of the one of supported types @returns { Point [] }
intersect(shape) {
        if (shape instanceof Flatten.Point) {
            return this.contains(shape) ? [shape] : [];
        }
        if (shape instanceof Flatten.Line) {
            return Intersection.intersectLine2Polygon(shape, this);
        }
        if (shape instanceof Flatten.Circle) {
            return Intersection.intersectCircle2Polygon(shape, this);
        }
        if (shape instanceof Flatten.Segment) {
            return Intersection.intersectSegment2Polygon(shape, this);
        }
        if (shape instanceof Flatten.Arc) {
            return Intersection.intersectArc2Polygon(shape, this);
        }
        if (shape instanceof Flatten.Polygon) {
            return Intersection.intersectPolygon2Polygon(shape, this);
        }
    }
intersect ( shape ) { if ( shape instanceof Flatten . Point ) { return this . contains ( shape ) ? [ shape ] : [ ] ; } if ( shape instanceof Flatten . Line ) { return Intersection . intersectLine2Polygon ( shape , this ) ; } if ( shape instanceof Flatten . Circle ) { return Intersection . intersectCircle2Polygon ( shape , this ) ; } if ( shape instanceof Flatten . Segment ) { return Intersection . intersectSegment2Polygon ( shape , this ) ; } if ( shape instanceof Flatten . Arc ) { return Intersection . intersectArc2Polygon ( shape , this ) ; } if ( shape instanceof Flatten . Polygon ) { return Intersection . intersectPolygon2Polygon ( shape , this ) ; } }
Return array of intersection points between polygon and other shape
 @param shape Shape of the one of supported types <br/>
 @returns {Point[]}
Return array of intersection points between polygon and other shape @param shape Shape of the one of supported types <br / > @returns { Point [] }