mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
15 lines
No EOL
427 B
JavaScript
15 lines
No EOL
427 B
JavaScript
import stlExporter from './stl/stlExporter';
|
|
import exportTextData from 'gems/exportTextData';
|
|
|
|
export function activate(ctx) {
|
|
|
|
function stlAscii() {
|
|
let meshes = ctx.services.cadRegistry.shells.map(mShell => mShell.ext.view && mShell.ext.view.mesh).filter(m => !!m);
|
|
let result = stlExporter(meshes);
|
|
exportTextData(result, ctx.services.project.id + ".stl");
|
|
}
|
|
|
|
ctx.services.export = {
|
|
stlAscii
|
|
};
|
|
} |