Overview
TheLinePrimitive class creates a straight line segment between two points in 3D space. It extends the kernel Line class and implements the IPrimitive interface for selection and editing capabilities.
Constructor
Configuration object for the line primitive
LineOptions
Unique identifier for the line object. Auto-generated if not provided.
Starting point coordinates as
[x, y, z]Ending point coordinates as
[x, y, z]Line color as hexadecimal number (e.g.,
0xFF0000 for red)Properties
Gets or sets the starting point of the line. Updates geometry automatically.
Gets or sets the ending point of the line. Updates geometry automatically.
Gets or sets the line color. Updates appearance automatically.
Indicates whether the line is currently selected
Indicates whether the line is in edit mode
Returns
'LinePrimitive' - the type identifierMethods
getOPConfig()
Returns the current configuration of the line.LineOptions - Current line configuration