src/tools/FreehandRoiSculptorTool.js
/**
   * Returns an array of indicies that describe where new handles should be
   * inserted (where the distance between subsequent handles is >
   * config.maxSpacing).
   *
   * @private
   * @param {Object} pushedHandles - The first and last handles that were pushed.
   * @returns {Object} An array of indicies that describe where new handles should be inserted.
   */
Returns an array of indicies that describe where new handles should be
inserted (where the distance between subsequent handles is >
config.maxSpacing).

@private
@param {Object} pushedHandles - The first and last handles that were pushed.
@returns {Object} An array of indicies that describe where new handles should be inserted.
Returns an array of indicies that describe where new handles should be inserted ( where the distance between subsequent handles is > config . maxSpacing ) . @private @param { Object } pushedHandles - The first and last handles that were pushed . @returns { Object } An array of indicies that describe where new handles should be inserted .
_findNewHandleIndicies(pushedHandles) {
    const { points, maxSpacing } = this._sculptData;
    const indiciesToInsertAfter = [];
    for (let i = pushedHandles.first; i <= pushedHandles.last; i++) {
      this._checkSpacing(i, points, indiciesToInsertAfter, maxSpacing);
    }
    const pointAfterLast = this.constructor._getNextHandleIndex(
      pushedHandles.last,
      points.length
    );
    if (pointAfterLast !== pushedHandles.first) {
      this._checkSpacing(
        pointAfterLast,
        points,
        indiciesToInsertAfter,
        maxSpacing
      );
      const pointBeforeFirst = this.constructor._getPreviousHandleIndex(
        pushedHandles.first,
        points.length
      );
      if (pointBeforeFirst !== pointAfterLast) {
        this._checkSpacing(
          pointBeforeFirst,
          points,
          indiciesToInsertAfter,
          maxSpacing
        );
      }
    }
    return indiciesToInsertAfter;
  }
_findNewHandleIndicies ( pushedHandles ) { const { points , maxSpacing } = this . _sculptData ; const indiciesToInsertAfter = [ ] ; for ( let i = pushedHandles . first ; i <= pushedHandles . last ; i ++ ) { this . _checkSpacing ( i , points , indiciesToInsertAfter , maxSpacing ) ; } const pointAfterLast = this . constructor . _getNextHandleIndex ( pushedHandles . last , points . length ) ; if ( pointAfterLast !== pushedHandles . first ) { this . _checkSpacing ( pointAfterLast , points , indiciesToInsertAfter , maxSpacing ) ; const pointBeforeFirst = this . constructor . _getPreviousHandleIndex ( pushedHandles . first , points . length ) ; if ( pointBeforeFirst !== pointAfterLast ) { this . _checkSpacing ( pointBeforeFirst , points , indiciesToInsertAfter , maxSpacing ) ; } } return indiciesToInsertAfter ; }
Returns an array of indicies that describe where new handles should be
 inserted (where the distance between subsequent handles is >
 config.maxSpacing).
Returns an array of indicies that describe where new handles should be inserted ( where the distance between subsequent handles is > config . maxSpacing ) .
// Check points before and after those pushed.