Files
torsten d5c13033e2 Session 022: Migrate Lts/Tools (72 submodules) to Qt6
- Copied complete Lts/Tools directory from qt5-before to qt6-after
- Updated 32 CMakeLists.txt files (Qt5:: → Qt6::)
- Tools subdirectory already included in parent Lts/CMakeLists.txt
- All 72 tool submodules now present in qt6-migrated-legatus
- Includes: Adler, ArAssets, ConfigX, DBAdministration, DBUpdate,
  DdsView, InfrastructureManagement, and 67 more tools
- C++17 standard (RTI 7.7.0 compatibility maintained)
- Tests deferred until final validation phase

Migration progress:
✅ Lts/Application (68 files)
✅ Lts/DDS (verified Qt6-ready)
✅ Lts/Plugins (60 submodules, verified)
✅ Lts/Projects (5 submodules, verified)
✅ Lts/Proxies (13 submodules, verified)
✅ Lts/Services (47 submodules, verified)
✅ Lts/Tools (72 submodules, copied + CMake updated)
✅ Lts/Viewer (LtsFileDialog, LtsReportDisplay, SituationMap)
🟡 TetraIF (partial)
🟡 Z (partial: nglwidgets, QtSingleApplication, qsql_informix, WMS_Interface)
2026-08-25 14:07:20 +02:00

196 lines
5.1 KiB
JavaScript
Executable File

class Polygon {
constructor() {
this.vertex = [];
}
addVertext(vertex) {
this.vertex.push(vertex);
}
closeRing() {
this.vertex.push(this.vertex[0]);
}
}
var parser, xmlDoc, PolyArray;
var PolygonObj = [];
var text = `<Group>
<Name>FOOTPRINT</Name>
<BBox_Min Z="2.850" Y="2.181" X="3.896" />
<BBox_Max Z="2.851" Y="6.766" X="6.175" />
<Polygon>
<Name>p6739</Name>
<Vertex>
<Name>p6739/V1</Name>
<Coord X="4.166" Y="6.766" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V2</Name>
<Coord X="4.151" Y="6.692" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V3</Name>
<Coord X="3.914" Y="6.694" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V4</Name>
<Coord X="3.896" Y="5.925" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V5</Name>
<Coord X="4.158" Y="5.923" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V6</Name>
<Coord X="4.089" Y="2.181" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V7</Name>
<Coord X="5.178" Y="2.203" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V8</Name>
<Coord X="5.178" Y="2.253" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V9</Name>
<Coord X="5.863" Y="2.253" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V10</Name>
<Coord X="5.879" Y="3.634" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V11</Name>
<Coord X="6.024" Y="3.632" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V12</Name>
<Coord X="6.028" Y="4.383" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V13</Name>
<Coord X="5.888" Y="4.385" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V14</Name>
<Coord X="5.898" Y="5.830" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V15</Name>
<Coord X="6.171" Y="5.829" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V16</Name>
<Coord X="6.175" Y="6.554" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V17</Name>
<Coord X="5.902" Y="6.555" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V18</Name>
<Coord X="5.903" Y="6.760" Z="2.850" />
</Vertex>
</Polygon>
<Polygon>
<Name>p6739</Name>
<Vertex>
<Name>p6739/V1</Name>
<Coord X="4.166" Y="6.766" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V2</Name>
<Coord X="4.151" Y="6.692" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V3</Name>
<Coord X="3.914" Y="6.694" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V4</Name>
<Coord X="3.896" Y="5.925" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V5</Name>
<Coord X="4.158" Y="5.923" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V6</Name>
<Coord X="4.089" Y="2.181" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V7</Name>
<Coord X="5.178" Y="2.203" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V8</Name>
<Coord X="5.178" Y="2.253" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V9</Name>
<Coord X="5.863" Y="2.253" Z="2.851" />
</Vertex>
<Vertex>
<Name>p6739/V10</Name>
<Coord X="5.879" Y="3.634" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V11</Name>
<Coord X="6.024" Y="3.632" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V12</Name>
<Coord X="6.028" Y="4.383" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V13</Name>
<Coord X="5.888" Y="4.385" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V14</Name>
<Coord X="5.898" Y="5.830" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V15</Name>
<Coord X="6.171" Y="5.829" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V16</Name>
<Coord X="6.175" Y="6.554" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V17</Name>
<Coord X="5.902" Y="6.555" Z="2.850" />
</Vertex>
<Vertex>
<Name>p6739/V18</Name>
<Coord X="5.903" Y="6.760" Z="2.850" />
</Vertex>
</Polygon>
</Group>`
parser = new DOMParser();
xmlDoc = parser.parseFromString(text, "text/xml");
PolyArray = Array.from(xmlDoc.getElementsByTagName("Polygon"));
PolyArray.forEach(polygon => {
polyObj = new P1();
var vertexes = Array.from(polygon.children);
for (var x = 1; x < vertexes.length; x++) {
var vertextChildren = vertexes[x].children[1].attributes;
var vertex = {};
for (var y = 0; y < 3; y++) {
switch (y) {
case 1:
vertex.x = parseFloat(vertextChildren[y].nodeValue);
break;
case 2:
vertex.y = parseFloat(vertextChildren[y].nodeValue);
case 3:
vertex.z = parseFloat(vertextChildren[y].nodeValue);
}
}
polyObj.addVertext(vertex);
}
P1.push(polyObj);
});
P1.forEach(polygon => {
polygon.closeRing();
});