Skip to content

[mxcad_3d API documentation](../README. md)/Mx3dUtils

Class: Mx3dUtils ​

Tool category

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dUtils()

Methods ​

LoadFileFromUrl ​

▸ Static LoadFileFromUrl(theFileUrl, theSaveFileName): Promise<string>

Load files from URL address to virtual file system

Parameters ​

NameTypeDescription
TheFileURLstringResource URL address
TheSaveFileNamestringThe complete path of the file in the virtual file system

Returns ​

Promise<string>

Return the absolute path of the file in the virtual file system after success


LoadLocalFile ​

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

Parameters ​

NameType
theFileFile
theFilePathstring

Returns ​

Promise<string>


LoadShapeFromFile ​

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

Read the model file from the virtual file system and return the shapes in the model file

Parameters ​

NameTypeDescription
TheFilePathstringThe complete path of the model file
TheFormat[MxFormat] (../enums/MdGe. MxFormat. md)Format of model files

Returns ​

Mx3dShapeObject[]

The shape read from the model file