From 636286024c28df20e4905915b41b0178589e431e Mon Sep 17 00:00:00 2001 From: Johannes Baumeister Date: Tue, 12 May 2026 13:20:09 +0200 Subject: [PATCH] Fix Nordex mirroring logic by default v1.0.3 --- app.js | 13 +++++++------ index.html | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index cf3a617..ad54132 100644 --- a/app.js +++ b/app.js @@ -160,7 +160,8 @@ document.addEventListener('DOMContentLoaded', async () => { const foundation = turf.circle(point, (fr) / 1000, { units: 'kilometers', steps: steps }); // Helper for KSF Geometries - const spg = ksfMirrored ? -1 : 1; + const isNordex = hersteller && hersteller.toLowerCase() === 'nordex'; + const spg = (ksfMirrored !== isNordex) ? -1 : 1; // Turf uses CCW for positive angles. Most tools use CW. // We'll use negative angle for CCW to achieve CW rotation if expected. const angle = -ksfAngle; @@ -196,20 +197,20 @@ document.addEventListener('DOMContentLoaded', async () => { // Nordex Geometries (Based on new QGIS schema provided by user) // KSF (Red): Complex polygon ksfCoords = [ - [-18, -44.72], [-18, 14.91], [6.31, 14.91], [18.38, 0], - [18.38, -33.19], [7, -44.72], [-18, -44.72] + [18, -44.72], [18, 14.91], [-6.31, 14.91], [-18.38, 0], + [-18.38, -33.19], [-7, -44.72], [18, -44.72] ]; // AMF (Green Area): 180m long starting at KSF edge, 15m wide const amf = [ - [-18, -44.72], [-18, -224.72], [-3, -224.72], [-3, -44.72], [-18, -44.72] + [18, -44.72], [18, -224.72], [3, -224.72], [3, -44.72], [18, -44.72] ]; mfParts = [amf]; // BLF/Road (Blue Area): Complex unified shape blfCoords = [ - [-18, -224.72], [-18, 40], [-49.5, 40], [-49.5, -100], - [-24, -100], [-24, -224.72], [-18, -224.72] + [18, -224.72], [18, 40], [49.5, 40], [49.5, -100], + [24, -100], [24, -224.72], [18, -224.72] ]; } else { // Enercon / Vestas / GE (Standard) diff --git a/index.html b/index.html index 286f517..eba0c65 100644 --- a/index.html +++ b/index.html @@ -142,7 +142,7 @@
- Bereit. (v1.0.2 - Mirrored Nordex) + Bereit. (v1.0.3 - Mirrored Nordex Default)