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

# add_rectangle

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

# Parameters

p0 : array
Start point. p0 = [x0,y0]
p1 : array
End point. p1 = [x1,y1]

# See also

  • add_polygon
  • add_polygons
  • add_box

# Examples

model2d.add_rectangle([0,0],[1,1])
model3d.add_rectangle([0,0,0],[1,1,0])

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_polygons

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

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_​prism
Next add_​sphere

© Copyright 2026 - OptumCE | All rights reserved.