From 240b1eb83e3be0ee7921f97cad8fca0a5b4db332 Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Sat, 7 Nov 2026 13:04:48 +1030 Subject: [PATCH 1/3] fix(ids): apply optional and prohibited cardinality to the property facet as a whole --- .../IDSSpecifications/src/facets/Facet.ts | 6 +- .../IDSSpecifications/src/facets/Property.ts | 199 +++++++++++------- .../src/facets/property-cardinality.test.ts | 92 ++++++++ 3 files changed, 219 insertions(+), 78 deletions(-) create mode 100644 packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/Facet.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/Facet.ts index c4b7f43d6..6a078cbed 100644 --- a/packages/core/src/openbim/IDSSpecifications/src/facets/Facet.ts +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/Facet.ts @@ -41,6 +41,8 @@ export abstract class IDSFacet { facetParameter: IDSFacetParameter, parameter: IDSFacetParameterName, checks?: IDSCheck[], + cardinality: IDSSimpleCardinality | IDSConditionalCardinaltiy = this + .cardinality, ) => { const checkLog: IDSCheck = { parameter, @@ -96,8 +98,8 @@ export abstract class IDSFacet { pass = minPass && maxPass; } - if (this.cardinality === "prohibited") pass = !pass; - if (this.cardinality === "optional") pass = true; + if (cardinality === "prohibited") pass = !pass; + if (cardinality === "optional") pass = true; checkLog.pass = pass; return checkLog.pass; diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts index c15b9e210..549f477b5 100644 --- a/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts @@ -107,6 +107,8 @@ export class IDSProperty extends IDSFacet { set.Name.value, this.propertySet, "PropertySet", + undefined, + "required", ); if (!nameMatches) continue; @@ -310,91 +312,130 @@ export class IDSProperty extends IDSFacet { ); if (!checks) continue; - const sets = await this.getPsets(item); - const matchingSets = sets.filter((set) => { - if (!(set.Name && "value" in set.Name)) return false; - const result = this.evalRequirement( - set.Name.value, - this.propertySet, - "PropertySet", - ); - if (!result) return false; - checks.push({ - currentValue: set.Name.value, - parameter: "PropertySet", - pass: true, - requiredValue: this.propertySet, - }); - return true; - }); + // Evaluate the facet itself (as if required), then apply the + // cardinality once: a prohibited property passes when the facet does + // not match, and an optional one passes when the property is absent. + const facetChecks: IDSCheck[] = []; + const present = await this.evalFacet(item, facetChecks); + const matches = + facetChecks.length > 0 && facetChecks.every(({ pass }) => pass); - if (matchingSets.length === 0) { + if (this.cardinality === "prohibited") { + checks.push({ + parameter: "BaseName", + currentValue: present ? this.baseName.parameter : null, + pass: !matches, + requiredValue: this.baseName, + } as IDSCheck); + } else if (this.cardinality === "optional" && !present) { checks.push({ + parameter: "BaseName", currentValue: null, - parameter: "PropertySet", - pass: false, - requiredValue: this.propertySet, - }); - continue; + pass: true, + requiredValue: this.baseName, + } as IDSCheck); + } else { + checks.push(...facetChecks); } + } + } + } - for (const set of matchingSets) { - const propsListName = this.getPropertyListName(set); - if (!propsListName) continue; - - const props = set[propsListName]; - if (!Array.isArray(props)) { - checks.push({ - currentValue: null, - parameter: "BaseName", - pass: false, - requiredValue: this.baseName, - }); - continue; - } + /** + * Checks the property set, name, value and data type of one item, as for a + * required facet, and returns whether a property with the required set and + * name is present at all. + */ + private async evalFacet(item: FRAGS.ItemData, checks: IDSCheck[]) { + const sets = await this.getPsets(item); + const matchingSets = sets.filter((set) => { + if (!(set.Name && "value" in set.Name)) return false; + const result = this.evalRequirement( + set.Name.value, + this.propertySet, + "PropertySet", + undefined, + "required", + ); + if (!result) return false; + checks.push({ + currentValue: set.Name.value, + parameter: "PropertySet", + pass: true, + requiredValue: this.propertySet, + }); + return true; + }); - const matchingProps = props.filter((item) => { - if (!(item._category && item.Name)) return false; - if (!("value" in item._category && "value" in item.Name)) - return false; - if (this._unsupportedTypes.includes(item._category.value)) { - return false; - } - - const result = this.evalRequirement( - item.Name.value, - this.baseName, - "BaseName", - ); - if (!result) return false; + if (matchingSets.length === 0) { + checks.push({ + currentValue: null, + parameter: "PropertySet", + pass: false, + requiredValue: this.propertySet, + }); + return false; + } - checks.push({ - currentValue: item.Name.value, - parameter: "BaseName", - pass: true, - requiredValue: this.baseName, - }); - return true; - }); - - if (matchingProps.length === 0) { - checks.push({ - currentValue: null, - parameter: "BaseName", - pass: false, - requiredValue: this.baseName, - }); - continue; - } + let present = false; + for (const set of matchingSets) { + const propsListName = this.getPropertyListName(set); + if (!propsListName) continue; + + const props = set[propsListName]; + if (!Array.isArray(props)) { + checks.push({ + currentValue: null, + parameter: "BaseName", + pass: false, + requiredValue: this.baseName, + }); + continue; + } - for (const item of matchingProps) { - this.evalValue(item, checks); - this.evalDataType(item, checks); - this.evalURI(); - } + const matchingProps = props.filter((item) => { + if (!(item._category && item.Name)) return false; + if (!("value" in item._category && "value" in item.Name)) return false; + if (this._unsupportedTypes.includes(item._category.value)) { + return false; } + + const result = this.evalRequirement( + item.Name.value, + this.baseName, + "BaseName", + undefined, + "required", + ); + if (!result) return false; + + checks.push({ + currentValue: item.Name.value, + parameter: "BaseName", + pass: true, + requiredValue: this.baseName, + }); + return true; + }); + + if (matchingProps.length === 0) { + checks.push({ + currentValue: null, + parameter: "BaseName", + pass: false, + requiredValue: this.baseName, + }); + continue; + } + + present = true; + for (const item of matchingProps) { + this.evalValue(item, checks); + this.evalDataType(item, checks); + this.evalURI(); } } + return present; } private getPropertyListName(item: FRAGS.ItemData) { @@ -531,7 +572,13 @@ export class IDSProperty extends IDSFacet { if (typeof value === "string" && parameter.type === "simple") { parameter.parameter = String(parameter.parameter); } - return this.evalRequirement(value, parameter, "Value"); + return this.evalRequirement( + value, + parameter, + "Value", + undefined, + "required", + ); }); const pass = match !== undefined; if (checks) { @@ -580,7 +627,7 @@ export class IDSProperty extends IDSFacet { const types = this.getValueAttrs(item).map((attr) => attr.type ?? null); const dataType = { type: "simple" as const, parameter: this.dataType }; const match = types.find((type) => - this.evalRequirement(type, dataType, "DataType"), + this.evalRequirement(type, dataType, "DataType", undefined, "required"), ); const pass = match !== undefined; if (checks) { diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts new file mode 100644 index 000000000..174a9f1d8 --- /dev/null +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts @@ -0,0 +1,92 @@ +import * as FRAGS from "@thatopen/fragments"; +import * as fs from "fs"; +import * as path from "path"; +import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; +import type { Components } from "../../../../index"; +import { loadSourceBundle } from "../../../../../tests/source-bundle"; + +// Needs the real `Components`: see `loadSourceBundle`. +const OBC = await loadSourceBundle(); + +const MODEL_ID = "type-psets"; + +// `tests/fixtures/type-psets.ifc` (see property.test.ts): IsExternal is TRUE +// on walls 40, 41, 42 and 46, FALSE on 45, and absent on 43. +const WALLS = [40, 41, 42, 43, 45, 46]; + +const convert = async () => { + const importer = new FRAGS.IfcImporter(); + const root = path.resolve(__dirname, "../../../../.."); + importer.wasm = { + path: `${path.resolve(root, "../../node_modules/web-ifc")}/`, + absolute: true, + }; + const ifc = fs.readFileSync( + path.join(root, "tests", "fixtures", "type-psets.ifc"), + ); + const bytes = await importer.process({ + bytes: new Uint8Array(ifc), + raw: true, + }); + return new FRAGS.SingleThreadedFragmentsModel(MODEL_ID, bytes, true); +}; + +describe("IDSProperty cardinality as a requirement", () => { + let components: Components; + let model: FRAGS.SingleThreadedFragmentsModel; + + beforeAll(async () => { + model = await convert(); + components = new OBC.Components(); + const fragments = components.get(OBC.FragmentsManager); + vi.spyOn(fragments, "list", "get").mockReturnValue( + new Map([[MODEL_ID, model]]) as never, + ); + }, 60_000); + + afterAll(() => { + vi.restoreAllMocks(); + components?.dispose(); + model?.dispose(); + }); + + const passing = async ( + cardinality: "required" | "optional" | "prohibited", + value?: boolean, + ) => { + const facet = new OBC.IDSProperty( + components, + { type: "simple", parameter: "Pset_WallCommon" }, + { type: "simple", parameter: "IsExternal" }, + ); + if (value !== undefined) facet.value = { type: "simple", parameter: value }; + facet.cardinality = cardinality; + const results = new FRAGS.DataMap< + string, + FRAGS.DataMap + >(); + await facet.test({ [MODEL_ID]: new Set(WALLS) }, results as never, { + skipIfFails: false, + }); + return [...results.get(MODEL_ID)!.entries()] + .filter(([, result]) => result.pass) + .map(([id]) => id) + .sort((a, b) => a - b); + }; + + it("required: passes only where the property has the value", async () => { + expect(await passing("required", true)).toEqual([40, 41, 42, 46]); + }); + + it("prohibited without a value: passes only where the property is absent", async () => { + expect(await passing("prohibited")).toEqual([43]); + }); + + it("prohibited with a value: passes where the property is absent or different", async () => { + expect(await passing("prohibited", true)).toEqual([43, 45]); + }); + + it("optional: passes where the property is absent or has the value", async () => { + expect(await passing("optional", true)).toEqual([40, 41, 42, 43, 46]); + }); +}); From c9f0a572f833dcfc0b1de8e4e5deb036371b86ca Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Sat, 7 Nov 2026 13:04:48 +1030 Subject: [PATCH 2/3] fix(ids): an optional property requirement never fails --- .../openbim/IDSSpecifications/src/facets/Property.ts | 10 ++++++---- .../src/facets/property-cardinality.test.ts | 11 +++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts index 549f477b5..ea67320ce 100644 --- a/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/Property.ts @@ -313,8 +313,10 @@ export class IDSProperty extends IDSFacet { if (!checks) continue; // Evaluate the facet itself (as if required), then apply the - // cardinality once: a prohibited property passes when the facet does - // not match, and an optional one passes when the property is absent. + // cardinality once. Prohibited: passes when the facet does not match. + // Optional: never fails ("If the requirement is optional but would fail + // if it were required instead, the checker tool must not log an + // error", IDS developer guide). const facetChecks: IDSCheck[] = []; const present = await this.evalFacet(item, facetChecks); const matches = @@ -327,10 +329,10 @@ export class IDSProperty extends IDSFacet { pass: !matches, requiredValue: this.baseName, } as IDSCheck); - } else if (this.cardinality === "optional" && !present) { + } else if (this.cardinality === "optional") { checks.push({ parameter: "BaseName", - currentValue: null, + currentValue: present ? this.baseName.parameter : null, pass: true, requiredValue: this.baseName, } as IDSCheck); diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts index 174a9f1d8..75016fa06 100644 --- a/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/property-cardinality.test.ts @@ -82,11 +82,10 @@ describe("IDSProperty cardinality as a requirement", () => { expect(await passing("prohibited")).toEqual([43]); }); - it("prohibited with a value: passes where the property is absent or different", async () => { - expect(await passing("prohibited", true)).toEqual([43, 45]); - }); - - it("optional: passes where the property is absent or has the value", async () => { - expect(await passing("optional", true)).toEqual([40, 41, 42, 43, 46]); + it("optional: never fails, whether the property is absent, matches or differs", async () => { + // buildingSMART IDS test cases "an optional facet always passes regardless + // of outcome", and the developer guide: an optional requirement that would + // fail if required must not be logged as an error. + expect(await passing("optional", true)).toEqual(WALLS); }); }); From 74cdc2c53b0d79b4af623bd2e504acb18902e714 Mon Sep 17 00:00:00 2001 From: Riho Kirss Date: Sat, 7 Nov 2026 20:49:48 +0200 Subject: [PATCH 3/3] fix(ids): implement attribute selection and value presence checks --- .../IDSSpecifications/src/facets/Attribute.ts | 197 +++++++----------- .../src/facets/attribute.test.ts | 116 +++++++++++ .../core/tests/fixtures/ids-attribute/LICENSE | 6 + .../tests/fixtures/ids-attribute/README.md | 5 + ...turns_the_opposite_of_a_required_facet.ids | 25 +++ ...turns_the_opposite_of_a_required_facet.ifc | 10 + ...l-an_optional_attribute_fails_if_empty.ids | 28 +++ ...l-an_optional_attribute_fails_if_empty.ifc | 10 + ...es_are_not_inherited_by_the_occurrence.ids | 28 +++ ...es_are_not_inherited_by_the_occurrence.ifc | 12 ++ ...uld_check_strings_case_sensitively_2_2.ids | 28 +++ ...uld_check_strings_case_sensitively_2_2.ifc | 10 + ...tes_with_a_logical_unknown_always_fail.ids | 25 +++ ...tes_with_a_logical_unknown_always_fail.ifc | 11 + ...ributes_with_an_empty_list_always_fail.ids | 25 +++ ...ributes_with_an_empty_list_always_fail.ifc | 12 ++ ...tributes_with_an_empty_set_always_fail.ids | 25 +++ ...tributes_with_an_empty_set_always_fail.ifc | 11 + ...ributes_with_empty_strings_always_fail.ids | 25 +++ ...ributes_with_empty_strings_always_fail.ifc | 10 + ...ttributes_with_null_values_always_fail.ids | 25 +++ ...ttributes_with_null_values_always_fail.ifc | 10 + ..._be_specified_as_lowercase_strings_1_3.ids | 28 +++ ..._be_specified_as_lowercase_strings_1_3.ifc | 10 + .../fail-dates_are_treated_as_strings_1_2.ids | 28 +++ .../fail-dates_are_treated_as_strings_1_2.ifc | 10 + ...l-durations_are_treated_as_strings_2_2.ids | 28 +++ ...l-durations_are_treated_as_strings_2_2.ifc | 10 + ...ing_truncation_such_as_for_identifiers.ids | 28 +++ ...ing_truncation_such_as_for_identifiers.ifc | 10 + ...ues_are_checked_using_type_casting_4_4.ids | 28 +++ ...ues_are_checked_using_type_casting_4_4.ifc | 10 + ...ail-value_restrictions_may_be_used_3_3.ids | 31 +++ ...ail-value_restrictions_may_be_used_3_3.ifc | 10 + ..._facet_checks_all_parameters_as_normal.ids | 25 +++ ..._facet_checks_all_parameters_as_normal.ifc | 10 + ...s-an_optional_attribute_passes_if_null.ids | 28 +++ ...s-an_optional_attribute_passes_if_null.ifc | 10 + ...optional_attribute_passes_if_specified.ids | 28 +++ ...optional_attribute_passes_if_specified.ifc | 10 + ...utes_referencing_an_object_should_pass.ids | 25 +++ ...utes_referencing_an_object_should_pass.ifc | 11 + ...uld_check_strings_case_sensitively_1_2.ids | 28 +++ ...uld_check_strings_case_sensitively_1_2.ifc | 10 + ...butes_with_a_boolean_false_should_pass.ids | 25 +++ ...butes_with_a_boolean_false_should_pass.ifc | 10 + ...ibutes_with_a_boolean_true_should_pass.ids | 25 +++ ...ibutes_with_a_boolean_true_should_pass.ifc | 10 + ...ct_referencing_a_primitive_should_pass.ids | 25 +++ ...ct_referencing_a_primitive_should_pass.ifc | 11 + ...lect_referencing_an_object_should_pass.ids | 25 +++ ...lect_referencing_an_object_should_pass.ifc | 12 ++ ...ibutes_with_a_string_value_should_pass.ids | 25 +++ ...ibutes_with_a_string_value_should_pass.ifc | 10 + ...butes_with_a_zero_duration_should_pass.ids | 25 +++ ...butes_with_a_zero_duration_should_pass.ifc | 10 + ...ro_number_have_meaning_and_should_pass.ids | 25 +++ ...ro_number_have_meaning_and_should_pass.ifc | 10 + ..._be_specified_as_lowercase_strings_3_3.ids | 28 +++ ..._be_specified_as_lowercase_strings_3_3.ifc | 10 + .../pass-dates_are_treated_as_strings_2_2.ids | 28 +++ .../pass-dates_are_treated_as_strings_2_2.ifc | 10 + ...s-durations_are_treated_as_strings_1_2.ids | 28 +++ ...s-durations_are_treated_as_strings_1_2.ifc | 10 + ...re_treated_as_strings_and_not_expanded.ids | 28 +++ ...re_treated_as_strings_and_not_expanded.ifc | 10 + ...egers_follow_the_same_rules_as_numbers.ids | 28 +++ ...egers_follow_the_same_rules_as_numbers.ifc | 10 + ...restrictions_will_match_any_result_1_3.ids | 27 +++ ...restrictions_will_match_any_result_1_3.ifc | 11 + ...restrictions_will_match_any_result_2_3.ids | 28 +++ ...restrictions_will_match_any_result_2_3.ifc | 10 + ...restrictions_will_match_any_result_3_3.ids | 28 +++ ...restrictions_will_match_any_result_3_3.ifc | 10 + ...haracters_are_treated_without_encoding.ids | 28 +++ ...haracters_are_treated_without_encoding.ifc | 10 + ...ues_are_checked_using_type_casting_1_4.ids | 28 +++ ...ues_are_checked_using_type_casting_1_4.ifc | 10 + ...ues_are_checked_using_type_casting_2_4.ids | 28 +++ ...ues_are_checked_using_type_casting_2_4.ifc | 10 + ...ues_are_checked_using_type_casting_3_4.ids | 28 +++ ...ues_are_checked_using_type_casting_3_4.ifc | 10 + ...ally_formatted_numbers_are_allowed_3_4.ids | 28 +++ ...ally_formatted_numbers_are_allowed_3_4.ifc | 10 + ...ally_formatted_numbers_are_allowed_4_4.ids | 28 +++ ...ally_formatted_numbers_are_allowed_4_4.ifc | 10 + ..._may_be_done_with_a_bounds_restriction.ids | 31 +++ ..._may_be_done_with_a_bounds_restriction.ifc | 10 + ..._occur_within_enumeration_restrictions.ids | 31 +++ ..._occur_within_enumeration_restrictions.ifc | 10 + ...ass-value_restrictions_may_be_used_1_3.ids | 31 +++ ...ass-value_restrictions_may_be_used_1_3.ifc | 10 + ...ass-value_restrictions_may_be_used_2_3.ids | 31 +++ ...ass-value_restrictions_may_be_used_2_3.ifc | 10 + 94 files changed, 1890 insertions(+), 124 deletions(-) create mode 100644 packages/core/src/openbim/IDSSpecifications/src/facets/attribute.test.ts create mode 100644 packages/core/tests/fixtures/ids-attribute/LICENSE create mode 100644 packages/core/tests/fixtures/ids-attribute/README.md create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-a_prohibited_facet_returns_the_opposite_of_a_required_facet.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-a_prohibited_facet_returns_the_opposite_of_a_required_facet.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ifc create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ids create mode 100644 packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ifc diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/Attribute.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/Attribute.ts index 841753f38..b6c5e26ea 100644 --- a/packages/core/src/openbim/IDSSpecifications/src/facets/Attribute.ts +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/Attribute.ts @@ -1,3 +1,4 @@ +import { DataMap } from "@thatopen/fragments"; import { IDSFacetParameter, IDSItemCheckResult } from "../types"; import { Components } from "../../../../core/Components"; import { IDSFacet } from "./Facet"; @@ -37,43 +38,24 @@ export class IDSAttribute extends IDSFacet { `; } - // This can be very ineficcient as we do not have an easy way to get an entity based on an attribute - // Right now, all entities must be iterated. - // When the new IfcEntitiesFinder comes, this can become easier. - // This may be greatly increase in performance if the applicability has any of the other facets and this is applied the latest - async getEntities() {} - // async getEntities( - // model: FRAGS.FragmentsGroup, - // collector: FRAGS.IfcProperties = {}, - // ) { - // return []; - // // for (const expressID in model) { - // // if (collector[expressID]) continue; - // // const entity = model[expressID]; - // // // Check if the attribute exists - // // const attribute = entity[this.name]; - // // const attributeExists = !!attribute; - // // // Check if the attribute value matches - // // let valueMatches = true; - // // if (attributeExists && this.value && this.value.value) { - // // if (this.value.type === "simpleValue") { - // // valueMatches = attribute.value === this.value.value; - // // } - // // if (this.value.type === "restriction") { - // // const regex = new RegExp(this.value.value); - // // valueMatches = regex.test(attribute.value); - // // } - // // } - // // if (attributeExists && valueMatches) { - // // collector[entity.expressID] = entity; - // // } - // // } - // } + async getEntities(modelIds: RegExp[], collector: ModelIdMap) { + const fragments = this._components.get(FragmentsManager); + for (const [modelId, model] of fragments.list) { + if (!modelIds.some((pattern) => pattern.test(modelId))) continue; + const ids = Object.values( + await model.getItemsOfCategories([/.*/]), + ).flat(); + const results: ModelIdDataMap = new DataMap(); + await this.test({ [modelId]: new Set(ids) }, results, { + skipIfFails: false, + }); + const selected = collector[modelId] ?? new Set(); + for (const [id, result] of results.get(modelId) ?? []) + if (result.pass) selected.add(id); + if (selected.size) collector[modelId] = selected; + } + } - // https://github.com/buildingSMART/IDS/tree/development/Documentation/ImplementersDocumentation/TestCases/attribute - // Test cases from buildingSMART repo have been tested and they all match with the expected result - // All invalid cases have been treated as failures - // FragmentsGroup do not hold some of the entities used in the tests async test( items: ModelIdMap, collector: ModelIdDataMap, @@ -83,7 +65,10 @@ export class IDSAttribute extends IDSFacet { for (const [modelId, localIds] of Object.entries(items)) { const model = fragments.list.get(modelId); if (!model) continue; - const data = await model.getItemsData([...localIds]); + const data = await model.getItemsData([...localIds], { + attributesDefault: true, + relationsDefault: { attributes: true, relations: false }, + }); for (const item of data) { const checks = this.getItemChecks( collector, @@ -93,99 +78,63 @@ export class IDSAttribute extends IDSFacet { ); if (!checks) continue; - const attrNames = Object.keys(item); - const matchingAttributes = attrNames.filter((name) => { - const nameMatches = this.evalRequirement(name, this.name, "Name"); - if (!nameMatches) return false; - - const attribute = item[name]; - if (Array.isArray(attribute)) return true; - - // IDSDocs: Attributes with null values always fail - if (attribute === null || attribute.value === null) { - if ( - this.cardinality === "optional" || - this.cardinality === "prohibited" - ) { - return true; + // GlobalId is retained by Fragments as _guid. Internal metadata is not + // an IFC attribute and must never satisfy a name restriction. + const attributes = { ...item, GlobalId: item._guid }; + const names = Object.keys(attributes).filter( + (name) => + !name.startsWith("_") && + this.evalRequirement( + name, + this.name, + "Name", + undefined, + "required", + ), + ); + let present = false; + let matches = false; + let actual: string | number | boolean | null = null; + for (const name of names) { + const attribute = attributes[name as keyof typeof attributes]; + if (attribute == null) continue; + if (Array.isArray(attribute)) { + if (attribute.length) { + present = true; + if (!this.value) matches = true; } - return false; + continue; } - - // IDSDocs: Attributes with a logical unknown always fail - // TODO: Can this be replicated with Fragments 2.0? - // if (nameMatches && attribute?.type === 3 && attribute.value === 2) { - // return false; - // } - - // IDSDocs: Attributes with an empty list always fail - // TODO: How to know for sure if the attribute value is an array - if (Array.isArray(attribute.value) && attribute.value.length === 0) { - return false; + const value = attribute.value; + if (value === null || value === undefined) continue; + present = true; + if (typeof value === "string" && !value.trim()) continue; + if (Array.isArray(value)) { + if (value.length && !this.value) matches = true; + continue; } - - // IDSDocs: Attributes with empty strings always fail + actual = value; if ( - typeof attribute.value === "string" && - attribute.value.trim() === "" - ) { - return false; - } - - return nameMatches; - }); - - const attributeMatches = matchingAttributes.length > 0; - + !this.value || + this.evalRequirement( + value, + this.value, + "Value", + undefined, + "required", + ) + ) + matches = true; + } + let pass = matches; + if (this.cardinality === "prohibited") pass = !matches; + if (this.cardinality === "optional" && !present) pass = true; checks.push({ - parameter: "Name", - currentValue: attributeMatches ? matchingAttributes[0] : null, - requiredValue: this.name, - pass: - this.cardinality === "prohibited" - ? !attributeMatches - : attributeMatches, + parameter: this.value ? "Value" : "Name", + currentValue: actual, + requiredValue: this.value ?? this.name, + pass, }); - - // Check if the attribute value matches - if (this.value) { - if (matchingAttributes[0]) { - const attribute = item[matchingAttributes[0]]; - if (Array.isArray(attribute)) { - checks.push({ - parameter: "Value", - currentValue: null, - requiredValue: this.value, - pass: this.cardinality === "prohibited", - }); - } else { - // IDSDocs: Value checks always fail for objects - const isRef = Array.isArray(attribute.value); - if (isRef) { - checks.push({ - parameter: "Value", - currentValue: null, - requiredValue: this.value, - pass: this.cardinality === "prohibited", - }); - } else { - this.evalRequirement( - attribute.value, - this.value, - "Value", - checks, - ); - } - } - } else { - checks.push({ - parameter: "Value", - currentValue: null, - requiredValue: this.value, - pass: this.cardinality === "prohibited", - }); - } - } } } } diff --git a/packages/core/src/openbim/IDSSpecifications/src/facets/attribute.test.ts b/packages/core/src/openbim/IDSSpecifications/src/facets/attribute.test.ts new file mode 100644 index 000000000..24f96ad2e --- /dev/null +++ b/packages/core/src/openbim/IDSSpecifications/src/facets/attribute.test.ts @@ -0,0 +1,116 @@ +import * as FRAGS from "@thatopen/fragments"; +import * as WEBIFC from "web-ifc"; +import * as fs from "fs"; +import * as path from "path"; +import { describe, expect, it, vi } from "vitest"; +import { loadSourceBundle } from "../../../../../tests/source-bundle"; + +const OBC = await loadSourceBundle(); +const root = path.resolve(__dirname, "../../../../.."); +const fixtures = path.join(root, "tests/fixtures/ids-attribute"); +const files = fs + .readdirSync(fixtures) + .filter((name) => /^(pass|fail)-.*\.ids$/.test(name)); +describe("IDSAttribute buildingSMART conformance", () => { + it.each(files)( + "%s", + async (name) => { + const importer = new FRAGS.IfcImporter(); + importer.wasm = { + path: `${path.resolve(root, "../../node_modules/web-ifc")}/`, + absolute: true, + }; + importer.includeRelationNames = true; + importer.relations.set(WEBIFC.IFCRELASSOCIATESCLASSIFICATION, { + forRelated: "HasAssociations", + forRelating: "ClassificationForObjects", + }); + importer.relations.set(WEBIFC.IFCRELDEFINESBYTYPE, { + forRelated: "IsTypedBy", + forRelating: "Types", + }); + const ifc = fs.readFileSync( + path.join(fixtures, name.replace(/\.ids$/, ".ifc")), + "utf8", + ); + for (const [, category] of ifc.matchAll( + /#\d+\s*=\s*(IFC[A-Z0-9_]+)\s*\(/g, + )) { + const code = WEBIFC[category as keyof typeof WEBIFC]; + if (typeof code === "number") importer.classes.abstract.add(code); + } + for (const [code, child, parent] of [ + [ + WEBIFC.IFCRELASSOCIATESCLASSIFICATION, + "HasAssociations", + "ClassificationForObjects", + ], + ] as const) + importer.relations.set(code, { + forRelated: child, + forRelating: parent, + }); + const bytes = await importer.process({ + bytes: new TextEncoder().encode(ifc), + raw: true, + }); + const model = new FRAGS.SingleThreadedFragmentsModel( + "attribute", + bytes, + true, + ); + const components = new OBC.Components(); + const spy = vi + .spyOn(components.get(OBC.FragmentsManager), "list", "get") + .mockReturnValue(new Map([["attribute", model]]) as never); + try { + const manager = components.get(OBC.IDSSpecifications); + const specs = manager.load( + fs.readFileSync(path.join(fixtures, name), "utf8"), + ); + let pass = true; + for (const spec of specs) { + const results = await spec.test([/^attribute$/], { + skipIfFails: false, + }); + for (const items of results.values()) + for (const item of items.values()) if (!item.pass) pass = false; + } + expect(pass).toBe(name.startsWith("pass-")); + for (const spec of specs) + for (const facet of spec.requirements) { + if (facet.facetType !== "Attribute") continue; + const previous = facet.cardinality; + facet.cardinality = "required"; + const all = Object.values( + await model.getItemsOfCategories([/.*/]), + ).flat(); + const direct = new FRAGS.DataMap< + string, + FRAGS.DataMap + >(); + await facet.test({ attribute: new Set(all) }, direct, { + skipIfFails: false, + }); + const selected: Record> = {}; + await facet.getEntities([/^attribute$/], selected); + const expected = [...(direct.get("attribute") ?? [])] + .filter(([, result]) => result.pass) + .map(([id]) => id); + expect([...(selected.attribute ?? [])].sort()).toEqual( + expected.sort(), + ); + facet.cardinality = previous; + } + const xml = manager.export({ title: "Attribute" }, specs); + expect(xml).toContain(" + + + A prohibited facet returns the opposite of a required facet + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-a_prohibited_facet_returns_the_opposite_of_a_required_facet.ifc b/packages/core/tests/fixtures/ids-attribute/fail-a_prohibited_facet_returns_the_opposite_of_a_required_facet.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-a_prohibited_facet_returns_the_opposite_of_a_required_facet.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ids b/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ids new file mode 100644 index 000000000..ce440a09f --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ids @@ -0,0 +1,28 @@ + + + + An optional attribute fails if empty + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ifc b/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ifc new file mode 100644 index 000000000..0728b69df --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-an_optional_attribute_fails_if_empty.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ids new file mode 100644 index 000000000..61fc78f86 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ids @@ -0,0 +1,28 @@ + + + + Attributes are not inherited by the occurrence + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Description + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ifc new file mode 100644 index 000000000..c6b35ba79 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_are_not_inherited_by_the_occurrence.ifc @@ -0,0 +1,12 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$); +#2=IFCWALLTYPE('0eA6m4fELI9QBIhP3wiLAp',$,$,'Foobar',$,$,$,$,$,.ELEMENTEDWALL.); +#3=IFCRELDEFINESBYTYPE('05rScmOVzMoQXOfbYdtLYj',$,$,$,(#1),#2); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ids new file mode 100644 index 000000000..6bc262b49 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ids @@ -0,0 +1,28 @@ + + + + Attributes should check strings case sensitively 2/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ifc new file mode 100644 index 000000000..e3b95890d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_should_check_strings_case_sensitively_2_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ids new file mode 100644 index 000000000..a12fcce66 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ids @@ -0,0 +1,25 @@ + + + + Attributes with a logical unknown always fail + Generated via code automation in the Ids Repository on github. + + + + + + + IFCPRESENTATIONLAYERWITHSTYLE + + + + + + + LayerOn + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ifc new file mode 100644 index 000000000..8a4f0546f --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_a_logical_unknown_always_fail.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCARTESIANPOINT((0.,0.,0.)); +#2=IFCPRESENTATIONLAYERWITHSTYLE('Foo',$,(#1),$,.U.,.F.,.F.,()); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ids new file mode 100644 index 000000000..26a38c29f --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ids @@ -0,0 +1,25 @@ + + + + Attributes with an empty list always fail + Generated via code automation in the Ids Repository on github. + + + + + + + IFCRELCONNECTSPATHELEMENTS + + + + + + + RelatingPriorities + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ifc new file mode 100644 index 000000000..382eb8c7b --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_list_always_fail.ifc @@ -0,0 +1,12 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$); +#2=IFCWALL('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$); +#3=IFCRELCONNECTSPATHELEMENTS('05rScmOVzMoQXOfbYdtLYj',$,$,$,$,#1,#2,(),(),.ATSTART.,.ATEND.); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ids new file mode 100644 index 000000000..b19760816 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ids @@ -0,0 +1,25 @@ + + + + Attributes with an empty set always fail + Generated via code automation in the Ids Repository on github. + + + + + + + IFCPRESENTATIONLAYERWITHSTYLE + + + + + + + LayerStyles + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ifc new file mode 100644 index 000000000..962b41d3c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_an_empty_set_always_fail.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCARTESIANPOINT((0.,0.,0.)); +#2=IFCPRESENTATIONLAYERWITHSTYLE('Foo',$,(#1),$,.T.,.F.,.F.,()); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ids new file mode 100644 index 000000000..550f13af0 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ids @@ -0,0 +1,25 @@ + + + + Attributes with empty strings always fail + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ifc new file mode 100644 index 000000000..0728b69df --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_empty_strings_always_fail.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ids b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ids new file mode 100644 index 000000000..3dbcab854 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ids @@ -0,0 +1,25 @@ + + + + Attributes with null values always fail + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ifc b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ifc new file mode 100644 index 000000000..e48556c4a --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-attributes_with_null_values_always_fail.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids b/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids new file mode 100644 index 000000000..b51025623 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ids @@ -0,0 +1,28 @@ + + + + Booleans must be specified as lowercase strings 1/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASK + + + + + + + IsMilestone + + + true + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ifc b/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ifc new file mode 100644 index 000000000..339324b8c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-booleans_must_be_specified_as_lowercase_strings_1_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASK('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$,.F.,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ids b/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ids new file mode 100644 index 000000000..ae7531acb --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ids @@ -0,0 +1,28 @@ + + + + Dates are treated as strings 1/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCCLASSIFICATION + + + + + + + EditionDate + + + 2022-01-01 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ifc b/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ifc new file mode 100644 index 000000000..c7ca921f2 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-dates_are_treated_as_strings_1_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCLASSIFICATION($,$,'2022-01-01+00:00','Name',$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ids b/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ids new file mode 100644 index 000000000..75c24be18 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ids @@ -0,0 +1,28 @@ + + + + Durations are treated as strings 2/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASKTIME + + + + + + + ScheduleDuration + + + PT16H + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ifc b/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ifc new file mode 100644 index 000000000..2d6dbb80d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-durations_are_treated_as_strings_2_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME('Name',$,$,$,'P2D',$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ids b/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ids new file mode 100644 index 000000000..dfb62f6ef --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ids @@ -0,0 +1,28 @@ + + + + IDS does not handle string truncation such as for identifiers + Generated via code automation in the Ids Repository on github. + + + + + + + IFCPERSON + + + + + + + Identification + + + 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345_extra_characters + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ifc b/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ifc new file mode 100644 index 000000000..2cc5608ee --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-ids_does_not_handle_string_truncation_such_as_for_identifiers.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCPERSON('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345',$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ids b/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ids new file mode 100644 index 000000000..a2b9015bb --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ids @@ -0,0 +1,28 @@ + + + + Numeric values are checked using type casting 4/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 42 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ifc b/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ifc new file mode 100644 index 000000000..0a2765056 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-numeric_values_are_checked_using_type_casting_4_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.3,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ids b/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ids new file mode 100644 index 000000000..22b33accf --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ids @@ -0,0 +1,31 @@ + + + + Value restrictions may be used 3/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ifc b/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/fail-value_restrictions_may_be_used_3_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ids b/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ids new file mode 100644 index 000000000..3bd09616c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ids @@ -0,0 +1,25 @@ + + + + A required facet checks all parameters as normal + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ifc b/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-a_required_facet_checks_all_parameters_as_normal.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ids b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ids new file mode 100644 index 000000000..aa31632fc --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ids @@ -0,0 +1,28 @@ + + + + An optional attribute passes if null + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ifc b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ifc new file mode 100644 index 000000000..e48556c4a --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_null.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ids b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ids new file mode 100644 index 000000000..4c523c5d6 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ids @@ -0,0 +1,28 @@ + + + + An optional attribute passes if specified + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ifc b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-an_optional_attribute_passes_if_specified.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ids new file mode 100644 index 000000000..946f1f98d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes referencing an object should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASK + + + + + + + TaskTime + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ifc new file mode 100644 index 000000000..e9ba40b1b --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_referencing_an_object_should_pass.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); +#2=IFCTASK('0eA6m4fELI9QBIhP3wiLAp',$,$,$,$,$,$,$,$,.T.,$,#1,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ids new file mode 100644 index 000000000..3c2594c18 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ids @@ -0,0 +1,28 @@ + + + + Attributes should check strings case sensitively 1/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + Foobar + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_should_check_strings_case_sensitively_1_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ids new file mode 100644 index 000000000..5b518ad09 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a boolean false should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASKTIME + + + + + + + IsCritical + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ifc new file mode 100644 index 000000000..658d65817 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_false_should_pass.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,.F.,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ids new file mode 100644 index 000000000..00374b6f3 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a boolean true should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASKTIME + + + + + + + IsCritical + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ifc new file mode 100644 index 000000000..f9baefc72 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_boolean_true_should_pass.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME($,$,$,$,$,$,$,$,$,$,$,$,$,.T.,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ids new file mode 100644 index 000000000..afecd39b1 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a select referencing a primitive should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLERENDERING + + + + + + + DiffuseColour + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ifc new file mode 100644 index 000000000..a5230bc6c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_a_primitive_should_pass.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCOLOURRGB($,1.,1.,1.); +#2=IFCSURFACESTYLERENDERING(#1,$,IFCNORMALISEDRATIOMEASURE(0.5),$,$,$,$,$,.FLAT.); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ids new file mode 100644 index 000000000..072cf894b --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a select referencing an object should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLERENDERING + + + + + + + DiffuseColour + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ifc new file mode 100644 index 000000000..2d680cc61 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_select_referencing_an_object_should_pass.ifc @@ -0,0 +1,12 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCOLOURRGB($,1.,1.,1.); +#2=IFCCOLOURRGB($,1.,1.,1.); +#3=IFCSURFACESTYLERENDERING(#1,$,#2,$,$,$,$,$,.FLAT.); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ids new file mode 100644 index 000000000..d307ec3bc --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a string value should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ifc new file mode 100644 index 000000000..9caac7d9d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_string_value_should_pass.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foobar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ids new file mode 100644 index 000000000..7e5a25124 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a zero duration should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASKTIME + + + + + + + ScheduleDuration + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ifc new file mode 100644 index 000000000..5c172a611 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_duration_should_pass.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME($,$,$,$,'P0D',$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ids b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ids new file mode 100644 index 000000000..e8adb4ce8 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ids @@ -0,0 +1,25 @@ + + + + Attributes with a zero number have meaning and should pass + Generated via code automation in the Ids Repository on github. + + + + + + + IFCQUANTITYCOUNT + + + + + + + CountValue + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ifc b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ifc new file mode 100644 index 000000000..22784d97c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-attributes_with_a_zero_number_have_meaning_and_should_pass.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCQUANTITYCOUNT('Foobar',$,$,0.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ids new file mode 100644 index 000000000..06b4f9f68 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ids @@ -0,0 +1,28 @@ + + + + Booleans must be specified as lowercase strings 3/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASK + + + + + + + IsMilestone + + + false + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ifc new file mode 100644 index 000000000..339324b8c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-booleans_must_be_specified_as_lowercase_strings_3_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASK('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$,.F.,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ids b/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ids new file mode 100644 index 000000000..7a5100810 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ids @@ -0,0 +1,28 @@ + + + + Dates are treated as strings 2/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCCLASSIFICATION + + + + + + + EditionDate + + + 2022-01-01 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ifc b/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ifc new file mode 100644 index 000000000..c71903155 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-dates_are_treated_as_strings_2_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCCLASSIFICATION($,$,'2022-01-01','Name',$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ids b/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ids new file mode 100644 index 000000000..932efe893 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ids @@ -0,0 +1,28 @@ + + + + Durations are treated as strings 1/2 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCTASKTIME + + + + + + + ScheduleDuration + + + PT16H + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ifc b/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ifc new file mode 100644 index 000000000..1f88bace2 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-durations_are_treated_as_strings_1_2.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCTASKTIME('Name',$,$,$,'PT16H',$,$,$,$,$,$,$,$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ids b/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ids new file mode 100644 index 000000000..5413125fb --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ids @@ -0,0 +1,28 @@ + + + + GlobalIds are treated as strings and not expanded + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + GlobalId + + + 1hqIFTRjfV6AWq_bMtnZwI + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ifc b/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ifc new file mode 100644 index 000000000..144ed1917 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-globalids_are_treated_as_strings_and_not_expanded.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-08T10:47:56',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ids b/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ids new file mode 100644 index 000000000..7cf294282 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ids @@ -0,0 +1,28 @@ + + + + Integers follow the same rules as numbers + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSTAIRFLIGHT + + + + + + + NumberOfRisers + + + 42 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ifc b/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ifc new file mode 100644 index 000000000..782e20be8 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-integers_follow_the_same_rules_as_numbers.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSTAIRFLIGHT('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,42,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ids new file mode 100644 index 000000000..3aad45ee9 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ids @@ -0,0 +1,27 @@ + + + + Name restrictions will match any result 1/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCMATERIALLAYERSET + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ifc new file mode 100644 index 000000000..0cc9e7173 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_1_3.ifc @@ -0,0 +1,11 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCMATERIALLAYER($,1.,$,$,$,$,$); +#2=IFCMATERIALLAYERSET((#1),'Foo',$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ids new file mode 100644 index 000000000..5c960b0d3 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ids @@ -0,0 +1,28 @@ + + + + Name restrictions will match any result 2/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ifc new file mode 100644 index 000000000..2c072dfd8 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_2_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foo',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ids new file mode 100644 index 000000000..1537683ab --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ids @@ -0,0 +1,28 @@ + + + + Name restrictions will match any result 3/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ifc new file mode 100644 index 000000000..fbee36fa0 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-name_restrictions_will_match_any_result_3_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,'Bar',$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ids b/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ids new file mode 100644 index 000000000..856d4713f --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ids @@ -0,0 +1,28 @@ + + + + Non-ascii characters are treated without encoding + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + ♫Don'tÄrgerhôtelЊет + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ifc b/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ifc new file mode 100644 index 000000000..04a3291ba --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-non_ascii_characters_are_treated_without_encoding.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'\X2\266B\X0\Don''t\X2\00C4\X0\rgerh\X2\00F4\X0\tel\X2\040A04350442\X0\',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ids b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ids new file mode 100644 index 000000000..3bd2b7b36 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ids @@ -0,0 +1,28 @@ + + + + Numeric values are checked using type casting 1/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 42 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ifc b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ifc new file mode 100644 index 000000000..88fb3856e --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_1_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ids b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ids new file mode 100644 index 000000000..ff82e5e73 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ids @@ -0,0 +1,28 @@ + + + + Numeric values are checked using type casting 2/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 42. + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ifc b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ifc new file mode 100644 index 000000000..88fb3856e --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_2_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ids b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ids new file mode 100644 index 000000000..35bd2923d --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ids @@ -0,0 +1,28 @@ + + + + Numeric values are checked using type casting 3/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 42.0 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ifc b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ifc new file mode 100644 index 000000000..88fb3856e --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-numeric_values_are_checked_using_type_casting_3_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ids b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ids new file mode 100644 index 000000000..63a36e498 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ids @@ -0,0 +1,28 @@ + + + + Only specifically formatted numbers are allowed 3/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 1.2345e3 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ifc b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ifc new file mode 100644 index 000000000..278056f29 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_3_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(1234.5,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ids b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ids new file mode 100644 index 000000000..f751ca1d5 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ids @@ -0,0 +1,28 @@ + + + + Only specifically formatted numbers are allowed 4/4 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + 1.2345E3 + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ifc b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ifc new file mode 100644 index 000000000..278056f29 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-only_specifically_formatted_numbers_are_allowed_4_4.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(1234.5,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ids b/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ids new file mode 100644 index 000000000..bff993449 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ids @@ -0,0 +1,31 @@ + + + + Strict numeric checking may be done with a bounds restriction + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ifc b/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ifc new file mode 100644 index 000000000..88fb3856e --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-strict_numeric_checking_may_be_done_with_a_bounds_restriction.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ids b/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ids new file mode 100644 index 000000000..1b3776cc1 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ids @@ -0,0 +1,31 @@ + + + + Typecast checking may also occur within enumeration restrictions + Generated via code automation in the Ids Repository on github. + + + + + + + IFCSURFACESTYLEREFRACTION + + + + + + + RefractionIndex + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ifc b/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ifc new file mode 100644 index 000000000..88fb3856e --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-typecast_checking_may_also_occur_within_enumeration_restrictions.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCSURFACESTYLEREFRACTION(42.,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ids new file mode 100644 index 000000000..9ac7bcf5c --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ids @@ -0,0 +1,31 @@ + + + + Value restrictions may be used 1/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ifc new file mode 100644 index 000000000..2c072dfd8 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_1_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foo',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21; diff --git a/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ids b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ids new file mode 100644 index 000000000..5c68fb049 --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ids @@ -0,0 +1,31 @@ + + + + Value restrictions may be used 2/3 + Generated via code automation in the Ids Repository on github. + + + + + + + IFCWALL + + + + + + + Name + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ifc b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ifc new file mode 100644 index 000000000..a043869ef --- /dev/null +++ b/packages/core/tests/fixtures/ids-attribute/pass-value_restrictions_may_be_used_2_3.ifc @@ -0,0 +1,10 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; +DATA; +#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Bar',$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21;