@novorender/api / DrawPart
Interface: DrawPart
Defined in: @novorender/src/measure/modules/draw/index.ts:117
Information about object to draw for measurement
Properties
angles2D?
optional angles2D: number[];
Defined in: @novorender/src/measure/modules/draw/index.ts:155
Angles in 2D space. Angle will be defined only if directions3D is present
color?
readonly optional color: string;
Defined in: @novorender/src/measure/modules/draw/index.ts:121
Optional color
directions3D?
readonly optional directions3D: ReadonlyVec3[];
Defined in: @novorender/src/measure/modules/draw/index.ts:150
Direction of the points. Used for text rotation
drawType
readonly drawType: "vertex" | "lines" | "angle" | "curveSegment" | "filled" | "text";
Defined in: @novorender/src/measure/modules/draw/index.ts:136
Type of object to draw
elevation?
readonly optional elevation:
| ElevationInfo
| (undefined | ElevationInfo)[];
Defined in: @novorender/src/measure/modules/draw/index.ts:144
From/to 3d elevation of object, used for cylinder to or lines to show slope
indicesOnScreen?
optional indicesOnScreen: number[];
Defined in: @novorender/src/measure/modules/draw/index.ts:158
Indices reffering to vertices3D and text if it is a list, -1 means an added empty text
name?
readonly optional name: string;
Defined in: @novorender/src/measure/modules/draw/index.ts:119
Name of the part
text?
readonly optional text: string | string[][];
Defined in: @novorender/src/measure/modules/draw/index.ts:128
Display text of the part, For lines of 2 points it is the length For angles its the angle in degrees For surfaces its a list of list strings. First list is for the outer loop while the remaining is for the voids
textTemplate?
readonly optional textTemplate:
| TextTemplate
| TextTemplate[][];
Defined in: @novorender/src/measure/modules/draw/index.ts:134
Performs same function as text
, but returns most numbers separately,
so they could be converted and formatted by the client.
Both text
and textTemplate
are returned.
vertices2D?
optional vertices2D: ReadonlyVec2[];
Defined in: @novorender/src/measure/modules/draw/index.ts:153
View space coordinates, in pixel values, empty if the entire part is out of view
vertices3D
readonly vertices3D: ReadonlyVec3[];
Defined in: @novorender/src/measure/modules/draw/index.ts:148
World coordinates
voids?
readonly optional voids: DrawVoid[];
Defined in: @novorender/src/measure/modules/draw/index.ts:146
Void in the draw part, only valid for filled kind