pytha.create_polygon - pytha-3d-cad/pytha-lua-api GitHub Wiki

Creates a polygon face in PYTHA as new part.

Similar to the Faces -> Polygon function in the PYTHA user interface.

Note: If the polygon contains holes or if the outline contains arcs, use the create_polygon_ex function instead.

pytha.create_polygon(points [,origin [,options]]]]) 
Parameter Type Description
points {{u,v [,w]}, ...} Coordinates of the loop points
origin {x,y,z} Optional: offset of the whole polygon
options {...} Optional: a table that may contain the following options:
options.u_axis {x,y,z} Local coordinate u-axis for the orientation of the plane
options.v_axis {x,y,z} Local coordinate v-axis for the orientation of the plane
options.w_axis {x,y,z} Local coordinate w-axis for the orientation of the plane-normal
options.clean_face string "clean" (default), "dont_clean"; eliminates self-intersections from polygon

Return value

Type Description
element_handle An element handle of the newly created part

See also:

pytha, element handles, Axes and directions, create_polyline, create_polygon_ex