Update web-ifc to version 0.0.39.

This commit is contained in:
kovacsv 2023-04-15 21:38:01 +02:00
parent 63bc9333c2
commit 7e0c281263
5 changed files with 58671 additions and 50146 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

14
package-lock.json generated
View File

@ -16,7 +16,7 @@
"occt-import-js": "0.0.18", "occt-import-js": "0.0.18",
"rhino3dm": "8.0.0", "rhino3dm": "8.0.0",
"three": "0.151.3", "three": "0.151.3",
"web-ifc": "0.0.35" "web-ifc": "0.0.39"
}, },
"devDependencies": { "devDependencies": {
"clean-css-cli": "^5.6.1", "clean-css-cli": "^5.6.1",
@ -5501,9 +5501,9 @@
"dev": true "dev": true
}, },
"node_modules/web-ifc": { "node_modules/web-ifc": {
"version": "0.0.35", "version": "0.0.39",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.35.tgz", "resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.39.tgz",
"integrity": "sha512-if/L9RiJAD+jJ1oWtHj44+o2NG6K6azK0otE9Pbppr5hNBnouYfJQNmnHZ+Ya+wZeaByo9KeU64D60Y6lFnT4w==" "integrity": "sha512-sg+DyxDiyXBqlXXbz+uSqw8IGX+mVvHmn2+hg6UXDvAcrzJJw8EI2H4ZzlxWxCqqdpGVeK0wCpdeQm43UCDbrA=="
}, },
"node_modules/whatwg-encoding": { "node_modules/whatwg-encoding": {
"version": "2.0.0", "version": "2.0.0",
@ -9753,9 +9753,9 @@
} }
}, },
"web-ifc": { "web-ifc": {
"version": "0.0.35", "version": "0.0.39",
"resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.35.tgz", "resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.39.tgz",
"integrity": "sha512-if/L9RiJAD+jJ1oWtHj44+o2NG6K6azK0otE9Pbppr5hNBnouYfJQNmnHZ+Ya+wZeaByo9KeU64D60Y6lFnT4w==" "integrity": "sha512-sg+DyxDiyXBqlXXbz+uSqw8IGX+mVvHmn2+hg6UXDvAcrzJJw8EI2H4ZzlxWxCqqdpGVeK0wCpdeQm43UCDbrA=="
}, },
"whatwg-encoding": { "whatwg-encoding": {
"version": "2.0.0", "version": "2.0.0",

View File

@ -81,7 +81,7 @@
"occt-import-js": "0.0.18", "occt-import-js": "0.0.18",
"rhino3dm": "8.0.0", "rhino3dm": "8.0.0",
"three": "0.151.3", "three": "0.151.3",
"web-ifc": "0.0.35" "web-ifc": "0.0.39"
}, },
"eslintConfig": { "eslintConfig": {
"env": { "env": {

View File

@ -149,20 +149,27 @@ export class ImporterIfc extends ImporterBase
} }
let propertyGroup = new PropertyGroup (propSet.Name.value); let propertyGroup = new PropertyGroup (propSet.Name.value);
propSet.HasProperties.forEach ((property) => { propSet.HasProperties.forEach ((property) => {
if (!property || !property.Name || !property.NominalValue) { if (!property || !property.Name) {
return;
}
if (!property.NominalValue || !property.NominalValue.constructor) {
return;
}
if (property.type !== WebIFC.IFCPROPERTYSINGLEVALUE) {
return; return;
} }
let elemProperty = null;
let propertyName = this.GetIFCString (property.Name.value); let propertyName = this.GetIFCString (property.Name.value);
let elemProperty = null;
let strValue = null; let strValue = null;
switch (property.NominalValue.label) { switch (property.NominalValue.constructor.name) {
case 'IFCTEXT': case 'IfcText':
case 'IFCLABEL': case 'IfcLabel':
case 'IFCIDENTIFIER': case 'IfcIdentifier':
case WebIFC.IFCLABEL:
elemProperty = new Property (PropertyType.Text, propertyName, this.GetIFCString (property.NominalValue.value)); elemProperty = new Property (PropertyType.Text, propertyName, this.GetIFCString (property.NominalValue.value));
break; break;
case 'IFCBOOLEAN': case 'IfcBoolean':
case 'IFCLOGICAL': case 'IfcLogical':
strValue = 'Unknown'; strValue = 'Unknown';
if (property.NominalValue.value === 'T') { if (property.NominalValue.value === 'T') {
strValue = 'True'; strValue = 'True';
@ -171,27 +178,26 @@ export class ImporterIfc extends ImporterBase
} }
elemProperty = new Property (PropertyType.Text, propertyName, strValue); elemProperty = new Property (PropertyType.Text, propertyName, strValue);
break; break;
case 'IFCINTEGER': case 'IfcInteger':
case 'IFCCOUNTMEASURE': case 'IfcCountMeasure':
elemProperty = new Property (PropertyType.Integer, propertyName, property.NominalValue.value); elemProperty = new Property (PropertyType.Integer, propertyName, property.NominalValue.value);
break; break;
case 'IFCREAL': case 'IfcReal':
case 'IFCLENGTHMEASURE': case 'IfcLengthMeasure':
case 'IFCPOSITIVELENGTHMEASURE': case 'IfcPositiveLengthMeasure':
case 'IFCAREAMEASURE': case 'IfcAreaMeasure':
case 'IFCVOLUMEMEASURE': case 'IfcVolumeMeasure':
case 'IFCRATIOMEASURE': case 'IfcRatioMeasure':
case 'IFCPOSITIVERATIOMEASURE': case 'IfcPositiveRATIOMeasure':
case 'IFCMASSMEASURE': case 'IfcMassMeasure':
case 'IFCMASSPERLENGTHMEASURE': case 'IfcMassPerLengthMeasure':
case 'IFCPLANEANGLEMEASURE': case 'IfcPlaneAngleMeasure':
case 'IFCTHERMALTRANSMITTANCEMEASURE': case 'IfcThermalTransmittanceMeasure':
elemProperty = new Property (PropertyType.Number, propertyName, property.NominalValue.value); elemProperty = new Property (PropertyType.Number, propertyName, property.NominalValue.value);
break; break;
default: default:
// TODO // TODO
console.log (property.NominalValue.label); console.log (property);
console.log (property.NominalValue.value);
break; break;
} }
if (elemProperty !== null) { if (elemProperty !== null) {