@ifc-lite/bcf 1.4.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.
- package/LICENSE +373 -0
- package/dist/guid.d.ts +41 -0
- package/dist/guid.d.ts.map +1 -0
- package/dist/guid.js +184 -0
- package/dist/guid.js.map +1 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +112 -0
- package/dist/index.js.map +1 -0
- package/dist/reader.d.ts +9 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +632 -0
- package/dist/reader.js.map +1 -0
- package/dist/types.d.ts +229 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/viewpoint.d.ts +138 -0
- package/dist/viewpoint.d.ts.map +1 -0
- package/dist/viewpoint.js +386 -0
- package/dist/viewpoint.js.map +1 -0
- package/dist/writer.d.ts +9 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +445 -0
- package/dist/writer.js.map +1 -0
- package/package.json +51 -0
package/dist/reader.js
ADDED
|
@@ -0,0 +1,632 @@
|
|
|
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
|
+
* BCF file reader
|
|
6
|
+
*
|
|
7
|
+
* Parses .bcfzip files into BCFProject structure
|
|
8
|
+
*/
|
|
9
|
+
import JSZip from 'jszip';
|
|
10
|
+
/**
|
|
11
|
+
* Parse a BCF file (.bcfzip) into a BCFProject
|
|
12
|
+
*
|
|
13
|
+
* @param file - BCF file as File, Blob, or ArrayBuffer
|
|
14
|
+
* @returns Parsed BCF project
|
|
15
|
+
*/
|
|
16
|
+
export async function readBCF(file) {
|
|
17
|
+
const zip = await JSZip.loadAsync(file);
|
|
18
|
+
// Read version file
|
|
19
|
+
const version = await readVersionFile(zip);
|
|
20
|
+
// Read project file (optional)
|
|
21
|
+
const { projectId, name, extensions } = await readProjectFile(zip);
|
|
22
|
+
// Read topics
|
|
23
|
+
const topics = await readTopics(zip);
|
|
24
|
+
return {
|
|
25
|
+
version: version.versionId,
|
|
26
|
+
projectId,
|
|
27
|
+
name,
|
|
28
|
+
topics,
|
|
29
|
+
extensions,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Read bcf.version file
|
|
34
|
+
*/
|
|
35
|
+
async function readVersionFile(zip) {
|
|
36
|
+
const versionFile = zip.file('bcf.version');
|
|
37
|
+
if (!versionFile) {
|
|
38
|
+
throw new Error('Invalid BCF file: missing bcf.version');
|
|
39
|
+
}
|
|
40
|
+
const content = await versionFile.async('string');
|
|
41
|
+
const versionMatch = content.match(/VersionId="([^"]+)"/);
|
|
42
|
+
if (!versionMatch) {
|
|
43
|
+
throw new Error('Invalid BCF version file: could not parse VersionId');
|
|
44
|
+
}
|
|
45
|
+
const versionId = versionMatch[1];
|
|
46
|
+
if (versionId !== '2.1' && versionId !== '3.0') {
|
|
47
|
+
console.warn(`Unsupported BCF version: ${versionId}, treating as 2.1`);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
versionId: versionId === '3.0' ? '3.0' : '2.1',
|
|
51
|
+
detailedVersion: versionMatch[1],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Read project.bcfp file (optional)
|
|
56
|
+
*/
|
|
57
|
+
async function readProjectFile(zip) {
|
|
58
|
+
const projectFile = zip.file('project.bcfp');
|
|
59
|
+
if (!projectFile) {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
const content = await projectFile.async('string');
|
|
63
|
+
const projectIdMatch = content.match(/ProjectId="([^"]+)"/);
|
|
64
|
+
const nameMatch = content.match(/<Name>([^<]+)<\/Name>/);
|
|
65
|
+
return {
|
|
66
|
+
projectId: projectIdMatch?.[1],
|
|
67
|
+
name: nameMatch?.[1],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Read all topics from the BCF archive
|
|
72
|
+
*/
|
|
73
|
+
async function readTopics(zip) {
|
|
74
|
+
const topics = new Map();
|
|
75
|
+
// Find all topic folders (folders with markup.bcf)
|
|
76
|
+
const topicFolders = new Set();
|
|
77
|
+
zip.forEach((relativePath) => {
|
|
78
|
+
const match = relativePath.match(/^([^/]+)\/markup\.bcf$/i);
|
|
79
|
+
if (match) {
|
|
80
|
+
topicFolders.add(match[1]);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// Parse each topic
|
|
84
|
+
for (const topicGuid of topicFolders) {
|
|
85
|
+
try {
|
|
86
|
+
const topic = await readTopic(zip, topicGuid);
|
|
87
|
+
if (topic) {
|
|
88
|
+
topics.set(topic.guid, topic);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.warn(`Failed to parse topic ${topicGuid}:`, error);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return topics;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Read a single topic from the BCF archive
|
|
99
|
+
*/
|
|
100
|
+
async function readTopic(zip, topicFolder) {
|
|
101
|
+
const markupFile = zip.file(`${topicFolder}/markup.bcf`);
|
|
102
|
+
if (!markupFile) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
const markupContent = await markupFile.async('string');
|
|
106
|
+
// Parse Topic element
|
|
107
|
+
const topicMatch = markupContent.match(/<Topic\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Topic>/);
|
|
108
|
+
if (!topicMatch) {
|
|
109
|
+
console.warn(`Invalid markup.bcf in ${topicFolder}: missing Topic element`);
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const guid = topicMatch[1];
|
|
113
|
+
const topicContent = topicMatch[2];
|
|
114
|
+
// Extract topic attributes
|
|
115
|
+
const topicTypeMatch = markupContent.match(/<Topic[^>]*TopicType="([^"]+)"/);
|
|
116
|
+
const topicStatusMatch = markupContent.match(/<Topic[^>]*TopicStatus="([^"]+)"/);
|
|
117
|
+
// Extract topic elements
|
|
118
|
+
const title = extractElement(topicContent, 'Title') || 'Untitled';
|
|
119
|
+
const description = extractElement(topicContent, 'Description');
|
|
120
|
+
const priority = extractElement(topicContent, 'Priority');
|
|
121
|
+
const index = extractElement(topicContent, 'Index');
|
|
122
|
+
const creationDate = extractElement(topicContent, 'CreationDate') || new Date().toISOString();
|
|
123
|
+
const creationAuthor = extractElement(topicContent, 'CreationAuthor') || 'Unknown';
|
|
124
|
+
const modifiedDate = extractElement(topicContent, 'ModifiedDate');
|
|
125
|
+
const modifiedAuthor = extractElement(topicContent, 'ModifiedAuthor');
|
|
126
|
+
const dueDate = extractElement(topicContent, 'DueDate');
|
|
127
|
+
const assignedTo = extractElement(topicContent, 'AssignedTo');
|
|
128
|
+
const stage = extractElement(topicContent, 'Stage');
|
|
129
|
+
// Extract labels
|
|
130
|
+
const labels = [];
|
|
131
|
+
const labelMatches = topicContent.matchAll(/<Labels>([^<]+)<\/Labels>/g);
|
|
132
|
+
for (const match of labelMatches) {
|
|
133
|
+
labels.push(match[1]);
|
|
134
|
+
}
|
|
135
|
+
// Extract BIM snippet
|
|
136
|
+
const bimSnippet = extractBimSnippet(topicContent);
|
|
137
|
+
// Extract document references
|
|
138
|
+
const documentReferences = extractDocumentReferences(topicContent);
|
|
139
|
+
// Extract related topics
|
|
140
|
+
const relatedTopics = [];
|
|
141
|
+
const relatedMatches = topicContent.matchAll(/<RelatedTopic\s+Guid="([^"]+)"/g);
|
|
142
|
+
for (const match of relatedMatches) {
|
|
143
|
+
relatedTopics.push(match[1]);
|
|
144
|
+
}
|
|
145
|
+
// Parse comments
|
|
146
|
+
const comments = parseComments(markupContent);
|
|
147
|
+
// Parse viewpoints
|
|
148
|
+
const viewpoints = await parseViewpoints(zip, topicFolder, markupContent);
|
|
149
|
+
return {
|
|
150
|
+
guid,
|
|
151
|
+
title,
|
|
152
|
+
description,
|
|
153
|
+
topicType: topicTypeMatch?.[1],
|
|
154
|
+
topicStatus: topicStatusMatch?.[1],
|
|
155
|
+
priority,
|
|
156
|
+
index: index ? parseInt(index, 10) : undefined,
|
|
157
|
+
creationDate,
|
|
158
|
+
creationAuthor,
|
|
159
|
+
modifiedDate,
|
|
160
|
+
modifiedAuthor,
|
|
161
|
+
dueDate,
|
|
162
|
+
assignedTo,
|
|
163
|
+
stage,
|
|
164
|
+
labels: labels.length > 0 ? labels : undefined,
|
|
165
|
+
bimSnippet,
|
|
166
|
+
documentReferences: documentReferences.length > 0 ? documentReferences : undefined,
|
|
167
|
+
relatedTopics: relatedTopics.length > 0 ? relatedTopics : undefined,
|
|
168
|
+
comments,
|
|
169
|
+
viewpoints,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Extract a simple element value from XML
|
|
174
|
+
*/
|
|
175
|
+
function extractElement(content, elementName) {
|
|
176
|
+
const match = content.match(new RegExp(`<${elementName}>([^<]*)<\\/${elementName}>`));
|
|
177
|
+
return match?.[1];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Extract BIM snippet from topic content
|
|
181
|
+
*/
|
|
182
|
+
function extractBimSnippet(content) {
|
|
183
|
+
const match = content.match(/<BimSnippet\s+SnippetType="([^"]+)"[^>]*>([\s\S]*?)<\/BimSnippet>/);
|
|
184
|
+
if (!match)
|
|
185
|
+
return undefined;
|
|
186
|
+
const isExternalMatch = match[0].match(/isExternal="([^"]+)"/);
|
|
187
|
+
const reference = extractElement(match[2], 'Reference');
|
|
188
|
+
const referenceSchema = extractElement(match[2], 'ReferenceSchema');
|
|
189
|
+
return {
|
|
190
|
+
snippetType: match[1],
|
|
191
|
+
isExternal: isExternalMatch?.[1] === 'true',
|
|
192
|
+
reference: reference || '',
|
|
193
|
+
referenceSchema,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Extract document references from topic content
|
|
198
|
+
*/
|
|
199
|
+
function extractDocumentReferences(content) {
|
|
200
|
+
const refs = [];
|
|
201
|
+
const matches = content.matchAll(/<DocumentReference[^>]*>([\s\S]*?)<\/DocumentReference>/g);
|
|
202
|
+
for (const match of matches) {
|
|
203
|
+
const guidMatch = match[0].match(/Guid="([^"]+)"/);
|
|
204
|
+
const isExternalMatch = match[0].match(/isExternal="([^"]+)"/);
|
|
205
|
+
const referencedDoc = extractElement(match[1], 'ReferencedDocument');
|
|
206
|
+
const description = extractElement(match[1], 'Description');
|
|
207
|
+
if (referencedDoc) {
|
|
208
|
+
refs.push({
|
|
209
|
+
guid: guidMatch?.[1],
|
|
210
|
+
isExternal: isExternalMatch?.[1] === 'true',
|
|
211
|
+
referencedDocument: referencedDoc,
|
|
212
|
+
description,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return refs;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Parse comments from markup.bcf
|
|
220
|
+
*/
|
|
221
|
+
function parseComments(markupContent) {
|
|
222
|
+
const comments = [];
|
|
223
|
+
const commentMatches = markupContent.matchAll(/<Comment\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Comment>/g);
|
|
224
|
+
for (const match of commentMatches) {
|
|
225
|
+
const guid = match[1];
|
|
226
|
+
const content = match[2];
|
|
227
|
+
const date = extractElement(content, 'Date') || new Date().toISOString();
|
|
228
|
+
const author = extractElement(content, 'Author') || 'Unknown';
|
|
229
|
+
const comment = extractElement(content, 'Comment') || '';
|
|
230
|
+
const modifiedDate = extractElement(content, 'ModifiedDate');
|
|
231
|
+
const modifiedAuthor = extractElement(content, 'ModifiedAuthor');
|
|
232
|
+
// Extract viewpoint reference
|
|
233
|
+
const viewpointMatch = content.match(/<Viewpoint\s+Guid="([^"]+)"/);
|
|
234
|
+
comments.push({
|
|
235
|
+
guid,
|
|
236
|
+
date,
|
|
237
|
+
author,
|
|
238
|
+
comment,
|
|
239
|
+
viewpointGuid: viewpointMatch?.[1],
|
|
240
|
+
modifiedDate,
|
|
241
|
+
modifiedAuthor,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
return comments;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Parse viewpoints from the BCF archive
|
|
248
|
+
*/
|
|
249
|
+
async function parseViewpoints(zip, topicFolder, markupContent) {
|
|
250
|
+
const viewpoints = [];
|
|
251
|
+
// Parse viewpoint references from markup.bcf to get snapshot filenames
|
|
252
|
+
// Format: <Viewpoint Guid="xxx"><Viewpoint>filename.bcfv</Viewpoint><Snapshot>snapshot.png</Snapshot></Viewpoint>
|
|
253
|
+
const viewpointInfoMap = new Map();
|
|
254
|
+
// Match full viewpoint elements with both viewpoint and snapshot references
|
|
255
|
+
const viewpointElementRegex = /<Viewpoint\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Viewpoint>/g;
|
|
256
|
+
for (const match of markupContent.matchAll(viewpointElementRegex)) {
|
|
257
|
+
const guid = match[1];
|
|
258
|
+
const content = match[2];
|
|
259
|
+
const viewpointFileMatch = content.match(/<Viewpoint>([^<]+)<\/Viewpoint>/);
|
|
260
|
+
const snapshotFileMatch = content.match(/<Snapshot>([^<]+)<\/Snapshot>/);
|
|
261
|
+
viewpointInfoMap.set(guid, {
|
|
262
|
+
viewpointFile: viewpointFileMatch?.[1],
|
|
263
|
+
snapshotFile: snapshotFileMatch?.[1],
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// Also match self-closing viewpoint references
|
|
267
|
+
const simpleViewpointRefs = markupContent.matchAll(/<Viewpoint\s+Guid="([^"]+)"[^>]*\/>/g);
|
|
268
|
+
for (const match of simpleViewpointRefs) {
|
|
269
|
+
if (!viewpointInfoMap.has(match[1])) {
|
|
270
|
+
viewpointInfoMap.set(match[1], {});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// Find viewpoint files directly in the folder
|
|
274
|
+
const viewpointFiles = [];
|
|
275
|
+
zip.forEach((relativePath) => {
|
|
276
|
+
if (relativePath.startsWith(`${topicFolder}/`) && relativePath.endsWith('.bcfv')) {
|
|
277
|
+
viewpointFiles.push(relativePath);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
// Parse each viewpoint file
|
|
281
|
+
for (const viewpointPath of viewpointFiles) {
|
|
282
|
+
try {
|
|
283
|
+
const viewpointFile = zip.file(viewpointPath);
|
|
284
|
+
if (!viewpointFile)
|
|
285
|
+
continue;
|
|
286
|
+
const viewpointContent = await viewpointFile.async('string');
|
|
287
|
+
const viewpoint = parseViewpointContent(viewpointContent);
|
|
288
|
+
if (viewpoint) {
|
|
289
|
+
// Get snapshot filename from markup.bcf if available
|
|
290
|
+
const viewpointInfo = viewpointInfoMap.get(viewpoint.guid);
|
|
291
|
+
let snapshotFile = null;
|
|
292
|
+
let snapshotFormat = 'png';
|
|
293
|
+
// First, try the snapshot filename from markup.bcf
|
|
294
|
+
if (viewpointInfo?.snapshotFile) {
|
|
295
|
+
const snapshotPath = `${topicFolder}/${viewpointInfo.snapshotFile}`;
|
|
296
|
+
snapshotFile = zip.file(snapshotPath);
|
|
297
|
+
if (viewpointInfo.snapshotFile.toLowerCase().endsWith('.jpg') ||
|
|
298
|
+
viewpointInfo.snapshotFile.toLowerCase().endsWith('.jpeg')) {
|
|
299
|
+
snapshotFormat = 'jpeg';
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// Fallback: try common naming patterns
|
|
303
|
+
if (!snapshotFile) {
|
|
304
|
+
const viewpointBaseName = viewpointPath.replace('.bcfv', '');
|
|
305
|
+
// Handle different naming conventions:
|
|
306
|
+
// 1. Viewpoint_<guid>.bcfv -> Snapshot_<guid>.png (buildingSMART standard)
|
|
307
|
+
// 2. <guid>_viewpoint.bcfv -> <guid>_snapshot.png (alternative pattern)
|
|
308
|
+
// 3. viewpoint.bcfv -> snapshot.png (simple default)
|
|
309
|
+
const snapshotBaseName1 = viewpointBaseName.replace(/Viewpoint_/i, 'Snapshot_');
|
|
310
|
+
const snapshotBaseName2 = viewpointBaseName.replace(/_viewpoint$/i, '_snapshot');
|
|
311
|
+
const pathsToTry = [
|
|
312
|
+
// Pattern 1: Snapshot_<guid>.png
|
|
313
|
+
`${snapshotBaseName1}.png`,
|
|
314
|
+
// Pattern 2: <guid>_snapshot.png
|
|
315
|
+
`${snapshotBaseName2}.png`,
|
|
316
|
+
// Pattern 3: same name as viewpoint but .png
|
|
317
|
+
`${viewpointBaseName}.png`,
|
|
318
|
+
// Default: snapshot.png
|
|
319
|
+
`${topicFolder}/snapshot.png`,
|
|
320
|
+
// JPG variants
|
|
321
|
+
`${snapshotBaseName1}.jpg`,
|
|
322
|
+
`${snapshotBaseName2}.jpg`,
|
|
323
|
+
`${viewpointBaseName}.jpg`,
|
|
324
|
+
`${topicFolder}/snapshot.jpg`,
|
|
325
|
+
];
|
|
326
|
+
for (const path of pathsToTry) {
|
|
327
|
+
snapshotFile = zip.file(path);
|
|
328
|
+
if (snapshotFile) {
|
|
329
|
+
if (path.toLowerCase().endsWith('.jpg') || path.toLowerCase().endsWith('.jpeg')) {
|
|
330
|
+
snapshotFormat = 'jpeg';
|
|
331
|
+
}
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (snapshotFile) {
|
|
337
|
+
const snapshotData = await snapshotFile.async('uint8array');
|
|
338
|
+
viewpoint.snapshotData = snapshotData;
|
|
339
|
+
viewpoint.snapshot = `data:image/${snapshotFormat};base64,${uint8ArrayToBase64(snapshotData)}`;
|
|
340
|
+
}
|
|
341
|
+
viewpoints.push(viewpoint);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
catch (error) {
|
|
345
|
+
console.warn(`Failed to parse viewpoint ${viewpointPath}:`, error);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// If no viewpoint files found, check for default snapshot
|
|
349
|
+
if (viewpoints.length === 0) {
|
|
350
|
+
const defaultSnapshot = zip.file(`${topicFolder}/snapshot.png`) || zip.file(`${topicFolder}/snapshot.jpg`);
|
|
351
|
+
if (defaultSnapshot) {
|
|
352
|
+
const isJpg = defaultSnapshot.name.toLowerCase().endsWith('.jpg');
|
|
353
|
+
const snapshotData = await defaultSnapshot.async('uint8array');
|
|
354
|
+
viewpoints.push({
|
|
355
|
+
guid: topicFolder, // Use topic GUID as viewpoint GUID
|
|
356
|
+
snapshot: `data:image/${isJpg ? 'jpeg' : 'png'};base64,${uint8ArrayToBase64(snapshotData)}`,
|
|
357
|
+
snapshotData,
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return viewpoints;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Parse viewpoint XML content
|
|
365
|
+
*/
|
|
366
|
+
function parseViewpointContent(content) {
|
|
367
|
+
// Extract viewpoint GUID from root element (Guid can be anywhere in the tag)
|
|
368
|
+
const guidMatch = content.match(/<VisualizationInfo[^>]+Guid="([^"]+)"/);
|
|
369
|
+
const guid = guidMatch?.[1] || crypto.randomUUID?.() || `vp-${Date.now()}`;
|
|
370
|
+
// Parse perspective camera
|
|
371
|
+
const perspectiveCamera = parsePerspectiveCamera(content);
|
|
372
|
+
// Parse orthogonal camera
|
|
373
|
+
const orthogonalCamera = parseOrthogonalCamera(content);
|
|
374
|
+
// Parse components
|
|
375
|
+
const components = parseComponents(content);
|
|
376
|
+
// Parse lines
|
|
377
|
+
const lines = parseLines(content);
|
|
378
|
+
// Parse clipping planes
|
|
379
|
+
const clippingPlanes = parseClippingPlanes(content);
|
|
380
|
+
// Parse bitmaps
|
|
381
|
+
const bitmaps = parseBitmaps(content);
|
|
382
|
+
return {
|
|
383
|
+
guid,
|
|
384
|
+
perspectiveCamera,
|
|
385
|
+
orthogonalCamera,
|
|
386
|
+
components,
|
|
387
|
+
lines: lines.length > 0 ? lines : undefined,
|
|
388
|
+
clippingPlanes: clippingPlanes.length > 0 ? clippingPlanes : undefined,
|
|
389
|
+
bitmaps: bitmaps.length > 0 ? bitmaps : undefined,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Parse perspective camera from viewpoint content
|
|
394
|
+
*/
|
|
395
|
+
function parsePerspectiveCamera(content) {
|
|
396
|
+
const match = content.match(/<PerspectiveCamera>([\s\S]*?)<\/PerspectiveCamera>/);
|
|
397
|
+
if (!match)
|
|
398
|
+
return undefined;
|
|
399
|
+
const cameraContent = match[1];
|
|
400
|
+
const viewPoint = parsePoint(cameraContent, 'CameraViewPoint');
|
|
401
|
+
const direction = parseDirection(cameraContent, 'CameraDirection');
|
|
402
|
+
const upVector = parseDirection(cameraContent, 'CameraUpVector');
|
|
403
|
+
const fieldOfView = extractElement(cameraContent, 'FieldOfView');
|
|
404
|
+
if (!viewPoint || !direction || !upVector || !fieldOfView) {
|
|
405
|
+
return undefined;
|
|
406
|
+
}
|
|
407
|
+
return {
|
|
408
|
+
cameraViewPoint: viewPoint,
|
|
409
|
+
cameraDirection: direction,
|
|
410
|
+
cameraUpVector: upVector,
|
|
411
|
+
fieldOfView: parseFloat(fieldOfView),
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Parse orthogonal camera from viewpoint content
|
|
416
|
+
*/
|
|
417
|
+
function parseOrthogonalCamera(content) {
|
|
418
|
+
const match = content.match(/<OrthogonalCamera>([\s\S]*?)<\/OrthogonalCamera>/);
|
|
419
|
+
if (!match)
|
|
420
|
+
return undefined;
|
|
421
|
+
const cameraContent = match[1];
|
|
422
|
+
const viewPoint = parsePoint(cameraContent, 'CameraViewPoint');
|
|
423
|
+
const direction = parseDirection(cameraContent, 'CameraDirection');
|
|
424
|
+
const upVector = parseDirection(cameraContent, 'CameraUpVector');
|
|
425
|
+
const viewToWorldScale = extractElement(cameraContent, 'ViewToWorldScale');
|
|
426
|
+
if (!viewPoint || !direction || !upVector || !viewToWorldScale) {
|
|
427
|
+
return undefined;
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
cameraViewPoint: viewPoint,
|
|
431
|
+
cameraDirection: direction,
|
|
432
|
+
cameraUpVector: upVector,
|
|
433
|
+
viewToWorldScale: parseFloat(viewToWorldScale),
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Parse a 3D point from XML
|
|
438
|
+
*/
|
|
439
|
+
function parsePoint(content, elementName) {
|
|
440
|
+
const match = content.match(new RegExp(`<${elementName}>([\\s\\S]*?)<\\/${elementName}>`));
|
|
441
|
+
if (!match)
|
|
442
|
+
return undefined;
|
|
443
|
+
const x = extractElement(match[1], 'X');
|
|
444
|
+
const y = extractElement(match[1], 'Y');
|
|
445
|
+
const z = extractElement(match[1], 'Z');
|
|
446
|
+
if (x === undefined || y === undefined || z === undefined) {
|
|
447
|
+
return undefined;
|
|
448
|
+
}
|
|
449
|
+
return {
|
|
450
|
+
x: parseFloat(x),
|
|
451
|
+
y: parseFloat(y),
|
|
452
|
+
z: parseFloat(z),
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Parse a 3D direction from XML
|
|
457
|
+
*/
|
|
458
|
+
function parseDirection(content, elementName) {
|
|
459
|
+
return parsePoint(content, elementName);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Parse components (selection/visibility/coloring)
|
|
463
|
+
*/
|
|
464
|
+
function parseComponents(content) {
|
|
465
|
+
const componentsMatch = content.match(/<Components>([\s\S]*?)<\/Components>/);
|
|
466
|
+
if (!componentsMatch)
|
|
467
|
+
return undefined;
|
|
468
|
+
const componentsContent = componentsMatch[1];
|
|
469
|
+
// Parse selection
|
|
470
|
+
const selection = parseComponentList(componentsContent, 'Selection');
|
|
471
|
+
// Parse visibility
|
|
472
|
+
const visibility = parseVisibility(componentsContent);
|
|
473
|
+
// Parse coloring
|
|
474
|
+
const coloring = parseColoring(componentsContent);
|
|
475
|
+
if (!selection && !visibility && !coloring) {
|
|
476
|
+
return undefined;
|
|
477
|
+
}
|
|
478
|
+
return {
|
|
479
|
+
selection: selection?.length ? selection : undefined,
|
|
480
|
+
visibility,
|
|
481
|
+
coloring: coloring?.length ? coloring : undefined,
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Parse a list of components
|
|
486
|
+
*/
|
|
487
|
+
function parseComponentList(content, elementName) {
|
|
488
|
+
const match = content.match(new RegExp(`<${elementName}>([\\s\\S]*?)<\\/${elementName}>`));
|
|
489
|
+
if (!match)
|
|
490
|
+
return undefined;
|
|
491
|
+
const components = [];
|
|
492
|
+
const componentMatches = match[1].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);
|
|
493
|
+
for (const compMatch of componentMatches) {
|
|
494
|
+
const component = parseComponent(compMatch[0]);
|
|
495
|
+
if (component) {
|
|
496
|
+
components.push(component);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return components.length > 0 ? components : undefined;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Parse a single component
|
|
503
|
+
*/
|
|
504
|
+
function parseComponent(content) {
|
|
505
|
+
const ifcGuidMatch = content.match(/IfcGuid="([^"]+)"/);
|
|
506
|
+
const authoringToolIdMatch = content.match(/AuthoringToolId="([^"]+)"/);
|
|
507
|
+
const originatingSystemMatch = content.match(/OriginatingSystem="([^"]+)"/);
|
|
508
|
+
if (!ifcGuidMatch && !authoringToolIdMatch) {
|
|
509
|
+
return undefined;
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
ifcGuid: ifcGuidMatch?.[1],
|
|
513
|
+
authoringToolId: authoringToolIdMatch?.[1],
|
|
514
|
+
originatingSystem: originatingSystemMatch?.[1],
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Parse visibility settings
|
|
519
|
+
*/
|
|
520
|
+
function parseVisibility(content) {
|
|
521
|
+
const visibilityMatch = content.match(/<Visibility[^>]*>([\s\S]*?)<\/Visibility>/);
|
|
522
|
+
if (!visibilityMatch)
|
|
523
|
+
return undefined;
|
|
524
|
+
const defaultVisMatch = content.match(/DefaultVisibility="([^"]+)"/);
|
|
525
|
+
const defaultVisibility = defaultVisMatch?.[1] !== 'false';
|
|
526
|
+
const exceptions = parseComponentList(visibilityMatch[1], 'Exceptions');
|
|
527
|
+
return {
|
|
528
|
+
defaultVisibility,
|
|
529
|
+
exceptions,
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Parse coloring settings
|
|
534
|
+
*/
|
|
535
|
+
function parseColoring(content) {
|
|
536
|
+
const coloringMatch = content.match(/<Coloring>([\s\S]*?)<\/Coloring>/);
|
|
537
|
+
if (!coloringMatch)
|
|
538
|
+
return undefined;
|
|
539
|
+
const colorings = [];
|
|
540
|
+
const colorMatches = coloringMatch[1].matchAll(/<Color\s+Color="([^"]+)"[^>]*>([\s\S]*?)<\/Color>/g);
|
|
541
|
+
for (const match of colorMatches) {
|
|
542
|
+
const color = match[1];
|
|
543
|
+
const components = [];
|
|
544
|
+
const componentMatches = match[2].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);
|
|
545
|
+
for (const compMatch of componentMatches) {
|
|
546
|
+
const component = parseComponent(compMatch[0]);
|
|
547
|
+
if (component) {
|
|
548
|
+
components.push(component);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
if (components.length > 0) {
|
|
552
|
+
colorings.push({ color, components });
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return colorings.length > 0 ? colorings : undefined;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Parse lines
|
|
559
|
+
*/
|
|
560
|
+
function parseLines(content) {
|
|
561
|
+
const lines = [];
|
|
562
|
+
const linesMatch = content.match(/<Lines>([\s\S]*?)<\/Lines>/);
|
|
563
|
+
if (!linesMatch)
|
|
564
|
+
return lines;
|
|
565
|
+
const lineMatches = linesMatch[1].matchAll(/<Line>([\s\S]*?)<\/Line>/g);
|
|
566
|
+
for (const match of lineMatches) {
|
|
567
|
+
const startPoint = parsePoint(match[1], 'StartPoint');
|
|
568
|
+
const endPoint = parsePoint(match[1], 'EndPoint');
|
|
569
|
+
if (startPoint && endPoint) {
|
|
570
|
+
lines.push({ startPoint, endPoint });
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return lines;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Parse clipping planes
|
|
577
|
+
*/
|
|
578
|
+
function parseClippingPlanes(content) {
|
|
579
|
+
const planes = [];
|
|
580
|
+
const planesMatch = content.match(/<ClippingPlanes>([\s\S]*?)<\/ClippingPlanes>/);
|
|
581
|
+
if (!planesMatch)
|
|
582
|
+
return planes;
|
|
583
|
+
const planeMatches = planesMatch[1].matchAll(/<ClippingPlane>([\s\S]*?)<\/ClippingPlane>/g);
|
|
584
|
+
for (const match of planeMatches) {
|
|
585
|
+
const location = parsePoint(match[1], 'Location');
|
|
586
|
+
const direction = parseDirection(match[1], 'Direction');
|
|
587
|
+
if (location && direction) {
|
|
588
|
+
planes.push({ location, direction });
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
return planes;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Parse bitmaps
|
|
595
|
+
*/
|
|
596
|
+
function parseBitmaps(content) {
|
|
597
|
+
const bitmaps = [];
|
|
598
|
+
const bitmapsMatch = content.match(/<Bitmaps>([\s\S]*?)<\/Bitmaps>/);
|
|
599
|
+
if (!bitmapsMatch)
|
|
600
|
+
return bitmaps;
|
|
601
|
+
const bitmapMatches = bitmapsMatch[1].matchAll(/<Bitmap>([\s\S]*?)<\/Bitmap>/g);
|
|
602
|
+
for (const match of bitmapMatches) {
|
|
603
|
+
const format = extractElement(match[1], 'Format') || extractElement(match[1], 'Bitmap');
|
|
604
|
+
const reference = extractElement(match[1], 'Reference');
|
|
605
|
+
const location = parsePoint(match[1], 'Location');
|
|
606
|
+
const normal = parseDirection(match[1], 'Normal');
|
|
607
|
+
const up = parseDirection(match[1], 'Up');
|
|
608
|
+
const height = extractElement(match[1], 'Height');
|
|
609
|
+
if (format && reference && location && normal && up && height) {
|
|
610
|
+
bitmaps.push({
|
|
611
|
+
format: format.toUpperCase() === 'JPG' ? 'JPG' : 'PNG',
|
|
612
|
+
reference,
|
|
613
|
+
location,
|
|
614
|
+
normal,
|
|
615
|
+
up,
|
|
616
|
+
height: parseFloat(height),
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return bitmaps;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Convert Uint8Array to base64 string
|
|
624
|
+
*/
|
|
625
|
+
function uint8ArrayToBase64(bytes) {
|
|
626
|
+
let binary = '';
|
|
627
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
628
|
+
binary += String.fromCharCode(bytes[i]);
|
|
629
|
+
}
|
|
630
|
+
return btoa(binary);
|
|
631
|
+
}
|
|
632
|
+
//# sourceMappingURL=reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../src/reader.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAuB1B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAA+B;IAC3D,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAExC,oBAAoB;IACpB,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAE3C,+BAA+B;IAC/B,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAEnE,cAAc;IACd,MAAM,MAAM,GAAG,MAAM,UAAU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