mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-16 05:23:19 +01:00
21 lines
No EOL
544 B
JavaScript
21 lines
No EOL
544 B
JavaScript
import TPI from './tpi';
|
|
import * as SceneGraph from 'scene/sceneGraph';
|
|
import {BREPSceneSolid} from "../scene/wrappers/brepSceneObject";
|
|
|
|
/*
|
|
* TPI stands for the Test Program Interface
|
|
*/
|
|
export function activate({bus, services}) {
|
|
|
|
function addShellOnScene(shell, skin) {
|
|
const sceneSolid = new BREPSceneSolid(shell, undefined, skin);
|
|
services.cadRegistry.update(null, [sceneSolid]);
|
|
services.viewer.render();
|
|
return sceneSolid;
|
|
}
|
|
services.tpi = Object.assign({
|
|
bus,
|
|
services,
|
|
addShellOnScene
|
|
}, TPI);
|
|
} |