@ifc-lite/viewer 1.6.0 → 1.7.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/CHANGELOG.md +78 -0
- package/dist/assets/{Arrow.dom-BjDQoB2M.js → Arrow.dom-BGPQieQQ.js} +1 -1
- package/dist/assets/ifc-lite_bg-DyIN_nBM.wasm +0 -0
- package/dist/assets/{index-YBtrHPu3.js → index-dgdgiQ9p.js} +40212 -30008
- package/dist/assets/index-yTqs8kgX.css +1 -0
- package/dist/assets/{native-bridge-CULtTDX3.js → native-bridge-DD0SNyQ5.js} +1 -1
- package/dist/assets/{wasm-bridge-CjL-lSak.js → wasm-bridge-D54YMO7X.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +18 -15
- package/src/components/viewer/BCFPanel.tsx +7 -789
- package/src/components/viewer/Drawing2DCanvas.tsx +1048 -0
- package/src/components/viewer/DrawingSettingsPanel.tsx +3 -3
- package/src/components/viewer/HierarchyPanel.tsx +110 -842
- package/src/components/viewer/IDSExportDialog.tsx +281 -0
- package/src/components/viewer/IDSPanel.tsx +126 -17
- package/src/components/viewer/KeyboardShortcutsDialog.tsx +9 -0
- package/src/components/viewer/LensPanel.tsx +603 -0
- package/src/components/viewer/MainToolbar.tsx +188 -21
- package/src/components/viewer/PropertiesPanel.tsx +171 -663
- package/src/components/viewer/PropertyEditor.tsx +866 -77
- package/src/components/viewer/Section2DPanel.tsx +76 -2648
- package/src/components/viewer/ToolOverlays.tsx +3 -1097
- package/src/components/viewer/ViewerLayout.tsx +132 -45
- package/src/components/viewer/Viewport.tsx +237 -1659
- package/src/components/viewer/ViewportContainer.tsx +11 -3
- package/src/components/viewer/bcf/BCFCreateTopicForm.tsx +134 -0
- package/src/components/viewer/bcf/BCFTopicDetail.tsx +388 -0
- package/src/components/viewer/bcf/BCFTopicList.tsx +239 -0
- package/src/components/viewer/bcf/bcfHelpers.tsx +109 -0
- package/src/components/viewer/hierarchy/HierarchyNode.tsx +328 -0
- package/src/components/viewer/hierarchy/treeDataBuilder.ts +464 -0
- package/src/components/viewer/hierarchy/types.ts +54 -0
- package/src/components/viewer/hierarchy/useHierarchyTree.ts +280 -0
- package/src/components/viewer/lists/ListBuilder.tsx +486 -0
- package/src/components/viewer/lists/ListPanel.tsx +540 -0
- package/src/components/viewer/lists/ListResultsTable.tsx +193 -0
- package/src/components/viewer/properties/ClassificationCard.tsx +70 -0
- package/src/components/viewer/properties/CoordinateDisplay.tsx +49 -0
- package/src/components/viewer/properties/DocumentCard.tsx +89 -0
- package/src/components/viewer/properties/MaterialCard.tsx +201 -0
- package/src/components/viewer/properties/ModelMetadataPanel.tsx +335 -0
- package/src/components/viewer/properties/PropertySetCard.tsx +132 -0
- package/src/components/viewer/properties/QuantitySetCard.tsx +79 -0
- package/src/components/viewer/properties/RelationshipsCard.tsx +100 -0
- package/src/components/viewer/properties/encodingUtils.ts +29 -0
- package/src/components/viewer/tools/MeasurePanel.tsx +218 -0
- package/src/components/viewer/tools/MeasurementVisuals.tsx +644 -0
- package/src/components/viewer/tools/SectionPanel.tsx +183 -0
- package/src/components/viewer/tools/SectionVisualization.tsx +78 -0
- package/src/components/viewer/tools/formatDistance.ts +18 -0
- package/src/components/viewer/tools/sectionConstants.ts +14 -0
- package/src/components/viewer/useAnimationLoop.ts +166 -0
- package/src/components/viewer/useGeometryStreaming.ts +398 -0
- package/src/components/viewer/useKeyboardControls.ts +221 -0
- package/src/components/viewer/useMouseControls.ts +1009 -0
- package/src/components/viewer/useRenderUpdates.ts +165 -0
- package/src/components/viewer/useTouchControls.ts +245 -0
- package/src/hooks/ids/idsColorSystem.ts +125 -0
- package/src/hooks/ids/idsDataAccessor.ts +237 -0
- package/src/hooks/ids/idsExportService.ts +444 -0
- package/src/hooks/useBCF.ts +7 -0
- package/src/hooks/useDrawingExport.ts +627 -0
- package/src/hooks/useDrawingGeneration.ts +627 -0
- package/src/hooks/useFloorplanView.ts +108 -0
- package/src/hooks/useIDS.ts +270 -463
- package/src/hooks/useIfc.ts +26 -1628
- package/src/hooks/useIfcFederation.ts +803 -0
- package/src/hooks/useIfcLoader.ts +508 -0
- package/src/hooks/useIfcServer.ts +465 -0
- package/src/hooks/useKeyboardShortcuts.ts +1 -1
- package/src/hooks/useLens.ts +129 -0
- package/src/hooks/useMeasure2D.ts +365 -0
- package/src/hooks/useViewControls.ts +218 -0
- package/src/lib/ifc4-pset-definitions.test.ts +161 -0
- package/src/lib/ifc4-pset-definitions.ts +621 -0
- package/src/lib/ifc4-qto-definitions.ts +315 -0
- package/src/lib/lens/adapter.ts +138 -0
- package/src/lib/lens/index.ts +5 -0
- package/src/lib/lists/adapter.ts +69 -0
- package/src/lib/lists/index.ts +28 -0
- package/src/lib/lists/persistence.ts +64 -0
- package/src/services/fs-cache.ts +1 -1
- package/src/services/tauri-modules.d.ts +25 -0
- package/src/store/index.ts +38 -2
- package/src/store/slices/cameraSlice.ts +14 -1
- package/src/store/slices/dataSlice.ts +14 -1
- package/src/store/slices/lensSlice.ts +184 -0
- package/src/store/slices/listSlice.ts +74 -0
- package/src/store/slices/pinboardSlice.ts +114 -0
- package/src/store/types.ts +5 -0
- package/src/utils/ifcConfig.ts +16 -3
- package/src/utils/serverDataModel.ts +64 -101
- package/src/vite-env.d.ts +3 -0
- package/dist/assets/ifc-lite_bg-C6kblxf9.wasm +0 -0
- package/dist/assets/index-v3mcCUPN.css +0 -1
|
@@ -0,0 +1,621 @@
|
|
|
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
|
+
* IFC4 Property Set Definitions
|
|
7
|
+
*
|
|
8
|
+
* Maps IFC entity types to their valid property sets and properties
|
|
9
|
+
* according to the official IFC4 standard (ISO 16739-1:2018).
|
|
10
|
+
*
|
|
11
|
+
* Only includes Pset_ definitions (not Qto_ quantities).
|
|
12
|
+
* Used by the property editor to validate and suggest additions.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { PropertyValueType } from '@ifc-lite/data';
|
|
16
|
+
|
|
17
|
+
export interface PsetPropertyDef {
|
|
18
|
+
name: string;
|
|
19
|
+
type: PropertyValueType;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface PsetDefinition {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
applicableTypes: string[];
|
|
27
|
+
properties: PsetPropertyDef[];
|
|
28
|
+
/** Schema versions this pset applies to. If undefined, applies to all. */
|
|
29
|
+
schemas?: Array<'IFC2X3' | 'IFC4' | 'IFC4X3'>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// IFC4 Standard Property Set Definitions
|
|
34
|
+
// ============================================================================
|
|
35
|
+
|
|
36
|
+
const PSET_DEFINITIONS: PsetDefinition[] = [
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Wall Property Sets
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
{
|
|
41
|
+
name: 'Pset_WallCommon',
|
|
42
|
+
description: 'Properties common to the definition of all occurrences of IfcWall',
|
|
43
|
+
applicableTypes: ['IfcWall', 'IfcWallStandardCase', 'IfcCurtainWall'],
|
|
44
|
+
properties: [
|
|
45
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID from an external source' },
|
|
46
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element (New, Existing, Demolish, Temporary)' },
|
|
47
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating for this element' },
|
|
48
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
49
|
+
{ name: 'Combustible', type: PropertyValueType.Boolean, description: 'Whether the material is combustible' },
|
|
50
|
+
{ name: 'SurfaceSpreadOfFlame', type: PropertyValueType.Label, description: 'Surface spread of flame classification' },
|
|
51
|
+
{ name: 'ThermalTransmittance', type: PropertyValueType.Real, description: 'Thermal transmittance (U-value) in W/(m²·K)' },
|
|
52
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external (part of the outer shell)' },
|
|
53
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
54
|
+
{ name: 'ExtendToStructure', type: PropertyValueType.Boolean, description: 'Whether the wall extends to the structure above' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Door Property Sets
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
{
|
|
62
|
+
name: 'Pset_DoorCommon',
|
|
63
|
+
description: 'Properties common to the definition of all occurrences of IfcDoor',
|
|
64
|
+
applicableTypes: ['IfcDoor'],
|
|
65
|
+
properties: [
|
|
66
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID from an external source' },
|
|
67
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
68
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
69
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
70
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
71
|
+
{ name: 'SecurityRating', type: PropertyValueType.Label, description: 'Security rating' },
|
|
72
|
+
{ name: 'HandicapAccessible', type: PropertyValueType.Boolean, description: 'Whether accessible for handicapped persons' },
|
|
73
|
+
{ name: 'FireExit', type: PropertyValueType.Boolean, description: 'Whether designated as fire exit' },
|
|
74
|
+
{ name: 'SelfClosing', type: PropertyValueType.Boolean, description: 'Whether self-closing' },
|
|
75
|
+
{ name: 'SmokeStop', type: PropertyValueType.Boolean, description: 'Whether designed to prevent smoke passage' },
|
|
76
|
+
{ name: 'GlazingAreaFraction', type: PropertyValueType.Real, description: 'Fraction of glazing area (0-1)' },
|
|
77
|
+
{ name: 'HasDrive', type: PropertyValueType.Boolean, description: 'Whether an automatic drive is provided' },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Pset_DoorWindowGlazingType',
|
|
82
|
+
description: 'Properties for door/window glazing',
|
|
83
|
+
applicableTypes: ['IfcDoor', 'IfcWindow'],
|
|
84
|
+
properties: [
|
|
85
|
+
{ name: 'GlassLayers', type: PropertyValueType.Integer, description: 'Number of glass layers' },
|
|
86
|
+
{ name: 'GlassThickness1', type: PropertyValueType.Real, description: 'Thickness of first glass layer (mm)' },
|
|
87
|
+
{ name: 'GlassThickness2', type: PropertyValueType.Real, description: 'Thickness of second glass layer (mm)' },
|
|
88
|
+
{ name: 'GlassThickness3', type: PropertyValueType.Real, description: 'Thickness of third glass layer (mm)' },
|
|
89
|
+
{ name: 'FillGas', type: PropertyValueType.Label, description: 'Fill gas type (Air, Argon, Krypton)' },
|
|
90
|
+
{ name: 'GlassColour', type: PropertyValueType.Label, description: 'Glass colour' },
|
|
91
|
+
{ name: 'IsTempered', type: PropertyValueType.Boolean, description: 'Whether glass is tempered' },
|
|
92
|
+
{ name: 'IsLaminated', type: PropertyValueType.Boolean, description: 'Whether glass is laminated' },
|
|
93
|
+
{ name: 'IsCoated', type: PropertyValueType.Boolean, description: 'Whether glass is coated' },
|
|
94
|
+
{ name: 'IsWired', type: PropertyValueType.Boolean, description: 'Whether glass is wired' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
// Window Property Sets
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
{
|
|
102
|
+
name: 'Pset_WindowCommon',
|
|
103
|
+
description: 'Properties common to the definition of all occurrences of IfcWindow',
|
|
104
|
+
applicableTypes: ['IfcWindow'],
|
|
105
|
+
properties: [
|
|
106
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID from an external source' },
|
|
107
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
108
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
109
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
110
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
111
|
+
{ name: 'ThermalTransmittance', type: PropertyValueType.Real, description: 'Thermal transmittance (U-value)' },
|
|
112
|
+
{ name: 'GlazingAreaFraction', type: PropertyValueType.Real, description: 'Fraction of glazing area (0-1)' },
|
|
113
|
+
{ name: 'HasSillExternal', type: PropertyValueType.Boolean, description: 'Whether has external sill' },
|
|
114
|
+
{ name: 'HasSillInternal', type: PropertyValueType.Boolean, description: 'Whether has internal sill' },
|
|
115
|
+
{ name: 'HasDrive', type: PropertyValueType.Boolean, description: 'Whether has automatic drive' },
|
|
116
|
+
{ name: 'SmokeStop', type: PropertyValueType.Boolean, description: 'Whether prevents smoke passage' },
|
|
117
|
+
{ name: 'Infiltration', type: PropertyValueType.Real, description: 'Air infiltration rate' },
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
// Slab Property Sets
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
{
|
|
125
|
+
name: 'Pset_SlabCommon',
|
|
126
|
+
description: 'Properties common to the definition of all occurrences of IfcSlab',
|
|
127
|
+
applicableTypes: ['IfcSlab'],
|
|
128
|
+
properties: [
|
|
129
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
130
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
131
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
132
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
133
|
+
{ name: 'Combustible', type: PropertyValueType.Boolean, description: 'Whether the material is combustible' },
|
|
134
|
+
{ name: 'SurfaceSpreadOfFlame', type: PropertyValueType.Label, description: 'Surface spread of flame' },
|
|
135
|
+
{ name: 'ThermalTransmittance', type: PropertyValueType.Real, description: 'Thermal transmittance (U-value)' },
|
|
136
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
137
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
138
|
+
{ name: 'PitchAngle', type: PropertyValueType.Real, description: 'Pitch angle of the slab (degrees)' },
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
143
|
+
// Column Property Sets
|
|
144
|
+
// ---------------------------------------------------------------------------
|
|
145
|
+
{
|
|
146
|
+
name: 'Pset_ColumnCommon',
|
|
147
|
+
description: 'Properties common to the definition of all occurrences of IfcColumn',
|
|
148
|
+
applicableTypes: ['IfcColumn'],
|
|
149
|
+
properties: [
|
|
150
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
151
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
152
|
+
{ name: 'Slope', type: PropertyValueType.Real, description: 'Slope angle (degrees)' },
|
|
153
|
+
{ name: 'Roll', type: PropertyValueType.Real, description: 'Roll angle (degrees)' },
|
|
154
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
155
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
156
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// Beam Property Sets
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
{
|
|
164
|
+
name: 'Pset_BeamCommon',
|
|
165
|
+
description: 'Properties common to the definition of all occurrences of IfcBeam',
|
|
166
|
+
applicableTypes: ['IfcBeam'],
|
|
167
|
+
properties: [
|
|
168
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
169
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
170
|
+
{ name: 'Span', type: PropertyValueType.Real, description: 'Clear span of the beam (m)' },
|
|
171
|
+
{ name: 'Slope', type: PropertyValueType.Real, description: 'Slope angle (degrees)' },
|
|
172
|
+
{ name: 'Roll', type: PropertyValueType.Real, description: 'Roll angle (degrees)' },
|
|
173
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
174
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
175
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
// Stair Property Sets
|
|
181
|
+
// ---------------------------------------------------------------------------
|
|
182
|
+
{
|
|
183
|
+
name: 'Pset_StairCommon',
|
|
184
|
+
description: 'Properties common to the definition of all occurrences of IfcStair',
|
|
185
|
+
applicableTypes: ['IfcStair'],
|
|
186
|
+
properties: [
|
|
187
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
188
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
189
|
+
{ name: 'NumberOfRiser', type: PropertyValueType.Integer, description: 'Number of risers' },
|
|
190
|
+
{ name: 'NumberOfTreads', type: PropertyValueType.Integer, description: 'Number of treads' },
|
|
191
|
+
{ name: 'RiserHeight', type: PropertyValueType.Real, description: 'Riser height (mm)' },
|
|
192
|
+
{ name: 'TreadLength', type: PropertyValueType.Real, description: 'Tread length (mm)' },
|
|
193
|
+
{ name: 'HandicapAccessible', type: PropertyValueType.Boolean, description: 'Whether accessible for handicapped persons' },
|
|
194
|
+
{ name: 'HasGuardRail', type: PropertyValueType.Boolean, description: 'Whether has guard rail' },
|
|
195
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
196
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
197
|
+
{ name: 'FireExit', type: PropertyValueType.Boolean, description: 'Whether designated as fire exit' },
|
|
198
|
+
{ name: 'RequiredHeadroom', type: PropertyValueType.Real, description: 'Required headroom clearance (m)' },
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
// ---------------------------------------------------------------------------
|
|
203
|
+
// Ramp Property Sets
|
|
204
|
+
// ---------------------------------------------------------------------------
|
|
205
|
+
{
|
|
206
|
+
name: 'Pset_RampCommon',
|
|
207
|
+
description: 'Properties common to the definition of all occurrences of IfcRamp',
|
|
208
|
+
applicableTypes: ['IfcRamp'],
|
|
209
|
+
properties: [
|
|
210
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
211
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
212
|
+
{ name: 'HandicapAccessible', type: PropertyValueType.Boolean, description: 'Whether accessible for handicapped persons' },
|
|
213
|
+
{ name: 'HasGuardRail', type: PropertyValueType.Boolean, description: 'Whether has guard rail' },
|
|
214
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
215
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
216
|
+
{ name: 'FireExit', type: PropertyValueType.Boolean, description: 'Whether designated as fire exit' },
|
|
217
|
+
{ name: 'RequiredSlope', type: PropertyValueType.Real, description: 'Required slope for the ramp' },
|
|
218
|
+
{ name: 'RequiredHeadroom', type: PropertyValueType.Real, description: 'Required headroom clearance (m)' },
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
// Roof Property Sets
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
{
|
|
226
|
+
name: 'Pset_RoofCommon',
|
|
227
|
+
description: 'Properties common to the definition of all occurrences of IfcRoof',
|
|
228
|
+
applicableTypes: ['IfcRoof'],
|
|
229
|
+
properties: [
|
|
230
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
231
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
232
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
233
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
234
|
+
{ name: 'ThermalTransmittance', type: PropertyValueType.Real, description: 'Thermal transmittance (U-value)' },
|
|
235
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
236
|
+
{ name: 'ProjectedArea', type: PropertyValueType.Real, description: 'Projected area of the roof (m²)' },
|
|
237
|
+
{ name: 'TotalArea', type: PropertyValueType.Real, description: 'Total surface area of the roof (m²)' },
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
// Covering Property Sets
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
244
|
+
{
|
|
245
|
+
name: 'Pset_CoveringCommon',
|
|
246
|
+
description: 'Properties common to the definition of all occurrences of IfcCovering',
|
|
247
|
+
applicableTypes: ['IfcCovering'],
|
|
248
|
+
properties: [
|
|
249
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
250
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
251
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
252
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
253
|
+
{ name: 'FlammabilityRating', type: PropertyValueType.Label, description: 'Flammability rating' },
|
|
254
|
+
{ name: 'FragilityRating', type: PropertyValueType.Label, description: 'Fragility rating' },
|
|
255
|
+
{ name: 'Combustible', type: PropertyValueType.Boolean, description: 'Whether the material is combustible' },
|
|
256
|
+
{ name: 'SurfaceSpreadOfFlame', type: PropertyValueType.Label, description: 'Surface spread of flame' },
|
|
257
|
+
{ name: 'Finish', type: PropertyValueType.Label, description: 'Finish material description' },
|
|
258
|
+
{ name: 'TotalThickness', type: PropertyValueType.Real, description: 'Total thickness (mm)' },
|
|
259
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
// ---------------------------------------------------------------------------
|
|
264
|
+
// Railing Property Sets
|
|
265
|
+
// ---------------------------------------------------------------------------
|
|
266
|
+
{
|
|
267
|
+
name: 'Pset_RailingCommon',
|
|
268
|
+
description: 'Properties common to the definition of all occurrences of IfcRailing',
|
|
269
|
+
applicableTypes: ['IfcRailing'],
|
|
270
|
+
properties: [
|
|
271
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
272
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
273
|
+
{ name: 'Height', type: PropertyValueType.Real, description: 'Height of the railing (mm)' },
|
|
274
|
+
{ name: 'Diameter', type: PropertyValueType.Real, description: 'Diameter of railing profile (mm)' },
|
|
275
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
276
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
281
|
+
// Space Property Sets
|
|
282
|
+
// ---------------------------------------------------------------------------
|
|
283
|
+
{
|
|
284
|
+
name: 'Pset_SpaceCommon',
|
|
285
|
+
description: 'Properties common to the definition of all occurrences of IfcSpace',
|
|
286
|
+
applicableTypes: ['IfcSpace'],
|
|
287
|
+
properties: [
|
|
288
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
289
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the space is external' },
|
|
290
|
+
{ name: 'GrossPlannedArea', type: PropertyValueType.Real, description: 'Gross planned area (m²)' },
|
|
291
|
+
{ name: 'NetPlannedArea', type: PropertyValueType.Real, description: 'Net planned area (m²)' },
|
|
292
|
+
{ name: 'PubliclyAccessible', type: PropertyValueType.Boolean, description: 'Whether publicly accessible' },
|
|
293
|
+
{ name: 'HandicapAccessible', type: PropertyValueType.Boolean, description: 'Whether accessible for handicapped' },
|
|
294
|
+
{ name: 'Category', type: PropertyValueType.Label, description: 'Category of space (office, circulation, etc.)' },
|
|
295
|
+
],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: 'Pset_SpaceFireSafetyRequirements',
|
|
299
|
+
description: 'Fire safety requirements for spaces',
|
|
300
|
+
applicableTypes: ['IfcSpace'],
|
|
301
|
+
properties: [
|
|
302
|
+
{ name: 'FireRiskFactor', type: PropertyValueType.Label, description: 'Fire risk classification' },
|
|
303
|
+
{ name: 'FlammableStorage', type: PropertyValueType.Boolean, description: 'Whether flammable materials stored' },
|
|
304
|
+
{ name: 'FireExit', type: PropertyValueType.Boolean, description: 'Whether space has fire exit' },
|
|
305
|
+
{ name: 'SprinklerProtection', type: PropertyValueType.Boolean, description: 'Whether has sprinkler protection' },
|
|
306
|
+
{ name: 'SprinklerProtectionAutomatic', type: PropertyValueType.Boolean, description: 'Whether sprinkler is automatic' },
|
|
307
|
+
{ name: 'AirPressurization', type: PropertyValueType.Boolean, description: 'Whether has air pressurization' },
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'Pset_SpaceOccupancyRequirements',
|
|
312
|
+
description: 'Occupancy requirements for spaces',
|
|
313
|
+
applicableTypes: ['IfcSpace'],
|
|
314
|
+
properties: [
|
|
315
|
+
{ name: 'OccupancyType', type: PropertyValueType.Label, description: 'Type of occupancy' },
|
|
316
|
+
{ name: 'OccupancyNumber', type: PropertyValueType.Integer, description: 'Number of occupants' },
|
|
317
|
+
{ name: 'OccupancyNumberPeak', type: PropertyValueType.Integer, description: 'Peak occupancy number' },
|
|
318
|
+
{ name: 'OccupancyTimePerDay', type: PropertyValueType.Real, description: 'Occupancy time per day (hours)' },
|
|
319
|
+
{ name: 'AreaPerOccupant', type: PropertyValueType.Real, description: 'Area per occupant (m²)' },
|
|
320
|
+
{ name: 'MinimumHeadroom', type: PropertyValueType.Real, description: 'Minimum headroom requirement (m)' },
|
|
321
|
+
{ name: 'IsOutlookDesirable', type: PropertyValueType.Boolean, description: 'Whether outlook is desirable' },
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
// ---------------------------------------------------------------------------
|
|
326
|
+
// Building Storey Property Sets
|
|
327
|
+
// ---------------------------------------------------------------------------
|
|
328
|
+
{
|
|
329
|
+
name: 'Pset_BuildingStoreyCommon',
|
|
330
|
+
description: 'Properties common to the definition of all occurrences of IfcBuildingStorey',
|
|
331
|
+
applicableTypes: ['IfcBuildingStorey'],
|
|
332
|
+
properties: [
|
|
333
|
+
{ name: 'EntranceLevel', type: PropertyValueType.Boolean, description: 'Whether this is the entrance level' },
|
|
334
|
+
{ name: 'AboveGround', type: PropertyValueType.Boolean, description: 'Whether storey is above ground' },
|
|
335
|
+
{ name: 'SprinklerProtection', type: PropertyValueType.Boolean, description: 'Whether has sprinkler protection' },
|
|
336
|
+
{ name: 'SprinklerProtectionAutomatic', type: PropertyValueType.Boolean, description: 'Whether sprinkler is automatic' },
|
|
337
|
+
{ name: 'LoadBearingCapacity', type: PropertyValueType.Real, description: 'Load bearing capacity (kN/m²)' },
|
|
338
|
+
{ name: 'GrossAreaPlanned', type: PropertyValueType.Real, description: 'Gross planned area (m²)' },
|
|
339
|
+
{ name: 'NetAreaPlanned', type: PropertyValueType.Real, description: 'Net planned area (m²)' },
|
|
340
|
+
],
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
// ---------------------------------------------------------------------------
|
|
344
|
+
// Building Property Sets
|
|
345
|
+
// ---------------------------------------------------------------------------
|
|
346
|
+
{
|
|
347
|
+
name: 'Pset_BuildingCommon',
|
|
348
|
+
description: 'Properties common to the definition of all occurrences of IfcBuilding',
|
|
349
|
+
applicableTypes: ['IfcBuilding'],
|
|
350
|
+
properties: [
|
|
351
|
+
{ name: 'BuildingID', type: PropertyValueType.Identifier, description: 'Identifier of the building' },
|
|
352
|
+
{ name: 'IsPermanentID', type: PropertyValueType.Boolean, description: 'Whether BuildingID is permanent' },
|
|
353
|
+
{ name: 'ConstructionMethod', type: PropertyValueType.Label, description: 'Construction method' },
|
|
354
|
+
{ name: 'OccupancyType', type: PropertyValueType.Label, description: 'Type of occupancy' },
|
|
355
|
+
{ name: 'NumberOfStoreys', type: PropertyValueType.Integer, description: 'Total number of storeys' },
|
|
356
|
+
{ name: 'YearOfConstruction', type: PropertyValueType.Integer, description: 'Year of construction' },
|
|
357
|
+
{ name: 'YearOfLastRefurbishment', type: PropertyValueType.Integer, description: 'Year of last refurbishment' },
|
|
358
|
+
{ name: 'IsLandmarked', type: PropertyValueType.Boolean, description: 'Whether building is landmarked' },
|
|
359
|
+
{ name: 'SprinklerProtection', type: PropertyValueType.Boolean, description: 'Whether has sprinkler protection' },
|
|
360
|
+
{ name: 'SprinklerProtectionAutomatic', type: PropertyValueType.Boolean, description: 'Whether sprinkler is automatic' },
|
|
361
|
+
{ name: 'GrossPlannedArea', type: PropertyValueType.Real, description: 'Gross planned area (m²)' },
|
|
362
|
+
],
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
// Generic Property Sets (applicable to all building elements)
|
|
367
|
+
// ---------------------------------------------------------------------------
|
|
368
|
+
{
|
|
369
|
+
name: 'Pset_ManufacturerTypeInformation',
|
|
370
|
+
description: 'Manufacturer type information applicable to all elements',
|
|
371
|
+
applicableTypes: [
|
|
372
|
+
'IfcWall', 'IfcWallStandardCase', 'IfcDoor', 'IfcWindow',
|
|
373
|
+
'IfcSlab', 'IfcColumn', 'IfcBeam', 'IfcStair', 'IfcRamp',
|
|
374
|
+
'IfcRoof', 'IfcCovering', 'IfcCurtainWall', 'IfcRailing',
|
|
375
|
+
'IfcBuildingElementProxy', 'IfcFurnishingElement',
|
|
376
|
+
],
|
|
377
|
+
properties: [
|
|
378
|
+
{ name: 'GlobalTradeItemNumber', type: PropertyValueType.Identifier, description: 'Global Trade Item Number (GTIN)' },
|
|
379
|
+
{ name: 'ArticleNumber', type: PropertyValueType.Identifier, description: 'Article number from manufacturer' },
|
|
380
|
+
{ name: 'ModelReference', type: PropertyValueType.Label, description: 'Model reference designation' },
|
|
381
|
+
{ name: 'ModelLabel', type: PropertyValueType.Label, description: 'Model label' },
|
|
382
|
+
{ name: 'Manufacturer', type: PropertyValueType.Label, description: 'Manufacturer name' },
|
|
383
|
+
{ name: 'ProductionYear', type: PropertyValueType.Integer, description: 'Year of production' },
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'Pset_ManufacturerOccurrence',
|
|
388
|
+
description: 'Manufacturer occurrence information applicable to all elements',
|
|
389
|
+
applicableTypes: [
|
|
390
|
+
'IfcWall', 'IfcWallStandardCase', 'IfcDoor', 'IfcWindow',
|
|
391
|
+
'IfcSlab', 'IfcColumn', 'IfcBeam', 'IfcStair', 'IfcRamp',
|
|
392
|
+
'IfcRoof', 'IfcCovering', 'IfcCurtainWall', 'IfcRailing',
|
|
393
|
+
'IfcBuildingElementProxy', 'IfcFurnishingElement',
|
|
394
|
+
],
|
|
395
|
+
properties: [
|
|
396
|
+
{ name: 'AcquisitionDate', type: PropertyValueType.Label, description: 'Date of acquisition' },
|
|
397
|
+
{ name: 'BarCode', type: PropertyValueType.Identifier, description: 'Bar code identifier' },
|
|
398
|
+
{ name: 'SerialNumber', type: PropertyValueType.Identifier, description: 'Serial number' },
|
|
399
|
+
{ name: 'BatchReference', type: PropertyValueType.Identifier, description: 'Batch reference' },
|
|
400
|
+
{ name: 'AssemblyPlace', type: PropertyValueType.Label, description: 'Where assembled (Factory/Site)' },
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'Pset_Condition',
|
|
405
|
+
description: 'Condition assessment applicable to all elements',
|
|
406
|
+
applicableTypes: [
|
|
407
|
+
'IfcWall', 'IfcWallStandardCase', 'IfcDoor', 'IfcWindow',
|
|
408
|
+
'IfcSlab', 'IfcColumn', 'IfcBeam', 'IfcStair', 'IfcRamp',
|
|
409
|
+
'IfcRoof', 'IfcCovering', 'IfcCurtainWall', 'IfcRailing',
|
|
410
|
+
'IfcBuildingElementProxy', 'IfcFurnishingElement',
|
|
411
|
+
],
|
|
412
|
+
properties: [
|
|
413
|
+
{ name: 'AssessmentDate', type: PropertyValueType.Label, description: 'Date of condition assessment' },
|
|
414
|
+
{ name: 'AssessmentCondition', type: PropertyValueType.Label, description: 'Assessed condition rating' },
|
|
415
|
+
{ name: 'AssessmentDescription', type: PropertyValueType.Label, description: 'Description of condition' },
|
|
416
|
+
],
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
name: 'Pset_Warranty',
|
|
420
|
+
description: 'Warranty information applicable to all elements',
|
|
421
|
+
applicableTypes: [
|
|
422
|
+
'IfcWall', 'IfcWallStandardCase', 'IfcDoor', 'IfcWindow',
|
|
423
|
+
'IfcSlab', 'IfcColumn', 'IfcBeam', 'IfcStair', 'IfcRamp',
|
|
424
|
+
'IfcRoof', 'IfcCovering', 'IfcCurtainWall', 'IfcRailing',
|
|
425
|
+
'IfcBuildingElementProxy', 'IfcFurnishingElement',
|
|
426
|
+
],
|
|
427
|
+
properties: [
|
|
428
|
+
{ name: 'WarrantyIdentifier', type: PropertyValueType.Identifier, description: 'Warranty identifier' },
|
|
429
|
+
{ name: 'WarrantyStartDate', type: PropertyValueType.Label, description: 'Warranty start date' },
|
|
430
|
+
{ name: 'WarrantyEndDate', type: PropertyValueType.Label, description: 'Warranty end date' },
|
|
431
|
+
{ name: 'WarrantyPeriod', type: PropertyValueType.Real, description: 'Warranty duration (years)' },
|
|
432
|
+
{ name: 'WarrantyContent', type: PropertyValueType.Label, description: 'Description of warranty coverage' },
|
|
433
|
+
{ name: 'PointOfContact', type: PropertyValueType.Label, description: 'Warranty contact point' },
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
// ---------------------------------------------------------------------------
|
|
438
|
+
// Curtain Wall Property Sets
|
|
439
|
+
// ---------------------------------------------------------------------------
|
|
440
|
+
{
|
|
441
|
+
name: 'Pset_CurtainWallCommon',
|
|
442
|
+
description: 'Properties common to the definition of all occurrences of IfcCurtainWall',
|
|
443
|
+
applicableTypes: ['IfcCurtainWall'],
|
|
444
|
+
properties: [
|
|
445
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
446
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
447
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
448
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
449
|
+
{ name: 'AcousticRating', type: PropertyValueType.Label, description: 'Acoustic rating' },
|
|
450
|
+
{ name: 'ThermalTransmittance', type: PropertyValueType.Real, description: 'Thermal transmittance (U-value)' },
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
// ---------------------------------------------------------------------------
|
|
455
|
+
// Building Element Proxy Property Sets
|
|
456
|
+
// ---------------------------------------------------------------------------
|
|
457
|
+
{
|
|
458
|
+
name: 'Pset_BuildingElementProxyCommon',
|
|
459
|
+
description: 'Properties common to the definition of IfcBuildingElementProxy',
|
|
460
|
+
applicableTypes: ['IfcBuildingElementProxy'],
|
|
461
|
+
properties: [
|
|
462
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
463
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
464
|
+
{ name: 'IsExternal', type: PropertyValueType.Boolean, description: 'Whether the element is external' },
|
|
465
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
466
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
467
|
+
],
|
|
468
|
+
},
|
|
469
|
+
|
|
470
|
+
// ---------------------------------------------------------------------------
|
|
471
|
+
// Footing Property Sets
|
|
472
|
+
// ---------------------------------------------------------------------------
|
|
473
|
+
{
|
|
474
|
+
name: 'Pset_FootingCommon',
|
|
475
|
+
description: 'Properties common to the definition of all occurrences of IfcFooting',
|
|
476
|
+
applicableTypes: ['IfcFooting'],
|
|
477
|
+
properties: [
|
|
478
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
479
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
480
|
+
{ name: 'LoadBearing', type: PropertyValueType.Boolean, description: 'Whether the element is load bearing' },
|
|
481
|
+
{ name: 'FireRating', type: PropertyValueType.Label, description: 'Fire resistance rating' },
|
|
482
|
+
],
|
|
483
|
+
},
|
|
484
|
+
|
|
485
|
+
// ---------------------------------------------------------------------------
|
|
486
|
+
// Furnishing Element Property Sets
|
|
487
|
+
// ---------------------------------------------------------------------------
|
|
488
|
+
{
|
|
489
|
+
name: 'Pset_FurnitureTypeCommon',
|
|
490
|
+
description: 'Properties for furnishing elements',
|
|
491
|
+
applicableTypes: ['IfcFurnishingElement'],
|
|
492
|
+
properties: [
|
|
493
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
494
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
495
|
+
{ name: 'NominalLength', type: PropertyValueType.Real, description: 'Nominal length (mm)' },
|
|
496
|
+
{ name: 'NominalWidth', type: PropertyValueType.Real, description: 'Nominal width (mm)' },
|
|
497
|
+
{ name: 'NominalHeight', type: PropertyValueType.Real, description: 'Nominal height (mm)' },
|
|
498
|
+
{ name: 'MainColour', type: PropertyValueType.Label, description: 'Main colour' },
|
|
499
|
+
{ name: 'Style', type: PropertyValueType.Label, description: 'Style designation' },
|
|
500
|
+
],
|
|
501
|
+
},
|
|
502
|
+
|
|
503
|
+
// ---------------------------------------------------------------------------
|
|
504
|
+
// Distribution / MEP Property Sets
|
|
505
|
+
// ---------------------------------------------------------------------------
|
|
506
|
+
{
|
|
507
|
+
name: 'Pset_DistributionElementCommon',
|
|
508
|
+
description: 'Properties common to distribution elements',
|
|
509
|
+
applicableTypes: ['IfcDistributionElement', 'IfcFlowTerminal', 'IfcFlowSegment'],
|
|
510
|
+
properties: [
|
|
511
|
+
{ name: 'Reference', type: PropertyValueType.Identifier, description: 'Reference ID' },
|
|
512
|
+
{ name: 'Status', type: PropertyValueType.Label, description: 'Status of the element' },
|
|
513
|
+
],
|
|
514
|
+
},
|
|
515
|
+
];
|
|
516
|
+
|
|
517
|
+
// ============================================================================
|
|
518
|
+
// Common Classification Systems
|
|
519
|
+
// ============================================================================
|
|
520
|
+
|
|
521
|
+
export interface ClassificationSystemDef {
|
|
522
|
+
name: string;
|
|
523
|
+
description: string;
|
|
524
|
+
editionDate?: string;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export const CLASSIFICATION_SYSTEMS: ClassificationSystemDef[] = [
|
|
528
|
+
{ name: 'Uniclass 2015', description: 'UK standard classification system for the construction industry' },
|
|
529
|
+
{ name: 'OmniClass', description: 'North American classification system for the construction industry' },
|
|
530
|
+
{ name: 'MasterFormat', description: 'CSI/CSC specification numbering system' },
|
|
531
|
+
{ name: 'UniFormat', description: 'CSI/CSC uniform classification for building elements' },
|
|
532
|
+
{ name: 'ICS', description: 'International Classification for Standards' },
|
|
533
|
+
{ name: 'CCS', description: 'Cuneco Classification System (Denmark)' },
|
|
534
|
+
{ name: 'SfB', description: 'SfB classification system' },
|
|
535
|
+
{ name: 'ETIM', description: 'European Technical Information Model' },
|
|
536
|
+
{ name: 'CoClass', description: 'Swedish classification system for the built environment' },
|
|
537
|
+
{ name: 'NS 3451', description: 'Norwegian building parts table' },
|
|
538
|
+
{ name: 'NL/SfB', description: 'Dutch classification system' },
|
|
539
|
+
{ name: 'Custom', description: 'Custom classification system' },
|
|
540
|
+
];
|
|
541
|
+
|
|
542
|
+
// ============================================================================
|
|
543
|
+
// Lookup Functions
|
|
544
|
+
// ============================================================================
|
|
545
|
+
|
|
546
|
+
// Pre-computed uppercase -> PascalCase lookup map for all known types
|
|
547
|
+
const KNOWN_TYPE_MAP = new Map<string, string>();
|
|
548
|
+
for (const pset of PSET_DEFINITIONS) {
|
|
549
|
+
for (const t of pset.applicableTypes) {
|
|
550
|
+
KNOWN_TYPE_MAP.set(t.toUpperCase(), t);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Normalize entity type name for lookup (handles IFCWALL -> IfcWall, etc.)
|
|
556
|
+
*/
|
|
557
|
+
function normalizeTypeName(type: string): string {
|
|
558
|
+
if (type.startsWith('Ifc')) return type;
|
|
559
|
+
const upper = type.toUpperCase();
|
|
560
|
+
if (!upper.startsWith('IFC')) return type;
|
|
561
|
+
|
|
562
|
+
// O(1) lookup from pre-computed map
|
|
563
|
+
const known = KNOWN_TYPE_MAP.get(upper);
|
|
564
|
+
if (known) return known;
|
|
565
|
+
|
|
566
|
+
// Fallback: convert IFCWALLSTANDARDCASE -> IfcWallstandardcase
|
|
567
|
+
// Preserves Ifc prefix with capitalized first letter after it
|
|
568
|
+
const rest = type.slice(3).toLowerCase();
|
|
569
|
+
return 'Ifc' + rest.charAt(0).toUpperCase() + rest.slice(1);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Get all valid property set definitions for a given IFC entity type.
|
|
574
|
+
* Optionally filters by schema version (IFC2X3, IFC4, IFC4X3).
|
|
575
|
+
* Includes type-specific Psets and generic ones applicable to all building elements.
|
|
576
|
+
*/
|
|
577
|
+
export function getPsetDefinitionsForType(entityType: string, schemaVersion?: string): PsetDefinition[] {
|
|
578
|
+
const normalized = normalizeTypeName(entityType);
|
|
579
|
+
|
|
580
|
+
return PSET_DEFINITIONS.filter(pset => {
|
|
581
|
+
// Check type match
|
|
582
|
+
const typeMatch = pset.applicableTypes.some(t => t === normalized);
|
|
583
|
+
if (!typeMatch) return false;
|
|
584
|
+
|
|
585
|
+
// Check schema match (if specified and pset has schema restriction)
|
|
586
|
+
if (schemaVersion && pset.schemas) {
|
|
587
|
+
return pset.schemas.includes(schemaVersion as 'IFC2X3' | 'IFC4' | 'IFC4X3');
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
return true;
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Get a specific property set definition by name.
|
|
596
|
+
*/
|
|
597
|
+
export function getPsetDefinition(psetName: string): PsetDefinition | undefined {
|
|
598
|
+
return PSET_DEFINITIONS.find(p => p.name === psetName);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Get all known property set definitions.
|
|
603
|
+
*/
|
|
604
|
+
export function getAllPsetDefinitions(): PsetDefinition[] {
|
|
605
|
+
return PSET_DEFINITIONS;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Check if a property set name is a known IFC4 standard property set.
|
|
610
|
+
*/
|
|
611
|
+
export function isStandardPset(psetName: string): boolean {
|
|
612
|
+
return PSET_DEFINITIONS.some(p => p.name === psetName);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Get the property definitions for a specific property set.
|
|
617
|
+
*/
|
|
618
|
+
export function getPropertiesForPset(psetName: string): PsetPropertyDef[] {
|
|
619
|
+
const pset = PSET_DEFINITIONS.find(p => p.name === psetName);
|
|
620
|
+
return pset ? pset.properties : [];
|
|
621
|
+
}
|