This design defines a polygon from a list of planar points . The points must be specified in a contiguous order for the creation of a Polygon with no intersecting segments. The polygon instance is a closed region, composed of lines connecting the last point in the list to the first point . The intersections of the line segments may be filleted by providing a fillet radius greater than zero or by providing a list of fillet radii - one radius for each intersection.
Problems may arise if fillets cross lines or other fillets - even if only an intermediate result during filleting. A polygonModifier can be defined to use lines and arcs for the polygon definition to overcome this limitation if needed.
PolygonModifier
Name | Type | Description |
---|---|---|
pointList | list | Specifies the points to be used in creating the region for the polygon. The points in this list must be contiguous to form the desired shape. Since the boundary of the polygon forms a closed curve, the start point should not be repeated at the end of the list , it will be automatically included to make the start and end points coincident and close the curve. |
Name | Type | Description |
---|---|---|
filletRadius | number | The radii of all the fillets at the polygon line segment intersections. If the fillet radius should be different for each intersection, use the filletRadii input. |
filletRadii | list | This is the radius of each fillet at the segment intersections. There should be radius inputs for each point in the pointList. However, if a fillet does not exist at a vertex, then a zero radius value can be used. |
Name | Type | Description |
---|---|---|
localFrame | frame | This is the local frame that lies on same plane as the polygon vertex points . Because it is determined using the first three points in the pointList, an error will be generated if the first three points lie in a straight line. |
Normal | vector | Normal vector of the plane that contains all the polygon vertex points . |
lines | list | This is a list of line instances that go between the vertices of the polygon. They are equivalent to the boundary of the polygon if there are no fillets at the segment intersections. |
isClosed? | boolean | A polygon is always closed, so this always returns True . |
Curves | list | Currently this returns only the unfilleted lines connecting the points . |
closed? | boolean | A polygon is always closed, so this is True . |
Name : | Polygon_Ex01 | |
Design : | acDrawingDocument | |
Name | Type | Formula |
a | number | 1 |
b | number | 1.25 |
ptList | list | {Point(0, 0, 0), Point(a, 0, 0), Point(0, b, 0)} |
Child Name : | outline | |
Child Design : | :Polygon | |
Name | Type | Supplied |
pointList | list | ptList |
color | string | "blue" |
Name : | Polygon_Ex02 | |
Design : | acDrawingDocument | |
Name | Type | Formula |
a | number | 1 |
b | number | 1.25 |
t | number | 0.2 |
ptList | list | {Point(0, 0, 0), Point(a, 0, 0), Point(a, t, 0), Point(t, t, 0), Point(t, b - t, 0), Point(a, b - t, 0), Point(a, b, 0), Point(0, b, 0)} |
Child Name : | outline | |
Child Design : | :Polygon | |
Name | Type | Supplied |
pointList | list | ptList |
filletRadii | list | {0, 0, 0, 0.2, 0.2, 0, 0} |
color | string | "jungle green" |