From 421904f9ae6fe7f59d4f4d16208e7a64a8f33814 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 13:43:29 +0100 Subject: [PATCH 01/14] added ifcCompatibleElements to CategorySchema --- src/types/common/enums.ts | 3 ++ src/types/common/productCategorySchema.ts | 51 +++++++++++++---------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/types/common/enums.ts b/src/types/common/enums.ts index 6f2792e..eb8dd62 100644 --- a/src/types/common/enums.ts +++ b/src/types/common/enums.ts @@ -60,6 +60,7 @@ const BuildingSystemEnum = z "Plants", "Roofs", "Stairs", + "Structure", ]) .openapi({ description: @@ -77,6 +78,8 @@ const ProductCategoryEnum = z "Insulated Concrete Panels", "Prefabricated Balcony", "Pod", + "Beam", + "Column", "Whole Building System", "Structural Frame", "Facade System", diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index af04a8e..9c7fcc4 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -1,34 +1,39 @@ import { z } from "zod"; -import { BuildingSystemEnum, ProductCategoryEnum } from "./enums"; +import { BuildingSystemEnum, ProductCategoryEnum,IfcBuildingElementEnum } from "./enums"; // Temporary schema for values const RawProductCategorySchema = z.object({ category: ProductCategoryEnum, - buildingSystem: BuildingSystemEnum + buildingSystem: BuildingSystemEnum, + ifcCompatibleElements: z + .array(IfcBuildingElementEnum) + .optional(), }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall" }, - { category: "Solid Wall Panels", buildingSystem: "Wall" }, - { category: "Closed Wall Panels", buildingSystem: "Wall" }, - { category: "Twinwall", buildingSystem: "Wall" }, - { category: "Open Wall Panels", buildingSystem: "Wall" }, - { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall" }, - { category: "Insulated Concrete Panels", buildingSystem: "Wall" }, - { category: "Whole Building System", buildingSystem: "Frame" }, - { category: "Structural Frame", buildingSystem: "Frame" }, - { category: "Hollowcore Floor", buildingSystem: "Floors" }, - { category: "Concrete Lattice Floor", buildingSystem: "Floors" }, - { category: "Floor Cassettes", buildingSystem: "Floors" }, - { category: "Solid Floor Panels", buildingSystem: "Floors" }, - { category: "Roof Panel", buildingSystem: "Roofs" }, - { category: "Roof Truss", buildingSystem: "Roofs" }, - { category: "Prefabricated Balcony", buildingSystem: "Balcony" }, - { category: "Pod", buildingSystem: "Pod" }, - { category: "Facade System", buildingSystem: "Facade" }, - { category: "Volumetric module", buildingSystem: "Modules" }, - { category: "Prefabricated Plant", buildingSystem: "Plants" }, - { category: "Prefabricated Stairs", buildingSystem: "Stairs" }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcFrame","IfcBuildingElementProxy"] }, + { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, + { category: "Concrete Lattice Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, + { category: "Floor Cassettes", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, + { category: "Solid Floor Panels", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, + { category: "Roof Panel", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy"] }, + { category: "Roof Truss", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy"] }, + { category: "Prefabricated Balcony", buildingSystem: "Balcony", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Pod", buildingSystem: "Pod", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy"] }, + { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Prefabricated Plant", buildingSystem: "Plants", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy"] }, + { category: "Beam", buildingSystem: "Structure", ifcCompatibleElements: ["IfcBeam", "IfcMember","IfcBuildingElementProxy"] }, + { category: "Column", buildingSystem: "Structure", ifcCompatibleElements: ["IfcColumn", "IfcMember","IfcBuildingElementProxy"] }, ]; const ProductCategorySchema = RawProductCategorySchema.refine( From 5e9295b1852a9e5fcf8b86fac2dae7ee8336ab31 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 13:54:33 +0100 Subject: [PATCH 02/14] added comaptible ifc elements --- src/types/common/productCategorySchema.ts | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 9c7fcc4..7e79fbc 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,27 +11,27 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, - { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcFrame","IfcBuildingElementProxy"] }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, + { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcFrame","IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Concrete Lattice Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Floor Cassettes", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Solid Floor Panels", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, - { category: "Roof Panel", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy"] }, - { category: "Roof Truss", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy"] }, - { category: "Prefabricated Balcony", buildingSystem: "Balcony", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Roof Panel", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy","IfcCovering"] }, + { category: "Roof Truss", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy","IfcBeam"] }, + { category: "Prefabricated Balcony", buildingSystem: "Balcony", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcSlab"] }, { category: "Pod", buildingSystem: "Pod", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy"] }, - { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, + { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof"] }, { category: "Prefabricated Plant", buildingSystem: "Plants", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, - { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy"] }, + { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy","IfcRamp"] }, { category: "Beam", buildingSystem: "Structure", ifcCompatibleElements: ["IfcBeam", "IfcMember","IfcBuildingElementProxy"] }, { category: "Column", buildingSystem: "Structure", ifcCompatibleElements: ["IfcColumn", "IfcMember","IfcBuildingElementProxy"] }, ]; From 2df3d5491cba3f499379fc321cce66c0e958e921 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 13:57:19 +0100 Subject: [PATCH 03/14] removed partition --- src/types/common/productCategorySchema.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 7e79fbc..3cb5659 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,13 +11,13 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, - { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall","IfcPartition"] }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcFrame","IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, From b6a3ef782eda764f813ad827e88a3bd2d45c5433 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 14:11:35 +0100 Subject: [PATCH 04/14] removed ifcFrame --- src/types/common/productCategorySchema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 3cb5659..4647338 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -19,7 +19,7 @@ const productCategoryValues: z.infer[] = [ { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, - { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcFrame","IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, + { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Concrete Lattice Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Floor Cassettes", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, From 73dee97845707f4553d172b3868f7e8e98450171 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 14:12:33 +0100 Subject: [PATCH 05/14] added Structureal --- src/types/common/enums.ts | 4 ++-- src/types/common/productCategorySchema.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/common/enums.ts b/src/types/common/enums.ts index eb8dd62..5bfb479 100644 --- a/src/types/common/enums.ts +++ b/src/types/common/enums.ts @@ -78,8 +78,8 @@ const ProductCategoryEnum = z "Insulated Concrete Panels", "Prefabricated Balcony", "Pod", - "Beam", - "Column", + "Structural Beam", + "Structural Column", "Whole Building System", "Structural Frame", "Facade System", diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 4647338..2e77272 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -32,8 +32,8 @@ const productCategoryValues: z.infer[] = [ { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof"] }, { category: "Prefabricated Plant", buildingSystem: "Plants", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy","IfcRamp"] }, - { category: "Beam", buildingSystem: "Structure", ifcCompatibleElements: ["IfcBeam", "IfcMember","IfcBuildingElementProxy"] }, - { category: "Column", buildingSystem: "Structure", ifcCompatibleElements: ["IfcColumn", "IfcMember","IfcBuildingElementProxy"] }, + { category: "Structural Beam", buildingSystem: "Structure", ifcCompatibleElements: ["IfcBeam", "IfcMember","IfcBuildingElementProxy"] }, + { category: "Structural Column", buildingSystem: "Structure", ifcCompatibleElements: ["IfcColumn", "IfcMember","IfcBuildingElementProxy"] }, ]; const ProductCategorySchema = RawProductCategorySchema.refine( From e2a010b3f1368c1d7523651952dc764ba3994318 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Tue, 3 Feb 2026 14:17:38 +0100 Subject: [PATCH 06/14] added Curtain Wall --- src/types/common/enums.ts | 1 + src/types/common/productCategorySchema.ts | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/types/common/enums.ts b/src/types/common/enums.ts index 5bfb479..edfae4c 100644 --- a/src/types/common/enums.ts +++ b/src/types/common/enums.ts @@ -83,6 +83,7 @@ const ProductCategoryEnum = z "Whole Building System", "Structural Frame", "Facade System", + "Curtain Wall", "Hollowcore Floor", "Concrete Lattice Floor", "Floor Cassettes", diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 2e77272..7002d28 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,13 +11,13 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, - { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy","IfcCurtainWall"] }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, @@ -28,7 +28,8 @@ const productCategoryValues: z.infer[] = [ { category: "Roof Truss", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy","IfcBeam"] }, { category: "Prefabricated Balcony", buildingSystem: "Balcony", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcSlab"] }, { category: "Pod", buildingSystem: "Pod", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, - { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy"] }, + { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall"] }, + { category: "Curtain Wall", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall"] }, { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof"] }, { category: "Prefabricated Plant", buildingSystem: "Plants", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy","IfcRamp"] }, From 2802a361be667d686e40a8d32f7b5417298615b7 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Wed, 25 Feb 2026 16:05:52 +0100 Subject: [PATCH 07/14] replaced boundingboxSchema with GeometrySchema --- src/types/common/boundingBoxSchema.ts | 12 --- src/types/common/geometrySchema.ts | 104 ++++++++++++++++++++++ src/types/entities/prefabElementSchema.ts | 2 +- src/types/types.ts | 2 +- 4 files changed, 106 insertions(+), 14 deletions(-) delete mode 100644 src/types/common/boundingBoxSchema.ts create mode 100644 src/types/common/geometrySchema.ts diff --git a/src/types/common/boundingBoxSchema.ts b/src/types/common/boundingBoxSchema.ts deleted file mode 100644 index a42c181..0000000 --- a/src/types/common/boundingBoxSchema.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { z } from "zod"; - -const BoundingBoxSchema = z.object({ - width: z.number().gt(0, "Width must be greater than 0"), - height: z.number().gt(0, "Height must be greater than 0"), - depth: z.number().gt(0, "Depth must be greater than 0") -}).openapi({ - description: "The bounding box of an element in millimeters.", -}); - -type BoundingBox = z.infer; -export { BoundingBoxSchema, BoundingBox }; \ No newline at end of file diff --git a/src/types/common/geometrySchema.ts b/src/types/common/geometrySchema.ts new file mode 100644 index 0000000..c171dda --- /dev/null +++ b/src/types/common/geometrySchema.ts @@ -0,0 +1,104 @@ +import { z } from "zod"; + +// Local Bounding Box (element's own coordinate system) +const LocalBoundingBoxSchema = z.object({ + min: z.tuple([ + z.literal(0), // Always 0 in local space + z.literal(0), + z.literal(0) + ]).describe("Minimum corner (always at local origin)"), + + max: z.tuple([ + z.number().positive(), // Length + z.number().positive(), // Width + z.number().positive() // Height + ]).describe("Maximum corner in millimeters"), + +}).openapi({ + description: "Local bounding box aligned to element's own axes, origin at (0,0,0). Dimensions in millimeters." +}); + +// World-Aligned Bounding Box (in global coordinates) +const WorldBoundingBoxSchema = z.object({ + min: z.tuple([ + z.number(), // Can be any value in world space + z.number(), + z.number() + ]).describe("Minimum corner in world coordinates (mm)"), + + max: z.tuple([ + z.number(), + z.number(), + z.number() + ]).describe("Maximum corner in world coordinates (mm)"), + + dimensions: z.object({ + x: z.number().positive().describe("World X extent (mm)"), + y: z.number().positive().describe("World Y extent (mm)"), + z: z.number().positive().describe("World Z extent (mm)") + }), + + center: z.tuple([ + z.number(), + z.number(), + z.number() + ]).optional().describe("Center point in world coordinates (mm)"), + + volume: z.number().positive().describe("Bounding box volume in mm³") +}).openapi({ + description: "World-aligned bounding box (AABB) in global coordinate system. May include rotation waste. Dimensions in millimeters." +}); + +// World Position & Orientation (Construction Plane) +const WorldPositionSchema = z.object({ + origin: z.tuple([ + z.number(), + z.number(), + z.number() + ]).describe("Element's local origin in world coordinates (mm)"), + + xAxis: z.tuple([ + z.number(), + z.number(), + z.number() + ]).describe("Local X-axis direction in world space (unit vector)"), + + yAxis: z.tuple([ + z.number(), + z.number(), + z.number() + ]).describe("Local Y-axis direction in world space (unit vector)"), + + zAxis: z.tuple([ + z.number(), + z.number(), + z.number() + ]).describe("Local Z-axis direction in world space (unit vector)") +}).openapi({ + description: "Element's position and orientation (construction plane) in world coordinate system." +}); + +// Complete Geometry +const GeometrySchema = z.object({ + localBoundingBox: LocalBoundingBoxSchema, + worldBoundingBox: WorldBoundingBoxSchema.optional(), + worldPosition: WorldPositionSchema +}).openapi({ + description: "Complete geometry representation with local bbox, world position, and optional world bbox." +}); + +type LocalBoundingBox = z.infer; +type WorldBoundingBox = z.infer; +type WorldPosition = z.infer; +type Geometry = z.infer; + +export { + LocalBoundingBoxSchema, + WorldBoundingBoxSchema, + WorldPositionSchema, + GeometrySchema, + LocalBoundingBox, + WorldBoundingBox, + WorldPosition, + Geometry +}; \ No newline at end of file diff --git a/src/types/entities/prefabElementSchema.ts b/src/types/entities/prefabElementSchema.ts index aa3da33..17c2f03 100644 --- a/src/types/entities/prefabElementSchema.ts +++ b/src/types/entities/prefabElementSchema.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { AestheticAndCustomizationOptionsSchema } from "../common/aestheticAndCustomizationOptionsSchema"; -import { BoundingBoxSchema } from "../common/boundingBoxSchema"; +import { BoundingBoxSchema } from "../common/geometrySchema"; import { DimensionalAttributesSchema } from "../common/dimensionalAttributesSchema"; import { DocumentationAndComplianceSchema } from "../common/documentationAndComplianceSchema"; import { EconomicFactorsSchema } from "../common/economicFactorsSchema"; diff --git a/src/types/types.ts b/src/types/types.ts index 4cd6aeb..7c8933d 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1,6 +1,6 @@ export * from "./common/acousticPropertiesSchema"; export * from "./common/aestheticAndCustomizationOptionsSchema"; -export * from "./common/boundingBoxSchema"; +export * from "./common/geometrySchema"; export * from "./common/certificationsSchema"; export * from "./common/dimensionalAttributesSchema"; export * from "./common/documentationAndComplianceSchema"; From 73f47b326c2b462ed7425b6543ab0f1190644e8d Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Wed, 25 Feb 2026 16:20:24 +0100 Subject: [PATCH 08/14] renamed to boundingboxschema --- src/types/common/boundingBoxSchema.ts | 26 ++++++ src/types/common/geometrySchema.ts | 104 ---------------------- src/types/entities/prefabElementSchema.ts | 2 +- src/types/types.ts | 2 +- 4 files changed, 28 insertions(+), 106 deletions(-) create mode 100644 src/types/common/boundingBoxSchema.ts delete mode 100644 src/types/common/geometrySchema.ts diff --git a/src/types/common/boundingBoxSchema.ts b/src/types/common/boundingBoxSchema.ts new file mode 100644 index 0000000..577bec7 --- /dev/null +++ b/src/types/common/boundingBoxSchema.ts @@ -0,0 +1,26 @@ +import { z } from "zod"; + +// Local Bounding Box (element's own coordinate system) +const BoundingBoxSchema = z.object({ + min: z.tuple([ + z.literal(0), // Always 0 in local space + z.literal(0), + z.literal(0) + ]).describe("Minimum corner (always at local origin)"), + + max: z.tuple([ + z.number().positive(), // Length + z.number().positive(), // Width + z.number().positive() // Height + ]).describe("Maximum corner in millimeters"), + +}).openapi({ + description: "Local bounding box aligned to element's own axes, origin at (0,0,0). Dimensions in millimeters." +}); + +type BoundingBox = z.infer; + +export { + BoundingBoxSchema, + BoundingBox, +}; \ No newline at end of file diff --git a/src/types/common/geometrySchema.ts b/src/types/common/geometrySchema.ts deleted file mode 100644 index c171dda..0000000 --- a/src/types/common/geometrySchema.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { z } from "zod"; - -// Local Bounding Box (element's own coordinate system) -const LocalBoundingBoxSchema = z.object({ - min: z.tuple([ - z.literal(0), // Always 0 in local space - z.literal(0), - z.literal(0) - ]).describe("Minimum corner (always at local origin)"), - - max: z.tuple([ - z.number().positive(), // Length - z.number().positive(), // Width - z.number().positive() // Height - ]).describe("Maximum corner in millimeters"), - -}).openapi({ - description: "Local bounding box aligned to element's own axes, origin at (0,0,0). Dimensions in millimeters." -}); - -// World-Aligned Bounding Box (in global coordinates) -const WorldBoundingBoxSchema = z.object({ - min: z.tuple([ - z.number(), // Can be any value in world space - z.number(), - z.number() - ]).describe("Minimum corner in world coordinates (mm)"), - - max: z.tuple([ - z.number(), - z.number(), - z.number() - ]).describe("Maximum corner in world coordinates (mm)"), - - dimensions: z.object({ - x: z.number().positive().describe("World X extent (mm)"), - y: z.number().positive().describe("World Y extent (mm)"), - z: z.number().positive().describe("World Z extent (mm)") - }), - - center: z.tuple([ - z.number(), - z.number(), - z.number() - ]).optional().describe("Center point in world coordinates (mm)"), - - volume: z.number().positive().describe("Bounding box volume in mm³") -}).openapi({ - description: "World-aligned bounding box (AABB) in global coordinate system. May include rotation waste. Dimensions in millimeters." -}); - -// World Position & Orientation (Construction Plane) -const WorldPositionSchema = z.object({ - origin: z.tuple([ - z.number(), - z.number(), - z.number() - ]).describe("Element's local origin in world coordinates (mm)"), - - xAxis: z.tuple([ - z.number(), - z.number(), - z.number() - ]).describe("Local X-axis direction in world space (unit vector)"), - - yAxis: z.tuple([ - z.number(), - z.number(), - z.number() - ]).describe("Local Y-axis direction in world space (unit vector)"), - - zAxis: z.tuple([ - z.number(), - z.number(), - z.number() - ]).describe("Local Z-axis direction in world space (unit vector)") -}).openapi({ - description: "Element's position and orientation (construction plane) in world coordinate system." -}); - -// Complete Geometry -const GeometrySchema = z.object({ - localBoundingBox: LocalBoundingBoxSchema, - worldBoundingBox: WorldBoundingBoxSchema.optional(), - worldPosition: WorldPositionSchema -}).openapi({ - description: "Complete geometry representation with local bbox, world position, and optional world bbox." -}); - -type LocalBoundingBox = z.infer; -type WorldBoundingBox = z.infer; -type WorldPosition = z.infer; -type Geometry = z.infer; - -export { - LocalBoundingBoxSchema, - WorldBoundingBoxSchema, - WorldPositionSchema, - GeometrySchema, - LocalBoundingBox, - WorldBoundingBox, - WorldPosition, - Geometry -}; \ No newline at end of file diff --git a/src/types/entities/prefabElementSchema.ts b/src/types/entities/prefabElementSchema.ts index 17c2f03..45fd01d 100644 --- a/src/types/entities/prefabElementSchema.ts +++ b/src/types/entities/prefabElementSchema.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { AestheticAndCustomizationOptionsSchema } from "../common/aestheticAndCustomizationOptionsSchema"; -import { BoundingBoxSchema } from "../common/geometrySchema"; +import { BoundingBoxSchema} from "../common/boundingBoxSchema"; import { DimensionalAttributesSchema } from "../common/dimensionalAttributesSchema"; import { DocumentationAndComplianceSchema } from "../common/documentationAndComplianceSchema"; import { EconomicFactorsSchema } from "../common/economicFactorsSchema"; diff --git a/src/types/types.ts b/src/types/types.ts index 7c8933d..4cd6aeb 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1,6 +1,6 @@ export * from "./common/acousticPropertiesSchema"; export * from "./common/aestheticAndCustomizationOptionsSchema"; -export * from "./common/geometrySchema"; +export * from "./common/boundingBoxSchema"; export * from "./common/certificationsSchema"; export * from "./common/dimensionalAttributesSchema"; export * from "./common/documentationAndComplianceSchema"; From c47b006c9cbb412cbe5431a4afbfdcd990ee44fe Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Fri, 27 Feb 2026 09:21:17 +0100 Subject: [PATCH 09/14] added new boundingbox schema --- src/types/common/dimensionSchema.ts | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 src/types/common/dimensionSchema.ts diff --git a/src/types/common/dimensionSchema.ts b/src/types/common/dimensionSchema.ts new file mode 100644 index 0000000..d6b9adf --- /dev/null +++ b/src/types/common/dimensionSchema.ts @@ -0,0 +1,88 @@ +import { z } from "zod"; + +// Wall dimensions +const WallDimensionsSchema = z.object({ + length: z.number().positive().optional(), + thickness: z.number().positive().optional(), + height: z.number().positive().optional() +}); + +// Balcony dimensions +const BalconyDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + height: z.number().positive().optional() +}); + +// Pod dimensions +const PodDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + height: z.number().positive().optional() +}); + +// Frame dimensions +const FrameDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + thickness: z.number().positive().optional() +}); + +// Floor dimensions +const FloorDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + thickness: z.number().positive().optional() +}); + +// Module dimensions +const ModuleDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + height: z.number().positive().optional() +}); + +// Roof dimensions +const RoofDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + thickness: z.number().positive().optional() +}); + +// Stairs dimensions +const StairsDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + height: z.number().positive().optional(), + numberOfSteps: z.number().int().positive().optional(), + riserHeight: z.number().positive().optional(), + treadDepth: z.number().positive().optional() +}); + +// Structure dimensions - SIMPLIFIED +const StructureDimensionsSchema = z.object({ + length: z.number().positive().optional(), + width: z.number().positive().optional(), + height: z.number().positive().optional(), + depth: z.number().positive().optional(), + diameter: z.number().positive().optional() +}); + +// Discriminated union by building system +const DimensionSchema = z.object({ + dimensions: z.discriminatedUnion("buildingSystem", [ + z.object({ buildingSystem: z.literal("Wall"), ...WallDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Balcony"), ...BalconyDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Pod"), ...PodDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Frame"), ...FrameDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Facade"), ...FacadeDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Floors"), ...FloorDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Modules"), ...ModuleDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Plants"), ...PlantDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Roofs"), ...RoofDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Stairs"), ...StairsDimensionsSchema.shape }), + z.object({ buildingSystem: z.literal("Structure"), ...StructureDimensionsSchema.shape }) + ]) +}); + +export { DimensionSchema }; \ No newline at end of file From ce6eb3a34c44eeb91a8e4f73ae4a3cd889b2d084 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Sat, 28 Feb 2026 20:08:04 +0100 Subject: [PATCH 10/14] extended DimensionalAttributesSchema --- src/types/common/dimensionSchema.ts | 88 ------------------- .../common/dimensionalAttributesSchema.ts | 5 +- src/types/common/productCategorySchema.ts | 5 +- src/types/entities/prefabElementSchema.ts | 2 +- 4 files changed, 9 insertions(+), 91 deletions(-) delete mode 100644 src/types/common/dimensionSchema.ts diff --git a/src/types/common/dimensionSchema.ts b/src/types/common/dimensionSchema.ts deleted file mode 100644 index d6b9adf..0000000 --- a/src/types/common/dimensionSchema.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { z } from "zod"; - -// Wall dimensions -const WallDimensionsSchema = z.object({ - length: z.number().positive().optional(), - thickness: z.number().positive().optional(), - height: z.number().positive().optional() -}); - -// Balcony dimensions -const BalconyDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - height: z.number().positive().optional() -}); - -// Pod dimensions -const PodDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - height: z.number().positive().optional() -}); - -// Frame dimensions -const FrameDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - thickness: z.number().positive().optional() -}); - -// Floor dimensions -const FloorDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - thickness: z.number().positive().optional() -}); - -// Module dimensions -const ModuleDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - height: z.number().positive().optional() -}); - -// Roof dimensions -const RoofDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - thickness: z.number().positive().optional() -}); - -// Stairs dimensions -const StairsDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - height: z.number().positive().optional(), - numberOfSteps: z.number().int().positive().optional(), - riserHeight: z.number().positive().optional(), - treadDepth: z.number().positive().optional() -}); - -// Structure dimensions - SIMPLIFIED -const StructureDimensionsSchema = z.object({ - length: z.number().positive().optional(), - width: z.number().positive().optional(), - height: z.number().positive().optional(), - depth: z.number().positive().optional(), - diameter: z.number().positive().optional() -}); - -// Discriminated union by building system -const DimensionSchema = z.object({ - dimensions: z.discriminatedUnion("buildingSystem", [ - z.object({ buildingSystem: z.literal("Wall"), ...WallDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Balcony"), ...BalconyDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Pod"), ...PodDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Frame"), ...FrameDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Facade"), ...FacadeDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Floors"), ...FloorDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Modules"), ...ModuleDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Plants"), ...PlantDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Roofs"), ...RoofDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Stairs"), ...StairsDimensionsSchema.shape }), - z.object({ buildingSystem: z.literal("Structure"), ...StructureDimensionsSchema.shape }) - ]) -}); - -export { DimensionSchema }; \ No newline at end of file diff --git a/src/types/common/dimensionalAttributesSchema.ts b/src/types/common/dimensionalAttributesSchema.ts index eecb412..42ee9c6 100644 --- a/src/types/common/dimensionalAttributesSchema.ts +++ b/src/types/common/dimensionalAttributesSchema.ts @@ -4,7 +4,10 @@ import { RangeSchema } from "./rangeSchema"; const DimensionalAttributesSchema = z.object({ width: RangeSchema, height: RangeSchema, - length: RangeSchema + length: RangeSchema, + depth: RangeSchema, + thickness: RangeSchema, + radius: RangeSchema, }); type DimensionalAttributes = z.infer; diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 7002d28..c1ef203 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,7 +11,10 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, + { category: "Boarding", + buildingSystem: "Wall", + ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] + }, { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, diff --git a/src/types/entities/prefabElementSchema.ts b/src/types/entities/prefabElementSchema.ts index 45fd01d..577d6a7 100644 --- a/src/types/entities/prefabElementSchema.ts +++ b/src/types/entities/prefabElementSchema.ts @@ -49,7 +49,7 @@ const PrefabElementSchema = z.object({ example: "This CLT wall panel is suitable for multi-story residential buildings and meets fire resistance standards." }), boundingBox: BoundingBoxSchema - .describe("3D bounding dimensions of the prefab element.") + .describe("3D bounding dimensions of the prefab element, located at the World Origin 0,0,0.") .openapi({ description: "3D bounding dimensions of the prefab element, defining its spatial envelope." }), From ac4f8d060fac25366de48204bf9350cce9e62ed9 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Sat, 28 Feb 2026 20:19:36 +0100 Subject: [PATCH 11/14] removed linebreak --- src/types/common/productCategorySchema.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index c1ef203..7002d28 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,10 +11,7 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", - buildingSystem: "Wall", - ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] - }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, From c408113d78f996c163c5b516b43cd757ca396fc6 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Mon, 2 Mar 2026 10:48:22 +0100 Subject: [PATCH 12/14] =?UTF-8?q?=C3=9Bpdated=20comments=20and=20added=20d?= =?UTF-8?q?escription?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ src/types/common/boundingBoxSchema.ts | 17 ++++++++--------- .../common/dimensionalAttributesSchema.ts | 18 ++++++++++++------ src/types/entities/prefabElementSchema.ts | 6 +++--- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f543a3d..6f7714f 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ You can always find the most up-to-date [API documentation here](https://mod-con ## Data Model +> **Note on Units**: All units decsribing the geometry of prefab elements are expressed in **millimeters (mm)** unless otherwise specified. + ```mermaid erDiagram PrefabElement { diff --git a/src/types/common/boundingBoxSchema.ts b/src/types/common/boundingBoxSchema.ts index 577bec7..75154b2 100644 --- a/src/types/common/boundingBoxSchema.ts +++ b/src/types/common/boundingBoxSchema.ts @@ -1,18 +1,17 @@ import { z } from "zod"; -// Local Bounding Box (element's own coordinate system) const BoundingBoxSchema = z.object({ min: z.tuple([ - z.literal(0), // Always 0 in local space - z.literal(0), - z.literal(0) - ]).describe("Minimum corner (always at local origin)"), + z.number(), + z.number(), + z.number() + ]).default([0, 0, 0]).describe("Minimum corner (defaults at local origin (0,0,0)) in millimeters"), max: z.tuple([ - z.number().positive(), // Length - z.number().positive(), // Width - z.number().positive() // Height - ]).describe("Maximum corner in millimeters"), + z.number().positive(), + z.number().positive(), + z.number().positive() + ]).describe("Maximum corner in millimeters and defined in the local coordianate system"), }).openapi({ description: "Local bounding box aligned to element's own axes, origin at (0,0,0). Dimensions in millimeters." diff --git a/src/types/common/dimensionalAttributesSchema.ts b/src/types/common/dimensionalAttributesSchema.ts index 42ee9c6..d96e5a7 100644 --- a/src/types/common/dimensionalAttributesSchema.ts +++ b/src/types/common/dimensionalAttributesSchema.ts @@ -2,12 +2,18 @@ import { z } from "zod"; import { RangeSchema } from "./rangeSchema"; const DimensionalAttributesSchema = z.object({ - width: RangeSchema, - height: RangeSchema, - length: RangeSchema, - depth: RangeSchema, - thickness: RangeSchema, - radius: RangeSchema, + length: RangeSchema.describe("Primary dimension along the longest horizontal axis of the element. Used for linear elements like beams, walls, and slabs."), + width: RangeSchema.describe("Secondary horizontal dimension perpendicular to length. Used for planar elements like slabs, walls, and panels."), + height: RangeSchema.describe("Vertical dimension. Defines the elevation of elements like walls and columns."), + depth: RangeSchema.describe("Cross-sectional dimension of structural members like beams and columns."), + thickness: RangeSchema.describe("Smallest dimension of planar elements such as walls, slabs, or panels. Represents the cross-sectional depth."), + radius: RangeSchema.describe("Radius of circular or cylindrical elements like columns, piles, or pipes."), +}).openapi({ + description: + "Dimensional attributes defining the physical size of prefab elements. " + + "All dimensions are optional and dependent on element type. " + + "All measurements are in millimeters (mm). " + + "Ranges represent manufacturing constraints.", }); type DimensionalAttributes = z.infer; diff --git a/src/types/entities/prefabElementSchema.ts b/src/types/entities/prefabElementSchema.ts index 577d6a7..02c9abf 100644 --- a/src/types/entities/prefabElementSchema.ts +++ b/src/types/entities/prefabElementSchema.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { AestheticAndCustomizationOptionsSchema } from "../common/aestheticAndCustomizationOptionsSchema"; -import { BoundingBoxSchema} from "../common/boundingBoxSchema"; +import { BoundingBoxSchema } from "../common/boundingBoxSchema"; import { DimensionalAttributesSchema } from "../common/dimensionalAttributesSchema"; import { DocumentationAndComplianceSchema } from "../common/documentationAndComplianceSchema"; import { EconomicFactorsSchema } from "../common/economicFactorsSchema"; @@ -49,9 +49,9 @@ const PrefabElementSchema = z.object({ example: "This CLT wall panel is suitable for multi-story residential buildings and meets fire resistance standards." }), boundingBox: BoundingBoxSchema - .describe("3D bounding dimensions of the prefab element, located at the World Origin 0,0,0.") + .describe("3D bounding dimensions of the prefab element, located at the Local Origin (0,0,0).") .openapi({ - description: "3D bounding dimensions of the prefab element, defining its spatial envelope." + description: "3D bounding dimensions of the prefab element, located at the local origin (0,0,0)." }), images: z.array(z.string()).min(1, "At least one image is required") .describe("Image URLs of the element") From 6fafcc8222e4a6d32d3d25c63e368c333a8b0ab4 Mon Sep 17 00:00:00 2001 From: Fuhrimann Lukas Date: Wed, 4 Mar 2026 10:25:32 +0100 Subject: [PATCH 13/14] updated boundingbox schema --- src/types/common/boundingBoxSchema.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/types/common/boundingBoxSchema.ts b/src/types/common/boundingBoxSchema.ts index 75154b2..b1b1315 100644 --- a/src/types/common/boundingBoxSchema.ts +++ b/src/types/common/boundingBoxSchema.ts @@ -1,12 +1,6 @@ import { z } from "zod"; -const BoundingBoxSchema = z.object({ - min: z.tuple([ - z.number(), - z.number(), - z.number() - ]).default([0, 0, 0]).describe("Minimum corner (defaults at local origin (0,0,0)) in millimeters"), - +const BoundingBoxSchema = z.object({ max: z.tuple([ z.number().positive(), z.number().positive(), From 2cd754949ae6a8064002f1c43a0540ecbc7ba1b9 Mon Sep 17 00:00:00 2001 From: Atacan Kural Avgoren Date: Wed, 4 Mar 2026 11:13:18 +0100 Subject: [PATCH 14/14] ref MOD-239 explicitly add ifcwallstandardcase --- src/types/common/productCategorySchema.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/types/common/productCategorySchema.ts b/src/types/common/productCategorySchema.ts index 7002d28..5fe13e8 100644 --- a/src/types/common/productCategorySchema.ts +++ b/src/types/common/productCategorySchema.ts @@ -11,14 +11,14 @@ const RawProductCategorySchema = z.object({ }); const productCategoryValues: z.infer[] = [ - { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcBuildingElementProxy"] }, - { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, + { category: "Boarding", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Solid Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Closed Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Twinwall", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Open Wall Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Structural Insulated Panels (SIPs)", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Insulated Concrete Panels", buildingSystem: "Wall", ifcCompatibleElements: ["IfcWall","IfcWallStandardCase","IfcBuildingElementProxy"] }, + { category: "Whole Building System", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcWallStandardCase","IfcSlab","IfcRoof","IfcColumn","IfcBeam"] }, { category: "Structural Frame", buildingSystem: "Frame", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcColumn","IfcBeam","IfcMember"] }, { category: "Hollowcore Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, { category: "Concrete Lattice Floor", buildingSystem: "Floors", ifcCompatibleElements: ["IfcSlab","IfcBuildingElementProxy"] }, @@ -28,9 +28,9 @@ const productCategoryValues: z.infer[] = [ { category: "Roof Truss", buildingSystem: "Roofs", ifcCompatibleElements: ["IfcRoof","IfcBuildingElementProxy","IfcBeam"] }, { category: "Prefabricated Balcony", buildingSystem: "Balcony", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcSlab"] }, { category: "Pod", buildingSystem: "Pod", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, - { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall"] }, - { category: "Curtain Wall", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall"] }, - { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcSlab","IfcRoof"] }, + { category: "Facade System", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall","IfcWallStandardCase"] }, + { category: "Curtain Wall", buildingSystem: "Facade", ifcCompatibleElements: ["IfcCurtainWall","IfcBuildingElementProxy","IfcWall","IfcWallStandardCase"] }, + { category: "Volumetric module", buildingSystem: "Modules", ifcCompatibleElements: ["IfcBuildingElementProxy","IfcWall","IfcWallStandardCase","IfcSlab","IfcRoof"] }, { category: "Prefabricated Plant", buildingSystem: "Plants", ifcCompatibleElements: ["IfcBuildingElementProxy"] }, { category: "Prefabricated Stairs", buildingSystem: "Stairs", ifcCompatibleElements: ["IfcStair","IfcBuildingElementProxy","IfcRamp"] }, { category: "Structural Beam", buildingSystem: "Structure", ifcCompatibleElements: ["IfcBeam", "IfcMember","IfcBuildingElementProxy"] },