Skip to content

Commit bc784e7

Browse files
committed
Bug Fix
1 parent b4a9ed1 commit bc784e7

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

src/schema-generator/gen_functional_types_helpers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export function generateClass(entity:Entity, classBuffer: Array<string>, types:T
176176
classBuffer.push(`${prop.name}!: ${type};`);
177177
});
178178

179-
classBuffer.push(`constructor(${entity.derivedProps.filter(i => !entity.ifcDerivedProps.includes(i.name)).map((p) => `public ${p.name}: ${(types.some( x => x.name == p.type) || p.primitive) ? p.type : "(Handle<" + p.type + `> | ${p.type})` }${p.set ? "[]" : ""} ${p.optional ? "| null" : ""}`).join(", ")})`)
179+
classBuffer.push(`constructor(${entity.derivedProps.filter(i => !entity.ifcDerivedProps.includes(i.name)).map((p) => `public ${p.name}: ${(types.some( x => x.name == p.type) || p.primitive) ? p.type : "(Handle<" + p.type + `> | ${p.type})` }${p.set ? "[]" : ""}${p.dimensions>1 ? "[]" : ""} ${p.optional ? "| null" : ""}`).join(", ")})`)
180180
classBuffer.push(`{`)
181181
if (!entity.parent) {
182182
classBuffer.push(`super();`)
@@ -431,10 +431,12 @@ export function parseElements(data:string)
431431
let setLoc = split.indexOf("SET");
432432
if (setLoc == -1) setLoc = split.indexOf("LIST")
433433
if (split[setLoc+1].includes("[0:")) optional=true;
434+
434435
}
435436
if (set) {
436437
var count = (line.match(/LIST/g) || []).length;
437438
dimensions = count;
439+
438440
}
439441
let type = split[split.length - 1].replace(";", "");
440442
let firstBracket = type.indexOf("(");

src/ts/ifc-schema.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14406,7 +14406,7 @@ super();
1440614406
}
1440714407
export class IfcStructuralLoadConfiguration extends IfcStructuralLoad {
1440814408
type:number=3478079324;
14409-
constructor(public Name: IfcLabel | null, public Values: (Handle<IfcStructuralLoadOrResult> | IfcStructuralLoadOrResult)[] , public Locations: IfcLengthMeasure[] | null)
14409+
constructor(public Name: IfcLabel | null, public Values: (Handle<IfcStructuralLoadOrResult> | IfcStructuralLoadOrResult)[] , public Locations: IfcLengthMeasure[][] | null)
1441014410
{
1441114411
super(Name);
1441214412
}
@@ -14597,7 +14597,7 @@ super();
1459714597
}
1459814598
export class IfcTextureVertexList extends IfcPresentationItem {
1459914599
type:number=3611470254;
14600-
constructor(public TexCoordsList: IfcParameterValue[] )
14600+
constructor(public TexCoordsList: IfcParameterValue[][] )
1460114601
{
1460214602
super();
1460314603
}
@@ -14735,7 +14735,7 @@ super(Location, Identification, Name);
1473514735
}
1473614736
export class IfcColourRgbList extends IfcPresentationItem {
1473714737
type:number=3285139300;
14738-
constructor(public ColourList: IfcNormalisedRatioMeasure[] )
14738+
constructor(public ColourList: IfcNormalisedRatioMeasure[][] )
1473914739
{
1474014740
super();
1474114741
}
@@ -15011,7 +15011,7 @@ super(Maps);
1501115011
}
1501215012
export class IfcIndexedTriangleTextureMap extends IfcIndexedTextureMap {
1501315013
type:number=2133299955;
15014-
constructor(public Maps: (Handle<IfcSurfaceTexture> | IfcSurfaceTexture)[] , public MappedTo: (Handle<IfcTessellatedFaceSet> | IfcTessellatedFaceSet) , public TexCoords: (Handle<IfcTextureVertexList> | IfcTextureVertexList) , public TexCoordIndex: IfcPositiveInteger[] | null)
15014+
constructor(public Maps: (Handle<IfcSurfaceTexture> | IfcSurfaceTexture)[] , public MappedTo: (Handle<IfcTessellatedFaceSet> | IfcTessellatedFaceSet) , public TexCoords: (Handle<IfcTextureVertexList> | IfcTextureVertexList) , public TexCoordIndex: IfcPositiveInteger[][] | null)
1501515015
{
1501615016
super(Maps, MappedTo, TexCoords);
1501715017
}
@@ -15767,14 +15767,14 @@ super();
1576715767
}
1576815768
export class IfcCartesianPointList2D extends IfcCartesianPointList {
1576915769
type:number=1675464909;
15770-
constructor(public CoordList: IfcLengthMeasure[] )
15770+
constructor(public CoordList: IfcLengthMeasure[][] )
1577115771
{
1577215772
super();
1577315773
}
1577415774
}
1577515775
export class IfcCartesianPointList3D extends IfcCartesianPointList {
1577615776
type:number=2059837836;
15777-
constructor(public CoordList: IfcLengthMeasure[] )
15777+
constructor(public CoordList: IfcLengthMeasure[][] )
1577815778
{
1577915779
super();
1578015780
}
@@ -16051,7 +16051,7 @@ super();
1605116051
}
1605216052
export class IfcIndexedPolygonalFaceWithVoids extends IfcIndexedPolygonalFace {
1605316053
type:number=2294589976;
16054-
constructor(public CoordIndex: IfcPositiveInteger[] , public InnerCoordIndices: IfcPositiveInteger[] )
16054+
constructor(public CoordIndex: IfcPositiveInteger[] , public InnerCoordIndices: IfcPositiveInteger[][] )
1605516055
{
1605616056
super(CoordIndex);
1605716057
}
@@ -16857,7 +16857,7 @@ super(GlobalId, OwnerHistory, Name, Description, ApplicableOccurrence, HasProper
1685716857
}
1685816858
export class IfcTriangulatedFaceSet extends IfcTessellatedFaceSet {
1685916859
type:number=2916149573;
16860-
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Normals: IfcParameterValue[] | null, public Closed: IfcBoolean | null, public CoordIndex: IfcPositiveInteger[] , public PnIndex: IfcPositiveInteger[] | null)
16860+
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Normals: IfcParameterValue[][] | null, public Closed: IfcBoolean | null, public CoordIndex: IfcPositiveInteger[][] , public PnIndex: IfcPositiveInteger[] | null)
1686116861
{
1686216862
super(Coordinates);
1686316863
}
@@ -16908,14 +16908,14 @@ super(GlobalId, OwnerHistory, Name, Description, ObjectType, ObjectPlacement, Re
1690816908
}
1690916909
export class IfcBSplineSurface extends IfcBoundedSurface {
1691016910
type:number=2887950389;
16911-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical )
16911+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical )
1691216912
{
1691316913
super();
1691416914
}
1691516915
}
1691616916
export class IfcBSplineSurfaceWithKnots extends IfcBSplineSurface {
1691716917
type:number=167062518;
16918-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType )
16918+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType )
1691916919
{
1692016920
super(UDegree, VDegree, ControlPointsList, SurfaceForm, UClosed, VClosed, SelfIntersect);
1692116921
}
@@ -17657,7 +17657,7 @@ super(GlobalId, OwnerHistory, Name, Description, ApplicableOccurrence, HasProper
1765717657
}
1765817658
export class IfcRationalBSplineSurfaceWithKnots extends IfcBSplineSurfaceWithKnots {
1765917659
type:number=683857671;
17660-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType , public WeightsData: IfcReal[] )
17660+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType , public WeightsData: IfcReal[][] )
1766117661
{
1766217662
super(UDegree, VDegree, ControlPointsList, SurfaceForm, UClosed, VClosed, SelfIntersect, UMultiplicities, VMultiplicities, UKnots, VKnots, KnotSpec);
1766317663
}
@@ -24742,7 +24742,7 @@ super();
2474224742
}
2474324743
export class IfcStructuralLoadConfiguration extends IfcStructuralLoad {
2474424744
type:number=3478079324;
24745-
constructor(public Name: IfcLabel | null, public Values: (Handle<IfcStructuralLoadOrResult> | IfcStructuralLoadOrResult)[] , public Locations: IfcLengthMeasure[] | null)
24745+
constructor(public Name: IfcLabel | null, public Values: (Handle<IfcStructuralLoadOrResult> | IfcStructuralLoadOrResult)[] , public Locations: IfcLengthMeasure[][] | null)
2474624746
{
2474724747
super(Name);
2474824748
}
@@ -24927,7 +24927,7 @@ super();
2492724927
}
2492824928
export class IfcTextureCoordinateIndicesWithVoids extends IfcTextureCoordinateIndices {
2492924929
type:number=1010789467;
24930-
constructor(public TexCoordIndex: IfcPositiveInteger[] , public TexCoordsOf: (Handle<IfcIndexedPolygonalFace> | IfcIndexedPolygonalFace) , public InnerTexCoordIndices: IfcPositiveInteger[] )
24930+
constructor(public TexCoordIndex: IfcPositiveInteger[] , public TexCoordsOf: (Handle<IfcIndexedPolygonalFace> | IfcIndexedPolygonalFace) , public InnerTexCoordIndices: IfcPositiveInteger[][] )
2493124931
{
2493224932
super(TexCoordIndex, TexCoordsOf);
2493324933
}
@@ -24948,7 +24948,7 @@ super();
2494824948
}
2494924949
export class IfcTextureVertexList extends IfcPresentationItem {
2495024950
type:number=3611470254;
24951-
constructor(public TexCoordsList: IfcParameterValue[] )
24951+
constructor(public TexCoordsList: IfcParameterValue[][] )
2495224952
{
2495324953
super();
2495424954
}
@@ -25100,7 +25100,7 @@ super(Location, Identification, Name);
2510025100
}
2510125101
export class IfcColourRgbList extends IfcPresentationItem {
2510225102
type:number=3285139300;
25103-
constructor(public ColourList: IfcNormalisedRatioMeasure[] )
25103+
constructor(public ColourList: IfcNormalisedRatioMeasure[][] )
2510425104
{
2510525105
super();
2510625106
}
@@ -25376,7 +25376,7 @@ super(Maps);
2537625376
}
2537725377
export class IfcIndexedTriangleTextureMap extends IfcIndexedTextureMap {
2537825378
type:number=2133299955;
25379-
constructor(public Maps: (Handle<IfcSurfaceTexture> | IfcSurfaceTexture)[] , public MappedTo: (Handle<IfcTessellatedFaceSet> | IfcTessellatedFaceSet) , public TexCoords: (Handle<IfcTextureVertexList> | IfcTextureVertexList) , public TexCoordIndex: IfcPositiveInteger[] | null)
25379+
constructor(public Maps: (Handle<IfcSurfaceTexture> | IfcSurfaceTexture)[] , public MappedTo: (Handle<IfcTessellatedFaceSet> | IfcTessellatedFaceSet) , public TexCoords: (Handle<IfcTextureVertexList> | IfcTextureVertexList) , public TexCoordIndex: IfcPositiveInteger[][] | null)
2538025380
{
2538125381
super(Maps, MappedTo, TexCoords);
2538225382
}
@@ -26161,14 +26161,14 @@ super();
2616126161
}
2616226162
export class IfcCartesianPointList2D extends IfcCartesianPointList {
2616326163
type:number=1675464909;
26164-
constructor(public CoordList: IfcLengthMeasure[] , public TagList: IfcLabel[] | null)
26164+
constructor(public CoordList: IfcLengthMeasure[][] , public TagList: IfcLabel[] | null)
2616526165
{
2616626166
super();
2616726167
}
2616826168
}
2616926169
export class IfcCartesianPointList3D extends IfcCartesianPointList {
2617026170
type:number=2059837836;
26171-
constructor(public CoordList: IfcLengthMeasure[] , public TagList: IfcLabel[] | null)
26171+
constructor(public CoordList: IfcLengthMeasure[][] , public TagList: IfcLabel[] | null)
2617226172
{
2617326173
super();
2617426174
}
@@ -26452,7 +26452,7 @@ super();
2645226452
}
2645326453
export class IfcIndexedPolygonalFaceWithVoids extends IfcIndexedPolygonalFace {
2645426454
type:number=2294589976;
26455-
constructor(public CoordIndex: IfcPositiveInteger[] , public InnerCoordIndices: IfcPositiveInteger[] )
26455+
constructor(public CoordIndex: IfcPositiveInteger[] , public InnerCoordIndices: IfcPositiveInteger[][] )
2645626456
{
2645726457
super(CoordIndex);
2645826458
}
@@ -27332,14 +27332,14 @@ super(GlobalId, OwnerHistory, Name, Description, ApplicableOccurrence, HasProper
2733227332
}
2733327333
export class IfcTriangulatedFaceSet extends IfcTessellatedFaceSet {
2733427334
type:number=2916149573;
27335-
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Closed: IfcBoolean | null, public Normals: IfcParameterValue[] | null, public CoordIndex: IfcPositiveInteger[] , public PnIndex: IfcPositiveInteger[] | null)
27335+
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Closed: IfcBoolean | null, public Normals: IfcParameterValue[][] | null, public CoordIndex: IfcPositiveInteger[][] , public PnIndex: IfcPositiveInteger[] | null)
2733627336
{
2733727337
super(Coordinates, Closed);
2733827338
}
2733927339
}
2734027340
export class IfcTriangulatedIrregularNetwork extends IfcTriangulatedFaceSet {
2734127341
type:number=1229763772;
27342-
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Closed: IfcBoolean | null, public Normals: IfcParameterValue[] | null, public CoordIndex: IfcPositiveInteger[] , public PnIndex: IfcPositiveInteger[] | null, public Flags: IfcInteger[] )
27342+
constructor(public Coordinates: (Handle<IfcCartesianPointList3D> | IfcCartesianPointList3D) , public Closed: IfcBoolean | null, public Normals: IfcParameterValue[][] | null, public CoordIndex: IfcPositiveInteger[][] , public PnIndex: IfcPositiveInteger[] | null, public Flags: IfcInteger[] )
2734327343
{
2734427344
super(Coordinates, Closed, Normals, CoordIndex, PnIndex);
2734527345
}
@@ -27397,14 +27397,14 @@ super(GlobalId, OwnerHistory, Name, Description, ObjectType, ObjectPlacement, Re
2739727397
}
2739827398
export class IfcBSplineSurface extends IfcBoundedSurface {
2739927399
type:number=2887950389;
27400-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical )
27400+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical )
2740127401
{
2740227402
super();
2740327403
}
2740427404
}
2740527405
export class IfcBSplineSurfaceWithKnots extends IfcBSplineSurface {
2740627406
type:number=167062518;
27407-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType )
27407+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType )
2740827408
{
2740927409
super(UDegree, VDegree, ControlPointsList, SurfaceForm, UClosed, VClosed, SelfIntersect);
2741027410
}
@@ -28309,7 +28309,7 @@ super(GlobalId, OwnerHistory, Name, Description, ApplicableOccurrence, HasProper
2830928309
}
2831028310
export class IfcRationalBSplineSurfaceWithKnots extends IfcBSplineSurfaceWithKnots {
2831128311
type:number=683857671;
28312-
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType , public WeightsData: IfcReal[] )
28312+
constructor(public UDegree: IfcInteger , public VDegree: IfcInteger , public ControlPointsList: (Handle<IfcCartesianPoint> | IfcCartesianPoint)[][] , public SurfaceForm: IfcBSplineSurfaceForm , public UClosed: IfcLogical , public VClosed: IfcLogical , public SelfIntersect: IfcLogical , public UMultiplicities: IfcInteger[] , public VMultiplicities: IfcInteger[] , public UKnots: IfcParameterValue[] , public VKnots: IfcParameterValue[] , public KnotSpec: IfcKnotType , public WeightsData: IfcReal[][] )
2831328313
{
2831428314
super(UDegree, VDegree, ControlPointsList, SurfaceForm, UClosed, VClosed, SelfIntersect, UMultiplicities, VMultiplicities, UKnots, VKnots, KnotSpec);
2831528315
}

0 commit comments

Comments
 (0)