Adds a new point to the program’s point list. The function accepts one of the following input formats:
Each element of the sequence used to fill the point’s coordinates. The number of elements in the sequence determines which coordinates are set.
The point is constructed with three components (x, y, z).
The point is constructed with a full nine-dimensional coordinate.
planetcnc.points_add((x, y, z, a, b, c, u, v, w)) planetcnc.points_add(x, y, z) planetcnc.points_add(x, y, z, a, b, c, u, v, w)
#! /usr/bin/env python import planetcnc # Example 1: Add a point using a tuple (or list) with 3 coordinates. new_count = planetcnc.points_add((1.0, 2.0, 3.0)) print(f"New points count: {new_count}") # Example 2: Add a point using three separate numeric arguments. new_count = planetcnc.points_add(4.0, 5.0, 6.0) print(f"New points count: {new_count}") # Example 3: Add a point using nine separate numeric arguments. new_count = planetcnc.points_add(1.0, 2.0, 3.0, 0.1, 0.2, 0.3, 7.0, 8.0, 9.0) print(f"New points count: {new_count}")