bim.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * bim.js
  3. *
  4. * @author realor
  5. */
  6. import { BIMInventoryTool } from '../tools/BIMInventoryTool.js'
  7. import { BIMLayoutTool } from '../tools/BIMLayoutTool.js'
  8. import { BIMInspectorTool } from '../tools/BIMInspectorTool.js'
  9. import { BCFTool } from '../tools/BCFTool.js'
  10. import { IFCSTEPLoader } from '../io/ifc/IFCSTEPLoader.js'
  11. import { BCFService } from '../io/BCFService.js'
  12. import { IOManager } from '../io/IOManager.js'
  13. import { BundleManager } from '../i18n/BundleManager.js'
  14. import '../io/ifc/schemas/IFC2x3.js'
  15. import '../io/ifc/schemas/IFC4.js'
  16. export function load(application) {
  17. // register formats
  18. IOManager.formats['ifc'] = {
  19. description: 'Industry foundation classes (*.ifc)',
  20. extensions: ['ifc'],
  21. mimeType: 'application/x-step',
  22. loader: {
  23. class: IFCSTEPLoader,
  24. loadMethod: 2,
  25. dataType: 'text'
  26. }
  27. }
  28. // // create tools
  29. // const bimInventoryTool = new BIMInventoryTool(application)
  30. // const bimLayoutTool = new BIMLayoutTool(application)
  31. // const bimInspectorTool = new BIMInspectorTool(application)
  32. // const bcfTool = new BCFTool(application)
  33. // application.addTool(bimInventoryTool)
  34. // application.addTool(bimLayoutTool)
  35. // application.addTool(bimInspectorTool)
  36. // application.addTool(bcfTool)
  37. // // create menus
  38. // const menuBar = application.menuBar
  39. // const bimMenu = menuBar.addMenu('BIM', menuBar.menus.length - 2)
  40. // bimMenu.addMenuItem(bimLayoutTool)
  41. // bimMenu.addMenuItem(bimInventoryTool)
  42. // bimMenu.addMenuItem(bimInspectorTool)
  43. // bimMenu.addMenuItem(bcfTool)
  44. // const toolBar = application.toolBar
  45. // toolBar.addToolButton(bimLayoutTool)
  46. // toolBar.addToolButton(bimInventoryTool)
  47. // // restore services
  48. // application.restoreServices('bcf')
  49. // // create default services
  50. // if (application.services.bcf === undefined) {
  51. // const bcf = new BCFService('bcf', application.constructor.NAME + ' BCF', '/bimrocket-server/api')
  52. // application.addService(bcf, 'bcf', false)
  53. // }
  54. // // load bundles
  55. // BundleManager.setBundle('base', 'i18n/base')
  56. // BundleManager.setBundle('bim', 'i18n/bim')
  57. // application.i18n.defaultBundle = BundleManager.getBundle('base')
  58. // application.i18n.addSupportedLanguages('en', 'es', 'ca')
  59. // application.i18n.updateTree(application.element)
  60. }