diff --git a/examples/nodejs/index.js b/examples/nodejs/index.js index 546b485c..c56e22c6 100644 --- a/examples/nodejs/index.js +++ b/examples/nodejs/index.js @@ -175,6 +175,10 @@ async function LoadFile(filename) { ifcapi.WriteLine(modelID, newUnits2); let time = ms() - start; + let obj = ifcapi.GetLine(modelID,148); + console.log(obj.RefLatitude); + obj.RefLatitude.value[0]=999; + ifcapi.WriteLine(modelID, obj); console.log(`Writing ${numLines} lines took ${time} ms`); start = ms(); diff --git a/src/ifc-schema.ts b/src/ifc-schema.ts index 890be4a5..decc390e 100644 --- a/src/ifc-schema.ts +++ b/src/ifc-schema.ts @@ -1693,7 +1693,7 @@ FromRawLineData[1]={ 1768891740:(id:number, v:any[]) => new IFC2X3.IfcSanitaryTerminalType(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), !v[8] ? null :new IFC2X3.IfcLabel(v[8].value), v[9]), 3517283431:(id:number, v:any[]) => new IFC2X3.IfcScheduleTimeControl(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new Handle(v[7].value), !v[8] ? null :new Handle(v[8].value), !v[9] ? null :new Handle(v[9].value), !v[10] ? null :new Handle(v[10].value), !v[11] ? null :new Handle(v[11].value), !v[12] ? null :new Handle(v[12].value), !v[13] ? null :new IFC2X3.IfcTimeMeasure(v[13].value), !v[14] ? null :new IFC2X3.IfcTimeMeasure(v[14].value), !v[15] ? null :new IFC2X3.IfcTimeMeasure(v[15].value), !v[16] ? null :new IFC2X3.IfcTimeMeasure(v[16].value), !v[17] ? null :new IFC2X3.IfcTimeMeasure(v[17].value), !v[18] ? null :v[18].value, !v[19] ? null :new Handle(v[19].value), !v[20] ? null :new IFC2X3.IfcTimeMeasure(v[20].value), !v[21] ? null :new IFC2X3.IfcTimeMeasure(v[21].value), !v[22] ? null :new IFC2X3.IfcPositiveRatioMeasure(v[22].value)), 4105383287:(id:number, v:any[]) => new IFC2X3.IfcServiceLife(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), v[5], new IFC2X3.IfcTimeMeasure(v[6].value)), - 4097777520:(id:number, v:any[]) => new IFC2X3.IfcSite(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC2X3.IfcCompoundPlaneAngleMeasure(v[9]), !v[10] ? null :new IFC2X3.IfcCompoundPlaneAngleMeasure(v[10]), !v[11] ? null :new IFC2X3.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC2X3.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), + 4097777520:(id:number, v:any[]) => new IFC2X3.IfcSite(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC2X3.IfcCompoundPlaneAngleMeasure(v[9].map( (x:any) => x.value)), !v[10] ? null :new IFC2X3.IfcCompoundPlaneAngleMeasure(v[10].map( (x:any) => x.value)), !v[11] ? null :new IFC2X3.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC2X3.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), 2533589738:(id:number, v:any[]) => new IFC2X3.IfcSlabType(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), !v[8] ? null :new IFC2X3.IfcLabel(v[8].value), v[9]), 3856911033:(id:number, v:any[]) => new IFC2X3.IfcSpace(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), v[8], v[9], !v[10] ? null :new IFC2X3.IfcLengthMeasure(v[10].value)), 1305183839:(id:number, v:any[]) => new IFC2X3.IfcSpaceHeaterType(id, new IFC2X3.IfcGloballyUniqueId(v[0].value), new Handle(v[1].value), !v[2] ? null :new IFC2X3.IfcLabel(v[2].value), !v[3] ? null :new IFC2X3.IfcText(v[3].value), !v[4] ? null :new IFC2X3.IfcLabel(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC2X3.IfcLabel(v[7].value), !v[8] ? null :new IFC2X3.IfcLabel(v[8].value), v[9]), @@ -3757,8 +3757,8 @@ TypeInitialisers[1]={ 2650437152:(v:any) => new IFC2X3.IfcAreaMeasure(v), 2735952531:(v:any) => new IFC2X3.IfcBoolean(v), 1867003952:(v:any) => new IFC2X3.IfcBoxAlignment(v), - 2991860651:(v:any) => new IFC2X3.IfcComplexNumber(v), - 3812528620:(v:any) => new IFC2X3.IfcCompoundPlaneAngleMeasure(v), + 2991860651:(v:any) => new IFC2X3.IfcComplexNumber(v.map( (x:any) => x.value)), + 3812528620:(v:any) => new IFC2X3.IfcCompoundPlaneAngleMeasure(v.map( (x:any) => x.value)), 3238673880:(v:any) => new IFC2X3.IfcContextDependentMeasure(v), 1778710042:(v:any) => new IFC2X3.IfcCountMeasure(v), 94842927:(v:any) => new IFC2X3.IfcCurvatureMeasure(v), @@ -10211,7 +10211,7 @@ FromRawLineData[2]={ 1768891740:(id:number, v:any[]) => new IFC4.IfcSanitaryTerminalType(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4.IfcLabel(v[7].value), !v[8] ? null :new IFC4.IfcLabel(v[8].value), v[9]), 2157484638:(id:number, v:any[]) => new IFC4.IfcSeamCurve(id, new Handle(v[0].value), v[1].map((p:any) => new Handle(p.value)), v[2]), 4074543187:(id:number, v:any[]) => new IFC4.IfcShadingDeviceType(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4.IfcLabel(v[7].value), !v[8] ? null :new IFC4.IfcLabel(v[8].value), v[9]), - 4097777520:(id:number, v:any[]) => new IFC4.IfcSite(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC4.IfcCompoundPlaneAngleMeasure(v[9]), !v[10] ? null :new IFC4.IfcCompoundPlaneAngleMeasure(v[10]), !v[11] ? null :new IFC4.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC4.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), + 4097777520:(id:number, v:any[]) => new IFC4.IfcSite(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC4.IfcCompoundPlaneAngleMeasure(v[9].map( (x:any) => x.value)), !v[10] ? null :new IFC4.IfcCompoundPlaneAngleMeasure(v[10].map( (x:any) => x.value)), !v[11] ? null :new IFC4.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC4.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), 2533589738:(id:number, v:any[]) => new IFC4.IfcSlabType(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4.IfcLabel(v[7].value), !v[8] ? null :new IFC4.IfcLabel(v[8].value), v[9]), 1072016465:(id:number, v:any[]) => new IFC4.IfcSolarDeviceType(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4.IfcLabel(v[7].value), !v[8] ? null :new IFC4.IfcLabel(v[8].value), v[9]), 3856911033:(id:number, v:any[]) => new IFC4.IfcSpace(id, new IFC4.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4.IfcLabel(v[2].value), !v[3] ? null :new IFC4.IfcText(v[3].value), !v[4] ? null :new IFC4.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4.IfcLabel(v[7].value), v[8], v[9], !v[10] ? null :new IFC4.IfcLengthMeasure(v[10].value)), @@ -12833,15 +12833,15 @@ TypeInitialisers[2]={ 4182062534:(v:any) => new IFC4.IfcAccelerationMeasure(v), 360377573:(v:any) => new IFC4.IfcAmountOfSubstanceMeasure(v), 632304761:(v:any) => new IFC4.IfcAngularVelocityMeasure(v), - 3683503648:(v:any) => new IFC4.IfcArcIndex(v), + 3683503648:(v:any) => new IFC4.IfcArcIndex(v.map( (x:any) => x.value)), 1500781891:(v:any) => new IFC4.IfcAreaDensityMeasure(v), 2650437152:(v:any) => new IFC4.IfcAreaMeasure(v), 2314439260:(v:any) => new IFC4.IfcBinary(v), 2735952531:(v:any) => new IFC4.IfcBoolean(v), 1867003952:(v:any) => new IFC4.IfcBoxAlignment(v), 1683019596:(v:any) => new IFC4.IfcCardinalPointReference(v), - 2991860651:(v:any) => new IFC4.IfcComplexNumber(v), - 3812528620:(v:any) => new IFC4.IfcCompoundPlaneAngleMeasure(v), + 2991860651:(v:any) => new IFC4.IfcComplexNumber(v.map( (x:any) => x.value)), + 3812528620:(v:any) => new IFC4.IfcCompoundPlaneAngleMeasure(v.map( (x:any) => x.value)), 3238673880:(v:any) => new IFC4.IfcContextDependentMeasure(v), 1778710042:(v:any) => new IFC4.IfcCountMeasure(v), 94842927:(v:any) => new IFC4.IfcCurvatureMeasure(v), @@ -12880,7 +12880,7 @@ TypeInitialisers[2]={ 3258342251:(v:any) => new IFC4.IfcLabel(v), 1275358634:(v:any) => new IFC4.IfcLanguageId(v), 1243674935:(v:any) => new IFC4.IfcLengthMeasure(v), - 1774176899:(v:any) => new IFC4.IfcLineIndex(v), + 1774176899:(v:any) => new IFC4.IfcLineIndex(v.map( (x:any) => x.value)), 191860431:(v:any) => new IFC4.IfcLinearForceMeasure(v), 2128979029:(v:any) => new IFC4.IfcLinearMomentMeasure(v), 1307019551:(v:any) => new IFC4.IfcLinearStiffnessMeasure(v), @@ -12918,7 +12918,7 @@ TypeInitialisers[2]={ 1364037233:(v:any) => new IFC4.IfcPowerMeasure(v), 2169031380:(v:any) => new IFC4.IfcPresentableText(v), 3665567075:(v:any) => new IFC4.IfcPressureMeasure(v), - 2798247006:(v:any) => new IFC4.IfcPropertySetDefinitionSet(v), + 2798247006:(v:any) => new IFC4.IfcPropertySetDefinitionSet(v.map( (x:any) => x.value)), 3972513137:(v:any) => new IFC4.IfcRadioActivityMeasure(v), 96294661:(v:any) => new IFC4.IfcRatioMeasure(v), 200335297:(v:any) => new IFC4.IfcReal(v), @@ -20455,7 +20455,7 @@ FromRawLineData[3]={ 3599934289:(id:number, v:any[]) => new IFC4X3.IfcSignType(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), !v[8] ? null :new IFC4X3.IfcLabel(v[8].value), v[9]), 1894708472:(id:number, v:any[]) => new IFC4X3.IfcSignalType(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), !v[8] ? null :new IFC4X3.IfcLabel(v[8].value), v[9]), 42703149:(id:number, v:any[]) => new IFC4X3.IfcSineSpiral(id, !v[0] ? null :new Handle(v[0].value), new IFC4X3.IfcLengthMeasure(v[1].value), !v[2] ? null :new IFC4X3.IfcLengthMeasure(v[2].value), !v[3] ? null :new IFC4X3.IfcLengthMeasure(v[3].value)), - 4097777520:(id:number, v:any[]) => new IFC4X3.IfcSite(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC4X3.IfcCompoundPlaneAngleMeasure(v[9]), !v[10] ? null :new IFC4X3.IfcCompoundPlaneAngleMeasure(v[10]), !v[11] ? null :new IFC4X3.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC4X3.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), + 4097777520:(id:number, v:any[]) => new IFC4X3.IfcSite(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), v[8], !v[9] ? null :new IFC4X3.IfcCompoundPlaneAngleMeasure(v[9].map( (x:any) => x.value)), !v[10] ? null :new IFC4X3.IfcCompoundPlaneAngleMeasure(v[10].map( (x:any) => x.value)), !v[11] ? null :new IFC4X3.IfcLengthMeasure(v[11].value), !v[12] ? null :new IFC4X3.IfcLabel(v[12].value), !v[13] ? null :new Handle(v[13].value)), 2533589738:(id:number, v:any[]) => new IFC4X3.IfcSlabType(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), !v[8] ? null :new IFC4X3.IfcLabel(v[8].value), v[9]), 1072016465:(id:number, v:any[]) => new IFC4X3.IfcSolarDeviceType(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcIdentifier(v[4].value), !v[5] ? null :v[5].map((p:any) => new Handle(p.value)), !v[6] ? null :v[6].map((p:any) => new Handle(p.value)), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), !v[8] ? null :new IFC4X3.IfcLabel(v[8].value), v[9]), 3856911033:(id:number, v:any[]) => new IFC4X3.IfcSpace(id, new IFC4X3.IfcGloballyUniqueId(v[0].value), !v[1] ? null :new Handle(v[1].value), !v[2] ? null :new IFC4X3.IfcLabel(v[2].value), !v[3] ? null :new IFC4X3.IfcText(v[3].value), !v[4] ? null :new IFC4X3.IfcLabel(v[4].value), !v[5] ? null :new Handle(v[5].value), !v[6] ? null :new Handle(v[6].value), !v[7] ? null :new IFC4X3.IfcLabel(v[7].value), v[8], v[9], !v[10] ? null :new IFC4X3.IfcLengthMeasure(v[10].value)), @@ -23411,15 +23411,15 @@ TypeInitialisers[3]={ 4182062534:(v:any) => new IFC4X3.IfcAccelerationMeasure(v), 360377573:(v:any) => new IFC4X3.IfcAmountOfSubstanceMeasure(v), 632304761:(v:any) => new IFC4X3.IfcAngularVelocityMeasure(v), - 3683503648:(v:any) => new IFC4X3.IfcArcIndex(v), + 3683503648:(v:any) => new IFC4X3.IfcArcIndex(v.map( (x:any) => x.value)), 1500781891:(v:any) => new IFC4X3.IfcAreaDensityMeasure(v), 2650437152:(v:any) => new IFC4X3.IfcAreaMeasure(v), 2314439260:(v:any) => new IFC4X3.IfcBinary(v), 2735952531:(v:any) => new IFC4X3.IfcBoolean(v), 1867003952:(v:any) => new IFC4X3.IfcBoxAlignment(v), 1683019596:(v:any) => new IFC4X3.IfcCardinalPointReference(v), - 2991860651:(v:any) => new IFC4X3.IfcComplexNumber(v), - 3812528620:(v:any) => new IFC4X3.IfcCompoundPlaneAngleMeasure(v), + 2991860651:(v:any) => new IFC4X3.IfcComplexNumber(v.map( (x:any) => x.value)), + 3812528620:(v:any) => new IFC4X3.IfcCompoundPlaneAngleMeasure(v.map( (x:any) => x.value)), 3238673880:(v:any) => new IFC4X3.IfcContextDependentMeasure(v), 1778710042:(v:any) => new IFC4X3.IfcCountMeasure(v), 94842927:(v:any) => new IFC4X3.IfcCurvatureMeasure(v), @@ -23458,7 +23458,7 @@ TypeInitialisers[3]={ 3258342251:(v:any) => new IFC4X3.IfcLabel(v), 1275358634:(v:any) => new IFC4X3.IfcLanguageId(v), 1243674935:(v:any) => new IFC4X3.IfcLengthMeasure(v), - 1774176899:(v:any) => new IFC4X3.IfcLineIndex(v), + 1774176899:(v:any) => new IFC4X3.IfcLineIndex(v.map( (x:any) => x.value)), 191860431:(v:any) => new IFC4X3.IfcLinearForceMeasure(v), 2128979029:(v:any) => new IFC4X3.IfcLinearMomentMeasure(v), 1307019551:(v:any) => new IFC4X3.IfcLinearStiffnessMeasure(v), @@ -23496,7 +23496,7 @@ TypeInitialisers[3]={ 1364037233:(v:any) => new IFC4X3.IfcPowerMeasure(v), 2169031380:(v:any) => new IFC4X3.IfcPresentableText(v), 3665567075:(v:any) => new IFC4X3.IfcPressureMeasure(v), - 2798247006:(v:any) => new IFC4X3.IfcPropertySetDefinitionSet(v), + 2798247006:(v:any) => new IFC4X3.IfcPropertySetDefinitionSet(v.map( (x:any) => x.value)), 3972513137:(v:any) => new IFC4X3.IfcRadioActivityMeasure(v), 96294661:(v:any) => new IFC4X3.IfcRatioMeasure(v), 200335297:(v:any) => new IFC4X3.IfcReal(v), diff --git a/src/schema-generator/gen_functional_types_helpers.ts b/src/schema-generator/gen_functional_types_helpers.ts index 993bd7b1..50d1753e 100644 --- a/src/schema-generator/gen_functional_types_helpers.ts +++ b/src/schema-generator/gen_functional_types_helpers.ts @@ -8,7 +8,7 @@ export function generateInitialiser(type: Type, initialisersDone: Set,bu if (type.isList) { if (initialisersDone.has(type.name)) return; - buffer.push(`\t${crc32(type.name.toUpperCase(),crcTable)}:(v:any) => new ${schemaName}.${type.name}(v),`); + buffer.push(`\t${crc32(type.name.toUpperCase(),crcTable)}:(v:any) => new ${schemaName}.${type.name}(v.map( (x:any) => x.value)),`); initialisersDone.add(type.name); return } @@ -63,7 +63,7 @@ export function generatePropAssignment(p: Prop, i:number, types:Type[],schemaNam } else if (isType) { - if (type?.isList) content='new '+schemaName+'.'+p.type+'(v['+i+'])'; + if (type?.isList) content='new '+schemaName+'.'+p.type+'(v['+i+'].map( (x:any) => x.value))'; else content='new '+schemaName+'.'+p.type+'(v['+i+'].value)'; } else if (p.primitive) content='v['+i+'].value'; diff --git a/src/wasm/web-ifc-api.cpp b/src/wasm/web-ifc-api.cpp index fc3b2e5a..ab420b8a 100644 --- a/src/wasm/web-ifc-api.cpp +++ b/src/wasm/web-ifc-api.cpp @@ -564,6 +564,18 @@ bool WriteSet(uint32_t modelID, emscripten::val& val) if (child.isNull()) loader->Push(webifc::parsing::IfcTokenType::EMPTY); else if (child.isUndefined()) continue; else if (child.isArray()) WriteSet(modelID,child); + else if (child["value"].isArray()) + { + emscripten::val innerVal = child["value"]; + loader->Push(webifc::parsing::IfcTokenType::SET_BEGIN); + uint32_t sz = innerVal["length"].as(); + for (size_t z=0; z < sz;z++) { + double value = innerVal[std::to_string(z)].as(); + loader->Push(webifc::parsing::IfcTokenType::REAL); + loader->Push(value); + } + loader->Push(webifc::parsing::IfcTokenType::SET_END); + } else if (child["type"].isNumber()) { webifc::parsing::IfcTokenType type = static_cast(child["type"].as());