-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
503 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./rels-builder"; | ||
export * from "./types"; |
55 changes: 55 additions & 0 deletions
55
packages/core/src/ifc/IfcPropertiesManager/src/rels-builder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import * as WEBIFC from "web-ifc"; | ||
import { IfcRelName } from "./types"; | ||
import { IfcRelation } from "../../IfcRelationsIndexer"; | ||
|
||
type IfcRelAttributePosition = { related: number; relating: number }; | ||
|
||
export const ifcRelAttrsPosition: Record<IfcRelName, IfcRelAttributePosition> = | ||
{ | ||
// IfcRelAssigns | ||
IfcRelAssignsToControl: { related: 5, relating: 7 }, | ||
IfcRelAssignsToGroup: { related: 5, relating: 7 }, | ||
IfcRelAssignsToProduct: { related: 5, relating: 7 }, | ||
// IfcRelAssociates | ||
IfcRelAssociatesClassification: { related: 5, relating: 6 }, | ||
IfcRelAssociatesMaterial: { related: 5, relating: 6 }, | ||
IfcRelAssociatesDocument: { related: 5, relating: 6 }, | ||
// IfcRelConnects | ||
IfcRelContainedInSpatialStructure: { related: 5, relating: 6 }, | ||
IfcRelFlowControlElements: { related: 5, relating: 6 }, | ||
IfcRelConnectsElements: { related: 7, relating: 6 }, | ||
// IfcRelDeclares | ||
IfcRelDeclares: { related: 6, relating: 5 }, | ||
// IfcRelDecomposes | ||
IfcRelAggregates: { related: 6, relating: 5 }, | ||
IfcRelNests: { related: 6, relating: 5 }, | ||
// IfcRelDefines | ||
IfcRelDefinesByProperties: { related: 5, relating: 6 }, | ||
IfcRelDefinesByType: { related: 5, relating: 6 }, | ||
IfcRelDefinesByTemplate: { related: 5, relating: 6 }, | ||
}; | ||
|
||
export const ifcRelClassNames: Record<IfcRelation, IfcRelName> = { | ||
// IfcRelAssigns | ||
[WEBIFC.IFCRELASSIGNSTOCONTROL]: "IfcRelAssignsToControl", | ||
[WEBIFC.IFCRELASSIGNSTOGROUP]: "IfcRelAssignsToGroup", | ||
[WEBIFC.IFCRELASSIGNSTOPRODUCT]: "IfcRelAssignsToProduct", | ||
// IfcRelAssociates | ||
[WEBIFC.IFCRELASSOCIATESCLASSIFICATION]: "IfcRelAssociatesClassification", | ||
[WEBIFC.IFCRELASSOCIATESMATERIAL]: "IfcRelAssociatesMaterial", | ||
[WEBIFC.IFCRELASSOCIATESDOCUMENT]: "IfcRelAssociatesDocument", | ||
// IfcRelConnects | ||
[WEBIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE]: | ||
"IfcRelContainedInSpatialStructure", | ||
[WEBIFC.IFCRELCONNECTSELEMENTS]: "IfcRelConnectsElements", | ||
[WEBIFC.IFCRELFLOWCONTROLELEMENTS]: "IfcRelFlowControlElements", | ||
// IfcRelDeclares | ||
[WEBIFC.IFCRELDECLARES]: "IfcRelDeclares", | ||
// IfcRelDecomposes | ||
[WEBIFC.IFCRELAGGREGATES]: "IfcRelAggregates", | ||
[WEBIFC.IFCRELNESTS]: "IfcRelNests", | ||
// IfcRelDefines | ||
[WEBIFC.IFCRELDEFINESBYPROPERTIES]: "IfcRelDefinesByProperties", | ||
[WEBIFC.IFCRELDEFINESBYTYPE]: "IfcRelDefinesByType", | ||
[WEBIFC.IFCRELDEFINESBYTEMPLATE]: "IfcRelDefinesByTemplate", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export type IfcRelationNames = [ | ||
// IfcRelAssigns | ||
"IfcRelAssignsToControl", | ||
"IfcRelAssignsToGroup", | ||
"IfcRelAssignsToProduct", | ||
// IfcRelAssociates | ||
"IfcRelAssociatesClassification", | ||
"IfcRelAssociatesMaterial", | ||
"IfcRelAssociatesDocument", | ||
// IfcRelConnects | ||
"IfcRelContainedInSpatialStructure", | ||
"IfcRelFlowControlElements", | ||
"IfcRelConnectsElements", | ||
// IfcRelDeclares | ||
"IfcRelDeclares", | ||
// IfcRelDecomposes | ||
"IfcRelAggregates", | ||
"IfcRelNests", | ||
// IfcRelDefines | ||
"IfcRelDefinesByProperties", | ||
"IfcRelDefinesByType", | ||
"IfcRelDefinesByTemplate", | ||
]; | ||
|
||
export type IfcRelName = IfcRelationNames[number]; |
Oops, something went wrong.