Home > PCB_ManufactureData > get3DShellFile
PCB_ManufactureData.get3DShellFile() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
获取 3D 外壳文件
签名
typescript
get3DShellFile(fileName?: string, fileType?: 'stl' | 'step' | 'obj'): Promise<File | undefined>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
fileName | string | (可选) 文件名 |
fileType | 'stl' | 'step' | 'obj' | (可选) 文件类型 |
返回值
Promise<File | undefined>
3D 外壳文件数据
备注
可以使用 SYS_FileSystem.saveFile() 接口将文件导出到本地文件系统
示例
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