[98] IFC: IsExternal/LoadBearing für Wand und Decke, Brand-/Schallschutz, U-Wert, Einbruchhemmung für Tür und Fenster im Pset_*Common; Import liest sie zurück

This commit is contained in:
Claude committed 2026-10-29 21:40:44 +00:00
1 parent a14da3e817
commit 4c70a243a5
8 files changed
+224 -9

No files matched your search

+36 -1
View File
@@ -685,12 +685,47 @@ describe("[B5] Pset_*Common mit den Werten aus dem Modell", () => {
expect(psetOf(spf, line(spf, "IFCDOOR"), "Pset_DoorCommon")).toEqual({
Reference: "IFCIDENTIFIER('Glast\\X2\\00FC\\X0\\r')",
GlazingAreaFraction: "IFCPOSITIVERATIOMEASURE(0.6)",
IsExternal: "IFCBOOLEAN(.T.)",
});
expect(psetOf(spf, line(spf, "IFCWINDOW"), "Pset_WindowCommon")).toEqual({ Reference: "IFCIDENTIFIER('Holz-Metall IV')" });
expect(psetOf(spf, line(spf, "IFCWINDOW"), "Pset_WindowCommon")).toMatchObject({ Reference: "IFCIDENTIFIER('Holz-Metall IV')" });
// Ohne Typ kein leeres Pset.
const plain = exportIfcSpf(fixtureProject());
expect(psetOf(plain, line(plain, "IFCDOOR"), "Pset_DoorCommon")).toBeNull();
});
it("[98] Tür/Fenster: Brand-, Schallschutz, U-Wert, Einbruchhemmung, Nummer und aussen/innen aus dem Modell", () => {
const base = project();
const spf = exportIfcSpf({
...base,
openings: [
{ ...base.openings![0], mark: "T1.01", fireRating: "EI30", soundClass: "Rw 32 dB", uValue: 1.3, burglaryClass: "RC2", isExternal: false },
{ ...base.openings![1], uValue: 0.9, isExternal: true },
],
});
expect(psetOf(spf, line(spf, "IFCDOOR"), "Pset_DoorCommon")).toEqual({
Reference: "IFCIDENTIFIER('T1.01')",
GlazingAreaFraction: "IFCPOSITIVERATIOMEASURE(0.6)",
IsExternal: "IFCBOOLEAN(.F.)",
FireRating: "IFCLABEL('EI30')",
AcousticRating: "IFCLABEL('Rw 32 dB')",
ThermalTransmittance: "IFCTHERMALTRANSMITTANCEMEASURE(1.3)",
SecurityRating: "IFCLABEL('RC2')",
});
expect(psetOf(spf, line(spf, "IFCWINDOW"), "Pset_WindowCommon")).toEqual({
Reference: "IFCIDENTIFIER('Holz-Metall IV')",
IsExternal: "IFCBOOLEAN(.T.)",
ThermalTransmittance: "IFCTHERMALTRANSMITTANCEMEASURE(0.9)",
});
});
it("[98] Wand/Decke: IsExternal und LoadBearing nur mit Angabe im Modell", () => {
const base = project();
const spf = exportIfcSpf({
...base,
walls: base.walls.map((w, i) => (i === 0 ? { ...w, isExternal: true, loadBearing: true } : w)),
ceilings: base.ceilings!.map((c) => ({ ...c, isExternal: false, loadBearing: true })),
});
expect(psetOf(spf, line(spf, "IFCWALL"), "Pset_WallCommon")).toEqual({ Reference: "IFCIDENTIFIER('Aussenwand')", IsExternal: "IFCBOOLEAN(.T.)", LoadBearing: "IFCBOOLEAN(.T.)" });
expect(psetOf(spf, line(spf, "IFCSLAB"), "Pset_SlabCommon")).toEqual({ Reference: "IFCIDENTIFIER('Betondecke')", IsExternal: "IFCBOOLEAN(.F.)", LoadBearing: "IFCBOOLEAN(.T.)" });
});
it("Raum: Reference = Raumnummer, IsExternal aus SIA 416 (AGF = Aussengeschossfläche)", () => {
const spf = exportIfcSpf(project());
const kueche = line(spf, "IFCSPACE", "'K\\X2\\00FC\\X0\\che'");
+13
View File
@@ -163,6 +163,19 @@ describe.skipIf(!hasIfcOpenShell)("IFC-Export gegen ifcopenshell", { timeout: 60
expect(r.out).toContain("0 Befunde");
expect(r.status).toBe(0);
});
it("[98] Pset_Door/Window/Wall/SlabCommon mit Kennwerten: gültig", () => {
const p: Project = {
...sampleProject,
walls: sampleProject.walls.map((w, i) => (i === 0 ? { ...w, isExternal: true, loadBearing: true } : w)),
ceilings: (sampleProject.ceilings ?? []).map((c) => ({ ...c, isExternal: false, loadBearing: true })),
openings: (sampleProject.openings ?? []).map((o) => ({ ...o, mark: "X1", fireRating: "EI30", soundClass: "Rw 32 dB", burglaryClass: "RC2", uValue: 1.3, isExternal: true })),
};
const ifc = exportIfcSpf(p);
expect(ifc).toContain("IFCTHERMALTRANSMITTANCEMEASURE(1.3)");
const r = validate("psets-kennwerte", ifc);
expect(r.out).toContain("0 Befunde");
expect(r.status).toBe(0);
});
it("Umlaute in Namen", () => {
const p = { ...sampleProject, name: "Wohnüberbauung «Süd»", rooms: (sampleProject.rooms ?? []).map((r) => ({ ...r, name: "Küche/Essen" })) };
const r = validate("umlaute", exportIfcSpf(p));
+23
View File
@@ -79,6 +79,29 @@ describe("IFC-Import als Bauteile: Rundreise Demo-Haus", () => {
expect(text).toContain('"walls":9');
});
it("[98] Pset_*Common: Brand-/Schallschutz, U-Wert, Einbruchhemmung, aussen, tragend (Rundreise)", async () => {
const door = sampleProject.openings!.find((o) => o.kind === "door")!;
const win = sampleProject.openings!.find((o) => o.kind === "window")!;
const wall0 = sampleProject.walls[0]!;
const src: Project = {
...sampleProject,
walls: sampleProject.walls.map((w) => (w.id === wall0.id ? { ...w, isExternal: true, loadBearing: true } : w)),
openings: (sampleProject.openings ?? []).map((o) =>
o.id === door.id
? { ...o, fireRating: "EI30", soundClass: "Rw 32 dB", burglaryClass: "RC2", uValue: 1.3, isExternal: false }
: o.id === win.id
? { ...o, uValue: 0.9, isExternal: true }
: o,
),
};
const { project: p } = await importInto(emptyProject, src);
const d = (p.openings ?? []).find((o) => o.kind === "door")!;
expect(d).toMatchObject({ fireRating: "EI30", soundClass: "Rw 32 dB", burglaryClass: "RC2", uValue: 1.3, isExternal: false });
const w = (p.openings ?? []).find((o) => o.kind === "window" && Math.abs(o.width - win.width) < 1e-6)!;
expect(w).toMatchObject({ uValue: 0.9, isExternal: true });
expect(p.walls.filter((x) => x.isExternal === true && x.loadBearing === true).length).toBe(1);
});
it("Tür-Anschlag/Aufschlag und Fensterteilung aus OperationType/PartitioningType (Rundreise)", async () => {
// Lage im Raum vergleichen (die Wand kann umgekehrt ankommen): Scharnierpunkt und Aufschlagrichtung.
const physical = (o: Opening, w: Wall) => {