@ifc-lite/viewer 1.25.1 → 1.25.2
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/.turbo/turbo-build.log +79 -84
- package/CHANGELOG.md +23 -0
- package/dist/assets/{basketViewActivator-Dkn92C04.js → basketViewActivator-CTgyKI3U.js} +6 -6
- package/dist/assets/{bcf-DP2AK1-_.js → bcf-7jQby1qi.js} +1 -1
- package/dist/assets/{deflate-BYqYwhkl.js → deflate-Cfp9t1Df.js} +1 -1
- package/dist/assets/exporters-DfSvJPi4.js +4660 -0
- package/dist/assets/geometry.worker-Cyn5BybV.js +1 -0
- package/dist/assets/{geotiff-By06vdeL.js → geotiff-xZoE8BkO.js} +10 -10
- package/dist/assets/{ids-DDkkb4mo.js → ids-Cu73hD0Y.js} +21 -21
- package/dist/assets/ifc-lite_bg-ksLBP5cA.wasm +0 -0
- package/dist/assets/{index-CqBdDOAZ.js → index-WSbA5iy6.js} +34803 -34679
- package/dist/assets/{jpeg-B4IBTphL.js → jpeg-DhwFEbqb.js} +1 -1
- package/dist/assets/{lerc-DQ3jI0Ke.js → lerc-Dz6BXOVb.js} +1 -1
- package/dist/assets/{lzw-CtdH775t.js → lzw-C9z0fG2o.js} +1 -1
- package/dist/assets/{native-bridge-DA8wxaN_.js → native-bridge-RvDmzO-2.js} +1 -1
- package/dist/assets/{packbits-DG3zn49C.js → packbits-jfwifz7C.js} +1 -1
- package/dist/assets/parser.worker-C594dWxH.js +182 -0
- package/dist/assets/raw-R2QfzPAR.js +1 -0
- package/dist/assets/{sandbox-D1pQT-5R.js → sandbox-DDSZ7rek.js} +2450 -2260
- package/dist/assets/{server-client-D9xO_8yX.js → server-client-Ctk8_Bof.js} +1 -1
- package/dist/assets/{webimage-_-qCDjkn.js → webimage-XFHVyVtC.js} +1 -1
- package/dist/assets/{zstd-DlfgC8gA.js → zstd-3q5qcl5V.js} +1 -1
- package/dist/index.html +6 -6
- package/package.json +22 -21
- package/src/App.tsx +4 -0
- package/src/components/viewer/CommandPalette.tsx +5 -1
- package/src/components/viewer/MainToolbar.tsx +41 -19
- package/src/components/viewer/Viewport.tsx +48 -3
- package/src/components/viewer/hierarchy/ifc-icons.ts +60 -0
- package/src/components/viewer/useGeometryStreaming.ts +113 -18
- package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +61 -0
- package/src/hooks/ingest/resolveDataStoreOrAbort.ts +28 -0
- package/src/hooks/ingest/viewerModelIngest.ts +55 -11
- package/src/hooks/useIfcCache.ts +44 -18
- package/src/hooks/useIfcLoader.ts +1 -23
- package/src/hooks/useSymbolicAnnotations.ts +170 -35
- package/src/store/constants.ts +19 -3
- package/src/store/index.ts +1 -0
- package/src/store/slices/visibilitySlice.ts +2 -1
- package/src/store/types.ts +9 -0
- package/src/utils/serverDataModel.test.ts +51 -1
- package/src/utils/serverDataModel.ts +2 -26
- package/vite.config.ts +0 -5
- package/dist/assets/exporters-CZe0D8N-.js +0 -5957
- package/dist/assets/geometry-controller.worker-pD49_fH6.js +0 -7
- package/dist/assets/geometry.worker-D4c-06r5.js +0 -1
- package/dist/assets/ifc-lite-DxGqDbjO.js +0 -7
- package/dist/assets/ifc-lite_bg-BNeu7R_V.wasm +0 -0
- package/dist/assets/ifc-lite_bg-DuxUZomW.wasm +0 -0
- package/dist/assets/parser.worker-BZZcO7DB.js +0 -182
- package/dist/assets/raw-DY7Y_acr.js +0 -1
- package/dist/assets/wasm-bridge-DMX8Acuf.js +0 -1
- package/dist/assets/workerHelpers-Crstj4Oa.js +0 -36
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type { MeshData } from '@ifc-lite/geometry';
|
|
14
14
|
import type { DataModel } from '@ifc-lite/server-client';
|
|
15
15
|
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
16
|
+
import { REL_TYPE_MAP as CANONICAL_REL_TYPE_MAP } from '@ifc-lite/parser';
|
|
16
17
|
import {
|
|
17
18
|
IfcTypeEnum,
|
|
18
19
|
RelationshipType,
|
|
@@ -76,31 +77,6 @@ export interface ServerParseResult {
|
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
// ============================================================================
|
|
80
|
-
// Relationship Type Mapping
|
|
81
|
-
// ============================================================================
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Pre-computed uppercase relationship type map for efficient comparison
|
|
85
|
-
* IMPORTANT: Keep in sync with columnar-parser.ts REL_TYPE_MAP (14 types total)
|
|
86
|
-
*/
|
|
87
|
-
const REL_TYPE_MAP = new Map<string, RelationshipType>([
|
|
88
|
-
['IFCRELCONTAINEDINSPATIALSTRUCTURE', RelationshipType.ContainsElements],
|
|
89
|
-
['IFCRELAGGREGATES', RelationshipType.Aggregates],
|
|
90
|
-
['IFCRELDEFINESBYPROPERTIES', RelationshipType.DefinesByProperties],
|
|
91
|
-
['IFCRELDEFINESBYTYPE', RelationshipType.DefinesByType],
|
|
92
|
-
['IFCRELASSOCIATESMATERIAL', RelationshipType.AssociatesMaterial],
|
|
93
|
-
['IFCRELASSOCIATESCLASSIFICATION', RelationshipType.AssociatesClassification],
|
|
94
|
-
['IFCRELVOIDSELEMENT', RelationshipType.VoidsElement],
|
|
95
|
-
['IFCRELFILLSELEMENT', RelationshipType.FillsElement],
|
|
96
|
-
['IFCRELCONNECTSPATHELEMENTS', RelationshipType.ConnectsPathElements],
|
|
97
|
-
['IFCRELCONNECTSELEMENTS', RelationshipType.ConnectsElements],
|
|
98
|
-
['IFCRELSPACEBOUNDARY', RelationshipType.SpaceBoundary],
|
|
99
|
-
['IFCRELASSIGNSTOGROUP', RelationshipType.AssignsToGroup],
|
|
100
|
-
['IFCRELASSIGNSTOPRODUCT', RelationshipType.AssignsToProduct],
|
|
101
|
-
['IFCRELREFERENCEDINSPATIALSTRUCTURE', RelationshipType.ReferencedInSpatialStructure],
|
|
102
|
-
]);
|
|
103
|
-
|
|
104
80
|
// ============================================================================
|
|
105
81
|
// Spatial Hierarchy Building
|
|
106
82
|
// ============================================================================
|
|
@@ -432,7 +408,7 @@ function buildRelationships(
|
|
|
432
408
|
// Combined loop - process relationships once for both graph building AND property mapping
|
|
433
409
|
for (const rel of dataModel.relationships) {
|
|
434
410
|
const upperType = rel.rel_type.toUpperCase();
|
|
435
|
-
const relType =
|
|
411
|
+
const relType = CANONICAL_REL_TYPE_MAP[upperType];
|
|
436
412
|
|
|
437
413
|
// Build property set and quantity set mappings (regardless of relType mapping)
|
|
438
414
|
if (upperType === 'IFCRELDEFINESBYPROPERTIES') {
|
package/vite.config.ts
CHANGED
|
@@ -256,11 +256,6 @@ export default defineConfig({
|
|
|
256
256
|
'@ifc-lite/ifcx': path.resolve(__dirname, '../../packages/ifcx/src'),
|
|
257
257
|
'@ifc-lite/pointcloud': path.resolve(__dirname, '../../packages/pointcloud/src'),
|
|
258
258
|
'@ifc-lite/wasm': path.resolve(__dirname, '../../packages/wasm/pkg/ifc-lite.js'),
|
|
259
|
-
// Phase 2 of single-controller-rayon-design.md — threaded bundle
|
|
260
|
-
// imported by `geometry-controller.worker.ts`. Kept separate from
|
|
261
|
-
// `@ifc-lite/wasm` so legacy code that doesn't need threading
|
|
262
|
-
// stays on the slim single-thread bundle.
|
|
263
|
-
'@ifc-lite/wasm-threaded': path.resolve(__dirname, '../../packages/wasm-threaded/pkg/ifc-lite.js'),
|
|
264
259
|
'@ifc-lite/sdk': path.resolve(__dirname, '../../packages/sdk/src'),
|
|
265
260
|
'@ifc-lite/create': path.resolve(__dirname, '../../packages/create/src'),
|
|
266
261
|
'@ifc-lite/sandbox/schema': path.resolve(__dirname, '../../packages/sandbox/src/bridge-schema.ts'),
|