points_get()

Retrieves the position of a point from the program’s point list at a specified index and returns it as a Python list of nine floating‐point values representing the point’s coordinates.

If the index is out of bounds, the function returns Python None.

Syntax

planetcnc.points_get(idx)

Parameters

Parameter Type Description
idx int The index of the point in the program’s point list.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Retrieve the coordinates of the point at index 2.
point_coords = planetcnc.points_get(2)
if point_coords is not None:
    print("Point coordinates:", point_coords)
else:
    print("No point found at that index.")

See also

points_clear
points_count
points_add
points_get
points_set
points_delete
points_load
points_save