Home > PCB_ManufactureData > get3DShellFile
PCB_ManufactureData.get3DShellFile() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get the 3D shell file
Signature
typescript
function get3DShellFile(
fileName?: string,
fileType?: 'stl' | 'step' | 'obj',
): Promise<File | undefined>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
fileName | string | (Optional) File name |
fileType | 'stl' | 'step' | 'obj' | (Optional) File type |
Returns
Promise<File | undefined>
3D shell file data
Remarks
You can use SYS_FileSystem.saveFile() API export the file to the local file system
Example
javascript
// 导出 STL 格式 3D 外壳
const stlFile = await eda.pcb_ManufactureData.get3DShellFile('Board_Shell', 'stl');
if (stlFile) {
await eda.sys_FileSystem.saveFile(stlFile);
}
// 导出 STEP 格式 3D 外壳
const stepShellFile = await eda.pcb_ManufactureData.get3DShellFile('Board_Shell_STEP', 'step');
if (stepShellFile) {
await eda.sys_FileSystem.saveFile(stepShellFile);
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11