[69] IFC: IfcProjectedCRS EPSG:2056 + IfcMapConversion bei gesetztem geoAnchor; Test
This commit is contained in:
1 parent
b2a1d58191
commit
5fec1ea809
2 files changed
+15
No files matched your search
@@ -325,6 +325,10 @@ describe("exportIfcSpf — IFC4-Export", () => {
|
||||
expect(spf).toContain("2600000.");
|
||||
expect(spf).toContain("1200000.");
|
||||
expect(spf).toContain("2600005.");
|
||||
// Koordinatensystem deklariert (IFC4): EPSG:2056 + Identitäts-Abbildung.
|
||||
expect(spf).toContain("IFCPROJECTEDCRS('EPSG:2056'");
|
||||
expect(spf).toContain("IFCMAPCONVERSION(");
|
||||
expect(withoutAnchor).not.toContain("IFCMAPCONVERSION");
|
||||
// Struktur bleibt valide (keine dangling refs / Duplikate).
|
||||
const { defined, referenced, duplicates } = collectIds(spf);
|
||||
expect(duplicates).toEqual([]);
|
||||
|
||||
@@ -335,6 +335,17 @@ export function exportIfcSpf(projectIn: Project): string {
|
||||
`$,${S("Model")},3,${R(0.00001)},#${identityAxis},$`,
|
||||
);
|
||||
|
||||
// Georeferenz: Die Geometrie liegt bereits in LV95-Weltkoordinaten (s. oben), die Abbildung
|
||||
// lokal→Welt ist daher die Identität; das Koordinatensystem wird trotzdem deklariert, damit
|
||||
// Importer die Datei als EPSG:2056 erkennen (IFC4 IfcProjectedCRS + IfcMapConversion).
|
||||
if (project.geoAnchor) {
|
||||
const crs = w.add(
|
||||
"IFCPROJECTEDCRS",
|
||||
`${S("EPSG:2056")},${S("CH1903+ / LV95")},${S("CH1903+")},$,${S("Swiss Oblique Mercator")},$,#${lenUnit}`,
|
||||
);
|
||||
w.add("IFCMAPCONVERSION", `#${context},#${crs},${R(0)},${R(0)},${R(0)},${R(1)},${R(0)},${R(1)}`);
|
||||
}
|
||||
|
||||
// Räumliche Hierarchie: Project → Site → Building → Storeys.
|
||||
const siteAxis = w.add("IFCAXIS2PLACEMENT3D", `#${originPoint},$,$`);
|
||||
const sitePlacement = w.add("IFCLOCALPLACEMENT", `$,#${siteAxis}`);
|
||||
|
||||
Reference in new issue
Block a user