How to add your knowledge

polygonIntersection()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1

    Synopsis

    Returns a list of polygons which represent the areas of poly1 that are common with poly2.

    Polygons are represented in a "lightweight" way by a list of points. The first three non-colinear points define the "plane" of the polygon, and even if the rest of the points do not lie in that plane, they will be projected onto that plane for all computations.

    Syntax

    polygonIntersection ( poly1 As List, _
                          poly2 As List ) As List 
    Argument Type Description
    poly1 List The first polygon.
    poly2 List The second polygon.

    Example 1

    Intent >polygonIntersection({point(0,0,0), Point(5,0,0), Point(5,5,0), Point(0,5,0)}, {Point(1,1,0), Point(6,1,0), Point(6,4,0), Point(1,4,0)}) 
    --> {{Point_(5.0, 4.0, 0.0, WorldFrame()), Point_(1.0, 4.0, 0.0, WorldFrame()), Point_(1.0, 1.0, 0.0, WorldFrame()), Point_(5.0, 1.0, 0.0, WorldFrame())}}