Overview
TheRectanglePrimitive class creates a rectangular shape in 3D space defined by a center point, width, and breadth. It extends the kernel Rectangle class and implements the IPrimitive interface for selection and editing capabilities.
Constructor
Configuration object for the rectangle primitive
RectangleOptions
Unique identifier for the rectangle object. Auto-generated if not provided.
Center point coordinates as
[x, y, z]Width of the rectangle
Breadth (height) of the rectangle
Rectangle color as hexadecimal number (e.g.,
0xFF0000 for red)Properties
Gets or sets the center point of the rectangle. Updates geometry automatically.
Gets or sets the width of the rectangle. Updates geometry automatically.
Gets or sets the breadth (height) of the rectangle. Updates geometry automatically.
Gets or sets the rectangle color. Updates appearance automatically.
Indicates whether the rectangle is currently selected
Indicates whether the rectangle is in edit mode
Returns
'RectanglePrimitive' - the type identifierMethods
getOPConfig()
Returns the current configuration of the rectangle.RectangleOptions - Current rectangle configuration