Update web-ifc to version 0.0.44.

This commit is contained in:
kovacsv 2023-10-08 19:39:39 +02:00
parent fbf946c54e
commit b2e21f32ee
6 changed files with 38706 additions and 35873 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

32
package-lock.json generated
View File

@ -15,7 +15,7 @@
"occt-import-js": "0.0.21",
"rhino3dm": "7.15.0",
"three": "0.157.0",
"web-ifc": "0.0.39"
"web-ifc": "0.0.44"
},
"devDependencies": {
"@types/node": "^20.1.0",
@ -6043,9 +6043,17 @@
"dev": true
},
"node_modules/web-ifc": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.39.tgz",
"integrity": "sha512-sg+DyxDiyXBqlXXbz+uSqw8IGX+mVvHmn2+hg6UXDvAcrzJJw8EI2H4ZzlxWxCqqdpGVeK0wCpdeQm43UCDbrA=="
"version": "0.0.44",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.44.tgz",
"integrity": "sha512-1Iz0zeYFVReE3ca72wIqCQeMQX3406ohJGcZrpnS3IevtKjqh7kLXJ5SrSW4C0IyaLhuLIuyLOFsBc6TeD38TA==",
"dependencies": {
"web-ifc": "^0.0.43"
}
},
"node_modules/web-ifc/node_modules/web-ifc": {
"version": "0.0.43",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.43.tgz",
"integrity": "sha512-83rMzZTCZmlACjWYuZRci4GlaWh0hfoTJu/7VKSTOiTm+gAT06fLkIrAqyeOlZnZt/AyY4+IQkPm5RYs6PZPNA=="
},
"node_modules/whatwg-encoding": {
"version": "2.0.0",
@ -10686,9 +10694,19 @@
}
},
"web-ifc": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.39.tgz",
"integrity": "sha512-sg+DyxDiyXBqlXXbz+uSqw8IGX+mVvHmn2+hg6UXDvAcrzJJw8EI2H4ZzlxWxCqqdpGVeK0wCpdeQm43UCDbrA=="
"version": "0.0.44",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.44.tgz",
"integrity": "sha512-1Iz0zeYFVReE3ca72wIqCQeMQX3406ohJGcZrpnS3IevtKjqh7kLXJ5SrSW4C0IyaLhuLIuyLOFsBc6TeD38TA==",
"requires": {
"web-ifc": "^0.0.43"
},
"dependencies": {
"web-ifc": {
"version": "0.0.43",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.43.tgz",
"integrity": "sha512-83rMzZTCZmlACjWYuZRci4GlaWh0hfoTJu/7VKSTOiTm+gAT06fLkIrAqyeOlZnZt/AyY4+IQkPm5RYs6PZPNA=="
}
}
},
"whatwg-encoding": {
"version": "2.0.0",

View File

@ -43,7 +43,7 @@
"test": "mocha test",
"lint": "eslint source",
"lint_fix": "eslint source --fix",
"update_libs": "npm install && run-python3 tools/update_libs.py",
"update_libs": "npm update && run-python3 tools/update_libs.py",
"generate_icon_font": "run-python3 tools/generate_icon_font.py",
"create_dist": "npm run create_package && npm run lint && npm run test",
"create_dist_test": "npm run create_package_test && npm run lint && npm run test",
@ -80,7 +80,7 @@
"occt-import-js": "0.0.21",
"rhino3dm": "7.15.0",
"three": "0.157.0",
"web-ifc": "0.0.39"
"web-ifc": "0.0.44"
},
"eslintConfig": {
"env": {

View File

@ -188,7 +188,7 @@ export class ImporterIfc extends ImporterBase
case 'IfcAreaMeasure':
case 'IfcVolumeMeasure':
case 'IfcRatioMeasure':
case 'IfcPositiveRATIOMeasure':
case 'IfcPositiveRatioMeasure':
case 'IfcMassMeasure':
case 'IfcMassPerLengthMeasure':
case 'IfcPlaneAngleMeasure':

View File

@ -2,26 +2,22 @@ import os
import sys
import shutil
dracoFileMap = [
[os.path.join ('draco3d', 'draco_decoder_nodejs.js'), os.path.join ('loaders', 'draco_decoder.js')],
[os.path.join ('draco3d', 'draco_decoder.wasm'), os.path.join ('loaders', 'draco_decoder.wasm')],
]
webIfcConverter = 'esbuild {0} --bundle --format=iife --global-name=WebIFC --external:os --external:path --external:fs --external:perf_hooks --outfile={1}'
rhino3dmFileMap = [
[os.path.join ('rhino3dm', 'rhino3dm.js'), os.path.join ('loaders', 'rhino3dm.min.js')],
[os.path.join ('rhino3dm', 'rhino3dm.wasm'), os.path.join ('loaders', 'rhino3dm.wasm')],
]
fileMap = [
[os.path.join ('draco3d', 'draco_decoder_nodejs.js'), os.path.join ('loaders', 'draco_decoder.js'), None],
[os.path.join ('draco3d', 'draco_decoder.wasm'), os.path.join ('loaders', 'draco_decoder.wasm'), None],
webIfcFileMap = [
[os.path.join ('web-ifc', 'web-ifc-api-browser.js'), os.path.join ('loaders', 'web-ifc-api-browser.js')],
[os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('loaders', 'web-ifc.wasm')],
]
[os.path.join ('rhino3dm', 'rhino3dm.js'), os.path.join ('loaders', 'rhino3dm.min.js'), None],
[os.path.join ('rhino3dm', 'rhino3dm.wasm'), os.path.join ('loaders', 'rhino3dm.wasm'), None],
occtImportJsFileMap = [
[os.path.join ('occt-import-js', 'dist', 'occt-import-js.js'), os.path.join ('loaders', 'occt-import-js.js')],
[os.path.join ('occt-import-js', 'dist', 'occt-import-js-worker.js'), os.path.join ('loaders', 'occt-import-js-worker.js')],
[os.path.join ('occt-import-js', 'dist', 'occt-import-js.wasm'), os.path.join ('loaders', 'occt-import-js.wasm')],
[os.path.join ('occt-import-js', 'LICENSE.md'), os.path.join ('loaders', 'occt-import-js.license.md')]
[os.path.join ('web-ifc', 'web-ifc-api.js'), os.path.join ('loaders', 'web-ifc-api-browser.js'), webIfcConverter],
[os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('loaders', 'web-ifc.wasm'), None],
[os.path.join ('occt-import-js', 'dist', 'occt-import-js.js'), os.path.join ('loaders', 'occt-import-js.js'), None],
[os.path.join ('occt-import-js', 'dist', 'occt-import-js-worker.js'), os.path.join ('loaders', 'occt-import-js-worker.js'), None],
[os.path.join ('occt-import-js', 'dist', 'occt-import-js.wasm'), os.path.join ('loaders', 'occt-import-js.wasm'), None],
[os.path.join ('occt-import-js', 'LICENSE.md'), os.path.join ('loaders', 'occt-import-js.license.md'), None]
]
def PrintInfo (message):
@ -30,13 +26,6 @@ def PrintInfo (message):
def PrintError (message):
print ('ERROR: ' + message)
def UpdateModule (fileMap, moduleDir, libsDir):
for fileEntry in fileMap:
src = os.path.join (moduleDir, fileEntry[0])
dst = os.path.join (libsDir, fileEntry[1])
PrintInfo ('Copying file ' + os.path.split (src)[1])
shutil.copy2 (src, dst)
def Main (argv):
toolsDir = os.path.dirname (os.path.abspath (__file__))
rootDir = os.path.dirname (toolsDir)
@ -45,10 +34,17 @@ def Main (argv):
nodeModulesDir = os.path.join (rootDir, 'node_modules')
libsDir = os.path.join (rootDir, 'libs')
UpdateModule (dracoFileMap, nodeModulesDir, libsDir)
UpdateModule (rhino3dmFileMap, nodeModulesDir, libsDir)
UpdateModule (webIfcFileMap, nodeModulesDir, libsDir)
UpdateModule (occtImportJsFileMap, nodeModulesDir, libsDir)
for fileEntry in fileMap:
src = os.path.join (nodeModulesDir, fileEntry[0])
dst = os.path.join (libsDir, fileEntry[1])
converter = fileEntry[2]
if converter == None:
PrintInfo ('Copying file ' + os.path.split (src)[1])
shutil.copy2 (src, dst)
else:
PrintInfo ('Converting file ' + os.path.split (src)[1])
result = os.system (converter.format (src, dst))
assert result == 0
return 0