跳到主要内容
版本:v10.0

M3D / M3D / Shapes / MeasureDisplayHelper

Class: MeasureDisplayHelper

M3D.Shapes.MeasureDisplayHelper

Memberof

M3D.Shapes

Description

测量对象显示数据生成工具类

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MeasureDisplayHelper(): MeasureDisplayHelper

Returns

MeasureDisplayHelper

Properties

measureApproximateSymbol

Static measureApproximateSymbol: string

Methods

CreateAngleMark

CreateAngleMark(line1Start, line1End, line2Start, line2End, theta, lines): void

Parameters

NameType
line1StartVector3
line1EndVector3
line2StartVector3
line2EndVector3
thetanumber
linesVector3[]

Returns

void

Description

角度符号


CreateDesignerAngleMark

CreateDesignerAngleMark(line1Start, line1End, line2Start, line2End, center, radius, theta, lines): void

Parameters

NameType
line1StartVector3
line1EndVector3
line2StartVector3
line2EndVector3
centerVector3
radiusnumber
thetanumber
linesVector3[]

Returns

void

Description

创建角度符号


CreateNoteRectangleImageMultiline

CreateNoteRectangleImageMultiline(shape2D, rectStart, rectEnd, lineColor, lineWidth, backColor, fontColor, fontSize, textsArray, col, scene, bEnvelope): any

Parameters

NameType
shape2DShape2D
rectStartVector2
rectEndVector2
lineColorColor
lineWidthnumber
backColorColor[][]
fontColorColor[][]
fontSizenumber
textsArrayTexts2D[][]
colnumber
sceneScene
bEnvelopeboolean

Returns

any

Description

创建多根线文本图片

CreateNoteRectangleImageMultiline(shape2D, rectStart, rectEnd, lineColor, lineWidth, fontSize, textsArray, col, scene, bEnvelope): any

Parameters

NameType
shape2DShape2D
rectStartVector2
rectEndVector2
lineColorColor
lineWidthnumber
fontSizenumber
textsArrayTexts2D[][]
colnumber
sceneScene
bEnvelopeboolean

Returns

any

Description

创建多根线文本图片


CreateSelectFaceMark

CreateSelectFaceMark(pointArray, boxCenter, direction, faceNormal, length): void

Parameters

NameType
pointArrayVector3[]
boxCenterVector3
directionVector3
faceNormalVector3
lengthany

Returns

void

Description

选择的面显示矩形


CreateSequenceNumberImage

CreateSequenceNumberImage(scene, imageBoard, text, position, imageboards, numb): any

Parameters

NameType
sceneScene
imageBoardImage
textTexts2D
positionVector3
imageboardsImage[]
numbnumber

Returns

any

Description

创建序号批注

CreateSequenceNumberImage(scene, imageBoard, text, position, sequenceNote): any

Parameters

NameType
sceneScene
imageBoardImage
textTexts2D
positionVector3
sequenceNoteNote

Returns

any

Description

创建序号批注


IsPC

IsPC(): boolean

Returns

boolean

Description

是否为电脑


SetMeasureAreaUnit

SetMeasureAreaUnit(unitFlag, values, unit): string

Parameters

NameType
unitFlagnumber
valuesnumber[]
unitstring

Returns

string

Description

设置测量面积单位


SetMeasureUnit

SetMeasureUnit(unitFlag, values, unit): string

Parameters

NameType
unitFlagnumber
valuesnumber[]
unitstring

Returns

string

Description

设置测量单位


SetMeasureVolumeUnit

SetMeasureVolumeUnit(unitFlag, values, unit): string

Parameters

NameType
unitFlagnumber
valuesnumber[]
unitstring

Returns

string

Description

设置测量体积单位


addImageToMemory

addImageToMemory(scene, imageboard, shape2D, pntInPlane, wideFactor, heightFactor, measure): void

Parameters

NameTypeDescription
sceneScene场景
imageboardImage图片
shape2DShape2D2D对象集合
pntInPlaneVector3摄像机射线在投影平面的投影点
wideFactornumber宽度比例
heightFactornumber高度比例
measureMeasure测量对象

Returns

void

Description

一定放在最后使用,内部已经把shape2D内存释放


createNoteRectangleImage

createNoteRectangleImage(shape2D, rectStart, rectEnd, lineColor, lineWidth, backColor, fontColor, fontSize, str): void

Parameters

NameType
shape2DShape2D
rectStartVector2
rectEndVector2
lineColorColor
lineWidthnumber
backColorColor
fontColorColor
fontSizenumber
strstring

Returns

void

Description

创建批注矩形图片的参数


createNoteTextsImageMultiline

createNoteTextsImageMultiline(scene, textsArray, position, measure, bEnvelope?): Image

Parameters

NameType
sceneScene
textsArrayTexts2D[][]
positionVector3
measureMeasure
bEnvelope?boolean

Returns

Image

Description

创建多根线文本图片


createNoteTextsImageN

createNoteTextsImageN(scene, textsArray, position, measure): any

Parameters

NameType
sceneScene
textsArrayTexts2D[]
positionVector3
measureMeasure

Returns

any

Description

创建批注文字显示的图片

createNoteTextsImageN(scene, textsArray, position, measure, tempScreenPos): any

Parameters

NameType
sceneScene
textsArrayTexts2D[]
positionVector3
measureMeasure
tempScreenPosVector2

Returns

any

Description

创建批注文字显示的图片

createNoteTextsImageN(scene, imageBoard, textsArray, position, imageBoards, numb): any

Parameters

NameType
sceneScene
imageBoardImage
textsArrayTexts2D[]
positionVector3
imageBoardsImage[]
numbnumber

Returns

any

Description

创建批注文字显示的图片

createNoteTextsImageN(scene, imageBoard, textsArray, position, textNote): any

Parameters

NameType
sceneScene
imageBoardImage
textsArrayTexts2D[]
positionVector3
textNoteNote

Returns

any

Description

创建批注文字显示的图片

createNoteTextsImageN(scene, imageBoard, textsArray, position, textNote, borderColor, backColor, fontColor, offsetDirection): any

Parameters

NameType
sceneScene
imageBoardImage
textsArrayTexts2D[][]
positionVector3
textNoteNote
borderColorColor
backColorColor[][]
fontColorColor[][]
offsetDirectionnumber

Returns

any

Description

创建批注文字显示的图片

createNoteTextsImageN(scene, imageBoard, textMap, position, textNote): any

Parameters

NameType
sceneScene
imageBoardImage
textMapObject
positionVector3
textNoteNote

Returns

any

Description

创建批注文字显示的图片


createNoteTextsImageN1

createNoteTextsImageN1(scene, textsArray, position, measure): Image

Parameters

NameType
sceneScene
textsArrayTexts2D[]
positionVector3
measureMeasure

Returns

Image

Description

创建批注文字显示的图片


createRectImage

createRectImage(shape2D, rect1Start, rect1End, rect2L, rect1Color, rect2Color, text1Color, text2Color, str1, str2, fontSize, drawD3): void

Parameters

NameTypeDescription
shape2DShape2D2D对象集合
rect1StartVector2第一个矩形开始位置
rect1EndVector2第一个矩形结束位置
rect2Lnumber长度
rect1ColorColor第一个矩形颜色
rect2ColorColor第二个矩形颜色
text1ColorColor左边文本颜色
text2ColorColor右边文本颜色
str1string左边文本
str2string右边文本
fontSizenumber字体大小
drawD3boolean

Returns

void

Description

创建批注矩形图片的参数


createTitleTextChinese

createTitleTextChinese(): Map<number, string>

Returns

Map<number, string>

Description

创建中文标题文本


createTitleTextEnglish

createTitleTextEnglish(): Map<number, string>

Returns

Map<number, string>

Description

创建英文标题文本


createTitleTextSign

createTitleTextSign(): Map<number, string>

Returns

Map<number, string>

Description

创建标题文本签名


getTitleMaxText

getTitleMaxText(): string

Returns

string

Description

获取最远距离标题文本


getTitleMinText

getTitleMinText(): string

Returns

string

Description

获取最近距离标题文本


getTitleText

getTitleText(id, measureType): any

Parameters

NameTypeDescription
idnumber
measureTypenumber测量类型

Returns

any

Description

获取文本标题

getTitleText(measureType): any

Parameters

NameType
measureTypenumber

Returns

any

Description

获取文本标题


updatePointToPointDisatnce

updatePointToPointDisatnce(firstPoint, secondPoint, measure): void

Parameters

NameType
firstPointPoint
secondPointPoint
measureMeasure

Returns

void

Description

更新点点间距离