addPointXYZ method

int addPointXYZ({
  1. required double x,
  2. required double y,
  3. required double z,
})

Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment is added to connect the new point to the previous.

The points in the part are the start and end points of segments. A new line segment is added to connect the new point to the previous point. If this is the first point in an empty segment, a single closed segment is added using the same start and end point. Adding a second point updates this line segment to gain a distinct end point. Adding subsequent points adds new line segments.

Parameters:

  • x — The x-coordinate of the new point.
  • y — The y-coordinate of the new point.
  • z — The z-coordinate of the new point.

Return Value: the point index where the point was added. If an error occurred then -1 is returned.

Implementation

int addPointXYZ({
  required double x,
  required double y,
  required double z,
}) {
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MutablePart_addPointXYZ(
      _handle,
      x,
      y,
      z,
      errorHandler,
    );
  });
}