three-3mf-exporter
Version:
3MF Exporter for Three.js
35 lines (32 loc) • 1.24 kB
TypeScript
import { Group, Object3D } from 'three';
/**
* 打印床配置接口 / Print Bed Configuration Interface
*/
interface PrintConfig {
printer_name: string;
filament: string;
printableWidth: number;
printableDepth: number;
printableHeight: number;
printableArea: readonly [string, string, string, string];
printerSettingsId: string;
printSettingsId: string;
compression: 'none' | 'standard';
seam_position?: 'nearest' | 'aligned' | 'back' | 'random';
different_settings_to_system: string[];
metadata: Partial<{
Application: string;
Copyright: string;
ApplicationTitle: string;
}>;
}
declare const defaultPrintConfig: PrintConfig;
/**
* 将 Three.js 的 Group 或 Mesh 导出为 3MF 文件格式 (BambuStudio 兼容格式)
* Export Three.js Group or Mesh to 3MF format (BambuStudio compatible)
* @param object Three.js Group 对象或 Mesh 数组 / Three.js Group or Mesh array
* @param printJobConfig 打印床配置,可选 / Optional print bed configuration
* @returns Blob 数据 / Blob data
*/
declare function exportTo3MF(object: Group | Object3D, printJobConfig?: Partial<PrintConfig>): Promise<Blob>;
export { defaultPrintConfig, exportTo3MF };