@ifc-lite/codegen 1.15.4 → 1.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -15
- package/package.json +16 -6
- package/.turbo/turbo-build.log +0 -4
- package/CHANGELOG.md +0 -165
- package/INTEGRATION.md +0 -360
- package/generated/ifc4/entities.ts +0 -7400
- package/generated/ifc4/enums.ts +0 -2467
- package/generated/ifc4/index.ts +0 -17
- package/generated/ifc4/schema-registry.ts +0 -63186
- package/generated/ifc4/selects.ts +0 -315
- package/generated/ifc4/serializers.ts +0 -51
- package/generated/ifc4/test-compile.ts +0 -49
- package/generated/ifc4/type-ids.ts +0 -1682
- package/generated/ifc4/types.ts +0 -401
- package/generated/ifc4x3/entities.ts +0 -8300
- package/generated/ifc4x3/enums.ts +0 -3096
- package/generated/ifc4x3/index.ts +0 -17
- package/generated/ifc4x3/schema-registry.ts +0 -71489
- package/generated/ifc4x3/selects.ts +0 -312
- package/generated/ifc4x3/serializers.ts +0 -51
- package/generated/ifc4x3/test-compile.ts +0 -49
- package/generated/ifc4x3/type-ids.ts +0 -1882
- package/generated/ifc4x3/types.ts +0 -407
- package/src/cli.ts +0 -72
- package/src/crc32.ts +0 -77
- package/src/express-parser.ts +0 -457
- package/src/generator.ts +0 -268
- package/src/index.ts +0 -57
- package/src/rust-generator.ts +0 -714
- package/src/serialization-generator.ts +0 -74
- package/src/type-ids-generator.ts +0 -166
- package/src/typescript-generator.ts +0 -631
- package/test/express-parser.test.ts +0 -363
- package/test/integration.test.ts +0 -246
- package/test/serialization-generator.test.ts +0 -65
- package/test/typescript-generator.test.ts +0 -348
- package/tsconfig.json +0 -21
- package/vitest.config.ts +0 -18
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IFC SELECT Types (Unions)
|
|
3
|
-
* Generated from EXPRESS schema: IFC4X3_DEV_923b0514
|
|
4
|
-
*
|
|
5
|
-
* DO NOT EDIT - This file is auto-generated
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type {
|
|
9
|
-
IfcActorRole,
|
|
10
|
-
IfcAddress,
|
|
11
|
-
IfcAppliedValue,
|
|
12
|
-
IfcApproval,
|
|
13
|
-
IfcAxis2Placement2D,
|
|
14
|
-
IfcAxis2Placement3D,
|
|
15
|
-
IfcBooleanResult,
|
|
16
|
-
IfcBoundedCurve,
|
|
17
|
-
IfcCartesianPoint,
|
|
18
|
-
IfcClassification,
|
|
19
|
-
IfcClassificationReference,
|
|
20
|
-
IfcClosedShell,
|
|
21
|
-
IfcColourRgb,
|
|
22
|
-
IfcColourSpecification,
|
|
23
|
-
IfcCompositeCurveOnSurface,
|
|
24
|
-
IfcConstraint,
|
|
25
|
-
IfcContextDependentUnit,
|
|
26
|
-
IfcConversionBasedUnit,
|
|
27
|
-
IfcCoordinateReferenceSystem,
|
|
28
|
-
IfcCsgPrimitive3D,
|
|
29
|
-
IfcCurve,
|
|
30
|
-
IfcCurveStyleFont,
|
|
31
|
-
IfcCurveStyleFontAndScaling,
|
|
32
|
-
IfcDerivedUnit,
|
|
33
|
-
IfcDirection,
|
|
34
|
-
IfcDocumentInformation,
|
|
35
|
-
IfcDocumentReference,
|
|
36
|
-
IfcEdgeCurve,
|
|
37
|
-
IfcElement,
|
|
38
|
-
IfcExternalInformation,
|
|
39
|
-
IfcExternalReference,
|
|
40
|
-
IfcExternalSpatialElement,
|
|
41
|
-
IfcExternallyDefinedHatchStyle,
|
|
42
|
-
IfcExternallyDefinedSurfaceStyle,
|
|
43
|
-
IfcExternallyDefinedTextFont,
|
|
44
|
-
IfcFaceBasedSurfaceModel,
|
|
45
|
-
IfcFaceSurface,
|
|
46
|
-
IfcFillAreaStyleHatching,
|
|
47
|
-
IfcFillAreaStyleTiles,
|
|
48
|
-
IfcGeometricRepresentationContext,
|
|
49
|
-
IfcGroup,
|
|
50
|
-
IfcHalfSpaceSolid,
|
|
51
|
-
IfcLibraryInformation,
|
|
52
|
-
IfcLibraryReference,
|
|
53
|
-
IfcLightIntensityDistribution,
|
|
54
|
-
IfcMaterialDefinition,
|
|
55
|
-
IfcMaterialList,
|
|
56
|
-
IfcMaterialUsageDefinition,
|
|
57
|
-
IfcMeasureWithUnit,
|
|
58
|
-
IfcMonetaryUnit,
|
|
59
|
-
IfcNamedUnit,
|
|
60
|
-
IfcObjectDefinition,
|
|
61
|
-
IfcOpenShell,
|
|
62
|
-
IfcOrganization,
|
|
63
|
-
IfcPcurve,
|
|
64
|
-
IfcPerson,
|
|
65
|
-
IfcPersonAndOrganization,
|
|
66
|
-
IfcPhysicalQuantity,
|
|
67
|
-
IfcPoint,
|
|
68
|
-
IfcPreDefinedColour,
|
|
69
|
-
IfcPreDefinedCurveFont,
|
|
70
|
-
IfcPreDefinedTextFont,
|
|
71
|
-
IfcProcess,
|
|
72
|
-
IfcProduct,
|
|
73
|
-
IfcProductDefinitionShape,
|
|
74
|
-
IfcProfileDef,
|
|
75
|
-
IfcPropertyAbstraction,
|
|
76
|
-
IfcPropertyDefinition,
|
|
77
|
-
IfcPropertySetDefinition,
|
|
78
|
-
IfcReference,
|
|
79
|
-
IfcRepresentation,
|
|
80
|
-
IfcRepresentationItem,
|
|
81
|
-
IfcRepresentationMap,
|
|
82
|
-
IfcResource,
|
|
83
|
-
IfcShapeAspect,
|
|
84
|
-
IfcSolidModel,
|
|
85
|
-
IfcSpace,
|
|
86
|
-
IfcSpatialElement,
|
|
87
|
-
IfcStructuralItem,
|
|
88
|
-
IfcSurface,
|
|
89
|
-
IfcSurfaceCurve,
|
|
90
|
-
IfcSurfaceStyleLighting,
|
|
91
|
-
IfcSurfaceStyleRefraction,
|
|
92
|
-
IfcSurfaceStyleShading,
|
|
93
|
-
IfcSurfaceStyleWithTextures,
|
|
94
|
-
IfcTable,
|
|
95
|
-
IfcTessellatedFaceSet,
|
|
96
|
-
IfcTimeSeries,
|
|
97
|
-
IfcTypeProcess,
|
|
98
|
-
IfcTypeProduct,
|
|
99
|
-
IfcTypeResource,
|
|
100
|
-
IfcVector,
|
|
101
|
-
IfcVertexPoint,
|
|
102
|
-
IfcVirtualGridIntersection,
|
|
103
|
-
} from './entities.js';
|
|
104
|
-
|
|
105
|
-
import type {
|
|
106
|
-
IfcArcIndex,
|
|
107
|
-
IfcBinary,
|
|
108
|
-
IfcBoolean,
|
|
109
|
-
IfcComplexNumber,
|
|
110
|
-
IfcDate,
|
|
111
|
-
IfcDateTime,
|
|
112
|
-
IfcDuration,
|
|
113
|
-
IfcIdentifier,
|
|
114
|
-
IfcInteger,
|
|
115
|
-
IfcLabel,
|
|
116
|
-
IfcLineIndex,
|
|
117
|
-
IfcLogical,
|
|
118
|
-
IfcParameterValue,
|
|
119
|
-
IfcPositiveInteger,
|
|
120
|
-
IfcPropertySetDefinitionSet,
|
|
121
|
-
IfcReal,
|
|
122
|
-
IfcSpecularExponent,
|
|
123
|
-
IfcSpecularRoughness,
|
|
124
|
-
IfcText,
|
|
125
|
-
IfcTime,
|
|
126
|
-
IfcTimeStamp,
|
|
127
|
-
IfcURIReference,
|
|
128
|
-
} from './types.js';
|
|
129
|
-
|
|
130
|
-
/** IfcActorSelect */
|
|
131
|
-
export type IfcActorSelect = IfcOrganization | IfcPerson | IfcPersonAndOrganization;
|
|
132
|
-
|
|
133
|
-
/** IfcAppliedValueSelect */
|
|
134
|
-
export type IfcAppliedValueSelect = IfcMeasureWithUnit | IfcReference | IfcValue;
|
|
135
|
-
|
|
136
|
-
/** IfcAxis2Placement */
|
|
137
|
-
export type IfcAxis2Placement = IfcAxis2Placement2D | IfcAxis2Placement3D;
|
|
138
|
-
|
|
139
|
-
/** IfcBendingParameterSelect */
|
|
140
|
-
export type IfcBendingParameterSelect = number | number;
|
|
141
|
-
|
|
142
|
-
/** IfcBooleanOperand */
|
|
143
|
-
export type IfcBooleanOperand = IfcBooleanResult | IfcCsgPrimitive3D | IfcHalfSpaceSolid | IfcSolidModel | IfcTessellatedFaceSet;
|
|
144
|
-
|
|
145
|
-
/** IfcClassificationReferenceSelect */
|
|
146
|
-
export type IfcClassificationReferenceSelect = IfcClassification | IfcClassificationReference;
|
|
147
|
-
|
|
148
|
-
/** IfcClassificationSelect */
|
|
149
|
-
export type IfcClassificationSelect = IfcClassification | IfcClassificationReference;
|
|
150
|
-
|
|
151
|
-
/** IfcColour */
|
|
152
|
-
export type IfcColour = IfcColourSpecification | IfcPreDefinedColour;
|
|
153
|
-
|
|
154
|
-
/** IfcColourOrFactor */
|
|
155
|
-
export type IfcColourOrFactor = IfcColourRgb | number;
|
|
156
|
-
|
|
157
|
-
/** IfcCoordinateReferenceSystemSelect */
|
|
158
|
-
export type IfcCoordinateReferenceSystemSelect = IfcCoordinateReferenceSystem | IfcGeometricRepresentationContext;
|
|
159
|
-
|
|
160
|
-
/** IfcCsgSelect */
|
|
161
|
-
export type IfcCsgSelect = IfcBooleanResult | IfcCsgPrimitive3D;
|
|
162
|
-
|
|
163
|
-
/** IfcCurveFontOrScaledCurveFontSelect */
|
|
164
|
-
export type IfcCurveFontOrScaledCurveFontSelect = IfcCurveStyleFontAndScaling | IfcCurveStyleFontSelect;
|
|
165
|
-
|
|
166
|
-
/** IfcCurveMeasureSelect */
|
|
167
|
-
export type IfcCurveMeasureSelect = number | IfcParameterValue;
|
|
168
|
-
|
|
169
|
-
/** IfcCurveOnSurface */
|
|
170
|
-
export type IfcCurveOnSurface = IfcCompositeCurveOnSurface | IfcPcurve | IfcSurfaceCurve;
|
|
171
|
-
|
|
172
|
-
/** IfcCurveOrEdgeCurve */
|
|
173
|
-
export type IfcCurveOrEdgeCurve = IfcBoundedCurve | IfcEdgeCurve;
|
|
174
|
-
|
|
175
|
-
/** IfcCurveStyleFontSelect */
|
|
176
|
-
export type IfcCurveStyleFontSelect = IfcCurveStyleFont | IfcPreDefinedCurveFont;
|
|
177
|
-
|
|
178
|
-
/** IfcDefinitionSelect */
|
|
179
|
-
export type IfcDefinitionSelect = IfcObjectDefinition | IfcPropertyDefinition;
|
|
180
|
-
|
|
181
|
-
/** IfcDerivedMeasureValue */
|
|
182
|
-
export type IfcDerivedMeasureValue = number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number | number;
|
|
183
|
-
|
|
184
|
-
/** IfcDocumentSelect */
|
|
185
|
-
export type IfcDocumentSelect = IfcDocumentInformation | IfcDocumentReference;
|
|
186
|
-
|
|
187
|
-
/** IfcFillStyleSelect */
|
|
188
|
-
export type IfcFillStyleSelect = IfcColour | IfcExternallyDefinedHatchStyle | IfcFillAreaStyleHatching | IfcFillAreaStyleTiles;
|
|
189
|
-
|
|
190
|
-
/** IfcGeometricSetSelect */
|
|
191
|
-
export type IfcGeometricSetSelect = IfcCurve | IfcPoint | IfcSurface;
|
|
192
|
-
|
|
193
|
-
/** IfcGridPlacementDirectionSelect */
|
|
194
|
-
export type IfcGridPlacementDirectionSelect = IfcDirection | IfcVirtualGridIntersection;
|
|
195
|
-
|
|
196
|
-
/** IfcHatchLineDistanceSelect */
|
|
197
|
-
export type IfcHatchLineDistanceSelect = number | IfcVector;
|
|
198
|
-
|
|
199
|
-
/** IfcInterferenceSelect */
|
|
200
|
-
export type IfcInterferenceSelect = IfcElement | IfcSpatialElement;
|
|
201
|
-
|
|
202
|
-
/** IfcLayeredItem */
|
|
203
|
-
export type IfcLayeredItem = IfcRepresentation | IfcRepresentationItem;
|
|
204
|
-
|
|
205
|
-
/** IfcLibrarySelect */
|
|
206
|
-
export type IfcLibrarySelect = IfcLibraryInformation | IfcLibraryReference;
|
|
207
|
-
|
|
208
|
-
/** IfcLightDistributionDataSourceSelect */
|
|
209
|
-
export type IfcLightDistributionDataSourceSelect = IfcExternalReference | IfcLightIntensityDistribution;
|
|
210
|
-
|
|
211
|
-
/** IfcMaterialSelect */
|
|
212
|
-
export type IfcMaterialSelect = IfcMaterialDefinition | IfcMaterialList | IfcMaterialUsageDefinition;
|
|
213
|
-
|
|
214
|
-
/** IfcMeasureValue */
|
|
215
|
-
export type IfcMeasureValue = number | number | IfcComplexNumber | number | number | number | number | number | number | number | number | number | number | IfcParameterValue | number | number | number | number | number | number | number | number | number;
|
|
216
|
-
|
|
217
|
-
/** IfcMetricValueSelect */
|
|
218
|
-
export type IfcMetricValueSelect = IfcAppliedValue | IfcMeasureWithUnit | IfcReference | IfcTable | IfcTimeSeries | IfcValue;
|
|
219
|
-
|
|
220
|
-
/** IfcModulusOfRotationalSubgradeReactionSelect */
|
|
221
|
-
export type IfcModulusOfRotationalSubgradeReactionSelect = IfcBoolean | number;
|
|
222
|
-
|
|
223
|
-
/** IfcModulusOfSubgradeReactionSelect */
|
|
224
|
-
export type IfcModulusOfSubgradeReactionSelect = IfcBoolean | number;
|
|
225
|
-
|
|
226
|
-
/** IfcModulusOfTranslationalSubgradeReactionSelect */
|
|
227
|
-
export type IfcModulusOfTranslationalSubgradeReactionSelect = IfcBoolean | number;
|
|
228
|
-
|
|
229
|
-
/** IfcObjectReferenceSelect */
|
|
230
|
-
export type IfcObjectReferenceSelect = IfcAddress | IfcAppliedValue | IfcExternalReference | IfcMaterialDefinition | IfcOrganization | IfcPerson | IfcPersonAndOrganization | IfcTable | IfcTimeSeries;
|
|
231
|
-
|
|
232
|
-
/** IfcPointOrVertexPoint */
|
|
233
|
-
export type IfcPointOrVertexPoint = IfcPoint | IfcVertexPoint;
|
|
234
|
-
|
|
235
|
-
/** IfcProcessSelect */
|
|
236
|
-
export type IfcProcessSelect = IfcProcess | IfcTypeProcess;
|
|
237
|
-
|
|
238
|
-
/** IfcProductRepresentationSelect */
|
|
239
|
-
export type IfcProductRepresentationSelect = IfcProductDefinitionShape | IfcRepresentationMap;
|
|
240
|
-
|
|
241
|
-
/** IfcProductSelect */
|
|
242
|
-
export type IfcProductSelect = IfcProduct | IfcTypeProduct;
|
|
243
|
-
|
|
244
|
-
/** IfcPropertySetDefinitionSelect */
|
|
245
|
-
export type IfcPropertySetDefinitionSelect = IfcPropertySetDefinition | IfcPropertySetDefinitionSet;
|
|
246
|
-
|
|
247
|
-
/** IfcResourceObjectSelect */
|
|
248
|
-
export type IfcResourceObjectSelect = IfcActorRole | IfcAppliedValue | IfcApproval | IfcConstraint | IfcContextDependentUnit | IfcConversionBasedUnit | IfcExternalInformation | IfcExternalReference | IfcMaterialDefinition | IfcOrganization | IfcPerson | IfcPersonAndOrganization | IfcPhysicalQuantity | IfcProfileDef | IfcPropertyAbstraction | IfcShapeAspect | IfcTimeSeries;
|
|
249
|
-
|
|
250
|
-
/** IfcResourceSelect */
|
|
251
|
-
export type IfcResourceSelect = IfcResource | IfcTypeResource;
|
|
252
|
-
|
|
253
|
-
/** IfcRotationalStiffnessSelect */
|
|
254
|
-
export type IfcRotationalStiffnessSelect = IfcBoolean | number;
|
|
255
|
-
|
|
256
|
-
/** IfcSegmentIndexSelect */
|
|
257
|
-
export type IfcSegmentIndexSelect = IfcArcIndex | IfcLineIndex;
|
|
258
|
-
|
|
259
|
-
/** IfcShell */
|
|
260
|
-
export type IfcShell = IfcClosedShell | IfcOpenShell;
|
|
261
|
-
|
|
262
|
-
/** IfcSimpleValue */
|
|
263
|
-
export type IfcSimpleValue = IfcBinary | IfcBoolean | IfcDate | IfcDateTime | IfcDuration | IfcIdentifier | IfcInteger | IfcLabel | IfcLogical | IfcPositiveInteger | IfcReal | IfcText | IfcTime | IfcTimeStamp | IfcURIReference;
|
|
264
|
-
|
|
265
|
-
/** IfcSizeSelect */
|
|
266
|
-
export type IfcSizeSelect = number | number | number | number | number | number;
|
|
267
|
-
|
|
268
|
-
/** IfcSolidOrShell */
|
|
269
|
-
export type IfcSolidOrShell = IfcClosedShell | IfcSolidModel;
|
|
270
|
-
|
|
271
|
-
/** IfcSpaceBoundarySelect */
|
|
272
|
-
export type IfcSpaceBoundarySelect = IfcExternalSpatialElement | IfcSpace;
|
|
273
|
-
|
|
274
|
-
/** IfcSpatialReferenceSelect */
|
|
275
|
-
export type IfcSpatialReferenceSelect = IfcGroup | IfcProduct;
|
|
276
|
-
|
|
277
|
-
/** IfcSpecularHighlightSelect */
|
|
278
|
-
export type IfcSpecularHighlightSelect = IfcSpecularExponent | IfcSpecularRoughness;
|
|
279
|
-
|
|
280
|
-
/** IfcStructuralActivityAssignmentSelect */
|
|
281
|
-
export type IfcStructuralActivityAssignmentSelect = IfcElement | IfcStructuralItem;
|
|
282
|
-
|
|
283
|
-
/** IfcSurfaceOrFaceSurface */
|
|
284
|
-
export type IfcSurfaceOrFaceSurface = IfcFaceBasedSurfaceModel | IfcFaceSurface | IfcSurface;
|
|
285
|
-
|
|
286
|
-
/** IfcSurfaceStyleElementSelect */
|
|
287
|
-
export type IfcSurfaceStyleElementSelect = IfcExternallyDefinedSurfaceStyle | IfcSurfaceStyleLighting | IfcSurfaceStyleRefraction | IfcSurfaceStyleShading | IfcSurfaceStyleWithTextures;
|
|
288
|
-
|
|
289
|
-
/** IfcTextFontSelect */
|
|
290
|
-
export type IfcTextFontSelect = IfcExternallyDefinedTextFont | IfcPreDefinedTextFont;
|
|
291
|
-
|
|
292
|
-
/** IfcTimeOrRatioSelect */
|
|
293
|
-
export type IfcTimeOrRatioSelect = IfcDuration | number;
|
|
294
|
-
|
|
295
|
-
/** IfcTranslationalStiffnessSelect */
|
|
296
|
-
export type IfcTranslationalStiffnessSelect = IfcBoolean | number;
|
|
297
|
-
|
|
298
|
-
/** IfcTrimmingSelect */
|
|
299
|
-
export type IfcTrimmingSelect = IfcCartesianPoint | IfcParameterValue;
|
|
300
|
-
|
|
301
|
-
/** IfcUnit */
|
|
302
|
-
export type IfcUnit = IfcDerivedUnit | IfcMonetaryUnit | IfcNamedUnit;
|
|
303
|
-
|
|
304
|
-
/** IfcValue */
|
|
305
|
-
export type IfcValue = IfcDerivedMeasureValue | IfcMeasureValue | IfcSimpleValue;
|
|
306
|
-
|
|
307
|
-
/** IfcVectorOrDirection */
|
|
308
|
-
export type IfcVectorOrDirection = IfcDirection | IfcVector;
|
|
309
|
-
|
|
310
|
-
/** IfcWarpingStiffnessSelect */
|
|
311
|
-
export type IfcWarpingStiffnessSelect = IfcBoolean | number;
|
|
312
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* IFC Serialization Support
|
|
7
|
-
* Generated from EXPRESS schema: IFC4X3_DEV_923b0514
|
|
8
|
-
*
|
|
9
|
-
* Thin binding over the shared, schema-agnostic STEP serializer in
|
|
10
|
-
* `@ifc-lite/data`. All serialization logic lives there (single source of
|
|
11
|
-
* truth); only this bundle's `SCHEMA_REGISTRY` is bound to the registry-coupled
|
|
12
|
-
* helpers below.
|
|
13
|
-
*
|
|
14
|
-
* DO NOT EDIT - This file is auto-generated
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { SCHEMA_REGISTRY } from './schema-registry.js';
|
|
18
|
-
import {
|
|
19
|
-
generateHeader,
|
|
20
|
-
generateStepFileWithRegistry,
|
|
21
|
-
toStepLineWithRegistry,
|
|
22
|
-
type StepEntity,
|
|
23
|
-
} from '@ifc-lite/data';
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
isEntityRef,
|
|
27
|
-
isEnumValue,
|
|
28
|
-
ref,
|
|
29
|
-
enumVal,
|
|
30
|
-
serializeValue,
|
|
31
|
-
generateHeader,
|
|
32
|
-
parseStepValue,
|
|
33
|
-
} from '@ifc-lite/data';
|
|
34
|
-
export type { StepValue, EntityRef, EnumValue, StepEntity } from '@ifc-lite/data';
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Serialize an entity to a STEP line (bound to this bundle's schema).
|
|
38
|
-
*/
|
|
39
|
-
export function toStepLine(entity: StepEntity): string {
|
|
40
|
-
return toStepLineWithRegistry(SCHEMA_REGISTRY, entity);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Generate complete STEP file content (bound to this bundle's schema).
|
|
45
|
-
*/
|
|
46
|
-
export function generateStepFile(
|
|
47
|
-
entities: StepEntity[],
|
|
48
|
-
options: Parameters<typeof generateHeader>[0]
|
|
49
|
-
): string {
|
|
50
|
-
return generateStepFileWithRegistry(SCHEMA_REGISTRY, entities, options);
|
|
51
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Type-check test file
|
|
7
|
-
* This file is used to verify the generated types compile correctly.
|
|
8
|
-
*
|
|
9
|
-
* DO NOT EDIT - This file is auto-generated
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import type { IfcWall, IfcProject, IfcExtrudedAreaSolid } from './entities.js';
|
|
13
|
-
import { TYPE_IDS, getTypeId, getTypeName } from './type-ids.js';
|
|
14
|
-
import { SCHEMA_REGISTRY, getEntityMetadata } from './schema-registry.js';
|
|
15
|
-
import { toStepLine, serializeValue, ref, enumVal, type StepEntity } from './serializers.js';
|
|
16
|
-
|
|
17
|
-
// Test type IDs
|
|
18
|
-
const wallId: number = TYPE_IDS.IfcWall;
|
|
19
|
-
const projectId: number = TYPE_IDS.IfcProject;
|
|
20
|
-
|
|
21
|
-
// Test ID lookup
|
|
22
|
-
const wallIdFromName = getTypeId('IfcWall');
|
|
23
|
-
const nameFromId = getTypeName(wallId);
|
|
24
|
-
|
|
25
|
-
// Test schema registry
|
|
26
|
-
const wallMeta = getEntityMetadata('IfcWall');
|
|
27
|
-
const wallAttrs = wallMeta?.allAttributes;
|
|
28
|
-
|
|
29
|
-
// Test serialization
|
|
30
|
-
const testEntity: StepEntity = {
|
|
31
|
-
expressId: 1,
|
|
32
|
-
type: 'IfcProject',
|
|
33
|
-
GlobalId: '0YvctVUKr0kugbFTf53O9L',
|
|
34
|
-
OwnerHistory: ref(2),
|
|
35
|
-
Name: 'Test Project',
|
|
36
|
-
Description: null,
|
|
37
|
-
ObjectType: null,
|
|
38
|
-
LongName: null,
|
|
39
|
-
Phase: null,
|
|
40
|
-
RepresentationContexts: [ref(3)],
|
|
41
|
-
UnitsInContext: ref(4),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const stepLine = toStepLine(testEntity);
|
|
45
|
-
|
|
46
|
-
console.log('✓ All types compile correctly');
|
|
47
|
-
console.log(' Wall ID:', wallId);
|
|
48
|
-
console.log(' Project ID:', projectId);
|
|
49
|
-
console.log(' STEP line:', stepLine);
|