Skip to content

Commit

Permalink
feat(core): adds Declares, HasContext, Controls, IsNestedBy and Nests…
Browse files Browse the repository at this point in the history
… to IfcRelationsIndexer
  • Loading branch information
HoyosJuan committed Aug 9, 2024
1 parent 2bcb599 commit 65db4fb
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/src/ifc/IfcRelationsIndexer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ export class IfcRelationsIndexer extends Component implements Disposable {
"ConnectedTo",
"ConnectedFrom",
"ReferencedBy",
"Declares",
"HasContext",
"Controls",
"IsNestedBy",
"Nests",
];

private _ifcRels: IfcRelations = [
Expand All @@ -90,6 +95,9 @@ export class IfcRelationsIndexer extends Component implements Disposable {
WEBIFC.IFCRELFLOWCONTROLELEMENTS,
WEBIFC.IFCRELCONNECTSELEMENTS,
WEBIFC.IFCRELASSIGNSTOPRODUCT,
WEBIFC.IFCRELDECLARES,
WEBIFC.IFCRELASSIGNSTOCONTROL,
WEBIFC.IFCRELNESTS,
];

constructor(components: Components) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,25 @@ export const relToAttributesMap = new Map<
forRelating: "ReferencedBy",
},
],
[
WEBIFC.IFCRELDECLARES,
{
forRelated: "HasContext",
forRelating: "Declares",
},
],
[
WEBIFC.IFCRELASSIGNSTOCONTROL,
{
forRelated: "HasAssignments",
forRelating: "Controls",
},
],
[
WEBIFC.IFCRELNESTS,
{
forRelated: "Nests",
forRelating: "IsNestedBy",
},
],
]);
8 changes: 8 additions & 0 deletions packages/core/src/ifc/IfcRelationsIndexer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export type InverseAttributes = [
"ConnectedTo",
"ConnectedFrom",
"ReferencedBy",
"Declares",
"HasContext",
"Controls",
"IsNestedBy",
"Nests",
];

export type InverseAttribute = InverseAttributes[number];
Expand All @@ -48,6 +53,9 @@ export type IfcRelations = [
typeof WEBIFC.IFCRELFLOWCONTROLELEMENTS,
typeof WEBIFC.IFCRELCONNECTSELEMENTS,
typeof WEBIFC.IFCRELASSIGNSTOPRODUCT,
typeof WEBIFC.IFCRELDECLARES,
typeof WEBIFC.IFCRELASSIGNSTOCONTROL,
typeof WEBIFC.IFCRELNESTS,
];

export type IfcRelation = IfcRelations[number];

0 comments on commit 65db4fb

Please sign in to comment.