mxcad_3d API 文档 / Mx3dUtils
Class: Mx3dUtils
工具类
Table of contents
Constructors
Methods
Constructors
constructor
• new Mx3dUtils()
Methods
LoadFileFromUrl
▸ Static LoadFileFromUrl(theFileUrl, theSaveFileName): Promise<string>
从URL地址加载文件到虚拟文件系统
Parameters
| Name | Type | Description |
|---|---|---|
theFileUrl | string | 资源URL地址 |
theSaveFileName | string | 文件在虚拟文件系统的完整路径 |
Returns
Promise<string>
成功后返回文件在虚拟文件系统中的绝对路径
LoadLocalFile
▸ Static LoadLocalFile(theFile, theFilePath): Promise<string>
Parameters
| Name | Type |
|---|---|
theFile | File |
theFilePath | string |
Returns
Promise<string>
LoadShapeFromFile
▸ Static LoadShapeFromFile(theFilePath, theFormat): Mx3dShapeObject[]
从虚拟文件系统中读取模型文件,返回模型文件中的形状
Parameters
| Name | Type | Description |
|---|---|---|
theFilePath | string | 模型文件的完整路径 |
theFormat | MxFormat | 模型文件的格式 |
Returns
模型文件中读取到的形状