A GIM to GLB high-fidelity conversion and optimization method for substation three-dimensional models

By using a unified unit system and a specialized geometry generation algorithm, the rendering and loading problems of substation 3D models on different platforms were solved, achieving high-fidelity conversion and optimization, and ensuring efficient loading and alignment accuracy of the model in UE, browser and Cesium platforms.

CN122199847APending Publication Date: 2026-06-12ANHUI ELECTRIC POWER DESIGN INST CEEC +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI ELECTRIC POWER DESIGN INST CEEC
Filing Date
2026-03-02
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing 3D model conversion process for substations suffers from problems such as inconsistent coordinate and unit processing, loss of material and color information, difficulty in preserving the fidelity of slender components such as wires, insufficient model assembly and alignment accuracy, and excessively large GLB file size. These issues result in poor rendering effects and insufficient loading performance on UE, browsers, and the Cesium platform.

Method used

By establishing a unified internal unit system, adopting box endpoint alignment, frustum replacement generation, and segmented cylindrical generation of wires, and combining cross-file and cross-modal attribute and coordinate fusion, the scene assembly and optimization structure is designed to achieve high-fidelity conversion and optimization of GLB files. This includes step one: parsing and metadata acquisition; step two: geometry generation and multi-scale component sub-module design; step three: cross-file/cross-modal attribute and coordinate fusion; step four: scene assembly and optimization structure design; step five: GLB export and consistency verification; and step six: model performance evaluation and index analysis.

🎯Benefits of technology

It achieves a unified spatial benchmark for the 3D model of the substation in UE, browser and Cesium platform, ensuring high-fidelity rendering and smooth loading of the model on different platforms, significantly reducing the size of GLB file, improving the visibility and alignment accuracy of the model, and improving the efficiency and quality of digital twin engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199847A_ABST
    Figure CN122199847A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of three-dimensional model data conversion and lightweight visualization, and particularly relates to a GIM to GLB high-fidelity conversion and optimization method for a substation three-dimensional model. The present application automatically completes unit unification, optional preservation of original coordinates, bounding box alignment and rotation calibration through multi-level file analysis and matrix reduction; ensures continuous visibility of conductors by using an improved geometry generator and conductor segment-by-segment cylindricalization generation; compresses a hundred-megabyte model to about half the size by using a lightweight strategy of color merging and vertex deduplication, and realizes high-fidelity output in terms of PBR material, IFC color analysis and the like; and finally outputs GLB / GLTF, which can directly support real-time loading and interaction of Web / VR / AR, and constructs a full-link automatic process of "geometric analysis-intelligent generation-lightweight optimization-alignment output", thereby providing a high-precision and low-delay three-dimensional data base for substation digital twinning and online operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of 3D model data conversion and lightweight visualization technology, specifically involving a high-fidelity conversion and optimization method for GIM to GLB for 3D models of substations. Background Technology

[0002] Substation 3D models are one of the crucial foundational data for power grid planning, design, construction management, and operation and maintenance decisions. With the rapid development of digital twin technology in the power industry, an increasing number of projects are adopting Unreal Engine (UE)-based digital twin platforms to construct highly realistic 3D visualization scenes. This is combined with lightweight browser-based displays using engines such as WebGL / Three.js, and the overlay of geographic base maps on 3D geographic platforms like Cesium for spatial alignment and situational awareness. In this context, GLB / GLTF has become a standard 3D asset format shared across UE, browsers, and Cesium. Therefore, the stable and accurate conversion of existing substation GIM (Geometric Information Model) data into high-fidelity, size-controlled GLB models is a key step in the successful implementation of power digital twin projects.

[0003] Existing 3D conversion processes for substations are mostly designed for a single rendering environment: some solutions only focus on importing FBX / OBJ models into the UE, lacking a unified plan for coordinate systems, units, and hierarchical relationships, making it difficult to seamlessly reuse the same model in browsers and Cesium scenes; other general-purpose mesh tools, while supporting GLB export, are unfamiliar with the internal CBM / DEV / PHM / MOD / IFC hierarchical structure of GIM, lacking specialized handling for wires, buses, and basic components, easily leading to problems such as missing wires, component misalignment, and material confusion, affecting the rendering effect of the UE scene and the geographic alignment accuracy in Cesium. Meanwhile, due to the lack of a lightweight strategy for unified optimization across Web / UE / Cesium, directly exported GLB files often exceed 100MB in size: importing them into the UE increases baking and runtime overhead, loading them in the browser causes prolonged blank screens, and overlaying geographic base maps in Cesium results in stuttering or even rendering failure. In specific engineering practice, the following prominent contradictions also exist: First, inconsistent handling of units and coordinate systems. Some conversion processes assume all data is in metric units, scaling IFC files by 0.001, or shifting the entire scene to "center" it in the UE viewport, causing GLBs to fail to align accurately with geographic coordinates or oblique photogrammetry data when loaded in Cesium. Secondly, material and color reproduction is incomplete. Information such as color and roughness defined in IFC files is often simplified or discarded during conversion, resulting in uniform device materials displayed in the UE and browser, hindering maintenance personnel from quickly identifying different electrical devices. The lack of reasonable default strategies for some MOD / STL components further reduces the realism of the digital twin scene. Thirdly, slender components such as wires and buses lack dedicated modeling and protection mechanisms. Many general conversion tools merge wires with components like supports and crossarms when generating or merging meshes, or directly ignore the Wire tag, resulting in incomplete scenes where wires are not visible in the UE and only "supports are suspended" in Cesium. Fourthly, there is a lack of a unified lightweight solution for multiple platforms. UE scenarios can usually accept slightly larger model sizes in exchange for better visual effects, while browsers and Cesium are more sensitive to file size and vertex count. The existing "one-size-fits-all" merging and simplification strategy cannot be optimized differently for different target platforms, making it difficult to simultaneously meet the requirements of high-fidelity rendering in UE and smooth loading in Web / Cesium.

[0004] To address the aforementioned issues, this invention proposes a high-fidelity conversion and optimization method for GIM to GLB models of 3D substations. Summary of the Invention

[0005] The purpose of this invention is to provide a high-fidelity conversion and optimization method for GIM to GLB for 3D models of substations, in order to solve the limitations of existing conversion processes such as inconsistent coordinate and unit processing, loss of material and color information, difficulty in preserving the fidelity of slender components such as wires, insufficient model assembly and alignment accuracy, and excessively large GLB file size. This method meets the comprehensive needs of UE digital twin projects for importing GLB, 3D display on the browser, and loading GLB and performing geographic alignment on the Cesium platform.

[0006] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:

[0007] This invention provides a high-fidelity conversion and optimization method for GIM to GLB models of 3D substations, comprising the following steps:

[0008] Step 1: Establish the transformation sample set and metadata: parse the CBM / DEV / PHM / MOD / IFC files of the GIM system to obtain matrix, color, geometry, path and visibility information, unify the internal unit to millimeters and be able to choose to retain the original world coordinates (no-center).

[0009] Step 2, Geometric Generation and Multi-Scale Component Sub-module Design: Supports box endpoint alignment, frustum replacement generation, and segmented cylindrical generation of wires, and performs feature processing on components of different scales;

[0010] Step 3: Design of cross-file / cross-modal attribute and coordinate fusion module: handle multi-source colors (including IFC colors), unit and axis transformations, and build a unified material and coordinate system expression;

[0011] Step 4: Scene assembly and optimized structure design based on hierarchical matrix reasoning: component assembly, scene alignment (rotation / translation), and lightweighting (vertex deduplication, color merging / configurable disabling) are achieved by combining components according to hierarchical matrix.

[0012] Step 5: GLB export and consistency verification based on assembly and optimization process: Generate GLB / GLTF and verify coordinates, colors, wire continuity, and volume compression ratio.

[0013] Step 6: Model performance evaluation and index analysis: Evaluation is conducted using indicators such as mesh count, file size, vertex deduplication rate, wire visibility rate, and color reproduction accuracy.

[0014] Furthermore, in step one, the parsing process includes: reading the scene references and global transformations of the CBM, the device matrix of the DEV, the part matrix of the PHM, and the geometry and color of the MOD / IFC; maintaining millimeter units and not applying a 0.001 scaling to the IFC; and being able to select no-center to preserve the original world coordinates.

[0015] Furthermore, in step two, the geometry generation submodule includes:

[0016] Box generation supports center_origin=False, which places the origin at one end to avoid assembly offset;

[0017] The missing conical_frustum is replaced by a combination of cones and cylinders for frustum / irregular components;

[0018] The wires are generated segment by segment by cylindrical, retaining all path points, with a cross-section of no less than 6 sides and a radius of no less than 5mm, and are given a unique dark material to avoid merging with other meshes.

[0019] Furthermore, in step three, cross-file / cross-modal fusion includes: left-multiplying and combining the axis transformation matrix and the hierarchical matrix; uniformly writing colors into the PBR channel and correcting the IFC color resolution; and converting units at the output end in one step according to unit_scale.

[0020] Furthermore, in step four, the matrix reasoning for scene assembly is as follows:

[0021] ;

[0022] The axis_matrix is ​​used for coordinate system alignment, the parent_matrix is ​​the upper-level assembly matrix, and the local_matrix is ​​the component local matrix. The alignment operation is based on the center of the bounding box, rotating (including 180°) and translating according to the difference in the center of the bounding box, so as to eliminate the translation error caused by the centroid deviation.

[0023] Furthermore, the lightweight strategy in step four includes: vertex deduplication and color-based merging; disabling `merge_by_color` to preserve sub-mesh for scenarios with high detail requirements, and enabling it for performance-priority scenarios to reduce size; the strategy consists of two core sub-modules: color-driven aggregation grouping and spatial vertex deduplication, supplemented by protection rules, error control, and a rollback mechanism; firstly, the substation data is preprocessed:

[0024] ;

[0025] Where c_i is the vertex color, c_i^lin is used for ΔE color difference measurement, and T(v_i) and UV(v_i) (the texture / material ID and texture coordinates of the vertex) are recorded; then, preliminary bucketing is performed (by material / texture to avoid accidental merging):

[0026] ;

[0027] If texture_preserve=True, merging across texture_ids is prohibited, and then similarity measurement (color + position + normal) is performed:

[0028] ;

[0029] Where dist(p,q) is the spatial distance, d_ref represents the scene scale normalization, and n_p is the normal unit vector; then, color clusters are generated:

[0030] ;

[0031] Where C_k is the k-th color / feature cluster, and the elements within the cluster satisfy a similarity threshold. Then, duplicate vertices in the space are removed:

[0032] ;

[0033] If ∀a,b∈S_key satisfies ||Lab_a−Lab_b||≤τ_lab and (1−|n_a·n_b|) ≤τ_n, then they are merged into representative points:

[0034] ;

[0035] And set map_old_to_new[i]=idx(v') (w_i can be area weights). In order to optimize the transformation model, index remapping and degenerate triangle removal are required:

[0036] ;

[0037] Then, error measurement and rollback are performed on the geometry and color texture:

[0038] ;

[0039] If geom_err > geom_eps ∨ color_err > color_eps → rollback(C_k) or retry generation; this method can significantly reduce size and rendering overhead, typically reducing size by 30%–70% in engineering projects, reducing network transmission and video memory usage, speeding up first frame loading; and reducing rendering costs, as CPU / GPU submission overhead is reduced after color merging, and page / engine frame rate is improved.

[0040] Furthermore, it is easy to integrate and parameterize for deployment. The merge_by_color switch provides one-click switching between detail-oriented and performance-oriented priorities, facilitating a unified pipeline for different project needs.

[0041] Furthermore, the evaluation metrics for steps five and six include at least: the exported GLB volume is reduced by approximately 50% compared to the unoptimized direct export, wire continuity (no breaks and coordinates not returning to zero), color reproduction (color consistency between IFC and MOD), mesh / vertex compression ratio, and alignment deviation (pose error based on bounding box center).

[0042] This invention also provides a high-fidelity conversion and optimization system for GIM to GLB models of substation 3D models, used to implement the above-mentioned method, including:

[0043] The acquisition and parsing module is configured to acquire GIM system files and extract matrix, color, geometry, and path information;

[0044] The geometry generation module is configured to generate box bodies, frustum substitutes, and wire meshes generated segment by segment along the path.

[0045] The attribute and coordinate fusion module is configured to perform axis transformation, unit unification, and color / PBR writing;

[0046] The assembly and optimization module is configured to perform hierarchical matrix combination, bounding box center rotation and translation alignment, vertex deduplication and color merging (configurable switch).

[0047] The export and verification module is configured to export GLB / GLTF and perform consistency verification on volume, alignment, color, and wire continuity.

[0048] The beneficial effects of this invention are:

[0049] This invention proposes a high-fidelity conversion and optimization method for GIM to GLB models of 3D substations. The method focuses on "unifying coordinates and units, preserving electrical semantics, and considering multi-platform loading performance." It fully analyzes the hierarchical structure of GIM files and the characteristics of substation components, designs a geometric reconstruction algorithm for regular components, a dedicated modeling and protection mechanism for conductors, and a lightweight strategy configurable by site and target platform (UE scene, browser display, Cesium geographic overlay). On the one hand, by establishing an internal unit system centered on millimeters, providing an optional scene centering switch (no-center), and implementing a rotation and translation calibration mechanism based on the bounding box center, a unified spatial reference for GIM data is achieved in three environments: UE, browser, and Cesium. On the other hand, through parametric reconstruction of typical components such as boxes, frustums, and conductors, and combined with multi-level optimization of color merging and vertex deduplication, the hundreds-of-megabytes-level GIM model is compressed to a size suitable for multi-platform loading, while ensuring good visual effects in the UE, fast loading in the browser, and accurate overlay with geographic base maps and GIS data in Cesium. Through these improvements, this invention provides a universal, stable, and high-fidelity GIM→GLB conversion toolchain for UE digital twin projects, web online displays, and Cesium 3D geographic applications in the power industry.

[0050] Of course, any product implementing this invention does not necessarily need to achieve all of the above advantages at the same time. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is an overall flowchart of an embodiment of the present invention;

[0053] This diagram illustrates the complete processing flow from GIM data parsing to GLB export;

[0054] Figure 2 This is a schematic diagram of the hierarchical assembly and matrix reasoning framework of an embodiment of the present invention;

[0055] This diagram illustrates the relationships between files such as CBM, DEV, PHM, MOD, and IFC, and how the combination matrix is ​​calculated.

[0056] Figure 3 This is a schematic diagram of the multi-scale geometry generation submodule in an embodiment of the present invention;

[0057] This diagram illustrates the process of aligning the end points of the box, replacing the frustum, and generating the cylindrical wire segment by segment.

[0058] Figure 4 This is a schematic diagram illustrating scene alignment and lightweight optimization in an embodiment of the present invention;

[0059] This diagram illustrates the rotation and translation alignment strategy based on the bounding box center, as well as the optimization process of merging by color and deduplicating vertexes.

[0060] Figure 5 This is a comparison chart of the conversion results of an embodiment of the present invention;

[0061] This figure illustrates the differences in size, mesh count, wire visibility, and material reproduction of GLB files before and after optimization.

[0062] Figure 6 This is a flowchart of the color-based merging and vertex deduplication algorithm according to an embodiment of the present invention.

[0063] This method significantly reduces file size and rendering overhead, typically reducing file size by 30%–70% in engineering projects, decreasing network transmission and VRAM usage, and speeding up first frame loading. It also lowers rendering costs; by merging colors, CPU / GPU submission overhead is reduced, and page / engine frame rates are improved. Detailed Implementation

[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0065] A high-fidelity conversion and optimization method for GIM to GLB models of 3D substations includes the following steps:

[0066] Step 1: Establish the transformed sample set and basic data structure

[0067] Obtain the GIM data for the substation project, decompress or expand it, and read the CBM, DEV, PHM, MOD, and IFC files containing information on the substation structure and equipment hierarchy:

[0068] First, the CBM file is parsed to obtain the site-level object model pointer, global coordinate system definition, and initial transformation matrix, and to establish the site-level scene root node. The DEV file is parsed to read the equipment-level model name, the matrix transformation information of the equipment relative to the site, and the visibility marker, and to construct the equipment hierarchy. The PHM file is parsed to parse the component-level model reference and its local transformation matrix, and to associate it with the corresponding equipment node. The MOD file is read to read the specific geometric entity definition, wire path, basic color, and material information. The IFC file is parsed to parse the component geometry, material, and PBR color attributes, and to establish a mapping relationship with the corresponding equipment or component in the GIM.

[0069] Then, using millimeters as the unified internal length unit, all units such as meters and centimeters that may exist in files at different levels are explicitly converted to the millimeter coordinate system. Adding a 0.001 scaling factor to the IFC coordinates is prohibited to avoid scaling distortion caused by overlapping scaling. At the scene level, a configuration option is provided to enable or disable global centering: when the user selects "no-center," the original world coordinates defined in the GIM are preserved for spatial alignment with the geographic base map or oblique photogrammetry data in Cesium; when the user needs to browse using local coordinates in the UE or browser, centering can be enabled as needed.

[0070] Finally, during the parsing phase, the geometric, matrix, color, and semantic information of all components are organized into a unified intermediate data structure, including: unique component number, parent-child hierarchy, original local matrix, upper-level combination matrix, geometric type (box, frustum, wire, general mesh, etc.), material parameters, and whether it can participate in merging, etc., to provide input data for subsequent geometry generation, assembly, and lightweighting.

[0071] Step 2: Design of Multi-Scale Geometry Generation Submodule

[0072] Based on the typical component types in substation GIM, a targeted geometry generation and reconstruction submodule is designed to improve mesh quality and facilitate lightweight processing.

[0073] First, for regular box-shaped components such as foundations, cable trays, and steel structural frames, the parametric box generation function `create_box` is used for reconstruction. This function supports the `center_origin` parameter. When `center_origin=False`, the origin of the box is defined at one end or a corner of the bottom surface, so that there will be no overall translational offset when applying the local transformation matrix. This is especially suitable for the precise positioning of components such as long cable trays and cable racks.

[0074] Secondly, for frustum, electrical support, and conical transition components, considering the lack of the conical_frustum interface in some GIM environments, this invention uses a combination of cone and cylinder for geometric substitution: while maintaining the consistency of the upper base radius, lower base radius, and height parameters, equivalent geometry is generated by splicing truncated cones and truncated cylinders, thereby avoiding the component loss problem caused by missing library functions, while taking into account rendering efficiency and shape similarity.

[0075] Furthermore, for slender components such as wires and busbars, this invention generates geometry based on the FitCoordArray path list defined in the MOD file. Specifically, it first reads all sampling points on the path without excessive thinning to ensure the continuity of the path geometry; then, it generates line segments based on adjacent point pairs, and generates cylindrical meshes with a cross-section of no less than 6 sides along the line segment direction. The radius of the cylinder is calculated based on the wire diameter parameter, and a minimum limit of 5mm is enforced to ensure visibility in the UE scene and browser rendering. To prevent the subsequent color merging step from merging the wires with other components, this invention assigns an independent dark material channel to the wires, keeping them as independent meshes during the merging process.

[0076] Through the above-mentioned multi-scale geometric generation design, this invention maintains the engineering characteristics of the component shape while controlling the mesh complexity, so that key objects such as foundations, steel structures, frustums, and wires can still be accurately identified and rendered after being converted to GLB.

[0077] Step 3: Design of the Cross-File and Attribute Fusion Module

[0078] This module is responsible for unifying geometric, matrix, and material information from different files and coordinate systems into a consistent expression space, providing a foundation for subsequent scene assembly and lightweight optimization.

[0079] First, at the coordinate and matrix level, this invention establishes a unified combined matrix representation for each component: by reading the axis transformation matrix `axis_matrix`, the native GIM coordinate system is aligned with the GLTF coordinate system; then, the site matrix of the CBM layer, the device matrix of the DEV layer, the component matrix of the PHM layer, and the local matrix of the MOD / IFC layer are multiplied sequentially to the left, constructing a combined matrix `combined = axis_matrix × CBM × DEV × PHM × local`. This combined matrix preserves the original hierarchical relationship while ensuring that all components fall within a unified three-dimensional coordinate system, facilitating sharing across the UE, browser, and Cesium.

[0080] Secondly, at the material and color level, this invention parses the surface styles, color values, and PBR parameters in the IFC file, converting them into fields such as baseColorFactor, metallicFactor, and roughnessFactor in the pbrMetallicRoughness structure of GLTF. Simultaneously, it maps simplified or indexed colors in the MOD file, assigning configurable default neutral materials to components without explicitly defined materials. To ensure consistency across multiple platforms, all colors are normalized in the same color space to avoid issues of being too dark or too bright on certain platforms.

[0081] Finally, at the attribute fusion level, information such as the component's geometry type, material label, whether it can be merged, its site and sub-scene are written into the intermediate data structure, providing a basis for selecting different optimization strategies based on the target platform (UE high-fidelity rendering, browser fast browsing, Cesium geographic overlay).

[0082] Step 4: Scene assembly and optimized structure design based on hierarchical reasoning

[0083] After completing geometry generation and attribute fusion, this invention achieves whole-site scene assembly through hierarchical matrix reasoning, and performs alignment and lightweight optimization on this basis.

[0084] First, during the scene assembly stage, based on the parent-child relationships in the intermediate data structure, starting from the root node of the substation, the equipment, components, and geometric elements are recursively traversed, and the aforementioned combination matrix is ​​applied to the geometric mesh to achieve spatial reconstruction of the entire substation. To improve accuracy, this invention uniformly uses double-precision floating-point representation when calculating the combination matrix to avoid cumulative errors during multiple matrix multiplications.

[0085] Then, in the alignment stage, this invention adopts an alignment strategy based on the bounding box center: on the one hand, when no external coordinate system is needed, a self-consistent coordinate system can be obtained simply by combining axis transformations and internal matrices; on the other hand, when alignment to an existing reference GLB or Cesium geographic scene is required, the overall bounding box center of the transformed model is first calculated, and then compared with the bounding box center corresponding to the latitude, longitude, and altitude coordinates of the reference model or target to obtain the translation vector; if a 180° or other angle rotation around an axis is required, the transformation is performed with the bounding box center as the rotation center. Compared with rotation methods that use the geometric centroid or origin as a reference, this method can significantly reduce the displacement error after alignment, ensuring accurate and consistent geographic overlay in Cesium and stitching with other sub-scenes in the UE.

[0086] Next, in the lightweighting stage, this invention employs a two-stage optimization strategy of "vertex deduplication + color-based merging". First, vertex deduplication is performed on the local mesh of each component, eliminating duplicate vertices and degenerate triangles to reduce storage redundancy. Then, the meshes are merged based on material and color labels, combining multiple sub-meshes of the same material into fewer meshes to reduce the number of meshes and primitives in the GLB. During this process, components marked as "non-mergeable," such as wires, are retained as independent meshes to ensure visual continuity and controllability. For sites requiring extremely high detail retention, this invention provides an option to disable the merge_by_color switch, performing only local vertex deduplication without cross-component merging to preserve all sub-mesh information.

[0087] Step 5: GLB Export and Consistency Verification Based on Assembly and Optimization Process

[0088] After the aforementioned assembly and lightweighting are completed, this invention converts the intermediate data structure into an output format conforming to the GLTF / GLB specification, writing mesh vertices, indices, normals, UV coordinates, material parameters, and node hierarchy relationships into a GLB file. During the export process, the loading characteristics of different platforms such as UE, browsers, and Cesium are considered, and the buffer layout, index type, and data alignment are uniformly planned to ensure correct parsing and rendering on each platform.

[0089] After exporting, this invention performs a series of automatic consistency checks, including but not limited to: counting the total number of grids and vertices, calculating vertex deduplication rate and file size compression rate; checking the coordinate range and continuity of all wire meshes to prevent coordinate zeroing or path breaks; comparing the color distribution in IFC and GLB to evaluate the degree of color reproduction; and calculating the deviation between the bounding box of the assembled model and the reference scene or geographic coordinates to ensure that the alignment error is within an acceptable range. The check results can generate a report, providing quality assurance for UE scene construction, web frontend loading, and Cesium geographic overlay.

[0090] Step Six: Model Performance Evaluation and Index Analysis

[0091] To verify the effectiveness of the GIM to GLB high-fidelity conversion and optimization method, this invention conducted comprehensive testing and evaluation on multiple substation engineering data. Evaluation metrics included: file size (MB), number of grids and vertices, vertex deduplication rate, conductor visibility rate (the proportion of conductor nodes successfully generated and within the visible range), material color reproduction accuracy (a statistical indicator based on color differences), and performance parameters for loading and rendering in UE, browser, and Cesium (such as first frame loading time, frame rate, memory usage, etc.).

[0092] Compared with the traditional "direct export + simple compression" approach, this invention, while maintaining coordinate accuracy and material effects, generally compresses GLB file sizes from the 100MB range to around 50MB, significantly improves vertex deduplication, and ensures continuous visibility of wireframe components across multiple platforms. In Cesium scenes, alignment errors between the model and the base map or other geographic data are significantly reduced. In UEs and browsers, scene loading times are shortened and interaction frame rates are increased. Comprehensive experimental results demonstrate that this invention outperforms existing methods in terms of accuracy, robustness, and multi-platform adaptability, possessing significant engineering practical value.

[0093] This invention maintains a consistent spatial reference system across different platforms by establishing a unified internal unit system and an optional no-center scene centering strategy. Through specialized geometry generation algorithms for typical components such as boxes, frustums, and conductors, it effectively avoids common problems in traditional processes, such as component misalignment and missing conductors. A lightweight strategy with configurable switches compresses model volume while preserving necessary geometric details. Automatic multi-index verification of the exported results ensures that the converted GLB model can stably serve UE digital twin projects, browser-based visualization, and Cesium geographic scene loading. This invention significantly improves the efficiency and quality of cross-platform reuse of substation 3D models, providing a universal and reliable technical solution for the large-scale implementation of digital twin projects in the power industry.

[0094] Specific embodiments of the present invention are as follows:

[0095] Example

[0096] This embodiment provides a high-fidelity conversion and optimization method for GIM to GLB models of 3D substations, including the following steps:

[0097] Step 1: Parse GIM Data and Establish a Transformation Sample Set. First, obtain the GIM data for the substation project and export or decompress it into a directory structure containing files such as CBM, DEV, PHM, MOD, and IFC. The parsing program sequentially scans the CBM, DEV, PHM, MOD, and IFC directories: — Parse the CBM files, read the key values ​​such as OBJECTMODELPOINTER and TRANSFORMMATRIX of the substation-level object model, obtain the translation, rotation, and scaling information of the entire substation, and establish a scene tree with CBM as the root node; — Parse the DEV files, read the fields such as SOLIDMODELS.NUM, SOLIDMODELᵢ, and TRANSFORMMATRIXᵢ, determine the PHM file corresponding to each device and the local matrix of the device relative to the substation, and construct the device hierarchy; — Parse the PHM files... The process involves parsing the SOLIDMODELᵢ and its corresponding TRANSFORMMATRIXᵢ to establish the correspondence between components and specific geometric models (MOD or STL), and recording the component-level local matrix. For MOD files, the process involves parsing to read parameters and path information from different geometric tags (such as Box, Cylinder, Wire, etc.) to construct a local geometric description. For entries containing the Wire tag, the FitCoordArray field is read to obtain the wire path point sequence. The process also involves parsing the IFC file to read component geometry, surface style, color, and material properties, associating them with the corresponding device or component identifier as the basis for subsequent color and material reconstruction. Regarding unit processing, this embodiment uniformly uses millimeters as the internal length unit: for geometric parameters in meters or centimeters, they are explicitly multiplied or divided by the corresponding coefficient during parsing to convert to millimeters; for fields in the IFC that already use international standard units, no additional 0.001 scaling is applied to avoid proportional distortion caused by repeated unit scaling. For coordinate processing, this embodiment provides a configuration for enabling or disabling global centering. By default, to achieve accurate correspondence with latitude, longitude, and altitude coordinates in geographic scenes such as Cesium, overall scene centering is disabled, preserving the original world coordinates defined in the GIM. In cases where only a partial scene preview is available for the UE, the scene can be shifted to near the local origin before exporting, as needed. After parsing, the hierarchical relationship, local matrix, combination matrix placeholders, geometry type, material index, mergeability flag, and substation to which each component belongs are organized into a unified intermediate data structure, serving as the input sample set for subsequent geometry generation and assembly optimization.

[0098] Step 2: Multi-scale Geometry Generation Submodule Design. Based on common geometric types in GIM data, this embodiment designs a multi-scale geometry generation submodule. Regular components are parametrically reconstructed, and slender components are specially modeled to obtain higher-quality, lightweight meshes while maintaining aesthetic appeal. For box-type components such as foundations, cable trays, cable racks, and equipment cabinets, the parametric box generation function `create_box(a,b,c,center_origin)` is used. When `center_origin=False`, one end of the box (e.g., a corner of the bottom surface) is used as the local origin. When applying upper-level matrix transformations, the starting position of the box can strictly match the design coordinates, avoiding offsets caused by using the geometric center as the origin. This improvement significantly reduces the error with the reference GLB, especially when long, narrow cable trays are laid out along a path. For pillars, conical transitions, and frustum components, due to the lack of the `conical_frustum` interface in some 3D library environments, this embodiment uses a combination of "cone + cylinder" for equivalent replacement: based on the upper base radius r1, lower base radius r2, and height h, a truncated cone is first generated, and then a cylinder is added as needed to supplement the length, thus maintaining consistency with the original design in terms of height and cross-sectional changes. This method considers both UE rendering efficiency and the number of vertices on the browser side to avoid generating excessively fine meshes. For wires, busbars, and cables in cable trays, this embodiment reconstructs the path point by point based on the FitCoordArray field in the MOD file. First, each triple (xᵢ, yᵢ, zᵢ) in the path point sequence is treated as millimeter coordinates without additional scaling; then, adjacent point pairs are considered as segments, the direction vector and length are calculated, and a hexagonal or octagonal cross-section is constructed on the normal plane. Cylindrical segments along the path are generated through rotation and displacement; finally, all segments are connected end to end to form a continuous wire mesh. To ensure that wires are not lost during scaling and merging, this embodiment assigns a separate dark material index to the wire mesh and excludes it from the merge set based on this index in the subsequent merging stage. Through the above multi-scale geometry generation design, this embodiment can maintain the engineering geometric features of various components while controlling mesh complexity, especially ensuring that foundations and wire channels do not shift, frustum components are not lost, and wires remain continuously visible.

[0099] Step 3: Cross-File and Attribute Fusion Module Design The cross-file and attribute fusion module in this embodiment is used to unify geometric, matrix, and material information from different sources such as CBM, DEV, PHM, MOD, and IFC into a single scene description. Regarding matrix fusion, this embodiment uses a hierarchical matrix left multiplication method for combination: First, the axis transformation matrix `axis_matrix` is calculated to convert the native GIM coordinate system (e.g., Z-axis upward) to the coordinate system commonly used by GLTF, UE, and Cesium; then, the site matrix `M_cbm` of the CBM layer, the device matrix `M_dev` of the DEV layer, the component matrix `M_phm` of the PHM layer, and the local matrix `M_local` of the MOD / IFC layer are multiplied sequentially to obtain the combined matrix `M_combined = axis_matrix × M_cbm × M_dev × M_phm × M_local`. Regarding material fusion, this embodiment parses the surface styles and color parameters defined in the IFC file and converts them into the pbrMetallicRoughness structure in GLTF, specifically including baseColorFactor, metallicFactor, and roughnessFactor, while retaining key indicators such as transparency and double-sided rendering. For MOD files that only provide indexed colors or simplified colors, a color mapping table is established to convert them into approximate PBR parameter combinations. For components without explicitly defined colors, this embodiment provides default neutral materials or default colors grouped by device category to quickly distinguish device types in the UE and browser. Regarding attribute tag fusion, this embodiment adds a set of attributes to each component, including tags such as "whether it can be merged," "whether it is a wire type," "belonging to a site or partition," and "whether it participates in collision detection," so that subsequent lightweighting and platform adaptation can adopt differentiated strategies according to different target environments (such as UE high-fidelity rendering, browser fast browsing, and Cesium geographic overlay).

[0100] Step 4: Scene Assembly and Optimized Structural Design After completing geometry generation and attribute fusion, this embodiment follows... Figure 2The hierarchical assembly framework shown is used for scene assembly and optimization. First, starting from the CBM root node, the equipment, parts, and geometric components are recursively traversed, and the aforementioned M_combined matrix is ​​applied to the local geometry of each component to generate a 3D mesh in a unified world coordinate system. To improve numerical stability, this embodiment uses double-precision floating-point calculations when calculating the combination matrix and vertex transformations, and converts them to single-precision storage according to the GLTF specification during the output stage. Subsequently, in the alignment submodule, this embodiment selects an appropriate alignment strategy based on whether there is a reference GLB or Cesium external coordinates: when alignment with an existing reference GLB is required, the difference Δ = (Δx, Δy, Δz) between the center of the current model and the overall bounding box of the reference model is calculated, and translation corrections are applied to all vertices; when alignment with Cesium geographic coordinates is required, the reference point in the target ECEF or local coordinate system is calculated based on the latitude, longitude, and height coordinates of the site center, and the center of the model bounding box is translated to the vicinity of the reference point. If the project requires the model to rotate 180° around a certain axis or by a specified angle, a rotation matrix R is constructed with the bounding box center as the rotation center, and the operation v'=R(v −c)+c is performed on all geometric vertices, where c is the coordinate of the bounding box center. In the lightweight submodule, this embodiment first performs vertex deduplication on each mesh, eliminating duplicate vertices and degenerate surfaces to reduce redundant data; then, a merge set is selected based on material and color labels, and multiple sub-mesh of the same material are connected and merged, thereby reducing the number of meshes and primitives in GLB and reducing drawing calls. For wires marked as "non-mergeable", important device boundaries, or components that require separate interaction, they are kept as independent meshes and do not participate in merging to ensure sufficient granularity when interactively controlling in the UE, selecting highlights in the browser, and querying in Cesium. For sites that emphasize detail preservation, merge_by_color can be turned off, performing only vertex deduplication without merging across components, thereby obtaining higher geometric fidelity.

[0101] Step 5: GLB Export and Consistency Verification. After assembly and optimization, this embodiment converts the intermediate data structure into a binary file conforming to the GLTF / GLB standard. During the export process, node hierarchy, mesh list, buffer, and bufferView structures are constructed according to the GLTF specification, and vertex coordinates, normals, indices, material parameters, and other data are written into a unified binary buffer. To balance the parsing performance of UE, browser, and Cesium, this embodiment has made unified plans for index type selection, data alignment, and buffer block division, ensuring that mainstream loaders can use it directly without additional conversion. After exporting, this embodiment performs consistency verification on the results: The total volume, number of meshes, and number of vertices of the GLB file are calculated and compared with the estimated geometric complexity in the original GIM; vertex deduplication rate and volume compression rate are calculated. A specific inspection is performed on the wire mesh to confirm that its vertex coordinates are not concentrated at the origin, paths are continuously distributed in space, and the Z-coordinate range is reasonable. The colors defined by the IFC are compared with the color distribution of materials in the GLB to evaluate the degree of color reproduction. With a reference GLB or geographic coordinates, the offset and pose difference of the bounding box centers of the two are measured to ensure that the alignment error is within a predetermined threshold range. The above verification results can be output as logs or report files, providing quality basis for UE digital twin projects, browser front-end development, and Cesium scene construction.

[0102] Step Six: Model Performance Evaluation and Index Analysis To verify the effectiveness of the GIM to GLB high-fidelity conversion and optimization method, this embodiment conducted detailed experimental analysis on multiple real substation engineering datasets. Key evaluation indicators included: GLB file size (MB), mesh and vertex count, vertex deduplication rate, conductor visibility rate (the proportion of successfully generated conductors visible within the viewport), color reproduction accuracy (based on color difference statistics), and loading time, first frame display time, average frame rate, and memory usage in UE, browser, and Cesium environments. Experimental results show that, compared to the traditional "direct export + simple compression" method, this embodiment can compress the GLB file size from 100MB to approximately 50MB while maintaining coordinate accuracy and material effects. Vertex deduplication rate is significantly improved, and the continuous visibility rate of conductors across multiple platforms is greatly enhanced. In Cesium, the alignment error between the model and the geographic base map is significantly reduced. In UE and browser environments, scene loading is faster, interaction is smoother, and resource usage is more controllable. Meanwhile, by comparing results under different sites and configurations, the study verifies that the configurable lightweight strategy provides a flexible trade-off between "high fidelity" and "high performance." This embodiment has good versatility and promotional value in engineering practice.

[0103] To meet the real-time interactive needs of power grid digitalization, intelligent operation and maintenance, and Web / VR / AR online visualization, this embodiment addresses the shortcomings of traditional GIM conversion processes in terms of insufficient automation and inability to form an end-to-end closed loop of "data to interaction" in aspects such as unit / coordinate system processing, material / color restoration, conductor generation, and volume control. It constructs a fully automated end-to-end solution that deeply integrates professional geometric analysis and modern 3D lightweight optimization. This solution automatically completes unit consistency, optional preservation of original coordinates (no-center), bounding box alignment, and rotation calibration through multi-level (CBM / DEV / PHM / MOD / IFC) file parsing and matrix restoration. It utilizes an improved geometry generator (box endpoint alignment, replacing frustums with cone+cylinder) and segment-by-segment cylindrical generation of conductors to ensure continuous conductor visibility. Through a lightweight strategy of color merging and vertex deduplication (with a configurable merge_by_color switch per site), it compresses the 100-megabit model to approximately half its original size and achieves high-fidelity output in PBR materials and IFC color analysis. The final output GLB / GLTF can directly support real-time loading and interaction for Web / VR / AR, and has built a fully automated process of "geometric analysis - intelligent generation - lightweight optimization - aligned output". It effectively solves the pain points of traditional methods such as low efficiency, large offset, missing materials, missing wires, and excessive volume, and provides a high-precision, low-latency 3D data foundation for substation digital twins and online operation and maintenance.

[0104] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to specific implementations. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A high-fidelity conversion and optimization method for GIM to GLB models of 3D substations, characterized in that, Includes the following steps: Step 1: Establish the transformation sample set and metadata: parse the CBM / DEV / PHM / MOD / IFC files of the GIM system to obtain matrix, color, geometry, path and visibility information, unify the internal unit to millimeters and be able to choose to retain the original world coordinates; Step 2, Geometric Generation and Multi-Scale Component Sub-module Design: Supports box endpoint alignment, frustum replacement generation, and segmented cylindrical generation of wires, and performs feature processing on components of different scales; Step 3: Design of cross-file / cross-modal attribute and coordinate fusion module: handle multi-source colors, units, and axis transformations, and build a unified material and coordinate system expression; Step 4: Scene assembly and optimized structure design based on hierarchical matrix reasoning: component assembly, scene alignment, and lightweighting are achieved by combining hierarchical matrices. Step 5: GLB export and consistency verification based on assembly and optimization process: Generate GLB / GLTF and verify coordinates, colors, wire continuity, and volume compression ratio. Step 6: Model performance evaluation and index analysis: Evaluation is conducted using indicators such as mesh count, file size, vertex deduplication rate, wire visibility rate, and color reproduction accuracy.

2. The method according to claim 1, characterized in that, In step one, the parsing process includes: reading the scene references and global transformations of the CBM, the device matrix of the DEV, the part matrix of the PHM, and the geometry and color of the MOD / IFC; maintaining millimeter units and not applying a 0.001 scaling to the IFC; and being able to select no-center to preserve the original world coordinates.

3. The method according to claim 1, characterized in that, In step two, the geometry generation submodule includes: Box generation supports center_origin=False, which places the origin at one end to avoid assembly offset; The missing conical_frustum is replaced by a combination of cones and cylinders for frustum / irregular components; The conductors are generated segment by segment as cylinders, retaining all path points. The cross-section has at least 6 sides and a radius of at least 5mm, and is given a unique dark material to avoid merging with other meshes.

4. The method according to claim 1, characterized in that, In step three, cross-file / cross-modal fusion includes: left-multiplying and combining the axis transformation matrix and the hierarchical matrix; uniformly writing colors into the PBR channel and correcting the IFC color resolution; and converting units at the output end in one step according to unit_scale.

5. The method according to claim 1, characterized in that, In step four, the matrix reasoning for scene assembly is as follows: ; The axis_matrix is ​​used for coordinate system alignment, the parent_matrix is ​​the upper-level assembly matrix, and the local_matrix is ​​the component local matrix. The alignment operation is based on the center of the bounding box for rotation and translation according to the difference in the center of the bounding box to eliminate translation errors caused by centroid deviation.

6. The method according to claim 1, characterized in that, The lightweight strategy in step four includes vertex deduplication and color-based merging; for scenarios with high detail requirements, `merge_by_color` is disabled to preserve sub-mesh, while for performance-priority scenarios, it is enabled to reduce size; the strategy consists of two core sub-modules: color-driven aggregation grouping and spatial vertex deduplication, supplemented by protection rules, error control, and rollback mechanisms; the substation data is first preprocessed: ; Where c_i is the vertex color, c_i^lin is used for ΔE color difference measurement, recording T(v_i) and UV(v_i); then, preliminary bucketing is performed: ; If texture_preserve=True, merging across texture_ids is prohibited, and then similarity measurement is performed: ; Where dist(p,q) is the spatial distance, d_ref represents the scene scale normalization, and n_p is the unit normal vector; then, color clusters are generated: ; Where C_k is the k-th color / feature cluster, and the elements within the cluster satisfy a similarity threshold. Then, duplicate vertices in the space are removed: ; If ∀a,b∈S_key satisfies ||Lab_a−Lab_b||≤τ_lab and (1−|n_a·n_b|)≤τ_n, then merge them into representative points: ; And set map_old_to_new[i]=idx(v'). To optimize the transformation model, index remapping and degenerate triangle removal are required: ; Then, error measurement and rollback are performed on the geometry and color texture: ; If geom_err > geom_eps ∨ color_err > color_eps, then rollback(C_k) or retry generating.

7. The method according to claim 1, characterized in that, The evaluation metrics for steps five and six should include at least: a 50% reduction in exported GLB volume compared to unoptimized direct export, wire continuity, color fidelity, mesh / vertex compression ratio, and alignment deviation.

8. A high-fidelity conversion and optimization system for GIM to GLB models of substations, used to implement the method described in any one of claims 1-7, characterized in that, include: The acquisition and parsing module is configured to acquire GIM system files and extract matrix, color, geometry, and path information; The geometry generation module is configured to generate box bodies, frustum substitutes, and wire meshes generated segment by segment along the path. The attribute and coordinate fusion module is configured to perform axis transformation, unit unification, and color / PBR writing; The assembly and optimization module is configured to perform hierarchical matrix combination, bounding box center rotation and translation alignment, vertex deduplication and color merging. The export and verification module is configured to export GLB / GLTF and perform consistency verification on volume, alignment, color, and wire continuity.