.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited

.. role:: clio-static
   :class: clio-flag clio-flag-static


##########
LineMarkup
##########

.. js:class:: Markup.Line.LineMarkup

   This class is for 3D line markup items.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Markup.Line.LineMarkup.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~Markup.Line.LineMarkup.uniqueId`
   * :js:data:`~Markup.Line.LineMarkup.className`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Markup.Line.LineMarkup.draw`
   * :js:meth:`~Markup.Line.LineMarkup.getClassName`
   * :js:meth:`~Markup.Line.LineMarkup.getFirstNodeId`
   * :js:meth:`~Markup.Line.LineMarkup.getFirstPoint`
   * :js:meth:`~Markup.Line.LineMarkup.getId`
   * :js:meth:`~Markup.Line.LineMarkup.getLineColor`
   * :js:meth:`~Markup.Line.LineMarkup.getLineOpacity`
   * :js:meth:`~Markup.Line.LineMarkup.getLinePattern`
   * :js:meth:`~Markup.Line.LineMarkup.getLinePatternLength`
   * :js:meth:`~Markup.Line.LineMarkup.getLinePatternLengthUnit`
   * :js:meth:`~Markup.Line.LineMarkup.getNodeId`
   * :js:meth:`~Markup.Line.LineMarkup.getSecondNodeId`
   * :js:meth:`~Markup.Line.LineMarkup.getSecondPoint`
   * :js:meth:`~Markup.Line.LineMarkup.hit`
   * :js:meth:`~Markup.Line.LineMarkup.hitWithTolerance`
   * :js:meth:`~Markup.Line.LineMarkup.onDeselect`
   * :js:meth:`~Markup.Line.LineMarkup.onSelect`
   * :js:meth:`~Markup.Line.LineMarkup.remove`
   * :js:meth:`~Markup.Line.LineMarkup.removeLine`
   * :js:meth:`~Markup.Line.LineMarkup.setFirstNodeId`
   * :js:meth:`~Markup.Line.LineMarkup.setFirstPoint`
   * :js:meth:`~Markup.Line.LineMarkup.setId`
   * :js:meth:`~Markup.Line.LineMarkup.setLineColor`
   * :js:meth:`~Markup.Line.LineMarkup.setLineOpacity`
   * :js:meth:`~Markup.Line.LineMarkup.setLinePattern`
   * :js:meth:`~Markup.Line.LineMarkup.setSecondNodeId`
   * :js:meth:`~Markup.Line.LineMarkup.setSecondPoint`
   * :js:meth:`~Markup.Line.LineMarkup.toJson`
   * :js:meth:`~Markup.Line.LineMarkup.updateLine`
   * :js:meth:`~static Markup.Line.LineMarkup.fromJson`
   
   




Constructors
============

.. js:method:: Markup.Line.LineMarkup.constructor

   .. rst-class:: sig-pretty-signature
   
      | LineMarkup(**viewer**\ : :js:class:`~IWebViewer`\ , **firstPoint**\ : (*None* \| :js:class:`~Point3`\ )?, **secondPoint**\ : (*None* \| :js:class:`~Point3`\ )?, **firstNodeId**\ : (*None* \| *number*\ )?, **secondNodeId**\ : (*None* \| *number*\ )?): :js:class:`LineMarkup <Markup.Line.LineMarkup>`
   
   **Parameters**
   
      **viewer**\ : :js:class:`~IWebViewer`
   
      **firstPoint**\ : (*None* \| :js:class:`~Point3`\ ) = null
   
      **secondPoint**\ : (*None* \| :js:class:`~Point3`\ ) = null
   
      **firstNodeId**\ : (*None* \| *number*\ ) = null
   
      **secondNodeId**\ : (*None* \| *number*\ ) = null
   
   
   **Returns**\ : :js:class:`LineMarkup <Markup.Line.LineMarkup>`
   





Properties
==========

.. js:data:: Markup.Line.LineMarkup.uniqueId

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | uniqueId: *string*
   



.. js:data:: Markup.Line.LineMarkup.className

   .. rst-class:: clio-flags
   
      :clio-static:`static`
   
   .. rst-class:: sig-pretty-signature
   
      | className: *string*
   





Methods
=======

.. js:method:: Markup.Line.LineMarkup.draw

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | draw(**_renderer**\ : :js:class:`MarkupRenderer <Markup.MarkupRenderer>`\ , **_view**\ : :js:class:`~IView`\ ): *void*
   
   Called when the markup item should be redrawn on a specific view. This most typically happens when the scene is rendered.
   
   **Parameters**
   
      **_renderer**\ : :js:class:`MarkupRenderer <Markup.MarkupRenderer>`
   
      **_view**\ : :js:class:`~IView`
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.getClassName

   .. rst-class:: sig-pretty-signature
   
      | getClassName(): *string*
   
   Returns the class name for this markup item.
   
   **Returns**\ : *string*
   



.. js:method:: Markup.Line.LineMarkup.getFirstNodeId

   .. rst-class:: sig-pretty-signature
   
      | getFirstNodeId(): (*None* \| *number*\ )
   
   Gets the NodeId of the part associated with the first line point
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Markup.Line.LineMarkup.getFirstPoint

   .. rst-class:: sig-pretty-signature
   
      | getFirstPoint(): (*None* \| :js:class:`~Point3`\ )
   
   Gets the first point on the line.
   
   **Returns**\ : (*None* \| :js:class:`~Point3`\ )
   
      the first point, or null if none is set.
   
   



.. js:method:: Markup.Line.LineMarkup.getId

   .. rst-class:: sig-pretty-signature
   
      | getId(): *string*
   
   Returns a unique markup id for this line.
   
   **Returns**\ : *string*
   



.. js:method:: Markup.Line.LineMarkup.getLineColor

   .. rst-class:: sig-pretty-signature
   
      | getLineColor(): :js:class:`~Color`
   
   Gets the line color.
   
   **Returns**\ : :js:class:`~Color`
   



.. js:method:: Markup.Line.LineMarkup.getLineOpacity

   .. rst-class:: sig-pretty-signature
   
      | getLineOpacity(): *number*
   
   Gets the line opacity.
   
   **Returns**\ : *number*
   



.. js:method:: Markup.Line.LineMarkup.getLinePattern

   .. rst-class:: sig-pretty-signature
   
      | getLinePattern(): (*None* \| :js:data:`~LinePattern`\ )
   
   Gets the line pattern.
   
   **Returns**\ : (*None* \| :js:data:`~LinePattern`\ )
   



.. js:method:: Markup.Line.LineMarkup.getLinePatternLength

   .. rst-class:: sig-pretty-signature
   
      | getLinePatternLength(): (*None* \| *number*\ )
   
   Gets the length of a single repetition of the line pattern.
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Markup.Line.LineMarkup.getLinePatternLengthUnit

   .. rst-class:: sig-pretty-signature
   
      | getLinePatternLengthUnit(): (*None* \| :js:data:`LinePatternLengthUnit <Sc.LinePatternLengthUnit>`\ )
   
   Gets the unit in which the line pattern length is measured.
   
   **Returns**\ : (*None* \| :js:data:`LinePatternLengthUnit <Sc.LinePatternLengthUnit>`\ )
   



.. js:method:: Markup.Line.LineMarkup.getNodeId

   .. rst-class:: sig-pretty-signature
   
      | getNodeId(): (*None* \| *number*\ )
   
   Gets the node id associated with the line markup.
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Markup.Line.LineMarkup.getSecondNodeId

   .. rst-class:: sig-pretty-signature
   
      | getSecondNodeId(): (*None* \| *number*\ )
   
   Gets the NodeId of the part associated with the second line point
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Markup.Line.LineMarkup.getSecondPoint

   .. rst-class:: sig-pretty-signature
   
      | getSecondPoint(): (*None* \| :js:class:`~Point3`\ )
   
   Gets the second point on the line.
   
   **Returns**\ : (*None* \| :js:class:`~Point3`\ )
   
      the second point, or null if none is set.
   
   



.. js:method:: Markup.Line.LineMarkup.hit

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | hit(**_point**\ : :js:class:`~Point2`\ , **_view**\ : :js:class:`~IView`\ ): *boolean*
   
   Called when a hit test is performed on this markup item.
   
   **Parameters**
   
      **_point**\ : :js:class:`~Point2`
   
      **_view**\ : :js:class:`~IView`
   
   
   **Returns**\ : *boolean*
   
      boolean value indicating whether this item was picked
   
   



.. js:method:: Markup.Line.LineMarkup.hitWithTolerance

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | hitWithTolerance(**_point**\ : :js:class:`~Point2`\ , **_view**\ : :js:class:`~IView`\ , **_pickTolerance**\ : *number*\ ): *boolean*
   
   Called when a hit test is performed on this markup item.
   
   **Parameters**
   
      **_point**\ : :js:class:`~Point2`
   
      **_view**\ : :js:class:`~IView`
   
      **_pickTolerance**\ : *number*
   
   
   **Returns**\ : *boolean*
   
      boolean value indicating whether this item was picked
   
   



.. js:method:: Markup.Line.LineMarkup.onDeselect

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | onDeselect(): *void*
   
   Called when this markup item is deselected by the system
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.onSelect

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | onSelect(**_view**\ : :js:class:`~IView`\ ): *void*
   
   Called when this markup item is selected by the system from a given view.
   
   **Parameters**
   
      **_view**\ : :js:class:`~IView`
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.remove

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | remove(**_view**\ : (*None* \| :js:class:`~IView`\ )): *void*
   
   Called when the MarkupItem is removed from a view from the system. Any cleanup that needs to be done should be performed in this method.
   
   **Parameters**
   
      **_view**\ : (*None* \| :js:class:`~IView`\ )
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.removeLine

   .. rst-class:: sig-pretty-signature
   
      | removeLine(): *Promise*
   
   Removes the line geometry from the scene.
   
   **Returns**\ : *Promise*
   



.. js:method:: Markup.Line.LineMarkup.setFirstNodeId

   .. rst-class:: sig-pretty-signature
   
      | setFirstNodeId(**nodeId**\ : (*None* \| *number*\ )): *void*
   
   Sets the NodeId of the part associated with the first line point
   
   **Parameters**
   
      **nodeId**\ : (*None* \| *number*\ )
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setFirstPoint

   .. rst-class:: sig-pretty-signature
   
      | setFirstPoint(**firstPoint**\ : (*None* \| :js:class:`~Point3`\ )): *void*
   
   Sets the first point on the line.
   
   **Parameters**
   
      **firstPoint**\ : (*None* \| :js:class:`~Point3`\ )
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setId

   .. rst-class:: sig-pretty-signature
   
      | setId(**id**\ : *string*\ ): *void*
   
   Sets a markup id for this line.
   
   **Parameters**
   
      **id**\ : *string*
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setLineColor

   .. rst-class:: sig-pretty-signature
   
      | setLineColor(**color**\ : :js:class:`~Color`\ ): *void*
   
   Sets the line color.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setLineOpacity

   .. rst-class:: sig-pretty-signature
   
      | setLineOpacity(**opacity**\ : *number*\ ): *void*
   
   Sets the line opacity.
   
   **Parameters**
   
      **opacity**\ : *number*
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setLinePattern

   .. rst-class:: sig-pretty-signature
   
      | setLinePattern(**pattern**\ : :js:data:`~LinePattern`\ , **patternLength**\ : *number*\ , **patternLengthUnit**\ : :js:data:`LinePatternLengthUnit <Sc.LinePatternLengthUnit>`\ ): *void*
   
   Sets the line pattern.
   
   **Parameters**
   
      **pattern**\ : :js:data:`~LinePattern`
   
         The line pattern.
   
   
      **patternLength**\ : *number*
   
         The length of a single repetition of the line pattern.
   
   
      **patternLengthUnit**\ : :js:data:`LinePatternLengthUnit <Sc.LinePatternLengthUnit>`
   
         The unit in which the pattern length is measured.
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setSecondNodeId

   .. rst-class:: sig-pretty-signature
   
      | setSecondNodeId(**nodeId**\ : (*None* \| *number*\ )): *void*
   
   Sets the NodeId of the part associated with the second line point
   
   **Parameters**
   
      **nodeId**\ : (*None* \| *number*\ )
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.setSecondPoint

   .. rst-class:: sig-pretty-signature
   
      | setSecondPoint(**secondPoint**\ : (*None* \| :js:class:`~Point3`\ )): *void*
   
   Sets the second point on the line.
   
   **Parameters**
   
      **secondPoint**\ : (*None* \| :js:class:`~Point3`\ )
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Line.LineMarkup.toJson

   .. rst-class:: sig-pretty-signature
   
      | toJson(): *object*
   
   Creates an object ready for JSON serialization.
   
   **Returns**\ : *object*
   
      The prepared object.
   
   



.. js:method:: Markup.Line.LineMarkup.updateLine

   .. rst-class:: sig-pretty-signature
   
      | updateLine(): *Promise*
   
   Draws updated line geometry in the scene.
   
   **Returns**\ : *Promise*
   



.. js:method:: static Markup.Line.LineMarkup.fromJson

   .. rst-class:: clio-flags
   
      :clio-static:`static`
   
   .. rst-class:: sig-pretty-signature
   
      | fromJson(**objData**\ : *any*\ , **viewer**\ : :js:class:`~IWebViewer`\ ): *Promise*
   
   Creates a new [[LineMarkup]] from an object given by [[toJson]].
   
   **Parameters**
   
      **objData**\ : *any*
   
      **viewer**\ : :js:class:`~IWebViewer`
   
   
   **Returns**\ : *Promise*
   
      The prepared object.
   
   





