# LineMarkup

class `Markup.Line.``LineMarkup`()

  This class is for 3D line markup items.

  ## Index

  Constructors

  - `constructor`

  Properties

  - `uniqueId`
  - `className`

  Methods

  - `draw`
  - `getClassName`
  - `getFirstNodeId`
  - `getFirstPoint`
  - `getId`
  - `getLineColor`
  - `getLineOpacity`
  - `getLinePattern`
  - `getLinePatternLength`
  - `getLinePatternLengthUnit`
  - `getNodeId`
  - `getSecondNodeId`
  - `getSecondPoint`
  - `hit`
  - `hitWithTolerance`
  - `onDeselect`
  - `onSelect`
  - `remove`
  - `removeLine`
  - `setFirstNodeId`
  - `setFirstPoint`
  - `setId`
  - `setLineColor`
  - `setLineOpacity`
  - `setLinePattern`
  - `setSecondNodeId`
  - `setSecondPoint`
  - `toJson`
  - `updateLine`
  - `fromJson`

## Constructors

`Markup.Line.LineMarkup.``constructor`()
  LineMarkup(viewer: `IWebViewer`, firstPoint: (None | `Point3`)?, secondPoint: (None | `Point3`)?, firstNodeId: (None | number)?, secondNodeId: (None | number)?): `LineMarkup`

  Parameters

  > viewer: `IWebViewer`

  > firstPoint: (None | `Point3`) = null

  > secondPoint: (None | `Point3`) = null

  > firstNodeId: (None | number) = null

  > secondNodeId: (None | number) = null

  Returns: `LineMarkup`

## Properties

`Markup.Line.LineMarkup.``uniqueId`

  inherited

  uniqueId: string

`Markup.Line.LineMarkup.``className`

  static

  className: string

## Methods

`Markup.Line.LineMarkup.``draw`()

  inherited

  draw(_renderer: `MarkupRenderer`, _view: `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: `MarkupRenderer`

  > _view: `IView`

  Returns: void

`Markup.Line.LineMarkup.``getClassName`()
  getClassName(): string

  Returns the class name for this markup item.

  Returns: string

`Markup.Line.LineMarkup.``getFirstNodeId`()
  getFirstNodeId(): (None | number)

  Gets the NodeId of the part associated with the first line point

  Returns: (None | number)

`Markup.Line.LineMarkup.``getFirstPoint`()
  getFirstPoint(): (None | `Point3`)

  Gets the first point on the line.

  Returns: (None | `Point3`)

  > the first point, or null if none is set.

`Markup.Line.LineMarkup.``getId`()
  getId(): string

  Returns a unique markup id for this line.

  Returns: string

`Markup.Line.LineMarkup.``getLineColor`()
  getLineColor(): `Color`

  Gets the line color.

  Returns: `Color`

`Markup.Line.LineMarkup.``getLineOpacity`()
  getLineOpacity(): number

  Gets the line opacity.

  Returns: number

`Markup.Line.LineMarkup.``getLinePattern`()
  getLinePattern(): (None | `LinePattern`)

  Gets the line pattern.

  Returns: (None | `LinePattern`)

`Markup.Line.LineMarkup.``getLinePatternLength`()
  getLinePatternLength(): (None | number)

  Gets the length of a single repetition of the line pattern.

  Returns: (None | number)

`Markup.Line.LineMarkup.``getLinePatternLengthUnit`()
  getLinePatternLengthUnit(): (None | `LinePatternLengthUnit`)

  Gets the unit in which the line pattern length is measured.

  Returns: (None | `LinePatternLengthUnit`)

`Markup.Line.LineMarkup.``getNodeId`()
  getNodeId(): (None | number)

  Gets the node id associated with the line markup.

  Returns: (None | number)

`Markup.Line.LineMarkup.``getSecondNodeId`()
  getSecondNodeId(): (None | number)

  Gets the NodeId of the part associated with the second line point

  Returns: (None | number)

`Markup.Line.LineMarkup.``getSecondPoint`()
  getSecondPoint(): (None | `Point3`)

  Gets the second point on the line.

  Returns: (None | `Point3`)

  > the second point, or null if none is set.

`Markup.Line.LineMarkup.``hit`()

  inherited

  hit(_point: `Point2`, _view: `IView`): boolean

  Called when a hit test is performed on this markup item.

  Parameters

  > _point: `Point2`

  > _view: `IView`

  Returns: boolean

  > boolean value indicating whether this item was picked

`Markup.Line.LineMarkup.``hitWithTolerance`()

  inherited

  hitWithTolerance(_point: `Point2`, _view: `IView`, _pickTolerance: number): boolean

  Called when a hit test is performed on this markup item.

  Parameters

  > _point: `Point2`

  > _view: `IView`

  > _pickTolerance: number

  Returns: boolean

  > boolean value indicating whether this item was picked

`Markup.Line.LineMarkup.``onDeselect`()

  inherited

  onDeselect(): void

  Called when this markup item is deselected by the system

  Returns: void

`Markup.Line.LineMarkup.``onSelect`()

  inherited

  onSelect(_view: `IView`): void

  Called when this markup item is selected by the system from a given view.

  Parameters

  > _view: `IView`

  Returns: void

`Markup.Line.LineMarkup.``remove`()

  inherited

  remove(_view: (None | `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 | `IView`)

  Returns: void

`Markup.Line.LineMarkup.``removeLine`()
  removeLine(): Promise

  Removes the line geometry from the scene.

  Returns: Promise

`Markup.Line.LineMarkup.``setFirstNodeId`()
  setFirstNodeId(nodeId: (None | number)): void

  Sets the NodeId of the part associated with the first line point

  Parameters

  > nodeId: (None | number)

  Returns: void

`Markup.Line.LineMarkup.``setFirstPoint`()
  setFirstPoint(firstPoint: (None | `Point3`)): void

  Sets the first point on the line.

  Parameters

  > firstPoint: (None | `Point3`)

  Returns: void

`Markup.Line.LineMarkup.``setId`()
  setId(id: string): void

  Sets a markup id for this line.

  Parameters

  > id: string

  Returns: void

`Markup.Line.LineMarkup.``setLineColor`()
  setLineColor(color: `Color`): void

  Sets the line color.

  Parameters

  > color: `Color`

  Returns: void

`Markup.Line.LineMarkup.``setLineOpacity`()
  setLineOpacity(opacity: number): void

  Sets the line opacity.

  Parameters

  > opacity: number

  Returns: void

`Markup.Line.LineMarkup.``setLinePattern`()
  setLinePattern(pattern: `LinePattern`, patternLength: number, patternLengthUnit: `LinePatternLengthUnit`): void

  Sets the line pattern.

  Parameters

  > pattern: `LinePattern`

  > > The line pattern.

  > patternLength: number

  > > The length of a single repetition of the line pattern.

  > patternLengthUnit: `LinePatternLengthUnit`

  > > The unit in which the pattern length is measured.

  Returns: void

`Markup.Line.LineMarkup.``setSecondNodeId`()
  setSecondNodeId(nodeId: (None | number)): void

  Sets the NodeId of the part associated with the second line point

  Parameters

  > nodeId: (None | number)

  Returns: void

`Markup.Line.LineMarkup.``setSecondPoint`()
  setSecondPoint(secondPoint: (None | `Point3`)): void

  Sets the second point on the line.

  Parameters

  > secondPoint: (None | `Point3`)

  Returns: void

`Markup.Line.LineMarkup.``toJson`()
  toJson(): object

  Creates an object ready for JSON serialization.

  Returns: object

  > The prepared object.

`Markup.Line.LineMarkup.``updateLine`()
  updateLine(): Promise

  Draws updated line geometry in the scene.

  Returns: Promise

`static Markup.Line.LineMarkup.``fromJson`()

  static

  fromJson(objData: any, viewer: `IWebViewer`): Promise

  Creates a new [[LineMarkup]] from an object given by [[toJson]].

  Parameters

  > objData: any

  > viewer: `IWebViewer`

  Returns: Promise

  > The prepared object.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...