Update external libraries.
This commit is contained in:
parent
e9f989ffea
commit
27c308e308
2
libs/loaders/fflate.min.js
vendored
2
libs/loaders/fflate.min.js
vendored
File diff suppressed because one or more lines are too long
54082
libs/loaders/web-ifc-api-browser.js
Normal file
54082
libs/loaders/web-ifc-api-browser.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -26,10 +26,10 @@
|
||||
"dependencies": {
|
||||
"@simonwep/pickr": "1.8.2",
|
||||
"draco3d": "1.5.0",
|
||||
"fflate": "0.7.1",
|
||||
"fflate": "0.7.2",
|
||||
"rhino3dm": "7.11.1",
|
||||
"three": "0.135.0",
|
||||
"web-ifc": "0.0.30"
|
||||
"web-ifc": "0.0.32"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
@ -45,7 +45,7 @@
|
||||
"THREE": "readonly",
|
||||
"DracoDecoderModule": "readonly",
|
||||
"rhino3dm": "readonly",
|
||||
"IfcAPI2": "readonly"
|
||||
"WebIFC": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 12
|
||||
|
||||
@ -31,8 +31,8 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
||||
ImportContent (fileContent, onFinish)
|
||||
{
|
||||
if (this.ifc === null) {
|
||||
OV.LoadExternalLibrary ('loaders/web-ifc-api.js').then (() => {
|
||||
this.ifc = new IfcAPI2 ();
|
||||
OV.LoadExternalLibrary ('loaders/web-ifc-api-browser.js').then (() => {
|
||||
this.ifc = new WebIFC.IfcAPI ();
|
||||
this.ifc.Init ().then (() => {
|
||||
this.ImportIfcContent (fileContent);
|
||||
onFinish ();
|
||||
@ -109,9 +109,7 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
||||
|
||||
ImportProperties (modelID)
|
||||
{
|
||||
// TODO: var IFCRELDEFINESBYPROPERTIES = 4186316022;
|
||||
// TODO: var IFCBUILDING = 4031249490;
|
||||
const lines = this.ifc.GetLineIDsWithType (modelID, 4186316022);
|
||||
const lines = this.ifc.GetLineIDsWithType (modelID, WebIFC.IFCRELDEFINESBYPROPERTIES);
|
||||
for (let i = 0; i < lines.size (); i++) {
|
||||
const relID = lines.get (i);
|
||||
const rel = this.ifc.GetLine (modelID, relID);
|
||||
@ -122,7 +120,7 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
||||
let element = this.expressIDToMesh[objectRelID.value];
|
||||
if (element === undefined) {
|
||||
let propSetOwner = this.ifc.GetLine (modelID, objectRelID.value, true);
|
||||
if (propSetOwner.type === 4031249490) {
|
||||
if (propSetOwner.type === WebIFC.IFCBUILDING) {
|
||||
element = this.model;
|
||||
} else {
|
||||
return;
|
||||
|
||||
@ -38,7 +38,7 @@ fflateFileMap = [
|
||||
]
|
||||
|
||||
webIfcFileMap = [
|
||||
[os.path.join ('web-ifc', 'web-ifc-api.js'), os.path.join ('loaders', 'web-ifc-api.js')],
|
||||
[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')],
|
||||
]
|
||||
|
||||
@ -55,11 +55,6 @@ def UpdateModule (fileMap, moduleDir, libsDir):
|
||||
PrintInfo ('Copying file ' + os.path.split (src)[1])
|
||||
shutil.copy2 (src, dst)
|
||||
|
||||
def FixWebIfcExport (libsDir):
|
||||
apiFilePath = os.path.join (libsDir, 'loaders', 'web-ifc-api.js')
|
||||
regex = re.compile (r'export \{.*\};', re.DOTALL)
|
||||
Tools.ReplaceRegexInFile (apiFilePath, regex, '')
|
||||
|
||||
def Main (argv):
|
||||
toolsDir = os.path.dirname (os.path.abspath (__file__))
|
||||
rootDir = os.path.dirname (toolsDir)
|
||||
@ -74,7 +69,6 @@ def Main (argv):
|
||||
UpdateModule (rhino3dmFileMap, nodeModulesDir, libsDir)
|
||||
UpdateModule (fflateFileMap, nodeModulesDir, libsDir)
|
||||
UpdateModule (webIfcFileMap, nodeModulesDir, libsDir)
|
||||
FixWebIfcExport (libsDir)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@ -83,7 +83,6 @@ OV.Website = class
|
||||
}
|
||||
let contentHeight = windowHeight - headerHeight;
|
||||
|
||||
console.log (contentWidth);
|
||||
OV.SetDomElementOuterHeight (this.parameters.introDiv, contentHeight);
|
||||
this.navigator.Resize (contentHeight);
|
||||
this.sidebar.Resize (contentHeight);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user