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

add_line

Add a line defined by two points.

Parameters

p0 : array
first point: p0 = [x0,y0] in 2D, p0 = [x0,y0,z0] in 3D
p1 : array
second point: p1 = [x1,y1] in 2D, p1 = [x1,y1,z1] in 3D

See also

  • add_arc
  • add_circle
  • add_polygon
  • add_polygons
  • add_rectangle
  • add_vertex

Examples

model2d.add_line([0,0], [1,2])
model3d.add_line([0,0,0], [1,2,3])

See also

add_arc

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

add_circle

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

add_lines

Add line segments between consecutive points.

add_polyline

Add a polyline defined by a list of points.

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_​circle
Next add_​lines

© Copyright 2026 - OptumCE | All rights reserved.