## Polygon

**Summary**

A structure representing a single closed polygon. This would
represent a single part of a polygon shape.

**Methods**

Add_Point |
This function has 2 overloads. |

Add_Segment |
Appends the the givin line segment to the end of the polyline. We assume that if the first point in the segment is the same as the endpoint of the polygon, we don't need to add the first point. |

Constructor |
This function has 2 overloads. |

Insert_Point |
This function has 2 overloads. |

Insert_Segment |
Inserts a segment into a polyline. This will check the points of the segment and only add the points if they are not identical to what will become the adjacent points. |

IntersectsWith |
Only returns true if the point is in the same plane as the polygon and the polygon encloses the point. Touching a node is considered intersecting. |

Invalidate |
Many properties are derived from the points. Generally, these are calculated once and cached. Most changes that can be made externally will automatically cause an invalidation to occur, so adding points, for instance, will force the perimeter to be recalculated. This forces such an invalidation so that the next time derived properties are queried, they will be recalculated. |

mwShape_To_Polygon |
If a Shape has multiple parts, this will create a separate polyline for each part. |

Polygon_To_mwShape |
Converts a list of polylines into a single multi-part shape |

SegmentsWithin |
Returns a list of segments from the Polygon that are within the submitted extents. |

ToSegments |
Will create a list of segment objects for the entire polygon |