LineMarkup
-
class
Markup.Line.
LineMarkup
() This class is for 3D line markup items.
Constructors
Properties
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
-
LineMarkup.
constructor
(viewer, firstPoint, secondPoint, firstNodeId, secondNodeId) Arguments: - viewer (
WebViewer()
) – None - firstPoint (
null | Point3()
) – None - secondPoint (
null | Point3()
) – None - firstNodeId (
null | number()
) – None - secondNodeId (
null | number()
) – None
Return type: LineMarkup
- viewer (
Methods
draw
getClassName
-
LineMarkup.
getClassName
() Returns the class name for this markup item.
Return type: string
getFirstNodeId
-
LineMarkup.
getFirstNodeId
() Gets the NodeId of the part associated with the first line point
Return type: null | number
getFirstPoint
-
LineMarkup.
getFirstPoint
() Gets the first point on the line.
Returns: the first point, or null if none is set. Return type: null | Point3
getLinePatternLength
-
LineMarkup.
getLinePatternLength
() Gets the length of a single repetition of the line pattern.
Return type: null | number
getLinePatternLengthUnit
-
LineMarkup.
getLinePatternLengthUnit
() Gets the unit in which the line pattern length is measured.
Return type: null | LinePatternLengthUnit
getNodeId
-
LineMarkup.
getNodeId
() Gets the node id associated with the line markup.
Return type: null | number
getSecondNodeId
-
LineMarkup.
getSecondNodeId
() Gets the NodeId of the part associated with the second line point
Return type: null | number
getSecondPoint
-
LineMarkup.
getSecondPoint
() Gets the second point on the line.
Returns: the second point, or null if none is set. Return type: null | Point3
hit
hitWithTolerance
onDeselect
-
LineMarkup.
onDeselect
() Called when this markup item is deselected by the system
Return type: void
onSelect
-
LineMarkup.
onSelect
() Called when this markup item is selected by the system.
Return type: void
remove
-
LineMarkup.
remove
() Called when the MarkupItem is removed from the system. Any cleanup that needs to be done should be performed in this method.
Return type: void
removeLine
-
LineMarkup.
removeLine
() Removes the line geometry from the scene.
Return type: Promise <void>
setFirstNodeId
-
LineMarkup.
setFirstNodeId
(nodeId) Arguments: - nodeId (
null | number()
) – None
Sets the NodeId of the part associated with the first line point
Return type: void - nodeId (
setFirstPoint
-
LineMarkup.
setFirstPoint
(firstPoint) Arguments: - firstPoint (
null | Point3()
) – None
Sets the first point on the line.
Return type: void - firstPoint (
setId
-
LineMarkup.
setId
(id) Arguments: - id (
string()
) – None
Sets a markup id for this line.
Return type: void - id (
setLineColor
setLineOpacity
-
LineMarkup.
setLineOpacity
(opacity) Arguments: - opacity (
number()
) – None
Sets the line opacity.
Return type: void - opacity (
setLinePattern
-
LineMarkup.
setLinePattern
(pattern, patternLength, patternLengthUnit) Arguments: - 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.
Sets the line pattern.
Return type: void - pattern (
setSecondNodeId
-
LineMarkup.
setSecondNodeId
(nodeId) Arguments: - nodeId (
null | number()
) – None
Sets the NodeId of the part associated with the second line point
Return type: void - nodeId (
setSecondPoint
-
LineMarkup.
setSecondPoint
(secondPoint) Arguments: - secondPoint (
null | Point3()
) – None
Sets the second point on the line.
Return type: void - secondPoint (
toJson
-
LineMarkup.
toJson
() Creates an object ready for JSON serialization.
Returns: The prepared object. Return type: object
updateLine
-
LineMarkup.
updateLine
() Draws updated line geometry in the scene.
Return type: Promise <void>
static fromJson
-
LineMarkup.
fromJson
(objData, viewer) Arguments: - objData (
any()
) – None - viewer (
WebViewer()
) – None
Creates a new [[LineMarkup]] from an object given by [[toJson]].
Returns: The prepared object. Return type: Promise <LineMarkup> - objData (