Skip to content

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 ​

NameTypeDescription
theFileUrlstring资源URL地址
theSaveFileNamestring文件在虚拟文件系统的完整路径

Returns ​

Promise<string>

成功后返回文件在虚拟文件系统中的绝对路径


LoadLocalFile ​

▸ Static LoadLocalFile(theFile, theFilePath): Promise<string>

Parameters ​

NameType
theFileFile
theFilePathstring

Returns ​

Promise<string>


LoadShapeFromFile ​

▸ Static LoadShapeFromFile(theFilePath, theFormat): Mx3dShapeObject[]

从虚拟文件系统中读取模型文件,返回模型文件中的形状

Parameters ​

NameTypeDescription
theFilePathstring模型文件的完整路径
theFormatMxFormat模型文件的格式

Returns ​

Mx3dShapeObject[]

模型文件中读取到的形状