mxcad API 文档 / MxDraw3d
Class: MxDraw3d
MxDraw3d的构造函数参数 的可配置选项
Hierarchy
default
<{eventAddToTree
: (node
:string
) =>void
;eventFileSave
: (fileName
:string
) =>void
;eventModesSelected
: (ids
:number
[]) =>void
;eventRebuildTree
: (tree_str
:string
) =>void
;eventRemoveFromTree
: (ids
:number
[]) =>void
;eventUpdatePointer
: (pointer
:number
[]) =>void
;eventUpdateViewSize
: (pointer
:number
[]) =>void
}>↳
MxDraw3d
Implements
Indexable
▪ [x: string
]: any
Table of contents
Constructors
Properties
- HEAPU8
- MdGeAisContext
- MdGeAisObject
- MdGeAisShape
- MdGeAisTexturedShape
- MdGeAngleDim
- MdGeApplication
- MdGeArray1OfInteger
- MdGeArray1OfPnt
- MdGeArray1OfReal
- MdGeArray2OfPnt
- MdGeArray2OfReal
- MdGeArrowAspect
- MdGeAxis
- MdGeBRep
- MdGeBSplineCurve
- MdGeBSplineSurface
- MdGeBezierCurve
- MdGeBezierSurface
- MdGeBndBox
- MdGeBox
- MdGeCSYS
- MdGeCSYSR
- MdGeChamfer
- MdGeCircle
- MdGeColor
- MdGeCompSolid
- MdGeCompound
- MdGeCone
- MdGeCylinder
- MdGeDiameterDim
- MdGeDimAspect
- MdGeDir
- MdGeDocColorTool
- MdGeDocReader
- MdGeDocShapeTool
- MdGeDocWriter
- MdGeDocument
- MdGeEdge
- MdGeEllipse
- MdGeExplorer
- MdGeFace
- MdGeFillet
- MdGeHGeomPlane
- MdGeHGeomSurface
- MdGeHypr
- MdGeInterpolateBSpl
- MdGeLabel
- MdGeLabelSequence
- MdGeLabelTree
- MdGeLengthDim
- MdGeLight
- MdGeLine
- MdGeLineAspect
- MdGeListIteratorOfListOfShape
- MdGeListOfShape
- MdGeLocation
- MdGeLoft
- MdGeMakeArcOfCircle
- MdGeMakeFace
- MdGeMakeThickSolid
- MdGeMakeWires
- MdGeMat
- MdGeMaterialAspect
- MdGeParab
- MdGePipe
- MdGePlane
- MdGePoint
- MdGePointsToBSpl
- MdGePointsToBSplSurface
- MdGePrism
- MdGeRadiusDim
- MdGeRect
- MdGeRevol
- MdGeSequenceIteratorOfSequenceOfShape
- MdGeSequenceOfShape
- MdGeShape
- MdGeShell
- MdGeSolid
- MdGeSphere
- MdGeSpliter
- MdGeText
- MdGeTextAspect
- MdGeTextLabel
- MdGeTopo
- MdGeTorus
- MdGeTransform
- MdGeTrsf
- MdGeVec
- MdGeVertex
- MdGeWedge
- MdGeWire
- MdGeXYZ
- Mx3dApplication
- Mx3dBaseObject
- Mx3dDbDocument
- Mx3dDbLabel
- Mx3dDbObject
- Mx3dGeBndBox
- Mx3dGeColor
- Mx3dGeLocation
- Mx3dGeObject
- Mx3dGePoint
- Mx3dLabelSequence
- Mx3dLabelSequenceIterator
- Mx3dShapeObject
- MxCF3dFilletShapeEnum
- MxCFDSChamfMode
- MxDimensionArrowOrientation
- MxDimensionTextHorizontalPosition
- MxDimensionTextVerticalPosition
- MxDisplayMode
- MxDisplayStatus
- MxDocColorType
- MxFontAspect
- MxGAJoinTypeEnum
- MxGAShapeEnum
- MxGFTrihedron
- MxHorizontalTextAlignment
- MxKindOfDimension
- MxKindOfInteractive
- MxNameOfColor
- MxNameOfMaterial
- MxOffsetModeEnum
- MxPrs3dTypeOfHLR
- MxShapeEnum
- MxTextPath
- MxTypeOfAngle
- MxTypeOfAngleArrowVisibility
- MxTypeOfColor
- MxTypeOfDisplayText
- MxTypeOfLine
- MxTypeOfMaterial
- MxTypeOfReflection
- MxVerticalTextAlignment
- _free
- _malloc
- app
- canvas
- creatDocument
- ctx
- events
- executeRedo
- executeUndo
- fitSelectedObjects
- getFileArryBufferPointer
- getFileSize
- getViewCursorX
- getViewCursorY
- getViewCursorZ
- getViewHeight
- getViewScale
- getViewWidth
- loadTextureImg
- locateFile
- mdGeAisContext
- mdGeApplication
- mdGeBRep
- mdGeDocument
- mdGeHGeomPlane
- mdGeLabelTree
- mdGeTopo
- onRuntimeInitialized
- open3DFile
- openFromUrl
- printErr
- ready
- removeSelectedObjects
- setObjectShowState
- updateCanvasSize
- wasmBinary
- onloadWasmMxDraw3dModel
Methods
- activateSelectionMode
- deactivateAllSelectionMode
- displayGround
- displayObject
- emit
- enableCustomClipPlane
- enableXClipPlane
- enableYClipPlane
- enableZClipPlane
- eraseObject
- explodeModels
- fitAllObjects
- highLightSelLabelShape
- highLightSelShape
- off
- on
- openBRepFromMemory
- openFromMemory
- pauseMainLoop
- removeAllObjects
- removeObjectByEntry
- resumeMainLoop
- setCanvasSize
- setCubemapBackground
- setCustomClipPlaneDirection
- setCustomClipPlanePosition
- setCustomClipPlaneReverse
- setDisplayMode
- setManipulatorEnabled
- setObjectShowStateByLabel
- setXClipPlaneReverse
- setXClipPlaneXPosition
- setYClipPlaneReverse
- setYClipPlaneYPosition
- setZClipPlaneReverse
- setZClipPlaneZPosition
- showCenterTrihedron
Constructors
constructor
• new MxDraw3d(options
)
Parameters
Name | Type |
---|---|
options | MxDraw3dConfig |
Overrides
PubSub<{ "eventModesSelected": (ids: number[]) => void "eventAddToTree": (node: string) => void "eventRemoveFromTree": (ids: number[]) => void "eventFileSave": (fileName: string) => void "eventRebuildTree": (tree_str: string) => void "eventUpdatePointer": (pointer: number[]) => void; "eventUpdateViewSize": (pointer: number[]) => void;
}>.constructor
Properties
HEAPU8
• HEAPU8: Uint8Array
MdGeAisContext
• MdGeAisContext: typeof MdGeAisContext
上下文
MdGeAisObject
• MdGeAisObject: typeof MdGeAisObject
ais对象
MdGeAisShape
• MdGeAisShape: typeof MdGeAisShape
ais形状
MdGeAisTexturedShape
• MdGeAisTexturedShape: typeof MdGeAisTexturedShape
aistextured形状
MdGeAngleDim
• MdGeAngleDim: typeof MdGeAngleDim
表示角度标注
MdGeApplication
• MdGeApplication: typeof MdGeApplication
应用程序
MdGeArray1OfInteger
• MdGeArray1OfInteger: typeof MdGeArray1OfInteger
表示一维整数数组
MdGeArray1OfPnt
• MdGeArray1OfPnt: typeof MdGeArray1OfPnt
表示一维点数组
MdGeArray1OfReal
• MdGeArray1OfReal: typeof MdGeArray1OfReal
表示一维实数数组
MdGeArray2OfPnt
• MdGeArray2OfPnt: typeof MdGeArray2OfPnt
表示二维点数组
MdGeArray2OfReal
• MdGeArray2OfReal: typeof MdGeArray2OfReal
表示二维实数数组
MdGeArrowAspect
• MdGeArrowAspect: typeof MdGeArrowAspect
箭头样式
MdGeAxis
• MdGeAxis: typeof MdGeAxis
表示一个轴
MdGeBRep
• MdGeBRep: typeof MdGeBRep
表示BRep工具
MdGeBSplineCurve
• MdGeBSplineCurve: typeof MdGeBSplineCurve
表示B样条曲线
MdGeBSplineSurface
• MdGeBSplineSurface: typeof MdGeBSplineSurface
表示B样条曲面
MdGeBezierCurve
• MdGeBezierCurve: typeof MdGeBezierCurve
表示贝塞尔曲线
MdGeBezierSurface
• MdGeBezierSurface: typeof MdGeBezierSurface
表示贝塞尔曲面
MdGeBndBox
• MdGeBndBox: typeof MdGeBndBox
包围盒
MdGeBox
• MdGeBox: typeof MdGeBox
表示一个Box
MdGeCSYS
• MdGeCSYS: typeof MdGeCSYS
表示一个坐标系(左手或右手)
MdGeCSYSR
• MdGeCSYSR: typeof MdGeCSYSR
表示一个右手坐标系
MdGeChamfer
• MdGeChamfer: typeof MdGeChamfer
表示倒斜角
MdGeCircle
• MdGeCircle: typeof MdGeCircle
表示一个圆
MdGeColor
• MdGeColor: typeof MdGeColor
表示颜色
MdGeCompSolid
• MdGeCompSolid: typeof MdGeCompSolid
表示一个CompSolid形状
MdGeCompound
• MdGeCompound: typeof MdGeCompound
表示一个Compound形状
MdGeCone
• MdGeCone: typeof MdGeCone
表示一个圆锥
MdGeCylinder
• MdGeCylinder: typeof MdGeCylinder
表示一个圆柱
MdGeDiameterDim
• MdGeDiameterDim: typeof MdGeDiameterDim
表示直径标注
MdGeDimAspect
• MdGeDimAspect: typeof MdGeDimAspect
标注样式
MdGeDir
• MdGeDir: typeof MdGeDir
表示一个方向
MdGeDocColorTool
• MdGeDocColorTool: typeof MdGeDocColorTool
文档颜色工具
MdGeDocReader
• MdGeDocReader: typeof MdGeDocReader
文档读取器
MdGeDocShapeTool
• MdGeDocShapeTool: typeof MdGeDocShapeTool
文档图形工具
MdGeDocWriter
• MdGeDocWriter: typeof MdGeDocWriter
文件写入器
MdGeDocument
• MdGeDocument: typeof MdGeDocument
文档
MdGeEdge
• MdGeEdge: typeof MdGeEdge
表示一个Edge形状
MdGeEllipse
• MdGeEllipse: typeof MdGeEllipse
表示一个椭圆
MdGeExplorer
• MdGeExplorer: typeof MdGeExplorer
表示拓扑元素遍历
MdGeFace
• MdGeFace: typeof MdGeFace
表示一个Face形状
MdGeFillet
• MdGeFillet: typeof MdGeFillet
表示倒圆角
MdGeHGeomPlane
• MdGeHGeomPlane: typeof MdGeHGeomPlane
表示几何平面句柄
MdGeHGeomSurface
• MdGeHGeomSurface: typeof MdGeHGeomSurface
表示几何曲面句柄
MdGeHypr
• MdGeHypr: typeof MdGeHypr
表示双曲线
MdGeInterpolateBSpl
• MdGeInterpolateBSpl: typeof MdGeInterpolateBSpl
表示插值B样条曲线
MdGeLabel
• MdGeLabel: typeof MdGeLabel
文档标签元素
MdGeLabelSequence
• MdGeLabelSequence: typeof MdGeLabelSequence
文档标签元素序列
MdGeLabelTree
• MdGeLabelTree: typeof MdGeLabelTree
MdGeLabelTree
MdGeLengthDim
• MdGeLengthDim: typeof MdGeLengthDim
表示长度标注
MdGeLight
• MdGeLight: typeof MdGeLight
表示光照
MdGeLine
• MdGeLine: typeof MdGeLine
表示一条直线
MdGeLineAspect
• MdGeLineAspect: typeof MdGeLineAspect
线样式
MdGeListIteratorOfListOfShape
• MdGeListIteratorOfListOfShape: typeof MdGeListIteratorOfListOfShape
表示形状链表迭代器
MdGeListOfShape
• MdGeListOfShape: typeof MdGeListOfShape
表示形状链表
MdGeLocation
• MdGeLocation: typeof MdGeLocation
Location
MdGeLoft
• MdGeLoft: typeof MdGeLoft
表示放样
MdGeMakeArcOfCircle
• MdGeMakeArcOfCircle: typeof MdGeMakeArcOfCircle
表示三点圆弧
MdGeMakeFace
• MdGeMakeFace: typeof MdGeMakeFace
表示Wire生成Face
MdGeMakeThickSolid
• MdGeMakeThickSolid: typeof MdGeMakeThickSolid
表示薄实体
MdGeMakeWires
• MdGeMakeWires: typeof MdGeMakeWires
表示合并Edges成Wires
MdGeMat
• MdGeMat: typeof MdGeMat
表示一个矩阵
MdGeMaterialAspect
• MdGeMaterialAspect: typeof MdGeMaterialAspect
表示材质
MdGeParab
• MdGeParab: typeof MdGeParab
表示抛物线
MdGePipe
• MdGePipe: typeof MdGePipe
表示管道
MdGePlane
• MdGePlane: typeof MdGePlane
表示一个平面
MdGePoint
• MdGePoint: typeof MdGePoint
表示一个点
MdGePointsToBSpl
• MdGePointsToBSpl: typeof MdGePointsToBSpl
表示拟合点B样条曲线
MdGePointsToBSplSurface
• MdGePointsToBSplSurface: typeof MdGePointsToBSplSurface
表示拟合B样条曲面
MdGePrism
• MdGePrism: typeof MdGePrism
表示拉伸体
MdGeRadiusDim
• MdGeRadiusDim: typeof MdGeRadiusDim
表示半径标注
MdGeRect
• MdGeRect: typeof MdGeRect
表示一个矩形
MdGeRevol
• MdGeRevol: typeof MdGeRevol
表示旋转体
MdGeSequenceIteratorOfSequenceOfShape
• MdGeSequenceIteratorOfSequenceOfShape: typeof MdGeSequenceIteratorOfSequenceOfShape
表示形状序列集合迭代器
MdGeSequenceOfShape
• MdGeSequenceOfShape: typeof MdGeSequenceOfShape
表示形状序列集合
MdGeShape
• MdGeShape: typeof MdGeShape
表示一个形状
MdGeShell
• MdGeShell: typeof MdGeShell
表示一个Shell形状
MdGeSolid
• MdGeSolid: typeof MdGeSolid
表示一个Solid形状
MdGeSphere
• MdGeSphere: typeof MdGeSphere
表示一个球体
MdGeSpliter
• MdGeSpliter: typeof MdGeSpliter
MdGeSpliter
MdGeText
• MdGeText: typeof MdGeText
表示文字
MdGeTextAspect
• MdGeTextAspect: typeof MdGeTextAspect
文本样式
MdGeTextLabel
• MdGeTextLabel: typeof MdGeTextLabel
表示文字标签
MdGeTopo
• MdGeTopo: typeof MdGeTopo
拓扑转换类
MdGeTorus
• MdGeTorus: typeof MdGeTorus
表示圆环
MdGeTransform
• MdGeTransform: typeof MdGeTransform
形状变换类
MdGeTrsf
• MdGeTrsf: typeof MdGeTrsf
表示一个变换
MdGeVec
• MdGeVec: typeof MdGeVec
表示一个向量
MdGeVertex
• MdGeVertex: typeof MdGeVertex
表示一个Vertex形状
MdGeWedge
• MdGeWedge: typeof MdGeWedge
表示一个楔形
MdGeWire
• MdGeWire: typeof MdGeWire
表示一个Wire形状
MdGeXYZ
• MdGeXYZ: typeof MdGeXYZ
表示一个坐标
Mx3dApplication
• Mx3dApplication: typeof Mx3dApplication
Mx3dBaseObject
• Mx3dBaseObject: typeof Mx3dBaseObject
所有类的父类,除MdGeTopo,MdGeBRep
Mx3dDbDocument
• Mx3dDbDocument: typeof Mx3dDbDocument
Mx3dDbLabel
• Mx3dDbLabel: typeof Mx3dDbLabel
Mx3dDbObject
• Mx3dDbObject: typeof Mx3dDbObject
Mx3dGeBndBox
• Mx3dGeBndBox: typeof Mx3dGeBndBox
Mx3dGeColor
• Mx3dGeColor: typeof Mx3dGeColor
Mx3dGeLocation
• Mx3dGeLocation: typeof Mx3dGeLocation
Mx3dGeObject
• Mx3dGeObject: typeof Mx3dGeObject
Mx3dGePoint
• Mx3dGePoint: typeof Mx3dGePoint
Mx3dLabelSequence
• Mx3dLabelSequence: typeof Mx3dLabelSequence
Mx3dLabelSequenceIterator
• Mx3dLabelSequenceIterator: typeof Mx3dLabelSequenceIterator
Mx3dShapeObject
• Mx3dShapeObject: typeof Mx3dShapeObject
MxCF3dFilletShapeEnum
• MxCF3dFilletShapeEnum: typeof MxCF3dFilletShapeEnum
MxCFDSChamfMode
• MxCFDSChamfMode: typeof MxCFDSChamfMode
MxDimensionArrowOrientation
• MxDimensionArrowOrientation: typeof MxDimensionArrowOrientation
MxDimensionTextHorizontalPosition
• MxDimensionTextHorizontalPosition: typeof MxDimensionTextHorizontalPosition
MxDimensionTextVerticalPosition
• MxDimensionTextVerticalPosition: typeof MxDimensionTextVerticalPosition
MxDisplayMode
• MxDisplayMode: typeof MxDisplayMode
MxDisplayStatus
• MxDisplayStatus: typeof MxDisplayStatus
MxDocColorType
• MxDocColorType: typeof MxDocColorType
MxFontAspect
• MxFontAspect: typeof MxFontAspect
MxGAJoinTypeEnum
• MxGAJoinTypeEnum: typeof MxGAJoinTypeEnum
MxGAShapeEnum
• MxGAShapeEnum: typeof MxGAShapeEnum
MxGFTrihedron
• MxGFTrihedron: typeof MxGFTrihedron
MxHorizontalTextAlignment
• MxHorizontalTextAlignment: typeof MxHorizontalTextAlignment
MxKindOfDimension
• MxKindOfDimension: typeof MxKindOfDimension
MxKindOfInteractive
• MxKindOfInteractive: typeof MxKindOfInteractive
MxNameOfColor
• MxNameOfColor: typeof MxNameOfColor
MxNameOfMaterial
• MxNameOfMaterial: typeof MxNameOfMaterial
MxOffsetModeEnum
• MxOffsetModeEnum: typeof MxOffsetModeEnum
MxPrs3dTypeOfHLR
• MxPrs3dTypeOfHLR: typeof MxPrs3dTypeOfHLR
MxShapeEnum
• MxShapeEnum: typeof MxShapeEnum
MxTextPath
• MxTextPath: typeof MxTextPath
MxTypeOfAngle
• MxTypeOfAngle: typeof MxTypeOfAngle
MxTypeOfAngleArrowVisibility
• MxTypeOfAngleArrowVisibility: typeof MxTypeOfAngleArrowVisibility
MxTypeOfColor
• MxTypeOfColor: typeof MxTypeOfColor
MxTypeOfDisplayText
• MxTypeOfDisplayText: typeof MxTypeOfDisplayText
MxTypeOfLine
• MxTypeOfLine: typeof MxTypeOfLine
MxTypeOfMaterial
• MxTypeOfMaterial: typeof MxTypeOfMaterial
MxTypeOfReflection
• MxTypeOfReflection: typeof MxTypeOfReflection
MxVerticalTextAlignment
• MxVerticalTextAlignment: typeof MxVerticalTextAlignment
_free
• _free: (ptr
: number
) => void
Type declaration
▸ (ptr
): void
Parameters
Name | Type |
---|---|
ptr | number |
Returns
void
_malloc
• _malloc: (len
: number
) => number
Type declaration
▸ (len
): number
Parameters
Name | Type |
---|---|
len | number |
Returns
number
app
• app: Mx3dApplication
canvas
• canvas: HTMLCanvasElement
Implementation of
creatDocument
• creatDocument: () => boolean
Type declaration
▸ (): boolean
新建文档
Returns
boolean
ctx
• ctx: null
| WebGLRenderingContext
| WebGL2RenderingContext
events
• events: Object
Index signature
▪ [x: EventType
]: Events
[keyof Events
][]
Inherited from
PubSub.events
executeRedo
• executeRedo: () => boolean
Type declaration
▸ (): boolean
执行redo
Returns
boolean
executeUndo
• executeUndo: () => boolean
Type declaration
▸ (): boolean
执行undo
Returns
boolean
fitSelectedObjects
• fitSelectedObjects: () => void
Type declaration
▸ (): void
适应选中的对象
Returns
void
getFileArryBufferPointer
• getFileArryBufferPointer: (theFileName
: string
) => number
Type declaration
▸ (theFileName
): number
获取文件的BufferPointer
Parameters
Name | Type |
---|---|
theFileName | string |
Returns
number
getFileSize
• getFileSize: (theFileName
: string
) => number
Type declaration
▸ (theFileName
): number
获取文件的长度
Parameters
Name | Type |
---|---|
theFileName | string |
Returns
number
getViewCursorX
• getViewCursorX: () => number
Type declaration
▸ (): number
获取视图中鼠标X位置
Returns
number
getViewCursorY
• getViewCursorY: () => number
Type declaration
▸ (): number
获取视图中鼠标Y位置
Returns
number
getViewCursorZ
• getViewCursorZ: () => number
Type declaration
▸ (): number
获取视图中鼠标Z位置
Returns
number
getViewHeight
• getViewHeight: () => number
Type declaration
▸ (): number
获取视图高度
Returns
number
getViewScale
• getViewScale: () => number
Type declaration
▸ (): number
获取视图缩放比例
Returns
number
getViewWidth
• getViewWidth: () => number
Type declaration
▸ (): number
获取视图宽度
Returns
number
loadTextureImg
• loadTextureImg: (fileUrl
: string
, fileName
: string
) => void
Type declaration
▸ (fileUrl
, fileName
): void
加载贴图图片
Parameters
Name | Type |
---|---|
fileUrl | string |
fileName | string |
Returns
void
locateFile
• Optional
locateFile: (wasmURL
: string
, baseURL
: string
| URL
) => string
Type declaration
▸ (wasmURL
, baseURL?
): string
手动指定wasm文件位置
Parameters
Name | Type | Default value |
---|---|---|
wasmURL | string | undefined |
baseURL | string | URL | self.location.href |
Returns
string
Implementation of
Inherited from
mdGeAisContext
• mdGeAisContext: MdGeAisContext
mdGeApplication
• mdGeApplication: MdGeApplication
mdGeBRep
• mdGeBRep: MdGeBRep
mdGeDocument
• mdGeDocument: MdGeDocument
mdGeHGeomPlane
• mdGeHGeomPlane: MdGeHGeomPlane
mdGeLabelTree
• mdGeLabelTree: MdGeLabelTree
mdGeTopo
• mdGeTopo: MdGeTopo
onRuntimeInitialized
• Optional
onRuntimeInitialized: () => void
Type declaration
▸ (): void
监听运行时初始化
Returns
void
Implementation of
MxDraw3dConfig.onRuntimeInitialized
Inherited from
WasmConfig.onRuntimeInitialized
open3DFile
• open3DFile: (file
: File
) => void
Type declaration
▸ (file
): void
通过浏览器器File对象打开3D文件
Parameters
Name | Type | Description |
---|---|---|
file | File | File对象 |
Returns
void
openFromUrl
• openFromUrl: (name
: string
, fileUrl
: string
) => void
Type declaration
▸ (name
, fileUrl
): void
从Url打开
Parameters
Name | Type | Description |
---|---|---|
name | string | 名称 是生成渲染3D对象的唯一标识 |
fileUrl | string | 文件路径 |
Returns
void
print
• Optional
print: (theText
: string
) => string
Type declaration
▸ (theText
): string
打印
Parameters
Name | Type |
---|---|
theText | string |
Returns
string
Implementation of
Inherited from
printErr
• Optional
printErr: (theText
: string
) => void
Type declaration
▸ (theText
): void
打印错误
Parameters
Name | Type |
---|---|
theText | string |
Returns
void
Implementation of
Inherited from
ready
完成初始化
removeSelectedObjects
• removeSelectedObjects: () => void
Type declaration
▸ (): void
删除选中实体
Returns
void
setObjectShowState
• setObjectShowState: (theId
: number
, theToShow
: boolean
) => void
Type declaration
▸ (theId
, theToShow
): void
设置显示/隐藏模型
Parameters
Name | Type |
---|---|
theId | number |
theToShow | boolean |
Returns
void
updateCanvasSize
• updateCanvasSize: () => void
Type declaration
▸ (): void
更新画布大小
Returns
void
Implementation of
MxDraw3dConfig.updateCanvasSize
wasmBinary
• Optional
wasmBinary: ArrayBuffer
二进制数据 设置wasmBinary 则 locateFile 不生效*
Implementation of
Inherited from
onloadWasmMxDraw3dModel
▪ Static
onloadWasmMxDraw3dModel: (mxDraw3d
: MxDraw3d
) => void
Type declaration
▸ (mxDraw3d
): void
监听wasm 文件加载成功事件
Parameters
Name | Type |
---|---|
mxDraw3d | MxDraw3d |
Returns
void
Methods
activateSelectionMode
▸ activateSelectionMode(selectionType
): void
激活选择模式
Parameters
Name | Type |
---|---|
selectionType | MxShapeEnum |
Returns
void
deactivateAllSelectionMode
▸ deactivateAllSelectionMode(): void
失活所有选择模式
Returns
void
displayGround
▸ displayGround(is
): void
- 显示地面或地面网格
Parameters
Name | Type |
---|---|
is | boolean |
Returns
void
displayObject
▸ displayObject(name
): boolean
显示对象
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
emit
▸ emit<Key
>(event
, ...data
): void
发布
Type parameters
Name | Type |
---|---|
Key | extends "eventModesSelected" | "eventAddToTree" | "eventRemoveFromTree" | "eventFileSave" | "eventRebuildTree" | "eventUpdatePointer" | "eventUpdateViewSize" |
Parameters
Name | Type | Description |
---|---|---|
event | number | Key | 事件名称 |
...data | Parameters <{ eventAddToTree : (node : string ) => void ; eventFileSave : (fileName : string ) => void ; eventModesSelected : (ids : number []) => void ; eventRebuildTree : (tree_str : string ) => void ; eventRemoveFromTree : (ids : number []) => void ; eventUpdatePointer : (pointer : number []) => void ; eventUpdateViewSize : (pointer : number []) => void }[Key ]> | 载荷 |
Returns
void
Inherited from
PubSub.emit
enableCustomClipPlane
▸ enableCustomClipPlane(theToEnabled
): void
Parameters
Name | Type |
---|---|
theToEnabled | boolean |
Returns
void
enableXClipPlane
▸ enableXClipPlane(theToEnabled
): void
管理剖切平面
Parameters
Name | Type |
---|---|
theToEnabled | boolean |
Returns
void
enableYClipPlane
▸ enableYClipPlane(theToEnabled
): void
Parameters
Name | Type |
---|---|
theToEnabled | boolean |
Returns
void
enableZClipPlane
▸ enableZClipPlane(theToEnabled
): void
Parameters
Name | Type |
---|---|
theToEnabled | boolean |
Returns
void
eraseObject
▸ eraseObject(name
): boolean
擦除对象
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
explodeModels
▸ explodeModels(theExplodeFactor
): void
散开模型
Parameters
Name | Type |
---|---|
theExplodeFactor | number |
Returns
void
fitAllObjects
▸ fitAllObjects(is
): void
适应所有对象
Parameters
Name | Type |
---|---|
is | boolean |
Returns
void
highLightSelLabelShape
▸ highLightSelLabelShape(labelEntryStr
): void
高亮
Parameters
Name | Type |
---|---|
labelEntryStr | string |
Returns
void
highLightSelShape
▸ highLightSelShape(theEntry
): void
高亮entry对应模型
Parameters
Name | Type |
---|---|
theEntry | number |
Returns
void
off
▸ off<Key
>(event
, callback?
): void
销毁事件
Type parameters
Name | Type |
---|---|
Key | extends "eventModesSelected" | "eventAddToTree" | "eventRemoveFromTree" | "eventFileSave" | "eventRebuildTree" | "eventUpdatePointer" | "eventUpdateViewSize" |
Parameters
Name | Type | Description |
---|---|---|
event | Key | 事件名称 |
callback? | (ids : number []) => void | (node : string ) => void | (ids : number []) => void | (fileName : string ) => void | (tree_str : string ) => void | (pointer : number []) => void | (pointer : number []) => void | 事件方法 |
Returns
void
Inherited from
PubSub.off
on
▸ on<Key
>(event
, callback
): void
订阅
Type parameters
Name | Type |
---|---|
Key | extends "eventModesSelected" | "eventAddToTree" | "eventRemoveFromTree" | "eventFileSave" | "eventRebuildTree" | "eventUpdatePointer" | "eventUpdateViewSize" |
Parameters
Name | Type | Description |
---|---|---|
event | Key | 事件名称 |
callback | (ids : number []) => void | (node : string ) => void | (ids : number []) => void | (fileName : string ) => void | (tree_str : string ) => void | (pointer : number []) => void | (pointer : number []) => void | 事件回调 |
Returns
void
Inherited from
PubSub.on
openBRepFromMemory
▸ openBRepFromMemory(fileName
, dataBuffer
, len
, is?
): boolean
从内存打开
Parameters
Name | Type | Description |
---|---|---|
fileName | string | 表示文件名称 (可通过浏览器 File对象的name属性或者自定义) 是生成渲染3D对象的唯一标识 |
dataBuffer | Buffer | 文件数据的缓冲区 |
len | number | 缓冲区的长度 |
is? | boolean | 是否为压缩格式 |
Returns
boolean
openFromMemory
▸ openFromMemory(fileName
, dataBuffer
, len
, is?
): boolean
从内存打开
Parameters
Name | Type | Description |
---|---|---|
fileName | string | 表示文件名称 (可通过浏览器 File对象的name属性或者自定义) 是生成渲染3D对象的唯一标识 |
dataBuffer | number | 文件数据的缓冲区 |
len | number | 缓冲区的长度 |
is? | boolean | 是否为压缩格式 |
Returns
boolean
pauseMainLoop
▸ pauseMainLoop(): void
暂停主循环
Returns
void
removeAllObjects
▸ removeAllObjects(): void
删除所有对象
Returns
void
removeObjectByEntry
▸ removeObjectByEntry(theEntry
): void
通过Entry来进行删除对象
Parameters
Name | Type |
---|---|
theEntry | string |
Returns
void
resumeMainLoop
▸ resumeMainLoop(): void
恢复主循环
Returns
void
setCanvasSize
▸ setCanvasSize(w
, h
, noUpdate?
): void
设置Canvas大小
Parameters
Name | Type | Description |
---|---|---|
w | number | 宽度 |
h | number | 高度 |
noUpdate? | boolean | 不更新调整侦听器大小 默认 是true |
Returns
void
setCubemapBackground
▸ setCubemapBackground(url
): void
设置多维数据集贴图背景
Parameters
Name | Type |
---|---|
url | string |
Returns
void
setCustomClipPlaneDirection
▸ setCustomClipPlaneDirection(x
, y
, z
): void
Parameters
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns
void
setCustomClipPlanePosition
▸ setCustomClipPlanePosition(thePosition
): void
Parameters
Name | Type |
---|---|
thePosition | number |
Returns
void
setCustomClipPlaneReverse
▸ setCustomClipPlaneReverse(): void
Returns
void
setDisplayMode
▸ setDisplayMode(theMode
): void
设置显示模式
Parameters
Name | Type |
---|---|
theMode | MxGlobalDisplayMode |
Returns
void
setManipulatorEnabled
▸ setManipulatorEnabled(isEnabled
): void
开启关闭操作器
Parameters
Name | Type |
---|---|
isEnabled | boolean |
Returns
void
setObjectShowStateByLabel
▸ setObjectShowStateByLabel(labelEntryStr
, theToShow
): void
显示隐藏
Parameters
Name | Type |
---|---|
labelEntryStr | string |
theToShow | boolean |
Returns
void
setXClipPlaneReverse
▸ setXClipPlaneReverse(): void
Returns
void
setXClipPlaneXPosition
▸ setXClipPlaneXPosition(thePosition
): void
Parameters
Name | Type |
---|---|
thePosition | number |
Returns
void
setYClipPlaneReverse
▸ setYClipPlaneReverse(): void
Returns
void
setYClipPlaneYPosition
▸ setYClipPlaneYPosition(thePosition
): void
Parameters
Name | Type |
---|---|
thePosition | number |
Returns
void
setZClipPlaneReverse
▸ setZClipPlaneReverse(): void
Returns
void
setZClipPlaneZPosition
▸ setZClipPlaneZPosition(thePosition
): void
Parameters
Name | Type |
---|---|
thePosition | number |
Returns
void
showCenterTrihedron
▸ showCenterTrihedron(theToShow
): void
显示隐藏中心坐标轴体
Parameters
Name | Type |
---|---|
theToShow | boolean |
Returns
void