A sketchup-based three-dimensional modeling method for cable bridge of thermal power plant
Patent Information
- Application Number
- CN202611184243.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-06
AI Technical Summary
上述过程使得桥架建模过程中各类约束条件之间的协同关系依赖多轮人工调整实现,进而导致建模迭代次数增加、建模周期延长,并对建模结果的空间一致性及整体设计效率产生影响
[0010]相较于现有技术,本发明的有益效果如下:(1)本发明通过调用SketchUP二次开发接口解析电缆清册自动生成初始中心线轨迹,并依据截面参数进行分段实例化形成初始桥架模型该方法解决了传统路径规划与规格选取割裂导致的重复绘图问题,实现了清册数据至三维实体的自动化转换,消除了人工分段衔接的繁琐操作,缩短前期布局周期,确保了初始模型的空间一致性与整体设计效率。
Smart Images

Figure CN122695119B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 3D modeling technology for cable trays in thermal power plants, and relates to a 3D modeling method for cable trays in thermal power plants based on SketchUP. Background Technology
[0002] Cable trays in thermal power plants are crucial infrastructure for carrying and laying cables, and their layout directly affects cable operation safety, system reliability, and space utilization. During the engineering design process, factors such as the number of cables, laying paths, spatial structure, and safety clearances must be comprehensively considered when planning and modeling the cable trays.
[0003] In existing technologies, cable tray design typically relies on manual experience, primarily using two-dimensional design drawings or 3D modeling software for auxiliary modeling. Designers determine the laying path based on cable inventory information and select the cable tray specifications and layout based on engineering experience. During the modeling process, multiple adjustments to the path, spatial location, and structural form are usually required to meet site space conditions and relevant design specifications.
[0004] Under the aforementioned design approach, cable tray path planning, specification selection, and spatial arrangement are typically carried out sequentially in different stages, with manual coordination and adjustments between each stage. In actual engineering scenarios, the spatial arrangement of cable trays, cable load-bearing requirements, and relevant regulatory constraints are interconnected. When any design parameter changes, it often triggers adjustments to other parameters, resulting in a multi-round, iterative modification process in the modeling process. Furthermore, design indicators such as cable laying density and safety spacing are usually checked after modeling is completed. If the check results differ from expectations, it is necessary to return to the previous modeling process for further adjustments. This process means that the coordination between various constraints during cable tray modeling relies on multiple rounds of manual adjustments, leading to an increase in the number of modeling iterations, a longer modeling cycle, and impacts the spatial consistency of the modeling results and overall design efficiency. Summary of the Invention
[0005] In view of this, in order to solve the problems mentioned in the background technology, a three-dimensional modeling method for cable trays in thermal power plants based on SketchUP is proposed.
[0006] The objective of this invention can be achieved through the following technical solution: a three-dimensional modeling method for cable trays in thermal power plants based on SketchUP, comprising: parsing the cable list and generating an initial centerline trajectory through the SketchUP secondary development interface, and instantiating the cable tray into segments according to the cross-sectional parameters to form an initial cable tray model.
[0007] Spatial collision detection is performed on the initial cable tray model. The iterative offset is determined according to the avoidance priority weight. The cable capacity requirement is extracted simultaneously to calculate the required cross-sectional area and match the trial cross-section. If the cross-section upgrade is triggered, collision detection and iterative offset are performed again until there is no collision and the trial cross-sectional area is not less than the required cross-sectional area to obtain the target cable tray model.
[0008] Extract the coordinates and orientations of the connection ports of the target cable tray model, construct a directed topology graph and map the cable laying path to the topology edges, traverse and calculate the cable fill rate and vertical clearance of each edge; when the limit is exceeded, upgrade the cross-sectional parameters and calculate the collision parameters of adjacent nodes; when a conflict is determined, reverse the layer index translation and redistribution to obtain the final cable tray model.
[0009] The process state vector is constructed by statistically analyzing the number of upgrade re-inspections and the number of out-of-limit conflicts. The risk probability value is calculated based on the historical state distribution characteristics of the sliding window. When the dynamic threshold is exceeded, the current iteration is interrupted, a parameter rollback instruction is generated, and the risk segment is identified.
[0010] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) The present invention automatically generates the initial centerline trajectory by calling the SketchUP secondary development interface to parse the cable list, and forms the initial cable tray model by segmenting and instantiating according to the cross-sectional parameters. This method solves the problem of repeated drawing caused by the separation of traditional path planning and specification selection, realizes the automatic conversion of list data to three-dimensional entities, eliminates the tedious operation of manual segmentation and connection, shortens the early layout cycle, and ensures the spatial consistency of the initial model and the overall design efficiency.
[0011] (2) This invention establishes a linkage and iteration mechanism between collision offset and cross-section upgrade, calculates the iterative offset based on the avoidance priority weight, and simultaneously matches the cable capacity requirements. It also combines a directed topology graph to verify the cable fill rate and vertical clearance. This mechanism solves the problem of multiple rounds of modification caused by the mutual constraints between spatial avoidance and load-bearing requirements, realizes the simultaneous solution of geometric interference elimination and capacity compliance, reduces the frequency of manual intervention, and ensures the continuity of modeling under complex working conditions.
[0012] (3) This invention constructs a process state vector and calculates the risk probability value based on the historical state distribution characteristics of the sliding window. When the dynamic threshold is exceeded, the iteration is interrupted, the execution parameters are rolled back, and the risk section is highlighted. This strategy solves the defect that the lagging verification indicators require returning to the previous steps for readjustment, realizes dynamic self-monitoring and abnormal circuit breaking in the modeling process, avoids calculation divergence and local dead loops, and ensures the global convergence and standard compliance of the final cable tray model. Attached Figure Description
[0013] 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.
[0014] Figure 1 This is a flowchart of a three-dimensional modeling method for cable trays in thermal power plants based on SketchUP, as described in this invention.
[0015] Figure 2 This is a flowchart of the method for obtaining the target cable tray model in this invention.
[0016] Figure 3 This is a flowchart of the method for constructing process state vectors in this invention. Detailed Implementation
[0017] 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.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0019] The following description, in conjunction with the accompanying drawings, details the specific scheme of a three-dimensional modeling method for thermal power plant cable trays based on SketchUP provided by this invention.
[0020] Please see Figure 1 As shown, the implementation of the present invention includes S1 to S4: To address the issues of lack of linkage verification between spatial conflicts and cross-sectional capacity matching, and lack of risk monitoring in the iterative process of 3D design of cable trays for thermal power plants, this invention uses the SketchUP secondary interface to parse the cable list, extract the start and end coordinates and hierarchical labels, generate the initial centerline through coordinate alignment and trajectory fitting, and instantiate the cross-sectional parameters in segments to construct the initial model.
[0021] Based on this, spatial collision detection is performed, and the avoidance priority weight is determined according to the collision object type. The weight is then used as the offset coefficient to determine the iterative offset constrained by the minimum bending radius. Simultaneously, the cable capacity requirement matching trial section is calculated. If the section is upgraded, collision detection and iterative offset are performed again until there are no collisions and the cross-sectional area meets the requirements, thus forming the target cable tray model.
[0022] Furthermore, the coordinates and directions of the connection ports are extracted to construct a directed topology graph, which is used to map the cable path. The fill rate and vertical clearance are calculated by traversing the graph. When the limit is exceeded, the cross section is upgraded and the collision parameters of adjacent nodes with adjacent envelopes are calculated. When there is a conflict, the topology graph is traversed in reverse to redistribute the layer index and correct the port Z-axis coordinates to obtain the final model.
[0023] Simultaneously, a process state vector is constructed by statistically analyzing the number of re-inspections and collisions. Based on the historical state distribution characteristics of the sliding window, a risk probability value is calculated and compared with a dynamic threshold composed of the historical mean and standard deviation. If the threshold is exceeded, the iteration is interrupted, parameters are rolled back, and the risk segment is highlighted. These steps form a technical closed loop from modeling, collision avoidance, cross-section adaptation to risk warning, improving automation and engineering reliability.
[0024] S1. Parse the cable list and generate the initial centerline trajectory through the SketchUP secondary development interface, and instantiate the segments according to the cross-sectional parameters to form the initial cable tray model.
[0025] The cable inventory data of thermal power plants usually contains a large number of unstructured or semi-structured path start points, end points and hierarchical attributes. If a three-dimensional entity is directly generated, it is easily affected by local coordinate system deviation and wiring curvature limitations, resulting in the initial model failing to conform to the actual cable tray laying specifications.
[0026] Therefore, by using the Ruby API secondary development interface provided by SketchUP, the file reading and writing module is called to parse the text data of the cable list line by line. During the extraction process, the starting device number and ending device number of each cable record are mapped to three-dimensional spatial coordinates. At the same time, the layer label to which the cable belongs is extracted, forming a structured data record set containing the starting coordinates, ending coordinates and layer attributes.
[0027] All extracted start and end coordinates are uniformly transformed to SketchUp's global world coordinate system using a coordinate transformation matrix, so that coordinates from different reference sources are spatially consistent and aligned, generating an aligned set of start and end coordinates.
[0028] Using the aligned starting and ending coordinate sets as spatial endpoint constraints, trajectory fitting calculations are performed in conjunction with preset minimum bending radius and interlayer clearance parameters. The minimum bending radius is determined based on the cable outer diameter and the allowable bending multiple in the cable manufacturing specifications, while the interlayer clearance is set based on the minimum spacing requirements between each layer in the cable tray installation specifications.
[0029] During the fitting process, the radius of curvature of the curved segment is constrained to be no less than the minimum curvature radius. At the same time, for the trajectory lines corresponding to different level labels, the spatial Z-axis offset of each trajectory line is calculated sequentially according to the layering order of the level labels, so that the Z-axis spacing between adjacent level trajectory lines is no less than the inter-layer net distance, thereby realizing the spatial arrangement adjustment of the highly layered structure and generating a sequence of control points for the initial centerline trajectory that meets the spatial geometric constraints.
[0030] The control point sequence is divided into several continuous segments according to a preset segment length interval. As an example, the segment length interval can be set to 2000 mm, with the centerline arc length of each 2000 mm serving as the unit length of a segment. The control point sequence is then sequentially divided along the trajectory to generate the corresponding continuous segments.
[0031] For each segment, the corresponding initial cross-sectional parameters are obtained from a pre-built cross-sectional parameter database by key-value matching based on the layer label of the cable carried by that segment. This cross-sectional parameter database stores the initial width and initial height values corresponding to each layer, using the layer label as the index key.
[0032] Establish a local coordinate system at the starting point of the segment, and draw a rectangular closed polyline outline defined by the initial width and initial height; call the SketchUP path array interface, use the closed outline as a section unit to spatially locate and repeatedly instantiate it along the center line trajectory of the segment, perform vertex tolerance merging and Boolean union operations on the joints of adjacent segment entities to eliminate splicing gaps, and classify them into a unified layer group to form a complete initial bridge model.
[0033] The initial cable tray model represents the theoretical cabling geometry under the conditions of satisfying the basic curvature constraints and inter-layer specifications. It serves as the initial reference state for subsequent spatial collision avoidance and cable capacity cross-sectional area verification.
[0034] S2. Perform spatial collision detection on the initial cable tray model, determine the iterative offset according to the avoidance priority weight, extract the cable capacity requirement simultaneously to calculate the required cross-sectional area and match the trial cross-section. If the cross-section upgrade is triggered, re-detect the collision and iterate the offset until there is no collision and the trial cross-sectional area is not less than the required cross-sectional area to obtain the target cable tray model.
[0035] Considering that the initial cable tray model is prone to hard collisions with civil structures or other pipelines in the complex three-dimensional space, and that the cable tray cross-section needs to meet the cable capacity requirements of the corresponding path, neither simple collision avoidance nor single cross-section upgrade can simultaneously meet the dual constraints of physical space and capacity. Therefore, this step establishes a linkage iterative mechanism between collision offset and cross-section upgrade.
[0036] In one specific embodiment, firstly, the 3D solid data of the initial cable tray model and existing facility entities already loaded in the SketchUP scene, including pipes, ventilation ducts, steel structures, and other cable trays, are used as input objects for collision detection. The entity intersection detection function provided by the SketchUP Ruby API is called to traverse each segment of the initial cable tray model and calculate the geometric intersection between its envelope and the envelopes of surrounding entities.
[0037] When an intersection is detected, it is determined that a spatial collision has occurred at that location. The unit normal vector of the collision surface is extracted from the collision geometric intersection. At the same time, the collision body type of the entity is obtained based on the project type label associated with the collided entity.
[0038] Subsequently, based on the collider type, key-value matching is performed in a preset avoidance priority rule base to retrieve the corresponding avoidance priority weight value. This avoidance priority rule base is a mapping table that uses the collider type string as the index key and stores the corresponding priority weight value.
[0039] The weight values are set based on the principle that the higher the operational safety requirements and the greater the difficulty of modification for a collision type, the greater the avoidance priority weight is assigned. As an example, the first level is: main steam pipelines and high-pressure water supply pipelines, with a weight range of 0.8 to 1.0; the second level is: fire water mains and important control cable trays, with a weight range of 0.5 to 0.7; and the third level is: conventional electromechanical pipelines, with a weight range of 0.1 to 0.4.
[0040] Using the retrieved avoidance priority weight as the offset coefficient, the initial offset vector is obtained by multiplying the unit normal vector of the collision surface by the offset coefficient. Then, a minimum bending radius constraint is applied to this initial offset vector: the target offset position is calculated along the direction of this offset vector, using the trajectory points before and after the offset as control points, and the bending radius of the newly generated trajectory is checked to see if it is less than the preset minimum bending radius; if it is less, the magnitude of the offset vector is reduced proportionally until the bending radius of the new trajectory is not less than the minimum bending radius. The offset vector after constraint correction is the iterative offset amount at the collision position.
[0041] Based on the calculated iterative offset, the coordinates of the control points on the initial centerline trajectory affected by the collision are updated. The control points are shifted along the offset direction by the offset value to generate a new sequence of control points after the offset. The spatial curve coordinates of the offset trajectory are regenerated according to the original centerline fitting method.
[0042] Finally, the list of cables carried by each segment of the offset trajectory is extracted, and the cross-sectional area of each cable is calculated according to its outer diameter. The total cross-sectional area of the cables required for each segment is then obtained. A matching search is performed in a preset cross-sectional specification library, which contains records of various standard cable tray cross-sectional specifications arranged in ascending order of area. Each record stores the width, height, and corresponding cross-sectional area. The specification library is traversed to locate the first specification record whose cross-sectional area is not less than the required total cross-sectional area. This record is used as the trial cross-section, and its corresponding trial width and trial height are obtained.
[0043] Further, please refer to Figure 2 As shown, the method for obtaining the target cable tray model includes the following steps: S201. Compare the calculated width of the current segment with the initial width, and the calculated height with the initial height.
[0044] If the calculated width is greater than the initial width, or the calculated height is greater than the initial height, it indicates that the current cable tray cross-section's spatial capacity is insufficient to support the cable capacity required for that segment, and a cross-section upgrade is determined. In this case, the original cross-sectional parameters of that segment in the initial cable tray model are replaced with the calculated cross-sectional width and height, the initial centerline trajectory is replaced with the current offset trajectory, and spatial collision detection is re-executed using this updated model.
[0045] S202. If a new collision is generated by re-performing spatial collision detection, the normal information of the new collision surface is obtained, the iterative offset is recalculated according to the aforementioned method, and the spatial coordinates of the offset trajectory are updated according to the recalculated iterative offset.
[0046] Repeat the collision detection, offset calculation, section matching, and upgrade determination process described above until a spatial collision detection result shows no new collisions, or the current number of offset iterations reaches the preset collision iteration limit. As an example, the collision iteration limit can be set to 20 times.
[0047] S203. When the spatial collision detection result is no new collision within the upper limit of the collision iteration, and the cross-sectional area of the current trial section is not less than the required cross-sectional area of the segment, it means that the current offset trajectory and the cross-sectional parameters have simultaneously met the dual constraints of no spatial interference and no capacity overrun.
[0048] At this point, based on the current offset trajectory spatial coordinates and the width and height parameters of the trial section, the corresponding geometric parameters of the initial cable tray model are replaced. The aforementioned section contour drawing and path array are then invoked to re-instantiate each segment of the cable tray entity, generating the target cable tray model. This target cable tray model represents a staged geometric entity that has avoided interference from existing facilities in physical space and has met the total capacity requirements of the corresponding path cables in terms of cross-sectional specifications. It serves as the spatial reference for subsequent global directed topology mapping and fill rate and clearance verification.
[0049] S3. Extract the coordinates and orientation of the connection ports of the target cable tray model, construct a directed topology graph and map the cable laying path to the topology edge, traverse and calculate the cable fill rate and vertical clearance of each edge; when the limit is exceeded, upgrade the cross-section parameters and calculate the collision parameters of adjacent nodes; when a conflict is determined, reverse the layer index translation and redistribution to obtain the final cable tray model.
[0050] Although the target cable tray model has eliminated collisions in the physical space, the cable laying path may still face situations where the cable fill rate exceeds the limit or the vertical clearance between layers is insufficient at the topological connection nodes. Furthermore, there is a risk of conflict propagation and local interference diffusion when adjusting parameters using a one-way traversal method. Therefore, a global directional topological relationship is constructed to perform a systematic layer and cross-section redistribution.
[0051] In one specific embodiment, the cable fill rate and vertical clearance are calculated as follows: First, traverse each segment of the target cable tray model to extract the coordinates of the geometric center points of the connecting ports at both ends of each segment, as well as the outward normal vector of the port cross-section. Using the center point coordinates of each connecting port as nodes in a directed topology graph, and the center line segments connecting adjacent ports in the target cable tray model as edges in the directed topology graph, the traversal direction of the edges is determined by the outward normal vector of the ports, thus constructing a directed topology graph describing the spatial connectivity of the cable tray network.
[0052] Subsequently, the laying path information of each cable in the cable list is read, the topology nodes corresponding to the starting and ending devices of each cable are matched, the sequence of topology edges traversed by the cable is determined, and the cable specification data is mapped to each topology edge covered by its path.
[0053] After mapping is completed, the directed topology graph is traversed edge by edge: for each topological edge, the cross-sectional area of all associated cables is summarized to obtain the total cross-sectional area of the cables; the cross-sectional width and height of the cable tray segment corresponding to the edge are read, and the effective area inside the cable tray is calculated after deducting the wall thickness; the ratio of the total cross-sectional area of the cables to the effective area inside the cable tray is calculated as the cable fill rate of the topological edge.
[0054] Simultaneously, for each topological edge, its centerline Z-axis coordinate and cross-sectional height are read in the global coordinate system. Using the spatial adjacency relationships in the directed topological graph, other topological edges parallel to and spatially adjacent to this edge are identified, and their centerline Z-axis coordinates and cross-sectional heights are read. The absolute value of the difference between the centerline Z-axis coordinates of the current edge and its adjacent edge is calculated, and then subtracted by the sum of half the cross-sectional height of the current edge and half the cross-sectional height of the adjacent edge. The result is the vertical clearance between the two parallel cable tray layers.
[0055] Furthermore, after obtaining the cable fill rate and vertical clearance of each topological edge, an over-limit judgment and layer translation redistribution are performed. The method for obtaining the final cable tray model is as follows: The calculated cable fill rate is compared with the preset fill rate limit, and the vertical clearance is compared with the preset clearance limit. As an example, the fill rate limit can be set to 40% based on the heat dissipation and installation space requirements in the cable laying specifications, and the clearance limit can be set to 200 mm based on the maintenance and operation space requirements in the cable tray installation specifications.
[0056] If the cable fill rate exceeds the fill rate limit, it indicates that the total amount of cables contained in that section of the cable tray exceeds the safe load limit; or if the vertical clearance is less than the clearance limit, it indicates that the spatial distance between adjacent cable tray layers does not meet the installation or heat dissipation requirements. In either of these cases, the topological edge is marked as an over-limit edge.
[0057] Following the forward traversal order of the directed topology graph, for topological edges marked as exceeding limits, their current cross-section parameters are replaced with cross-section parameters of the next higher specification level. The higher specification cross-section parameters are selected from a preset cross-section specification library, that is, the record position of the current cross-section in the specification library is located, and the width and height of the next record are taken as the upgraded cross-section parameters.
[0058] Using the upgraded cross-sectional parameters and the centerline trajectory of the edge, the upgraded envelope of the cable tray segment is generated. Simultaneously, through the spatial adjacency relationship of the directed topology graph, other topological nodes spatially adjacent to the over-limit edge are determined, and the current envelope of each cable tray segment associated with these adjacent nodes is obtained.
[0059] The geometric distance calculation function is invoked to calculate the minimum spatial distance between the upgraded envelope and each adjacent envelope, which is used as the collision parameter for adjacent nodes. If the collision parameter for an adjacent node is less than zero, it indicates that the upgraded cable tray entity has geometric overlap with the adjacent cable tray entity, and is thus determined to be a spatial conflict. At this point, the forward traversal is paused, and the reverse traversal order of the directed topology graph is switched. The reverse topology relationship is backtracked to locate the adjacent topology node that conflicts with the upgraded envelope.
[0060] The current layer index of the adjacent topology node is read, and addition or subtraction operations are performed on the current layer index according to the preset layer translation rules to generate a redistributed layer index. The step size of the operation is determined by the preset layer translation step size, which can be set to the cross-sectional height value of the current cable tray.
[0061] The layer translation rule is as follows: read the layer index of the topological edge where the upgrade envelope is located. If the layer index of the conflicting node is less than the layer index of the edge where the upgrade envelope is located, perform an addition operation to move it to the upper layer; otherwise, perform a subtraction operation to move it to the lower layer.
[0062] The layer index is an integer value representing the vertical layer of the cable tray segment. It is allocated based on the layer label and the interlayer clearance when the initial centerline trajectory is generated. The initial value of the bottom layer is 0, and it increases layer by layer along the positive Z-axis.
[0063] Replace the current layer index of the conflicting node with the reassigned layer index, and simultaneously correct the Z-axis component of the coordinates of the cable tray connection port associated with the node based on the new layer index. Then update the spatial position coordinates of the corresponding centerline segment, complete the layer translation and reassignment operation, and generate the final cable tray model.
[0064] The final cable tray model is a three-dimensional geometric entity that has completely eliminated hard collisions in physical space, meets the upper limit requirements of cable capacity fill rate and the lower limit specifications of vertical clearance between layers, and whose internal topological connection relationship achieves self-consistent balance in global space.
[0065] S4. Construct a process state vector by counting the number of upgrade re-inspections and the number of out-of-limit conflicts of the statistical cross-section. Calculate the risk probability value based on the historical state distribution characteristics of the sliding window. When the dynamic threshold is exceeded, interrupt the current iteration, generate a parameter rollback instruction, and identify the risk segment.
[0066] Because the iterative solution process for cable tray modeling has nonlinear characteristics and accumulated uncertainty, the global optimization process is at risk of computational divergence or iteration non-convergence. Therefore, dynamic statistics and trend analysis are performed on the frequency of cross-section upgrade re-examination and the number of out-of-limit conflicts during the iteration process.
[0067] In one specific embodiment, please refer to Figure 3 As shown, the method for constructing the process state vector includes the following steps: S401. During the generation and iteration of the target cable tray model, maintain a global collision re-detection counter. Whenever the calculated width is greater than the initial width or the calculated height is greater than the initial height, and spatial collision detection is triggered again based on the calculated cross section, the counter is incremented to record the cumulative number of cross section upgrade re-detections triggered in the current modeling process, which is used as the re-detection count.
[0068] S402. During the iterative process of obtaining the final cable tray model, a global collision counter is maintained. The fill rate limit is set based on the proportional requirements for the allowable fill cross-section of cables within the cable tray, and the clearance limit is set based on the minimum vertical distance requirements for maintenance and heat dissipation between cable tray layers in the power engineering cable design standards.
[0069] Whenever a cross-section upgrade is performed due to the cable fill rate being greater than the fill rate limit or the vertical clearance being less than the clearance limit, and the calculated collision parameters of adjacent nodes are less than zero, it indicates that the cross-section upgrade has triggered a chain of topological spatial interferences. The collision counter is incremented to record the cumulative number of spatial chain collisions that occur in the current modeling process, which is taken as the number of collisions.
[0070] S403. Combine the number of re-examinations and the number of conflicts recorded in the current iteration to construct a two-dimensional process state vector. This process state vector represents the comprehensive interference severity and topological instability characteristics of the current bridge model during the spatial avoidance and capacity matching iteration process.
[0071] Furthermore, the divergence risk of the iterative process is assessed based on the constructed process state vector, and the method for calculating the risk probability value specifically includes: Extract the process state vectors of historical iterations within the sliding window. As an example, the length of the sliding window can be set to the 10 most recent consecutive iterations. Calculate the difference between each component of the current iteration's process state vector and the arithmetic mean of the corresponding components of the historical process state vectors within the sliding window. Use the vector composed of these differences as the state deviation vector, reflecting the degree to which the current iteration deviates from the recent normal convergence state.
[0072] The re-detection difference and conflict difference in the state deviation vector are weighted, summed, and normalized to obtain the risk probability value for the current round. As an example, the weight of the re-detection difference is set to 0.6, and the weight of the conflict difference is set to 0.4. After weighted summation, the sum is mapped to the [0,1] interval using a normalization function to obtain the risk probability value for the current round. The normalization function used is the Sigmoid function.
[0073] Subsequently, the arithmetic mean and standard deviation of the risk probability values from previous rounds are calculated using the sliding window. The sum of the mean of the historical risk probability values and the standard deviations by a preset multiple is used as the dynamic threshold for the current round's judgment.
[0074] As an example, the preset multiplier can be set to 3 standard deviations. This dynamic threshold represents the upper bound of the normal fluctuation of the risk probability under the current sliding window statistical distribution; when the risk probability value of this round exceeds this upper bound, it indicates that the difficulty of this round of modeling iteration has deviated from the historical normal level, and there is a high risk of calculation divergence or getting trapped in a local loop.
[0075] The risk probability value for the current round is compared with the dynamic threshold. When the risk probability value exceeds the dynamic threshold, the following actions are taken: Trigger an iterative exception interruption service, forcibly exit the currently executing spatial collision detection or layer translation and redistribution loop, and block the issuance of subsequent calculation instructions; extract the offset trajectory coordinate data and cross-sectional width and height parameter data stored when the previous round of successful convergence was successfully achieved from the state stack in system memory, encapsulate them as a rollback target, and generate parameter rollback instructions.
[0076] Based on the parameter rollback command, the calculated cross-section width and height variables in the current round's divergent state are cleared and overwritten with the cross-section width and height values from the previous round's convergence in the rollback target. Simultaneously, the avoidance priority weight variable for the current round is overwritten with the avoidance priority weight value used in the previous round from the rollback target. Using these rolled-back cross-section parameters and weight parameters as the new baseline, and loading the offset trajectory coordinates from the previous round's convergence saved in the rollback target, the collision detection and cross-section matching iterative process is re-executed to restore the iterative convergence path of the local segment.
[0077] Synchronously extract the edge identifiers marked as over-limit edges and the node identifiers determined as spatial conflicts in the directed topology graph before the interruption, and write their index numbers into the risk segment list; call the scene rendering attribute interface of SketchUP, traverse the entity objects in the 3D view, match the corresponding cable tray segment entities according to the identifiers in the risk segment list, and modify their material or display color attributes to red, so as to visually identify the geometric bottleneck segments that cause the iteration divergence in the 3D model space.
[0078] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0079] Those skilled in the art will recognize that the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0080] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0081] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0082] Finally, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A 3D modeling method for cable trays in thermal power plants based on SketchUp, characterized in that, include: The cable list is parsed through the SketchUP secondary development interface and the initial centerline trajectory is generated. The initial cable tray model is formed by segmenting and instantiating according to the cross-sectional parameters. Spatial collision detection is performed on the initial cable tray model. The iterative offset is determined according to the avoidance priority weight. The cable capacity requirement is extracted simultaneously to calculate the required cross-sectional area and match the trial cross-section. If the cross-section upgrade is triggered, collision detection and iterative offset are repeated until there is no collision and the trial cross-sectional area is not less than the required cross-sectional area to obtain the target cable tray model. Extract the coordinates and orientation of the connection ports of the target cable tray model, construct a directed topology graph and map the cable laying path to the topology edge, traverse and calculate the cable fill rate and vertical clearance of each edge; when the limit is exceeded, upgrade the cross section parameters and calculate the collision parameters of adjacent nodes; when a conflict is determined, reverse the layer index translation and redistribution to obtain the final cable tray model. The process state vector is constructed by statistically analyzing the number of upgrade re-inspections and the number of out-of-limit conflicts. The risk probability value is calculated based on the historical state distribution characteristics of the sliding window. When the dynamic threshold is exceeded, the current iteration is interrupted, a parameter rollback instruction is generated, and the risk segment is identified.
2. The method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The method for obtaining the initial cable tray model is as follows: The cable list is read through the SketchUP secondary development interface, and the starting point coordinates, ending point coordinates, and layer labels of each cable are extracted. Transform all extracted start and end coordinates to the SketchUP global coordinate system and perform coordinate alignment to obtain the aligned start and end coordinate sets. Using the aligned starting and ending coordinate sets as input, trajectory fitting calculations are performed based on the minimum bending radius and inter-layer clearance to generate a sequence of control points for the initial centerline trajectory. The control point sequence is divided into several segments along the initial centerline trajectory. For each segment, the corresponding cross-sectional parameters are called according to the hierarchical label. The cross-sectional parameters include the initial width and the initial height. The cross-sectional profile of the cable tray segment is constructed using the cross-sectional parameters, and array instantiation is performed along the segment to form the initial cable tray model.
3. The method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The method for determining the iterative offset is as follows: Perform spatial collision detection on the initial cable tray model to obtain the collision surface normal and collision body type; Retrieve the corresponding avoidance priority weight based on the type of colliding object; Using the avoidance priority weight as the offset coefficient, determine the iterative offset applied along the collision surface normal, constrained by the minimum bending radius.
4. The method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, Extracting the cable capacity requirement to calculate the required cross-sectional area and matching the trial section specifically includes: Update the spatial coordinates of the initial centerline trajectory based on the iterative offset to obtain the offset trajectory; It also extracts the cable capacity requirement corresponding to the offset trajectory, calculates the required cross-sectional area, matches a trial cross-section with an area not less than the required cross-sectional area in the preset cross-sectional specification library, and obtains the trial width and trial height of the trial cross-section.
5. A three-dimensional modeling method for cable trays in thermal power plants based on SketchUP as described in claim 4, characterized in that, The method for obtaining the target cable tray model is as follows: Compare the calculated width with the initial width, and the calculated height with the initial height; If the calculated width is greater than the initial width, or the calculated height is greater than the initial height, then a cross-section upgrade is determined to have occurred. The cross-section parameters and initial centerline trajectory of the initial cable tray model are replaced with the calculated cross-section and offset trajectory, and spatial collision detection is re-executed. If a new collision occurs during the re-execution of spatial collision detection, the normal of the new collision surface is obtained and the iterative offset is recalculated. The offset trajectory is updated based on the recalculated iterative offset. This process is repeated until no new collisions occur, or the current number of offset iterations reaches the preset collision iteration limit. When the spatial collision detection result is no new collision within the upper limit of the collision iteration, and the area of the trial section is not less than the required cross-sectional area, the geometric parameters of the initial cable tray model are replaced according to the current offset trajectory and the trial section, and the model is re-instantiated to generate the target cable tray model.
6. The method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The calculation methods for the cable fill ratio and vertical clearance are as follows: Extract the coordinates and orientation of the cable tray connection ports of the target cable tray model. Use the coordinates of the cable tray connection ports as topological nodes and the center line segment of the target cable tray model as topological edges. Combine the port orientation to construct a directed topological graph. Map the cable laying path to the topological edges of the directed topology graph, traverse the topological edges of the directed topology graph, read the total cross-sectional area of the cable associated with each topological edge and the effective area inside the cable tray in the cross-sectional parameters, and calculate the ratio of the total cross-sectional area of the cable to the effective area inside the cable tray as the cable fill rate. Read the centerline spatial Z-axis coordinates and cross-section heights of each topological edge, as well as the centerline spatial Z-axis coordinates and cross-section heights of adjacent parallel topological edges. Calculate the absolute value of the difference between the centerline spatial Z-axis coordinates of the two edges, and subtract the sum of half of the cross-section heights of the two topological edges to obtain the vertical clearance.
7. The method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The method for obtaining the final cable tray model is as follows: The cable fill rate is compared with the fill rate limit, and the vertical clearance is compared with the clearance limit. If the cable fill rate is greater than the fill rate limit or the vertical clearance is less than the clearance limit, the topological edge is marked as an edge that exceeds the limit. Following the forward traversal order of the directed topology graph, the current cross-section parameters of the over-limit edge are replaced with cross-section parameters of a higher specification, generating the upgraded envelope of the over-limit edge, determining the topology node adjacent to the over-limit edge in spatial location, and obtaining the envelope corresponding to the adjacent topology node. The minimum spatial distance between the upgraded envelope and the envelopes corresponding to adjacent topological nodes is calculated and used as the collision parameter between adjacent nodes. If the collision parameter of adjacent nodes is less than zero, it is determined to be a spatial conflict. Then, the reverse traversal order of the directed topology graph is switched to locate the adjacent topology nodes that are in conflict during the reverse traversal. Read the current layer index of the adjacent topology node, perform addition and subtraction operations on the current layer index according to the preset layer translation step size, and generate a redistribution layer index; Replace the current layer index with the reassigned layer index, and simultaneously correct the Z-axis component of the cable tray connection port coordinates based on the reassigned layer index, update the spatial position of the center line segment, and generate the final cable tray model.
8. A three-dimensional modeling method for cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The method for constructing the process state vector is as follows: The cumulative number of times that spatial collision detection is re-executed due to the calculated width being greater than the initial width or the calculated height being greater than the initial height is counted as the re-detection count; The cumulative number of times when the cross-section upgrade is performed due to the cable fill rate being greater than the fill rate limit or the vertical clearance being less than the clearance limit, and the calculated collision parameters of adjacent nodes are less than zero, is counted as the number of conflicts. The number of re-examinations and the number of conflicts are combined to construct a two-dimensional process state vector.
9. A method for 3D modeling of cable trays in thermal power plants based on SketchUP as described in claim 1, characterized in that, The method for calculating the risk probability value is as follows: Extract the process state vector of the historical rounds within the sliding window, calculate the difference between each component of the current process state vector and the mean of the corresponding components of the historical process state vector within the sliding window, and use the vector composed of the differences of each component as the state deviation vector. Perform a weighted summation and normalization operation on the difference between the number of re-detections and the difference between the number of conflicts in the state deviation vector to obtain the risk probability value of the current round; Based on the process state vector of the historical rounds within the sliding window, the mean and standard deviation of the risk probability values of the historical rounds are calculated. The sum of the mean of the historical risk probability values and the standard deviation of the preset multiple is used as the dynamic threshold. The risk probability value of the current round is compared with the dynamic threshold.
10. A three-dimensional modeling method for cable trays in thermal power plants based on SketchUP as described in claim 9, characterized in that, When the risk probability value exceeds the dynamic threshold, perform the following operations: Interrupt the current spatial collision detection or layer translation redistribution iteration, extract the offset trajectory and cross-sectional parameters of the previous round as rollback target to generate rollback command parameters; Based on the parameter rollback instruction, the trial section parameters and avoidance priority weights of the current round are overwritten with the parameters in the rollback target and used to re-execute the iterative process of collision detection and section matching; Extract the edge identifiers of out-of-bounds edges and the node identifiers of conflicting nodes from the directed topology graph and write them into the risk segment list. In the SketchUp scene, modify the display color attribute of the corresponding entity model to the preset highlight color based on the risk segment list.
Citation Information
Patent Citations
Suitcase personalized customization design system based on three-dimensional modeling
CN122413817A
Virtual / augmented reality modeling application for architecture
US20190146599A1