• OPTUM GX
  • OPTUM GX Python
  • OPTUM CS
  • OPTUM G2/G3
Powered by
  1. OPTUM GX Documentation
  2. Python
  3. Functions
  4. Model
  5. add_​polygon

# add_polygon

Add a polygon defined by a two-dimensional array of vertex points.

# Parameters

list : list of vertex points

# See also

  • add_polygons
  • add_sphere
  • add_vertex

# Notes

In 3D all vertex points must be on the same plane.

# Examples

model2d.add_polygon([[0,0],[1,0],[1,1]])
model3d.add_polygon([[0,0,0],[1,0,0],[1,1,2]])

See also

add_arc

Draw an arc in 2D, using N line segments between two points and a midpoint.

add_box

Create a solid box in 3D between a start and end point.

add_circle

Draw a circle in 2D, from center point and radius, using N line segments.

add_line

Add a line defined by two points.

add_nprism

Draw a Nprism in 3D.

add_polygons

Add a list of polygons defined by an array of two-dimensional arrays of vertex points for each polygon.

add_rectangle

Create a rectangle in 2D between a start and end point.

add_sphere

Add a sphere from center point and radius, using N line segments.

add_vertex

Create a point in 2D or 3D.

Previous add_​nprism
Next add_​polygons

© Copyright 2026 - OptumCE | All rights reserved.