src/tools/FreehandRoiSculptorTool.js
/**
   * Inserts a handle on the surface of the circle defined by toolSize and the
   * mousePoint.
   *
   * @private
   * @param {number} insertIndex - The index to insert the new handle.
   * @returns {void}
   */
Inserts a handle on the surface of the circle defined by toolSize and the
mousePoint.

@private
@param {number} insertIndex - The index to insert the new handle.
@returns {void}
Inserts a handle on the surface of the circle defined by toolSize and the mousePoint . @private @param { number } insertIndex - The index to insert the new handle . @returns { void }
_insertHandleRadially(insertIndex) {
    const { points } = this._sculptData;
    const previousIndex = insertIndex - 1;
    const nextIndex = this.constructor._getNextHandleIndexBeforeInsert(
      insertIndex,
      points.length
    );
    const insertPosition = this._getInsertPosition(
      insertIndex,
      previousIndex,
      nextIndex
    );
    const handleData = new FreehandHandleData(insertPosition);
    points.splice(insertIndex, 0, handleData);
    points[previousIndex].lines.pop();
    points[previousIndex].lines.push(points[insertIndex]);
    freehandUtils.addLine(points, insertIndex);
  }
_insertHandleRadially ( insertIndex ) { const { points } = this . _sculptData ; const previousIndex = insertIndex - 1 ; const nextIndex = this . constructor . _getNextHandleIndexBeforeInsert ( insertIndex , points . length ) ; const insertPosition = this . _getInsertPosition ( insertIndex , previousIndex , nextIndex ) ; const handleData = new FreehandHandleData ( insertPosition ) ; points . splice ( insertIndex , 0 , handleData ) ; points [ previousIndex ] . lines . pop ( ) ; points [ previousIndex ] . lines . push ( points [ insertIndex ] ) ; freehandUtils . addLine ( points , insertIndex ) ; }
Inserts a handle on the surface of the circle defined by toolSize and the
 mousePoint.
Inserts a handle on the surface of the circle defined by toolSize and the mousePoint .
// Add the line from the previous handle to the inserted handle (note the tool is now one increment longer)