@thatopen/components 2.4.3 → 2.4.4
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/dist/core/Components/index.d.ts +1 -1
- package/dist/ifc/IfcPropertiesManager/index.d.ts +1 -1
- package/dist/index.cjs +42 -28
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.mjs +3 -3
- package/dist/index.mjs +43 -29
- package/dist/namespace.d.ts +3721 -3721
- package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import * as THREE$1 from "three";
|
|
8
|
-
import { BufferAttribute, Vector3, Plane, Line3,
|
|
8
|
+
import { BufferAttribute, Vector3, Vector2, Plane, Line3, Triangle, Sphere, Matrix4, Box3, BackSide, DoubleSide, FrontSide, Mesh, Ray, Raycaster, Quaternion, Object3D, Euler, MeshBasicMaterial, LineBasicMaterial, CylinderGeometry, BoxGeometry, BufferGeometry, Float32BufferAttribute, OctahedronGeometry, Line, SphereGeometry, TorusGeometry, PlaneGeometry } from "three";
|
|
9
9
|
import * as FRAGS from "@thatopen/fragments";
|
|
10
10
|
import { FragmentsGroup, Serializer } from "@thatopen/fragments";
|
|
11
11
|
import * as WEBIFC from "web-ifc";
|
|
@@ -6293,7 +6293,7 @@ const _Components = class _Components {
|
|
|
6293
6293
|
/**
|
|
6294
6294
|
* The version of the @thatopen/components library.
|
|
6295
6295
|
*/
|
|
6296
|
-
__publicField(_Components, "release", "2.4.
|
|
6296
|
+
__publicField(_Components, "release", "2.4.4");
|
|
6297
6297
|
let Components = _Components;
|
|
6298
6298
|
class SimpleWorld extends Base {
|
|
6299
6299
|
constructor() {
|
|
@@ -21087,10 +21087,8 @@ function readDocType$1(xmlData, i) {
|
|
|
21087
21087
|
i += 8;
|
|
21088
21088
|
else if (hasBody && isNotation(xmlData, i))
|
|
21089
21089
|
i += 9;
|
|
21090
|
-
else if (isComment)
|
|
21091
|
-
comment = true;
|
|
21092
21090
|
else
|
|
21093
|
-
|
|
21091
|
+
comment = true;
|
|
21094
21092
|
angleBracketsCount++;
|
|
21095
21093
|
exp = "";
|
|
21096
21094
|
} else if (xmlData[i] === ">") {
|
|
@@ -21134,11 +21132,6 @@ function readEntityExp(xmlData, i) {
|
|
|
21134
21132
|
}
|
|
21135
21133
|
return [entityName2, val2, i];
|
|
21136
21134
|
}
|
|
21137
|
-
function isComment(xmlData, i) {
|
|
21138
|
-
if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-")
|
|
21139
|
-
return true;
|
|
21140
|
-
return false;
|
|
21141
|
-
}
|
|
21142
21135
|
function isEntity(xmlData, i) {
|
|
21143
21136
|
if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y")
|
|
21144
21137
|
return true;
|
|
@@ -23179,7 +23172,7 @@ ${users}
|
|
|
23179
23172
|
Comment: CommentText,
|
|
23180
23173
|
Viewpoint: Viewpoint2
|
|
23181
23174
|
} = markupComment;
|
|
23182
|
-
if (!(Guid && CommentDate && Author &&
|
|
23175
|
+
if (!(Guid && CommentDate && Author && Comment))
|
|
23183
23176
|
return null;
|
|
23184
23177
|
const viewpoints = this.components.get(Viewpoints);
|
|
23185
23178
|
const comment = new Comment(this.components, CommentText ?? "");
|
|
@@ -27229,10 +27222,10 @@ class IDSFacet {
|
|
|
27229
27222
|
let minPass = true;
|
|
27230
27223
|
let maxPass = true;
|
|
27231
27224
|
if (min !== void 0) {
|
|
27232
|
-
minPass = minInclusive ? value
|
|
27225
|
+
minPass = minInclusive ? value >= min : value > min;
|
|
27233
27226
|
}
|
|
27234
27227
|
if (max !== void 0) {
|
|
27235
|
-
maxPass = maxInclusive ? value
|
|
27228
|
+
maxPass = maxInclusive ? value <= max : value < max;
|
|
27236
27229
|
}
|
|
27237
27230
|
pass = minPass && maxPass;
|
|
27238
27231
|
}
|
|
@@ -27957,16 +27950,15 @@ class IDSProperty extends IDSFacet {
|
|
|
27957
27950
|
this.testResult.push(result2);
|
|
27958
27951
|
const sets = await this.getPsets(model, expressID);
|
|
27959
27952
|
const matchingSets = sets.filter((set) => {
|
|
27960
|
-
var _a2;
|
|
27961
27953
|
const result3 = this.evalRequirement(
|
|
27962
|
-
|
|
27954
|
+
set.Name ?? null,
|
|
27963
27955
|
this.propertySet,
|
|
27964
27956
|
"PropertySet"
|
|
27965
27957
|
);
|
|
27966
27958
|
if (!result3)
|
|
27967
27959
|
return false;
|
|
27968
27960
|
checks.push({
|
|
27969
|
-
currentValue: set.Name
|
|
27961
|
+
currentValue: set.Name,
|
|
27970
27962
|
parameter: "PropertySet",
|
|
27971
27963
|
pass: true,
|
|
27972
27964
|
requiredValue: this.propertySet.parameter
|
|
@@ -27983,8 +27975,7 @@ class IDSProperty extends IDSFacet {
|
|
|
27983
27975
|
continue;
|
|
27984
27976
|
}
|
|
27985
27977
|
for (const set of matchingSets) {
|
|
27986
|
-
|
|
27987
|
-
if (!itemsAttrName) {
|
|
27978
|
+
if (!("Properties" in set)) {
|
|
27988
27979
|
checks.push({
|
|
27989
27980
|
currentValue: null,
|
|
27990
27981
|
parameter: "BaseName",
|
|
@@ -27993,7 +27984,7 @@ class IDSProperty extends IDSFacet {
|
|
|
27993
27984
|
});
|
|
27994
27985
|
continue;
|
|
27995
27986
|
}
|
|
27996
|
-
const items = set
|
|
27987
|
+
const items = set.Properties;
|
|
27997
27988
|
const matchingItems = items.filter((item) => {
|
|
27998
27989
|
var _a2;
|
|
27999
27990
|
if (this._unsupportedTypes.includes(item.type)) {
|
|
@@ -28048,18 +28039,22 @@ class IDSProperty extends IDSFacet {
|
|
|
28048
28039
|
(name) => name.endsWith("Value") || name.endsWith("Values")
|
|
28049
28040
|
);
|
|
28050
28041
|
}
|
|
28051
|
-
async
|
|
28052
|
-
|
|
28042
|
+
async simplifyPset(model, attrs, propsListName) {
|
|
28043
|
+
var _a;
|
|
28053
28044
|
const props = [];
|
|
28054
|
-
const list =
|
|
28045
|
+
const list = attrs[propsListName];
|
|
28055
28046
|
if (!list)
|
|
28056
|
-
return
|
|
28047
|
+
return attrs;
|
|
28057
28048
|
for (const { value } of list) {
|
|
28058
28049
|
const propAttrs = await model.getProperties(value);
|
|
28059
28050
|
if (propAttrs)
|
|
28060
28051
|
props.push(propAttrs);
|
|
28061
28052
|
}
|
|
28062
|
-
attrsClone
|
|
28053
|
+
const attrsClone = {
|
|
28054
|
+
Name: (_a = attrs.Name) == null ? void 0 : _a.value,
|
|
28055
|
+
Properties: props,
|
|
28056
|
+
type: attrs.type
|
|
28057
|
+
};
|
|
28063
28058
|
return attrsClone;
|
|
28064
28059
|
}
|
|
28065
28060
|
async getTypePsets(model, expressID) {
|
|
@@ -28077,13 +28072,14 @@ class IDSProperty extends IDSFacet {
|
|
|
28077
28072
|
if (!(psetAttrs && "HasProperties" in psetAttrs && Array.isArray(psetAttrs.HasProperties))) {
|
|
28078
28073
|
continue;
|
|
28079
28074
|
}
|
|
28080
|
-
const pset = await this.
|
|
28075
|
+
const pset = await this.simplifyPset(model, psetAttrs, "HasProperties");
|
|
28081
28076
|
sets.push(pset);
|
|
28082
28077
|
}
|
|
28083
28078
|
return sets;
|
|
28084
28079
|
}
|
|
28085
28080
|
async getPsets(model, expressID) {
|
|
28086
|
-
|
|
28081
|
+
var _a;
|
|
28082
|
+
const typePsets = await this.getTypePsets(model, expressID);
|
|
28087
28083
|
const indexer = this.components.get(IfcRelationsIndexer);
|
|
28088
28084
|
const definitions = indexer.getEntityRelations(
|
|
28089
28085
|
model,
|
|
@@ -28091,7 +28087,8 @@ class IDSProperty extends IDSFacet {
|
|
|
28091
28087
|
"IsDefinedBy"
|
|
28092
28088
|
);
|
|
28093
28089
|
if (!definitions)
|
|
28094
|
-
return
|
|
28090
|
+
return typePsets;
|
|
28091
|
+
const sets = [];
|
|
28095
28092
|
for (const definitionID of definitions) {
|
|
28096
28093
|
const attrs = await model.getProperties(definitionID);
|
|
28097
28094
|
if (!attrs)
|
|
@@ -28099,8 +28096,25 @@ class IDSProperty extends IDSFacet {
|
|
|
28099
28096
|
const propsListName = this.getItemsAttrName(attrs.type);
|
|
28100
28097
|
if (!propsListName)
|
|
28101
28098
|
continue;
|
|
28102
|
-
const
|
|
28103
|
-
|
|
28099
|
+
const occurencePset = await this.simplifyPset(
|
|
28100
|
+
model,
|
|
28101
|
+
attrs,
|
|
28102
|
+
propsListName
|
|
28103
|
+
);
|
|
28104
|
+
const typePset = typePsets.find(
|
|
28105
|
+
({ Name }) => Name === occurencePset.Name
|
|
28106
|
+
);
|
|
28107
|
+
if (typePset) {
|
|
28108
|
+
for (const prop of typePset.Properties) {
|
|
28109
|
+
const name = (_a = prop.Name) == null ? void 0 : _a.value;
|
|
28110
|
+
const existingProp = occurencePset.Properties.find(
|
|
28111
|
+
({ Name }) => Name.value === name
|
|
28112
|
+
);
|
|
28113
|
+
if (!existingProp)
|
|
28114
|
+
occurencePset.Properties.push(prop);
|
|
28115
|
+
}
|
|
28116
|
+
}
|
|
28117
|
+
sets.push(occurencePset);
|
|
28104
28118
|
}
|
|
28105
28119
|
return sets;
|
|
28106
28120
|
}
|