@ifc-lite/codegen 1.0.0 → 1.1.0

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.
Files changed (44) hide show
  1. package/dist/cli.js +23 -5
  2. package/dist/cli.js.map +1 -1
  3. package/dist/crc32.d.ts +16 -0
  4. package/dist/crc32.d.ts.map +1 -0
  5. package/dist/crc32.js +69 -0
  6. package/dist/crc32.js.map +1 -0
  7. package/dist/generator.d.ts +20 -4
  8. package/dist/generator.d.ts.map +1 -1
  9. package/dist/generator.js +175 -19
  10. package/dist/generator.js.map +1 -1
  11. package/dist/index.d.ts +13 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +19 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/rust-generator.d.ts +20 -0
  16. package/dist/rust-generator.d.ts.map +1 -0
  17. package/dist/rust-generator.js +640 -0
  18. package/dist/rust-generator.js.map +1 -0
  19. package/dist/serialization-generator.d.ts +11 -0
  20. package/dist/serialization-generator.d.ts.map +1 -0
  21. package/dist/serialization-generator.js +333 -0
  22. package/dist/serialization-generator.js.map +1 -0
  23. package/dist/type-ids-generator.d.ts +11 -0
  24. package/dist/type-ids-generator.d.ts.map +1 -0
  25. package/dist/type-ids-generator.js +153 -0
  26. package/dist/type-ids-generator.js.map +1 -0
  27. package/generated/ifc4x3/entities.ts +9 -13
  28. package/generated/ifc4x3/enums.ts +0 -4
  29. package/generated/ifc4x3/index.ts +4 -2
  30. package/generated/ifc4x3/schema-registry.ts +326 -2718
  31. package/generated/ifc4x3/selects.ts +0 -4
  32. package/generated/ifc4x3/serializers.ts +322 -0
  33. package/generated/ifc4x3/test-compile.ts +49 -0
  34. package/generated/ifc4x3/type-ids.ts +1882 -0
  35. package/generated/ifc4x3/types.ts +0 -4
  36. package/package.json +1 -1
  37. package/src/cli.ts +49 -18
  38. package/src/crc32.ts +77 -0
  39. package/src/generator.ts +213 -21
  40. package/src/index.ts +28 -2
  41. package/src/rust-generator.ts +715 -0
  42. package/src/serialization-generator.ts +343 -0
  43. package/src/type-ids-generator.ts +166 -0
  44. package/tsconfig.json +1 -0
@@ -0,0 +1,333 @@
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
+ * Generate serialization support code
6
+ */
7
+ export function generateSerializers(schema) {
8
+ let code = `/* This Source Code Form is subject to the terms of the Mozilla Public
9
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
10
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
11
+
12
+ /**
13
+ * IFC Serialization Support
14
+ * Generated from EXPRESS schema: ${schema.name}
15
+ *
16
+ * Utilities for serializing IFC entities to STEP format.
17
+ *
18
+ * DO NOT EDIT - This file is auto-generated
19
+ */
20
+
21
+ import { SCHEMA_REGISTRY } from './schema-registry.js';
22
+
23
+ /**
24
+ * STEP value types
25
+ */
26
+ export type StepValue =
27
+ | string
28
+ | number
29
+ | boolean
30
+ | null
31
+ | undefined
32
+ | StepValue[]
33
+ | EntityRef
34
+ | EnumValue;
35
+
36
+ /**
37
+ * Entity reference (#123)
38
+ */
39
+ export interface EntityRef {
40
+ ref: number;
41
+ }
42
+
43
+ /**
44
+ * Enum value (.VALUE.)
45
+ */
46
+ export interface EnumValue {
47
+ enum: string;
48
+ }
49
+
50
+ /**
51
+ * Check if value is an entity reference
52
+ */
53
+ export function isEntityRef(value: unknown): value is EntityRef {
54
+ return typeof value === 'object' && value !== null && 'ref' in value;
55
+ }
56
+
57
+ /**
58
+ * Check if value is an enum value
59
+ */
60
+ export function isEnumValue(value: unknown): value is EnumValue {
61
+ return typeof value === 'object' && value !== null && 'enum' in value;
62
+ }
63
+
64
+ /**
65
+ * Create an entity reference
66
+ */
67
+ export function ref(id: number): EntityRef {
68
+ return { ref: id };
69
+ }
70
+
71
+ /**
72
+ * Create an enum value
73
+ */
74
+ export function enumVal(value: string): EnumValue {
75
+ return { enum: value };
76
+ }
77
+
78
+ /**
79
+ * Base interface for serializable entities
80
+ */
81
+ export interface StepEntity {
82
+ /** Express ID (#123) */
83
+ expressId: number;
84
+ /** IFC type name */
85
+ type: string;
86
+ /** Attribute values */
87
+ [key: string]: unknown;
88
+ }
89
+
90
+ /**
91
+ * Serialize a single value to STEP format
92
+ */
93
+ export function serializeValue(value: StepValue): string {
94
+ // Null/undefined -> $
95
+ if (value === null || value === undefined) {
96
+ return '$';
97
+ }
98
+
99
+ // Derived value -> *
100
+ if (value === '*') {
101
+ return '*';
102
+ }
103
+
104
+ // Boolean
105
+ if (typeof value === 'boolean') {
106
+ return value ? '.T.' : '.F.';
107
+ }
108
+
109
+ // Number
110
+ if (typeof value === 'number') {
111
+ if (!Number.isFinite(value)) {
112
+ return '$';
113
+ }
114
+ // Use exponential notation for large/small numbers
115
+ if (Math.abs(value) > 1e10 || (Math.abs(value) < 1e-10 && value !== 0)) {
116
+ return value.toExponential(10).toUpperCase().replace('E+', 'E');
117
+ }
118
+ // Otherwise use fixed notation
119
+ const str = value.toString();
120
+ // Ensure there's a decimal point for REAL values
121
+ return str.includes('.') ? str : str + '.';
122
+ }
123
+
124
+ // String
125
+ if (typeof value === 'string') {
126
+ return "'" + escapeStepString(value) + "'";
127
+ }
128
+
129
+ // Entity reference
130
+ if (isEntityRef(value)) {
131
+ return '#' + value.ref;
132
+ }
133
+
134
+ // Enum value
135
+ if (isEnumValue(value)) {
136
+ return '.' + value.enum + '.';
137
+ }
138
+
139
+ // Array/List
140
+ if (Array.isArray(value)) {
141
+ if (value.length === 0) {
142
+ return '()';
143
+ }
144
+ return '(' + value.map(v => serializeValue(v as StepValue)).join(',') + ')';
145
+ }
146
+
147
+ // Object (shouldn't happen for valid STEP values)
148
+ return '$';
149
+ }
150
+
151
+ /**
152
+ * Escape a string for STEP format
153
+ */
154
+ function escapeStepString(str: string): string {
155
+ return str
156
+ .replace(/\\\\/g, '\\\\\\\\') // Backslash
157
+ .replace(/'/g, "''"); // Single quote
158
+ }
159
+
160
+ /**
161
+ * Serialize an entity to a STEP line
162
+ */
163
+ export function toStepLine(entity: StepEntity): string {
164
+ const schema = SCHEMA_REGISTRY.entities[entity.type];
165
+ if (!schema) {
166
+ throw new Error(\`Unknown entity type: \${entity.type}\`);
167
+ }
168
+
169
+ // Get all attributes in order
170
+ const values: string[] = [];
171
+ for (const attr of schema.allAttributes) {
172
+ const value = entity[attr.name];
173
+ values.push(serializeValue(value as StepValue));
174
+ }
175
+
176
+ return \`#\${entity.expressId}=\${entity.type.toUpperCase()}(\${values.join(',')});\`;
177
+ }
178
+
179
+ /**
180
+ * Generate STEP file header
181
+ */
182
+ export function generateHeader(options: {
183
+ description?: string;
184
+ author?: string;
185
+ organization?: string;
186
+ application?: string;
187
+ schema: 'IFC2X3' | 'IFC4' | 'IFC4X3';
188
+ filename?: string;
189
+ }): string {
190
+ const now = new Date().toISOString().replace(/[-:]/g, '').split('.')[0];
191
+ const desc = options.description || 'ViewDefinition [CoordinationView]';
192
+ const author = options.author || '';
193
+ const org = options.organization || '';
194
+ const app = options.application || 'ifc-lite';
195
+ const filename = options.filename || 'output.ifc';
196
+
197
+ return \`ISO-10303-21;
198
+ HEADER;
199
+ FILE_DESCRIPTION('\${desc}','2;1');
200
+ FILE_NAME('\${filename}','\${now}',('\${author}'),('\${org}'),'\${app}','\${app}','');
201
+ FILE_SCHEMA(('\${options.schema}'));
202
+ ENDSEC;
203
+ \`;
204
+ }
205
+
206
+ /**
207
+ * Generate complete STEP file content
208
+ */
209
+ export function generateStepFile(
210
+ entities: StepEntity[],
211
+ options: Parameters<typeof generateHeader>[0]
212
+ ): string {
213
+ const header = generateHeader(options);
214
+
215
+ // Sort entities by ID for deterministic output
216
+ const sorted = [...entities].sort((a, b) => a.expressId - b.expressId);
217
+
218
+ const data = sorted.map(e => toStepLine(e)).join('\\n');
219
+
220
+ return \`\${header}DATA;
221
+ \${data}
222
+ ENDSEC;
223
+ END-ISO-10303-21;
224
+ \`;
225
+ }
226
+
227
+ /**
228
+ * Parse a STEP value from string
229
+ */
230
+ export function parseStepValue(str: string): StepValue {
231
+ str = str.trim();
232
+
233
+ // Null
234
+ if (str === '$') {
235
+ return null;
236
+ }
237
+
238
+ // Derived
239
+ if (str === '*') {
240
+ return '*' as unknown as StepValue;
241
+ }
242
+
243
+ // Boolean
244
+ if (str === '.T.') {
245
+ return true;
246
+ }
247
+ if (str === '.F.') {
248
+ return false;
249
+ }
250
+ if (str === '.U.') {
251
+ return null; // Unknown/indeterminate
252
+ }
253
+
254
+ // Entity reference
255
+ if (str.startsWith('#')) {
256
+ return { ref: parseInt(str.substring(1), 10) };
257
+ }
258
+
259
+ // Enum
260
+ if (str.startsWith('.') && str.endsWith('.')) {
261
+ return { enum: str.substring(1, str.length - 1) };
262
+ }
263
+
264
+ // String
265
+ if (str.startsWith("'") && str.endsWith("'")) {
266
+ return unescapeStepString(str.substring(1, str.length - 1));
267
+ }
268
+
269
+ // List
270
+ if (str.startsWith('(') && str.endsWith(')')) {
271
+ return parseStepList(str);
272
+ }
273
+
274
+ // Number
275
+ const num = parseFloat(str);
276
+ if (!isNaN(num)) {
277
+ return num;
278
+ }
279
+
280
+ // Unknown
281
+ return str;
282
+ }
283
+
284
+ /**
285
+ * Parse a STEP list
286
+ */
287
+ function parseStepList(str: string): StepValue[] {
288
+ // Remove outer parentheses
289
+ const inner = str.substring(1, str.length - 1).trim();
290
+ if (inner === '') {
291
+ return [];
292
+ }
293
+
294
+ const values: StepValue[] = [];
295
+ let depth = 0;
296
+ let current = '';
297
+
298
+ for (let i = 0; i < inner.length; i++) {
299
+ const char = inner[i];
300
+
301
+ if (char === '(' || char === '[') {
302
+ depth++;
303
+ current += char;
304
+ } else if (char === ')' || char === ']') {
305
+ depth--;
306
+ current += char;
307
+ } else if (char === ',' && depth === 0) {
308
+ values.push(parseStepValue(current));
309
+ current = '';
310
+ } else {
311
+ current += char;
312
+ }
313
+ }
314
+
315
+ if (current.trim()) {
316
+ values.push(parseStepValue(current));
317
+ }
318
+
319
+ return values;
320
+ }
321
+
322
+ /**
323
+ * Unescape a STEP string
324
+ */
325
+ function unescapeStepString(str: string): string {
326
+ return str
327
+ .replace(/''/g, "'")
328
+ .replace(/\\\\\\\\/g, '\\\\');
329
+ }
330
+ `;
331
+ return code;
332
+ }
333
+ //# sourceMappingURL=serialization-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialization-generator.js","sourceRoot":"","sources":["../src/serialization-generator.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAW/D;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAqB;IACvD,IAAI,IAAI,GAAG;;;;;;oCAMuB,MAAM,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4T9C,CAAC;IAEA,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Type IDs Generator
3
+ *
4
+ * Generates TypeScript type ID constants and lookup maps.
5
+ */
6
+ import type { ExpressSchema } from './express-parser.js';
7
+ /**
8
+ * Generate TypeScript type IDs file
9
+ */
10
+ export declare function generateTypeIds(schema: ExpressSchema): string;
11
+ //# sourceMappingURL=type-ids-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-ids-generator.d.ts","sourceRoot":"","sources":["../src/type-ids-generator.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAqJ7D"}
@@ -0,0 +1,153 @@
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
+ import { crc32 } from './crc32.js';
5
+ /**
6
+ * Generate TypeScript type IDs file
7
+ */
8
+ export function generateTypeIds(schema) {
9
+ let code = `/* This Source Code Form is subject to the terms of the Mozilla Public
10
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
11
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
12
+
13
+ /**
14
+ * IFC Type IDs
15
+ * Generated from EXPRESS schema: ${schema.name}
16
+ *
17
+ * CRC32 hashes for fast O(1) type lookup.
18
+ *
19
+ * DO NOT EDIT - This file is auto-generated
20
+ */
21
+
22
+ /**
23
+ * CRC32 Type IDs for all IFC entities
24
+ */
25
+ export const TYPE_IDS = {
26
+ `;
27
+ // Generate type IDs for all entities
28
+ for (const entity of schema.entities) {
29
+ const id = crc32(entity.name);
30
+ code += ` ${entity.name}: ${id},\n`;
31
+ }
32
+ code += `} as const;
33
+
34
+ /**
35
+ * Type for any valid type ID
36
+ */
37
+ export type TypeId = (typeof TYPE_IDS)[keyof typeof TYPE_IDS];
38
+
39
+ /**
40
+ * Reverse lookup: ID -> Name
41
+ */
42
+ export const TYPE_NAMES: Record<number, string> = {
43
+ `;
44
+ for (const entity of schema.entities) {
45
+ const id = crc32(entity.name);
46
+ code += ` ${id}: '${entity.name}',\n`;
47
+ }
48
+ code += `};
49
+
50
+ /**
51
+ * Get type ID from name (case-insensitive)
52
+ */
53
+ export function getTypeId(name: string): number | undefined {
54
+ // Normalize to IfcXxx format
55
+ const normalized = normalizeTypeName(name);
56
+ return (TYPE_IDS as Record<string, number>)[normalized];
57
+ }
58
+
59
+ /**
60
+ * Get type name from ID
61
+ */
62
+ export function getTypeName(id: number): string | undefined {
63
+ return TYPE_NAMES[id];
64
+ }
65
+
66
+ /**
67
+ * Check if a type ID exists
68
+ */
69
+ export function isValidTypeId(id: number): boolean {
70
+ return id in TYPE_NAMES;
71
+ }
72
+
73
+ /**
74
+ * Normalize type name to IfcXxx format
75
+ */
76
+ function normalizeTypeName(name: string): string {
77
+ // Handle IFCWALL -> IfcWall
78
+ if (name.toUpperCase().startsWith('IFC')) {
79
+ const rest = name.substring(3);
80
+ // Find the entity that matches case-insensitively
81
+ const upperRest = rest.toUpperCase();
82
+ for (const key of Object.keys(TYPE_IDS)) {
83
+ if (key.substring(3).toUpperCase() === upperRest) {
84
+ return key;
85
+ }
86
+ }
87
+ }
88
+ return name;
89
+ }
90
+
91
+ /**
92
+ * Calculate CRC32 hash for any string
93
+ * (Useful for unknown types)
94
+ */
95
+ export function crc32Hash(str: string): number {
96
+ const upper = str.toUpperCase();
97
+ let crc = 0xffffffff;
98
+ for (let i = 0; i < upper.length; i++) {
99
+ crc = CRC32_TABLE[(crc ^ upper.charCodeAt(i)) & 0xff] ^ (crc >>> 8);
100
+ }
101
+ return (crc ^ 0xffffffff) >>> 0;
102
+ }
103
+
104
+ // CRC32 lookup table
105
+ const CRC32_TABLE = new Uint32Array([
106
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
107
+ 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
108
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
109
+ 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
110
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
111
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
112
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
113
+ 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
114
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
115
+ 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
116
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
117
+ 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
118
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
119
+ 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
120
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
121
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
122
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
123
+ 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
124
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cd9, 0x5005713c, 0x270241aa,
125
+ 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
126
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
127
+ 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
128
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
129
+ 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
130
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
131
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
132
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
133
+ 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
134
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
135
+ 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
136
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
137
+ 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
138
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
139
+ 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
140
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
141
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
142
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
143
+ 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
144
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
145
+ 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
146
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd706b3,
147
+ 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
148
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
149
+ ]);
150
+ `;
151
+ return code;
152
+ }
153
+ //# sourceMappingURL=type-ids-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-ids-generator.js","sourceRoot":"","sources":["../src/type-ids-generator.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAqB;IACnD,IAAI,IAAI,GAAG;;;;;;oCAMuB,MAAM,CAAC,IAAI;;;;;;;;;;;CAW9C,CAAC;IAEA,qCAAqC;IACrC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,IAAI,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC;IACvC,CAAC;IAED,IAAI,IAAI;;;;;;;;;;;CAWT,CAAC;IAEA,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,IAAI,KAAK,EAAE,MAAM,MAAM,CAAC,IAAI,MAAM,CAAC;IACzC,CAAC;IAED,IAAI,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGT,CAAC;IAEA,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,7 +1,3 @@
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
1
  /**
6
2
  * IFC Entity Interfaces
7
3
  * Generated from EXPRESS schema: IFC4X3_DEV_923b0514
@@ -767,7 +763,7 @@ export interface IfcBoundedSurface extends IfcSurface {
767
763
  export interface IfcBSplineSurface extends IfcBoundedSurface {
768
764
  UDegree: IfcInteger;
769
765
  VDegree: IfcInteger;
770
- ControlPointsList: LIST [2:?] OF IfcCartesianPoint[];
766
+ ControlPointsList: IfcCartesianPoint[][];
771
767
  SurfaceForm: IfcBSplineSurfaceForm;
772
768
  UClosed: IfcLogical;
773
769
  VClosed: IfcLogical;
@@ -1361,7 +1357,7 @@ export interface IfcCartesianPointList extends IfcGeometricRepresentationItem {
1361
1357
  * @extends IfcCartesianPointList
1362
1358
  */
1363
1359
  export interface IfcCartesianPointList2D extends IfcCartesianPointList {
1364
- CoordList: number[];
1360
+ CoordList: IfcLengthMeasure[][];
1365
1361
  TagList?: IfcLabel[];
1366
1362
  }
1367
1363
 
@@ -1370,7 +1366,7 @@ export interface IfcCartesianPointList2D extends IfcCartesianPointList {
1370
1366
  * @extends IfcCartesianPointList
1371
1367
  */
1372
1368
  export interface IfcCartesianPointList3D extends IfcCartesianPointList {
1373
- CoordList: number[];
1369
+ CoordList: IfcLengthMeasure[][];
1374
1370
  TagList?: IfcLabel[];
1375
1371
  }
1376
1372
 
@@ -1618,7 +1614,7 @@ export interface IfcColourRgb extends IfcColourSpecification {
1618
1614
  * @extends IfcPresentationItem
1619
1615
  */
1620
1616
  export interface IfcColourRgbList extends IfcPresentationItem {
1621
- ColourList: number[];
1617
+ ColourList: IfcNormalisedRatioMeasure[][];
1622
1618
  }
1623
1619
 
1624
1620
  /**
@@ -3657,7 +3653,7 @@ export interface IfcIndexedPolygonalTextureMap extends IfcIndexedTextureMap {
3657
3653
  * @extends IfcIndexedTextureMap
3658
3654
  */
3659
3655
  export interface IfcIndexedTriangleTextureMap extends IfcIndexedTextureMap {
3660
- TexCoordIndex?: LIST [3:3] OF IfcPositiveInteger[];
3656
+ TexCoordIndex?: IfcPositiveInteger[][];
3661
3657
  }
3662
3658
 
3663
3659
  /**
@@ -5248,7 +5244,7 @@ export interface IfcRationalBSplineCurveWithKnots extends IfcBSplineCurveWithKno
5248
5244
  * @extends IfcBSplineSurfaceWithKnots
5249
5245
  */
5250
5246
  export interface IfcRationalBSplineSurfaceWithKnots extends IfcBSplineSurfaceWithKnots {
5251
- WeightsData: LIST [2:?] OF IfcReal[];
5247
+ WeightsData: IfcReal[][];
5252
5248
  }
5253
5249
 
5254
5250
  /**
@@ -7323,7 +7319,7 @@ export interface IfcTextureVertex extends IfcPresentationItem {
7323
7319
  * @extends IfcPresentationItem
7324
7320
  */
7325
7321
  export interface IfcTextureVertexList extends IfcPresentationItem {
7326
- TexCoordsList: LIST [2:2] OF IfcParameterValue[];
7322
+ TexCoordsList: IfcParameterValue[][];
7327
7323
  }
7328
7324
 
7329
7325
  /**
@@ -7448,9 +7444,9 @@ export interface IfcTrapeziumProfileDef extends IfcParameterizedProfileDef {
7448
7444
  * @extends IfcTessellatedFaceSet
7449
7445
  */
7450
7446
  export interface IfcTriangulatedFaceSet extends IfcTessellatedFaceSet {
7451
- Normals?: LIST [3:3] OF IfcParameterValue[];
7447
+ Normals?: IfcParameterValue[][];
7452
7448
  Closed?: IfcBoolean;
7453
- CoordIndex: LIST [3:3] OF IfcPositiveInteger[];
7449
+ CoordIndex: IfcPositiveInteger[][];
7454
7450
  PnIndex?: IfcPositiveInteger[];
7455
7451
  }
7456
7452
 
@@ -1,7 +1,3 @@
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
1
  /**
6
2
  * IFC Enumerations
7
3
  * Generated from EXPRESS schema: IFC4X3_DEV_923b0514
@@ -3,9 +3,9 @@
3
3
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
4
 
5
5
  /**
6
- * Generated IFC Schema
6
+ * Generated IFC Schema: IFC4X3_DEV_923b0514
7
7
  *
8
- * DO NOT EDIT - This file is auto-generated
8
+ * DO NOT EDIT - This file is auto-generated by @ifc-lite/codegen
9
9
  */
10
10
 
11
11
  export * from './entities.js';
@@ -13,3 +13,5 @@ export * from './types.js';
13
13
  export * from './enums.js';
14
14
  export * from './selects.js';
15
15
  export * from './schema-registry.js';
16
+ export * from './type-ids.js';
17
+ export * from './serializers.js';