System and method for generating overall PID graph based on three-dimensional model
By using system extraction, mapping, and layout techniques based on 3D models, an efficient and accurate P&ID diagram of the overall P is generated. This solves the problems of data dispersion and automated P&ID diagram generation in traditional P&ID technology, and realizes end-to-end automation from 3D model to P&ID diagram, significantly improving generation efficiency and accuracy.
Patent Information
- Application Number
- CN202510982783.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional P&ID paper-based maps suffer from scattered and unstructured data, resulting in low data utilization and an inability to meet digitization needs. Furthermore, they lack effective tools for creating topological relationships, making it difficult to automatically integrate and generate complete P&ID maps.
The system for generating a complete P&ID diagram based on a 3D model uses an extraction module to analyze the symbol types and topological relationships of the 3D model, a symbol mapping module to establish a mapping relationship table, a relationship construction module to construct a logical diagram data table, and a layout module to perform symbol layout, thus forming a complete P&ID diagram.
It improves the efficiency of P&ID graph generation, ensures the accuracy and consistency of topological relationships, reduces manual operations, lowers costs, and enhances data organization and readability.
Smart Images

Figure CN120976416A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional modeling, and in particular to a system and method for generating an overall P&ID diagram based on a three-dimensional model. BACKGROUND
[0002] In the field of process industry production management, the traditional generation method of pipeline and instrument flow diagram (P&ID diagram) has two modes: one is a decentralized paper diagram management mode, that is, the complete process is divided into equipment, pipelines, instruments and other independent paper diagrams for separate management, which requires construction personnel to manually search and jointly query multiple paper diagrams to obtain complete process information; the other is to rely on manual drawing of integration scheme. In the blowing and flushing operation after the construction or maintenance of equipment, due to the connection of pipelines across the paper and the protection requirements of instruments, the actual operation needs to be marked by technical personnel on the original multiple P&ID paper diagrams, and the cleaned pipelines are manually integrated into a single visual scheme paper diagram for construction. This operation mode not only consumes a large amount of manual checking time, but also has the risk of information integration error.
[0003] In the field of process industry production management, the technical scheme based on P&ID flow diagram under the traditional operation mode has significant defects. First, most of the P&IDs of enterprises are in paper form, and the data on multiple paper P&ID diagrams cannot be automatically searched, making it difficult to find. If multiple paper diagrams need to be integrated into one paper diagram, manual drawing is required, which is a huge workload. Second, the scattered P&ID paper diagrams lead to data redundancy, and complete information (such as upstream and downstream equipment of a pipeline) needs to be obtained by joint querying across multiple paper diagrams, increasing the risk of error. Third, multi-source data easily leads to inconsistent data. Enterprises rely on digital three-dimensional models and two-dimensional P&IDs, but the two data sources are updated separately and managed by different departments, which easily leads to inconsistent data. Fourth, the cost is too high. Currently, the mainstream drawing software requires 2 people per day to draw one A3 P&ID. Enterprises face thousands of P&ID files, and the workload grows geometrically.
[0004] The fundamental reasons for these defects include:
[0005] (1) Historical legacy. The paperization of enterprise diagrams is common, and the structuredness of paper diagram data is not enough to support current digitalization needs. For example, searching and reorganizing paper diagram data are not possible. Re-drawing P&ID files from traditional paper or pure graphical representation to structured data storage requires high costs. There is currently no low-cost solution.
[0006] (2) Process design defects.
[0007] First, the paper chart segmentation strategy is outdated. The design logic of traditional P&ID charts, which are segmented by functional modules, is disconnected from the integration needs of modern chemical plants, leading to scattered information. For example, as shown in FIG. 1, Figure 3 the left side of FIG. 1 is a single page of a traditional P&ID paper chart, which currently represents the connection relationship of the pipelines around the heat exchanger. However, the heat exchanger cannot realize any function alone and needs to be connected to other P&ID pages through the connection relationship marked on the pipeline. During use, it needs to be repeatedly checked, the information is scattered, and it is not easy to find. In the operation and maintenance process of enterprises, it is necessary to observe the connection relationship of the entire system in one chart, as shown in the right side of FIG. 1. This directly restricts the operation and maintenance efficiency. Figure 3 Figure 3 Second, in terms of technology, there are obvious short boards in tool intelligence. At present, there is a lack of effective topological relationship creation tools, and existing technologies cannot parse the topological relationship in paper P&ID charts or pure graphical expressions (such as Visio, AutoCAD, etc. Vector diagram software drawn but no database storage). Although three-dimensional models have complete topological relationships, due to the complexity of their spatial structure, in actual application, more attention is paid to logical relationships rather than spatial relationships, so it is necessary to reduce the dimension of 3D models to generate P&ID logical charts, but there is no mature tool on the market. This mainly faces three technical difficulties: first, the identification and extraction of three-dimensional model topological relationships; second, when reconstructing P&ID paper charts, it is necessary to solve the problems of two-dimensional symbol mapping and reasonable construction of logical levels; third, two-dimensional symbol layout needs to be independent of three-dimensional space and rely on algorithms and experience rules to achieve reasonable arrangement. In addition, there are obstacles in automatic execution of jump symbols—unable to automatically exhaust associated pipelines based on P&ID jump symbols, and lack of automatic layout capabilities—after manually completing pipeline association, there is a lack of intelligent layout technology for pipeline connection and overall optimization. Finally, the dynamic adaptation ability is weak, and multiple versions of P&ID files often lead to inconsistent legend symbols (such as the same shape may represent a gate valve or a stop valve), and there is no tool that can achieve rapid unified adaptation.
[0008]
[0009] For example, CN107194056A discloses a method for automatically matching and checking system diagrams and three-dimensional models in pipeline design, comprising: A. obtaining P&ID diagrams and three-dimensional model diagrams; B. generating corresponding P&ID topology structures and three-dimensional topology structures; C. searching the two topology structures respectively with the same device as the starting point to generate respective node sequences; separately listing the searched three-way / two-way valves in the queue, and starting to search and establish new node sequences with the three-way / two-way valves in the queue as the starting point after the current node sequence search is completed; respectively forming two corresponding node sequence groups; D. comparing the two node sequence groups one by one, if all the nodes are consistent, the matching is successful, otherwise the matching fails; E. when the matching fails, outputting the failure information; after the matching succeeds, updating the three-dimensional topology structure and generating a new three-dimensional model diagram. This technical solution is typically used to update the three-dimensional model diagram using the P&ID diagram, but the P&ID still maintains a segmented state and cannot provide a complete form.
[0010] CN114078253A discloses a technique for extracting machine-readable information from P&IDs, using an optical character recognition (OCR) algorithm to predict labels for P&ID text boxes. A first machine learning algorithm is used to detect symbols in the P&ID and return, for each symbol, a predicted bounding box and a predicted class of equipment. One or more of the predicted bounding boxes can be pruned by non-maximum suppression to avoid overlapping detections. A second machine learning algorithm is used to infer properties of each detected symbol with remaining predicted bounding boxes. The predicted bounding boxes and labels including the predicted class of equipment and inferred properties are stored in a machine-readable format. This technical solution only describes how to extract machine-readable information from P&IDs and does not involve how to realize a complete P&ID diagram.
[0011] Therefore, how to combine a large number of P&ID paper diagrams with different drawing specifications and different symbol expression meanings and form a complete P&ID diagram while reducing the operation difficulty and the cost of enterprises is a difficult problem at present and is almost impossible to solve in reality. The present application adopts a new idea to generate an overall P&ID diagram based on an already constructed three-dimensional model, so that the digitization of the P&ID diagram becomes a reality, facilitating the retrieval and viewing of technical personnel.
[0012] In addition, on the one hand, there are differences in the understanding of those skilled in the art, and on the other hand, due to the fact that the applicant has studied a large number of literatures and patents when making the present application, but due to the limited space, all the details and contents have not been listed in detail, which does not mean that the present application does not have these characteristics of the prior art, on the contrary, the present application already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art in the background art. SUMMARY
[0013] Due to the problems of data missing, unstructured, inconsistent legends and unable to automatically retrieve in traditional P&ID paper diagram, the data utilization rate is very low, which cannot meet the current digital demand. Therefore, the present application discards the idea of generating a complete flowchart on the traditional P&ID, and proposes a method for automatically generating an overall P&ID diagram based on a three-dimensional model, which solves the problems of low efficiency and poor flexibility of the traditional method by intelligently extracting the information topology relationship of the model and combining the user-defined symbol mapping rules.
[0014] In view of the deficiencies of the prior art, the present application provides a system for generating an overall P&ID diagram based on a three-dimensional model, which comprises a processor including an extraction module, a symbol mapping module, a relationship construction module and a layout module. The extraction module is used to analyze a specified area of the three-dimensional model and extract the three-dimensional symbol type and the topology relationship of the three-dimensional model; the symbol mapping module is used to establish a mapping relationship table between the three-dimensional symbol type and the two-dimensional symbol type based on the three-dimensional symbol type and the mapping rule, so as to retrieve the two-dimensional symbol type based on the three-dimensional symbol type; the relationship construction module is used to establish a logical graph data table based on the topology relationship, so as to store the connection relationship and the sequence relationship; and the layout module is used to layout the two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, so as to form a complete P&ID diagram.
[0015] The system of the present application extracts the symbol type and the topology relationship from the three-dimensional model, and finally generates a complete P&ID diagram through the steps of symbol mapping, relationship construction and layout. The system directly solves the pain points of the lack of topology relationship and attribute data in the traditional P&ID paper diagram. By using the structured data of the three-dimensional model (abandoning complex three-dimensional layout and retaining logical relationship), the system can efficiently and intelligently generate a P&ID diagram, significantly improving the generation efficiency and ensuring the accuracy of the topology relationship, and avoiding the problems caused by information missing in the traditional method.
[0016] According to a preferred embodiment, the step of extracting the three-dimensional symbol type and the topology relationship of the three-dimensional model by the extraction module comprises: identifying the object ID and the three-dimensional symbol type from the attribute field of the three-dimensional model, and analyzing the connection relationship between the objects based on the three-dimensional symbol type; removing the connection body symbol and merging the connection relationship into the topology relationship with logical relationship.
[0017] The process of removing the connection body symbol and merging the relationship ensures that the connection relationship extracted from the three-dimensional model is logically clear and non-redundant, which lays a solid foundation for accurately constructing the connection and sequence relationship of the P&ID diagram and improves the accuracy of data conversion.
[0018] According to a preferred embodiment, the step of the symbol mapping module constructing the mapping relationship table comprises: obtaining symbol attributes based on the symbol library; matching the two-dimensional symbol type in the symbol attributes with the three-dimensional symbol type of the three-dimensional model to construct the mapping relationship table. By establishing a standardized mapping relationship table, a basis is provided for subsequent quick retrieval and application of correct two-dimensional symbols according to three-dimensional symbols, ensuring consistency and accuracy of symbol conversion.
[0019] According to a preferred embodiment, the step of the symbol mapping module matching the two-dimensional symbol type with the three-dimensional symbol type comprises: in the case of complete consistency between the three-dimensional symbol type and the two-dimensional symbol type, accurately matching the two; in the case of inability to accurately match the three-dimensional symbol type with the two-dimensional symbol type, performing fuzzy matching based on part of the fields of the three-dimensional symbol type; in the case of inability to fuzzy match the three-dimensional symbol type with the two-dimensional symbol type, automatically generating a placeholder and recording an exception log.
[0020] This flexible matching strategy greatly enhances the robustness and adaptability of the system. Even in the case of incomplete consistency of symbol types, matching or proper handling can be found as much as possible, ensuring the continuity of the P&ID drawing generation process, reducing errors caused by symbol mismatching, and improving the fault tolerance of the system.
[0021] According to a preferred embodiment, the step of the relationship construction module establishing the logical graph data table comprises: taking the directory tree ID of the pipeline table as the root node, taking the parent node of the branch pipeline table as the branch, and taking the parent node of the element reference table as the leaf node to form a complete tree structure, thereby converting the three-dimensional spatial relationship of the three-dimensional model into a queryable tree index.
[0022] The establishment of this tree structure enables the complex spatial relationship of the three-dimensional model to be clearly organized, facilitating subsequent query and reference by the layout module, providing data support for generating P&ID drawings with reasonable structure and clear logic, and improving the orderliness of information organization.
[0023] According to a preferred embodiment, the step of the layout module laying out the two-dimensional symbols based on the two-dimensional symbol type and the three-dimensional symbol type comprises: generating a process sequence based on the logical graph data table; distinguishing core devices and ordinary devices based on the symbol level field of the two-dimensional symbols; calculating the main axis reference coordinates of the core devices and linearly arranging the core devices according to the process flow; arranging the ordinary devices serving the core devices as auxiliary devices on both sides of the core devices to form a core device functional island; laying out the core devices with the position of the core devices as the origin of the coordinate system; and minimizing the total length of the pipelines within the core device functional island.
[0024] This layout strategy significantly improves the readability and aesthetics of P&ID diagrams. By highlighting core equipment, forming functional islands, and optimizing piping, the process flow becomes clearer, making it easier for engineers to understand and operate, and possibly reducing the complexity of actual piping.
[0025] According to a preferred embodiment, the step of the layout module performing layout of the two-dimensional symbols based on the two-dimensional symbol types and the three-dimensional symbol types further comprises: arranging the core equipment on the same flow line in a straight line according to the material flow direction and forming a clear main axis, and maintaining vertical alignment.
[0026] This more refined layout requirement further enhances the professionalism and readability of P&ID diagrams. Straight arrangement and alignment make the main process flow clear at a glance, conforming to engineering drawing habits, improving the quality and standardization of P&ID diagrams.
[0027] According to a preferred embodiment, the layout module sets the inlet and outlet pipe openings of the core equipment functional islands according to the standard form of pump-type equipment. This specific pipe opening layout may help standardize the design representation of key areas, making the connection methods of these areas more uniform and easy to identify, especially when it comes to connecting similar pump-type equipment, improving the consistency and professionalism of the drawings.
[0028] The present application provides a method for generating an overall P&ID diagram based on a three-dimensional model from a second aspect, characterized in that the method comprises: analyzing a specified region of the three-dimensional model, extracting three-dimensional symbol types and topological relationships of the three-dimensional model; establishing a mapping relationship table between the three-dimensional symbol types and the two-dimensional symbol types based on the three-dimensional symbol types and the mapping rules, to be used for retrieving two-dimensional symbols based on three-dimensional symbol types; based on the topological relationship, establishing a logical diagram data table, and performing layout of two-dimensional symbols based on two-dimensional symbol types and three-dimensional symbol types, to form a complete P&ID diagram.
[0029] The method of the present application extracts symbol types and topological relationships by directly analyzing the specified region of the three-dimensional model, which avoids the full-scan or complex spatial calculation that may exist in traditional methods, making the data extraction process more efficient. The entire process is simplified into four core steps of extraction, mapping, construction, and layout, replacing the complex process of multiple stages of conversion, manual adjustment, or reliance on multiple software, achieving end-to-end automated generation from three-dimensional models to P&ID diagrams. This improvement not only significantly shortens the time required to generate P&ID diagrams, significantly improving the efficiency of engineers, but also reduces the probability of errors due to its simplified process and fewer operation steps, making it relatively easy for users without deep CAD skills to generate standard P&ID diagrams. More importantly, the automated steps reduce human intervention, ensuring the consistency of each generated P&ID diagram in symbol usage, connection relationships, and basic layout, avoiding the differences that may occur in traditional manual drawing.
[0030] According to a preferred embodiment, the step of layout of the two-dimensional symbols based on the two-dimensional symbol type and the three-dimensional symbol type comprises: generating a process sequence based on the logic diagram data table; distinguishing core devices and common devices based on the symbol level field of the two-dimensional symbols; calculating the core device main shaft reference coordinates, and linearly arranging the core devices according to the process flow direction; arranging the common devices serving the core devices as auxiliary devices on both sides of the core devices to form a core device functional island; taking the position of the core device as the coordinate system origin for layout; and minimizing the total length of pipelines within the core device functional island.
[0031] The method is further improved in data processing speed and step simplification, and brings more optimized layout effect. By introducing the distinction between core devices and common devices, and using the symbol level field for judgment, the layout algorithm can preferentially process key elements, calculate core device coordinates and take them as the reference for layout, effectively reducing the spatial complexity of layout calculation. The goal of minimizing pipeline length makes the optimization process more focused, and a more efficient algorithm can be used to achieve it. The layout steps are divided into a series of sub-steps such as generating a process sequence, distinguishing devices, calculating coordinates, arranging core devices, arranging auxiliary devices, and optimizing pipelines, each of which provides clear input for the next step. This structured method is more direct and easier to automate than free layout or methods that rely on complex heuristic rules. These improvements not only make the layout process converge faster, but more importantly, the formation of the core device functional island and the establishment of the clear main shaft make the process flow more prominent and easier to understand on the drawing, significantly improving the readability and practical value of the P&ID drawing and reducing the subsequent manual adjustment work. At the same time, this structured layout method itself has a certain standardization color, and the generated drawing style is uniform, meeting the modern engineering requirements for standardized drawings and facilitating team collaboration and knowledge inheritance. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a simplified module connection relationship schematic diagram of the system for generating an overall P&ID drawing based on a three-dimensional model provided by the application;
[0033] Figure 2 is a flow schematic diagram of the method for generating an overall P&ID drawing based on a three-dimensional model provided by the application;
[0034] Figure 3 is an association schematic diagram of the connection relationship between a traditional P&ID paper drawing and an overall system provided by the application;
[0035] Figure 4 is an effect schematic diagram of manual connection by a traditional P&ID paper drawing provided by the application;
[0036] Figure 5 is a whole data flow chart provided by the present application;
[0037] Figure 6 is a data preprocessing flow chart provided by the present application;
[0038] Figure 7 is a schematic diagram of connection relationship provided by the present application;
[0039] Figure 8 is a schematic diagram of identifying the topological relationship of the generating element provided by the present application;
[0040] Figure 9 is a schematic diagram of a two-three dimensional symbol type mapping relationship table provided by the present application;
[0041] Figure 10 is a schematic diagram of a P&ID data level example provided by the present application;
[0042] Figure 11 is a schematic diagram of device symbol position area division provided by the present application;
[0043] Figure 12 is a schematic diagram of a three-dimensional model of pipe layout and a corresponding P&ID diagram provided by the present application;
[0044] Figure 13 is a business layer division schematic diagram of a system for generating a whole P&ID diagram based on a three-dimensional model provided by the present application.
[0045] List of reference signs
[0046] 100: processor; 110: extraction module; 120: symbol mapping module; 130: relationship construction module; 140: layout module; 150: output processing module. DETAILED DESCRIPTION
[0047] The following will be described in detail in combination with the drawings.
[0048] The present application aims at the problems of P&ID paper diagram dispersion, low scheme generation efficiency and insufficient intelligent association of P&ID diagram topological relationship in the prior art, and focuses on solving the following technical pain points: traditional P&ID paper diagram is mostly pure graphical expression, lacking necessary topological relationship and structured object data. Such graphics cannot be directly split and reorganized by computer, but only rely on manual redrawing, which not only consumes time and effort, but also due to data source difference, the connection relationship of the pipeline after redrawing cannot be kept 100% consistent with the three-dimensional model of the pipeline.
[0049] Figure 4 The display is the effect of traditional P&ID paper diagram after manual splicing, Figure 4In the prior art, the green pipelines are the connection relationships between the supplemented P&ID paper drawings and the P&ID paper drawings. In the manual splicing, the following difficulties are faced:
[0050] 1) The connection relationship of each pipeline needs to be copied and analyzed manually, and then the pipeline connection is completed through manual operation. This process not only consumes time and effort, but also is prone to errors in the copying and pasting process. Figure 4 In the prior art, all the green pipelines are the connection relationships found and supplemented manually.
[0051] 2) The readability of the complete P&ID file after merging is significantly reduced, and the consistency of the graphical expression data with the three-dimensional model still needs to be verified manually.
[0052] 3) The data still exists in an unstructured form, and the ability of automatic retrieval and association with external data is almost zero.
[0053] 4) The ideal merging effect should be that all the equipment is rearranged to achieve clear expression according to the production relationship and medium flow. However, the current page-by-page copying method cannot realize the equipment rearrangement function.
[0054] By changing the technical path, the symbol and topological relationship of the P&ID drawing are directly generated from the three-dimensional model, the data defects of the traditional P&ID paper drawing are avoided, and the technical difficulty of integrating multiple P&ID paper drawings to generate a complete P&ID drawing is fundamentally solved.
[0055] In view of the deficiencies in the prior art, the present application provides a system and method for generating an overall P&ID drawing based on a three-dimensional model. The present application can also provide an electronic device for generating an overall P&ID drawing. The present application can also provide a storage medium storing a program code for generating an overall P&ID drawing. The present application can also provide a processor or server for generating an overall P&ID drawing based on a three-dimensional model.
[0056] Embodiment 1
[0057] The present application generates a P&ID drawing from a three-dimensional model, which mainly faces three technical difficulties:
[0058] First, the identification and extraction of the topological relationship of the three-dimensional model. Taking a typical industrial pipeline system as an example, the reaction kettle device constructed in the three-dimensional modeling software contains hundreds of components such as process pipelines, valves, pump bodies, and containers that are distributed in a staggered manner. The spatial structure presents complex tree-like and ring-like topological characteristics. In the automatic identification process, it is necessary to analyze the pipeline docking form (such as flange or welded interface), branch priority (such as main pipeline and auxiliary pipeline), and equipment linkage relationship (such as pump and valve opening and closing logic) and other multi-dimensional topological connection information. However, in actual industrial scenarios, parallel pipelines may be misjudged as a single pipeline due to the close installation distance at the geometric level, the three-dimensional form of curved pipe sections may cause the algorithm to fail to accurately identify the connection node direction, and non-standard interface components are more likely to interfere with the topological relationship analysis due to the lack of unified modeling specifications. The nonlinear mapping relationship between the spatial structure and the logical level makes it difficult for existing topological extraction algorithms to completely strip the topological network that meets the process design logic without relying on manual correction, which is a core bottleneck that hinders the development of fully automatic conversion tools.
[0059] Second, the mapping of two-dimensional symbols and the reasonable construction of logical levels need to be addressed when rebuilding P&ID diagrams. Taking the symbol mapping of a centrifugal pump as an example, the three-dimensional model contains hundreds of parts such as impellers, pump casings, and sealing components, but in the P&ID diagram, it needs to be simplified into standardized ISO 14615 symbols (rectangular boxes with directional arrows). This process not only requires feature recognition algorithms to extract the pump's inlet and outlet directions, drive type (electricity / steam), flow parameters, and other key attributes, but also needs to automatically match the symbol attribute table. If the model is not labeled with the drive method or the parameters are missing, the rule base needs to be called to infer the default values - for example, according to process experience to determine the common drive type, otherwise the mapping result will lose its engineering significance, making it difficult for designers to accurately interpret the device function.
[0060] In terms of logical level construction, taking the system division of a certain chemical device as an example, the three-dimensional model covers multiple subsystems such as the reaction system, heating system, and cooling system. The P&ID diagram needs to strictly follow the ISO 15926 standard for hierarchical division: the main process layer uses thick solid lines to mark the core material path of the reactor-heat exchanger-separation tank, the auxiliary system layer uses dashed lines to distinguish between instrument air, process water, and other utility pipelines, and the control loop layer uses double-dot dashed lines to mark the signal connection between the temperature regulating valve and the PLC. If the hierarchical division is incorrect (such as mislabeling instrument air as the main process), it will not only lead to misjudgment of the process priority by the operator, but also may cause safety hazards.
[0061] Third, two-dimensional symbol layout needs to be independent of three-dimensional space, and instead be reasonably arranged through algorithms and empirical rules. Taking the cooling water circulation system in a large chemical plant as an example, the centrifugal pump, heat exchanger, control valve and other devices in the three-dimensional model are vertically distributed along the vertical column of the plant building, among which the pump body is installed 3 meters below the storage tank, and the valve group surrounds the pump body outlet in a radial manner. However, the P&ID diagram requires strict adherence to the fluid logic flow direction and operation priority, and all device symbols need to be horizontally laid out on a single plane. If the existing layout algorithm directly inherits the physical coordinates of the three-dimensional model, it may cause the control valve symbol to block the pump body symbol, or the unnecessary turning and crossing of the pipeline connection line. At this time, the automation system needs to combine the flow direction topological characteristics, and first construct a reference axis along the main process flow direction (storage tank → pump → heat exchanger → backwater pipe), and then offset the auxiliary equipment (such as pressure gauge, safety valve) according to the ISO 14617 standard. The algorithm also needs to automatically avoid symbol overlap through a potential field model, while meeting the implicit rule in the engineering drawing specification that the symbol spacing is not less than 1% of the drawing size. However, in actual application, when there are multiple parallel branches in the three-dimensional model, the existing algorithm often causes excessive stacking of symbols due to the inability to dynamically divide logical blocks, and still needs to rely on manual intervention to adjust the modular layout.
[0062] In addition, there are obstacles to the automatic execution of jump symbols, such as the inability to automatically exhaust associated pipelines based on P&ID jump symbols, and the lack of automatic layout capabilities, such as the lack of intelligent layout technology after manually completing pipeline association to optimize the pipeline connection and the overall.
[0063] Finally, the dynamic adaptation capability is weak, and multiple versions of P&ID often lead to inconsistent legend symbols (such as the same shape may represent a gate valve or a stop valve), and there is no tool to quickly and uniformly adapt.
[0064] As described above, there are three major technical bottlenecks in generating P&ID logic diagrams from three-dimensional models: intelligent analysis of complex spatial topology needs to identify multi-dimensional connection relationships and avoid geometric misjudgment; two-dimensional symbol mapping and logical level construction rely on high-precision feature recognition and standard specification adaptation; intelligent layout must break through the constraints of three-dimensional space coordinates and optimize symbol arrangement based on process flow direction. Existing technologies cannot solve the obstacles of automatic association of jump symbols and dynamic adaptation of multiple versions of symbols, and manual intervention is still a constraint on the realization of the whole process automation.
[0065] The present application provides a system for generating an overall P&ID diagram based on a three-dimensional model, comprising a processor 100. The processor 100 can be a CPU, a special integrated chip, a special logic circuit, etc.
[0066] The processor 100 comprises an extraction module 110, a symbol mapping module 120, a relationship construction module 130 and a layout module 140. The extraction module 110, the symbol mapping module 120, the relationship construction module 130 and the layout module 140 can be separate electronic components with corresponding coding programs, or can be integrated in the same processor 100. Preferably, the extraction module 110, the symbol mapping module 120, the relationship construction module 130 and the layout module 140 can also be individual models stored in the memory and called by the processor 100.
[0067] The extraction module 110 is used to parse a specified area of a three-dimensional model and extract a three-dimensional symbol type and a topological relationship of the three-dimensional model. The symbol mapping module 120 is used to establish a mapping relationship table of the three-dimensional symbol type and a two-dimensional symbol type based on the three-dimensional symbol type and a mapping rule, so as to search for the two-dimensional symbol type based on the three-dimensional symbol type. The relationship construction module 130 is used to establish a logic diagram data table based on the topological relationship, so as to store a connection relationship and a sequence relationship. The layout module 140 is used to perform layout of a two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, so as to form a complete P&ID diagram.
[0068] As shown in Figure 1 The extraction module 110 is connected with the symbol mapping module 120 and the relationship construction module 130 respectively. The symbol mapping module 120 and the relationship construction module 130 are connected with the layout module 140 respectively.
[0069] The system of the present application further comprises an output processing module 150. The layout module 140 is connected with the output processing module 150. The output processing module 150 is used to output, design format conversion and output parameter setting of the drawing result of the layout module 140.
[0070] Figure 13 is a business layer division schematic diagram of the system for generating an overall P&ID diagram based on a three-dimensional model of the present application. Figure 13 The layered logic of the system for generating an overall P&ID diagram based on a three-dimensional model is presented, which comprises a user layer, a business layer, an interface layer and a data layer from top to bottom. The user layer receives operations through an interactive interface; the business layer provides a basis in turn through the extraction module 110, the symbol mapping module 120 and the relationship construction module 130, and is supported by the relationship construction module 130 to support the layout module 140, and finally achieves result output by the output processing module 150. The interface layer comprises a raw model analysis, a two-dimensional symbol interface, a drawing interface and a layout rule interface, which connects the business process and external functions; the data layer stores various supporting data relying on a relational database, a non-relational database and a graph database, and each layer cooperates to realize a complete process from a three-dimensional model to P&ID drawing output.
[0071] The system of the present application executes the method for generating an overall P&ID diagram based on a three-dimensional model of the present application, as shown inFigure 5 as shown.
[0072] S100: The extraction module 110 parses the specified area of the three-dimensional model, extracts the three-dimensional symbol type and topological relationship of the three-dimensional model, as shown in Figure 2 as shown.
[0073] The extraction module 110 is responsible for information extraction of the three-dimensional model, including extracting three-dimensional symbol type, symbol attribute information, topological relationship information, etc. The three-dimensional symbol type is transmitted to the symbol mapping module 120 for symbol mapping, and the remaining information is transmitted to the relationship construction module 130 for construction of the logical graph data table.
[0074] S101: Input three-dimensional model data.
[0075] Input content: three-dimensional model file with attribute information. The three-dimensional model file is, for example, in RVM format and ATT format.
[0076] Key parameters: pipeline geometry data, component type (valve, container, pump, etc.), connection relationship, etc.
[0077] S102: Data preprocessing.
[0078] The three-dimensional model file in RVM format stores all three-dimensional information and object ID, and the three-dimensional model file in ATT format stores object ID and all attributes and topological relationships of the object. The two files are parsed. As shown in Figure 6 read the three-dimensional model file in RVM format and the three-dimensional model file in ATT format, the logical relationship of the three-dimensional model can be obtained, and the P&ID diagram can be drawn.
[0079] Preferably, the extraction module 110 mainly judges whether the three-dimensional model file in RVM format and ATT format is available and the attributes are sufficient. If the attribute information meets all the information involved in step S104, it is considered that the attributes are sufficient. The data will flow down. Otherwise, the process is terminated.
[0080] Some of the nouns in this process are explained as follows.
[0081] Pipe element: such as elbow, tee, valve, etc., connected by pipe, a component that realizes a certain function.
[0082] Pipeline: the superior node of the pipe element, a conveying path for medium flow, with only one head and one tail.
[0083] ID: unique identification of the object.
[0084] Fullname: Can also be used as the unique identifier of the object, embodied as the path of the element, for example, the first elbow Elbow01 under the pipeline Branch01, the Fullname of the elbow is Elbow01 of Branch01, to ensure the uniqueness of the Fullname.
[0085] Connection relationship: The relationship between two connected objects.
[0086] Flow direction relationship: The sequence of medium flow, whether it is from A to B or from B to A.
[0087] Membership relationship: The superior-inferior relationship. For example, the elbow belongs to the pipeline, that is, the parent of the elbow is the pipeline. In the industrial scene of the present application, an object has only one parent, and a parent can have multiple children.
[0088] Medium flow direction: The flow direction of process media (such as liquid, gas, slurry, etc.) in the pipeline, equipment and valve system. The medium flow direction is the core parameter of plant design, operation and maintenance, and directly affects the safety, efficiency and control logic of the system.
[0089] After extracting the two types of three-dimensional model files, as shown in Figure 6 , the extraction module 110 judges whether the object IDs of the two three-dimensional model files are complete and consistent. If so, judge whether the key attribute information is complete. If so, the data flows down, and the preprocessing ends; if not, the extraction module 110 judges that the data is not available, and the process ends.
[0090] The extraction module 110 judges whether the object IDs of the two three-dimensional model files are complete and consistent, and if not, the extraction module 110 judges that the data is not available, and the process ends.
[0091] S103: Extract the three-dimensional symbol type and object ID of all objects, as shown in Figure 5 .
[0092] The extraction module 110 identifies the three-dimensional symbol type and object ID of all objects according to the Type field in the RVM format three-dimensional model file and the ATT format three-dimensional model file, such as Branch, Valve, etc.
[0093] For example, in the input ATT format three-dimensional model file, the data format is as follows:
[0094] NEW / V118
[0095] FULLNAME:= / V118
[0096] TYPE:=VALV
[0097] Stype:=BalValve
[0098] LOCK:=false
[0099] OWNER:= / 50-B-9-B2
[0100] POS:=E 7510mm N 16195mm U 1022mm
[0101] ORI:=Y is N and Z is E
[0102] SPRE:= / A3B / VH50
[0103] LSTU:= / A3B / PA50
[0104] POSI:=E 7510mm N 16195mm U 1022mm
[0105] ANGL:=90degree.
[0106] In the above content, "BallValve" corresponding to the "Stype:=" field is a three-dimensional symbol type.
[0107] S104: According to the three-dimensional symbol type, the object attribute is extracted.
[0108] In the input three-dimensional model file in the ATT format, the semantic expression of the object is as follows:
[0109] NEW / ***
[0110] Attribute name:=attribute value.
[0111] The extraction module 110 judges that NEW / means to start describing a new object, and the front of the ":=" symbol is the attribute name and the back is the attribute value.
[0112] For example, the following statement indicates that a bend is described, and the nominal diameter of the bend is 50.
[0113] The OWNER is 50-B-9-B3:
[0114] NEW ELBOW 1of BRANCH / 50-B-9-B3
[0115] NAME:=23584 / 5636
[0116] TYPE:=ELBO
[0117] LOCK:=false
[0118] OWNER := / 50-B-9-B3.
[0119] Based on the above rules, the extraction module 110 needs to obtain the object attributes according to the different types of three-dimensional symbols. The extraction module 110 focuses on obtaining the following object attributes for connection relationship judgment and subsequent symbol mapping.
[0120] Pipe element type, such as Valve (valve), Elbow (elbow), Tee (tee), Weld (weld), etc.
[0121] The object attributes of the pipe element type include: Fullname (bit number or path), P1 BORE (port 1 nominal diameter), P2 BORE (port 2 nominal diameter), TYPE (type), STYPE (subtype), PSPEC / SPREF (grade), OWNER (parent), LPOS (outlet coordinate), APOS (inlet coordinate), POS (center coordinate), NEXT (next element) and PRE (previous element).
[0122] Pipe branch type: for example, Branch (branch).
[0123] The object attributes of the branch include: Fullname (bit number or path), HREF (ID of the pipe head connection object), TREF (ID of the pipe tail connection object), and PSPEC (grade).
[0124] S105: Determine the connection relationship according to the object attributes of the three-dimensional model.
[0125] The extraction module 110 analyzes the connection relationship between objects through the following three cases.
[0126] First, "Element A's LPOS" = "Element B's APOS", then it is determined that the two elements A and B have a connection relationship, and the flow direction is A to B.
[0127] Second, "Element A's NEXT" = "Element B's Fullname", then it is determined that the two elements A and B have a connection relationship, and the flow direction is A to B.
[0128] Third, through the OWNER attribute of the element, its parent branch can be found, and through the HREF and TREF attributes of the parent branch, the object ID of the device connected by the branch or the object ID of other branches can be determined.
[0129] If it is necessary to establish the connection relationship of the P&ID diagram as shown in Figure 7 , it is necessary to know the current Figure 7The first element in the green valve in the figure is who, the second element is who (Next attribute), the upper branch pipeline to which the valve belongs is who (OWNER attribute), and the valve front end is a large end or a small end (APOS attribute). Through the above attribute analysis, the subsequent relationship construction module 130 can construct the relationship of the entire link in the logical graph data table.
[0130] S106: Connection relationship merging.
[0131] Specifically, the extraction module 110 removes the connector symbols and merges the connection relationships into topological relationships with logical relationships.
[0132] The P&ID diagram is a logical relationship. According to the chemical standard HG / T20519, the following connector symbols are not expressed in the P&ID diagram: Elbow (elbow), Tee (tee), and Weld (weld). Therefore, in the connection relationship of the P&ID diagram, these connector symbols need to be discarded, and their connection relationship attributes are merged into the previous element. For example, A connects B, and B connects C, where B needs to be discarded as a connector symbol, and the extraction module 110 automatically records A connecting C.
[0133] Through the above steps, the extraction module 110 can obtain all three-dimensional symbol type data and four kinds of connection relationships: element connection relationship, element sequence, element membership relationship, and branch head and tail connection device information. Finally, the extraction module 110 sends all connection relationship data (topological relationship) to the relationship construction module 130 and sends all three-dimensional symbol type data to the symbol mapping module 120. These information will be used to construct the P&ID diagram.
[0134] Figure 12 In the figure, the left graph is a three-dimensional model, and the right graph is a P&ID diagram corresponding to the three-dimensional model. As shown in the left graph of the figure, Figure 12 As shown in the right graph of the figure, there are two biggest differences between it and the traditional P&ID diagram. One is data structuring, which supports fast retrieval and data association. The second is the generation of topological relationships, which originally expresses the connection relationship through graphics in the background and stores it in the database. All connection relationships are stored through the setting of data table fields. This connection relationship is not only used to express the order and attribution relationship during subsequent graphics drawing, but also makes the structured data more convenient for user retrieval.
[0135] As shown in the figure, Figure 8As shown, the topology relationship in the intelligent P&ID diagram of the present application is completely consistent with the topology relationship of the three-dimensional model, but the two sides focus on different aspects. The three-dimensional model focuses on expressing the spatial installation relationship, but the P&ID diagram focuses on the logical relationship, and the topology relationship is expressed by two-dimensional symbols, so that the interface is more concise and convenient to use, and the user can overlook the entire process flow from the perspective of God. For example, in an emergency situation, when the main purge path is blocked, the system can quickly calculate the standby path based on the topology relationship, etc.
[0136] S200: symbol mapping.
[0137] The symbol mapping module 120 establishes a mapping relationship table between the three-dimensional symbol type and the two-dimensional symbol type based on the three-dimensional symbol type and the mapping rule, so as to retrieve the two-dimensional symbol type based on the three-dimensional symbol type.
[0138] The three-dimensional symbol type data of all three-dimensional elements generated in the extraction module 110 are used as the input source of the symbol mapping module 120.
[0139] Through the connection port, the symbol mapping module 120 calls the two-dimensional symbols of the existing platform Designer P&ID. The Designer P&ID platform is an intelligent P&ID drawing software that supports symbol type customization, symbol shape customization, two-dimensional point line face drawing and other basic functions. Depending on this function, the symbol mapping module 120 completes the definition of the initial symbol library. The symbol library type is consistent with the three-dimensional symbol type in the three-dimensional model.
[0140] The symbol mapping module 120 automatically matches in the two-three-dimensional symbol mapping interactive interface, and supports manual modification.
[0141] The symbol mapping module 120 calls the symbol library of the Designer P&ID platform, and obtains the symbol attributes based on the symbol library. The symbol attributes include symbol ID, symbol name, symbol type and symbol geometric data.
[0142] Symbol ID: the unique identifier of the symbol.
[0143] Symbol type, used to identify the purpose of the symbol and the mapping relationship of the three-dimensional symbol type.
[0144] Symbol geometric data is the appearance shape of the symbol. Different shapes represent different symbols.
[0145] Symbol level: identified by core / ordinary device classification, set the level attribute when labeling the symbol, which can provide data basis for subsequent device topology layout.
[0146] Figure 9In some embodiments, the three-dimensional symbol type includes a three-dimensional symbol type ID and a three-dimensional symbol type name. The two-dimensional symbol type includes a two-dimensional symbol type ID and a two-dimensional symbol type name. The symbol mapping module 120 matches the two-dimensional symbol type in the symbol attribute and the three-dimensional symbol type of the three-dimensional model, and constructs a mapping relationship table, as shown in Figure 9
[0147] The symbol mapping module 120 supports accurate matching, fuzzy matching, and manual modification. The user takes the three-dimensional symbol type as a retrieval condition, traverses the two-dimensional symbol types of all two-dimensional symbols, and generates a mapping relationship table and summarizes the mapping relationship under the condition that the following conditions are met, and the matching is completed.
[0148] In the case where the three-dimensional symbol type and the two-dimensional symbol type are completely consistent, the symbol mapping module 120 performs accurate matching on the two.
[0149] In the case where the three-dimensional symbol type and the two-dimensional symbol type cannot be accurately matched, the symbol mapping module 120 performs fuzzy matching based on part of the fields of the three-dimensional symbol type.
[0150] When no completely matched symbol is found in the two-dimensional symbol, partial field fuzzy matching is adopted, for example, the valve in the three-dimensional model is “swing check valve”, and only “check valve” is found in the P&ID. It can also be recommended as a fuzzy matching item.
[0151] In the case where the three-dimensional symbol type and the two-dimensional symbol type cannot be fuzzy matched, the symbol mapping module 120 automatically generates a placeholder and records an exception log.
[0152] For example, “filter” appears in the three-dimensional symbol type, but there is no matching object in the P&ID diagram, and an exception log report is performed, and the symbol needs to be added in the platform symbol library.
[0153] S300: Topology analysis is performed to construct two-dimensional data.
[0154] The relationship construction module 130 establishes a logical graph data table based on the topological relationship to store the connection relationship and the sequence relationship.
[0155] The relationship construction module 130 receives the topological relationship and the object attribute sent by the receiving and extracting module 110, and constructs the logical graph data table of the P&ID diagram.
[0156] The relationship construction module 130 is designed by cascading four data tables.
[0157] The relationship building module 130 forms a complete tree structure with the directory tree ID of the pipeline table as the root node, the parent node of the branch pipeline table as the branch, and the parent node of the element reference table as the leaf node, so as to convert the three-dimensional space relationship of the three-dimensional model into a queryable tree index. The relationship building module 130 stores all connection relationships and sequence relationships through the ports FROM / T0. These information is the basic information required by the intelligent P&ID diagram.
[0158] Figure 10 The construction mode of the logical diagram data table is shown.
[0159] The pipeline table records the relationship between the pipeline and the directory tree. Figure 10 In the pipeline table, the pipeline PIPE01 and the pipeline PIPE02 are included.
[0160] The pipeline table is provided with the following fields:
[0161] Pipeline ID: unique ID, as the unique identification of the pipeline.
[0162] Pipeline number: bit number of the pipeline.
[0163] Parent node: unique ID, as the unique ID of the directory tree, each diagram has an independent directory tree.
[0164] The branch pipeline table records the relationship between the branch pipeline and the pipeline. Figure 10 In the branch pipeline table, the branch pipeline Branch01 and the branch pipeline Branch02 are included.
[0165] The branch pipeline table is provided with the following fields:
[0166] Branch pipeline ID: unique ID, as the unique identification of the branch pipeline.
[0167] Parent node: records the affiliation relationship of the pipeline, and facilitates the construction of the directory tree.
[0168] The element reference table records the reference relationship between the element instance and the symbol, and the parent node of the element instance. Figure 10 In the element, the valve, the pipeline element and the pipe segment are included.
[0169] The element reference table is provided with the following fields:
[0170] Element ID: unique ID, each symbol in the P&ID has a unique ID.
[0171] Symbol ID: ID of the referenced two-dimensional symbol, records the reference relationship, and the element attribute is updated in real time when the symbol is updated.
[0172] Graphic data: copy the symbol shape data according to the symbol ID and store it to speed up the graphic display efficiency.
[0173] Parent node: records the membership of the element, which facilitates the construction of the directory tree.
[0174] Two-dimensional coordinates: in this step, the two-dimensional coordinates are empty and need to be gradually generated according to subsequent steps.
[0175] Connection relationship table: records the connection relationship and flow direction relationship between pipe elements.
[0176] The connection relationship table is provided with the following fields:
[0177] Element ID: unique ID, consistent with the element ID in the element reference table, one-to-one correspondence.
[0178] Port ID: ID of the element port, each element has 1-3 ports. Each port is uniquely numbered.
[0179] Port FROM: flow direction and connection information of the port, recording the upstream object of the port.
[0180] Port TO: flow direction and connection information of the port, recording the downstream object of the port.
[0181] S400: The layout module 140 performs layout of the two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, and forms a complete P&ID diagram.
[0182] The layout module 140 receives the mapping relationship table sent by the symbol mapping module 120 and the topological relationship sent by the extraction module 110, and performs P&ID diagram drawing, and writes the space information into the logical diagram data table of the relationship construction module 130.
[0183] The layout module 140 displays and draws the P&ID diagram, presents the data relationship generated in the previous step in a graphical manner, and assigns specific coordinate positions to the graphics for reasonable layout.
[0184] Preferably, the layout module 140 places the core equipment in the center area of the P&ID diagram.
[0185] Core equipment: In the process plant layout, the core equipment refers to the key equipment that plays a leading role in the process flow and directly affects the production capacity and safety. For example: reactor, tower, high temperature and high pressure equipment, etc., which undertakes the functions of core reaction, separation or energy conversion.
[0186] In the present application, the layout module 140 pre-fabricates all core equipment types into the system by exhaustive method.
[0187] The two-dimensional symbol extracted in step S200 contains a "symbol level" field, based on which the core device and the ordinary device can be determined.
[0188] S401: generating a process sequence based on the connection relationship table.
[0189] Order linear :=TopologicalSort(G,root).
[0190] The code represents performing topological sorting on the graph structure G with root as the starting point, and assigning the generated linear sequence to Order linear variable.
[0191] Wherein, G represents a directed graph (node = device, edge = pipeline flow direction), root represents the starting device; Order linear represents a one-dimensional array output, storing the node sequence conforming to the topological order.
[0192] For example: the input device connection relationship is:
[0193] Raw material tank → reactor, reactor → centrifuge, centrifuge → storage tank.
[0194] The topological sorting output is: Order linear = [raw material tank, reactor, centrifuge, storage tank].
[0195] Accordingly, in addition to sorting the devices, the layout module 140 can also solve the circular dependency according to the flow linear arrangement. When a loop appears in the process flow (such as reactor → centrifuge → reactor), the algorithm automatically reports an error and prompts a design contradiction.
[0196] The layout module 140 according to the flow linear arrangement can also realize branch processing. If there are parallel devices (such as reactor → centrifuge A and centrifuge B), then generate: [raw material tank, reactor, centrifuge A, centrifuge B, storage tank].
[0197] S402: calculating the coordinates of the main shaft of the core device.
[0198] According to the P&ID diagram size, the X-axis reference coordinates of the core device are dynamically calculated:
[0199]
[0200] In the above formula, W drawing represents the effective width of the P&ID diagram, N core represents the number of core devices, and rank represents the sequence number of the device in Order linear .
[0201] S403: Linearly arrange the core equipment according to the process flow direction.
[0202] Preferably, the direction deviation is within 5 degrees:
[0203]
[0204] Wherein, θ i represents the angle (unit: degree) between the connecting line of the i-th pair of adjacent equipment and the horizontal axis (X-axis); 0 0 represents the reference value, and the theoretically ideal process flow should be completely horizontal. represents the arithmetic mean operator (standardize the scale difference caused by different equipment quantities); represents the deviation accumulation of all adjacent equipment pairs.
[0205] The physical meaning of this calculation formula is to quantify the layout accuracy of the core equipment in the process production line, and to ensure the linear continuity of the process flow.
[0206] S404: Equipment layout, i.e. distributing auxiliary equipment on both sides of the core equipment.
[0207] The auxiliary equipment serving the core equipment is arranged on both sides of the core equipment, forming a functional island of the core equipment. Pump-type equipment is below other equipment.
[0208] The functional island refers to a cluster of auxiliary equipment arranged around the core equipment, forming an independent functional unit through physical proximity and logical association. The functional island forms a cycle by itself and only has a small amount of main medium pipelines for transmission. Such layout of the present application can shorten the pipeline distance between the auxiliary equipment and the core equipment, make the layout more reasonable and beautiful, and avoid a large number of pipelines crossing the entire paper drawing.
[0209] The calculation logic of the functional island is as follows:
[0210] The objects with the symbol level of "ordinary equipment" can be regarded as auxiliary equipment, which serve the core equipment.
[0211] The connection relationship parsed by step S100 and the ordinary equipment directly connected (connected by 1-2 pipelines) to the core equipment can be used as the functional island object of the core equipment.
[0212] S405: Auxiliary equipment position allocation.
[0213] Let the position of the core equipment be the origin O (0, 0) of the coordinate system, its diameter be D, and the number of auxiliary equipment in the functional island be N. The auxiliary equipment is distributed on both sides of the core equipment, and its polar coordinate position (r i , θ i ) satisfies:
[0214]
[0215] In the above formula, 1.2D represents the spacing constraint, which can be adjusted as needed. The present application takes the value 1.2D in combination with actual engineering experience. left = 90° ± Δθ (left sector area). θ right = 270° ± Δθ (right sector area). Δθ represents the angle extension range (usually 30°-60°), which is used to control the width of the functional island.
[0216] In this step, the safe operating distance between the auxiliary equipment and the core equipment is determined by the 1.2D spacing, avoiding mechanical interference and thermal radiation interference, and the left-right symmetric sector distribution is used to optimize the spatial layout of the narrow field, and the compactness of the pipeline is improved by centralized arrangement; the angle adjustable design of Δθ supports flexible matching of the functional island width and the actual demand of the field. Moreover, the setting of the spacing and angle parameters is based on engineering experience and equipment safety specifications, taking into account the maintenance operation space and thermal expansion redundancy, finally forming a standardized functional island framework, reducing the design complexity and improving the reliability of the layout.
[0217] S406: Minimize the total length of the pipeline.
[0218] The total length L of the pipeline between the auxiliary equipment and the core equipment in the functional island total needs to be minimized.
[0219] The calculation formula for minimization is:
[0220]
[0221] In the above formula, N represents the number of auxiliary equipment in the functional island; x i and y i represent the coordinates of the i-th auxiliary equipment in the two-dimensional plane coordinate system, and the core equipment is fixed at the origin. r i represents the straight-line distance from the i-th auxiliary equipment to the core equipment, which satisfies represents the pipeline length of a single device.
[0222] Constraint condition: r i ≥ 1.2D.
[0223] The constraint condition represents the minimum safe distance that each auxiliary equipment needs to maintain from the core equipment. D represents the reference safe spacing of the core equipment. 1.2D is the lower limit of the engineering constraint under the safety margin coefficient (1.2 times), which is used to prevent mechanical interference or thermal radiation influence.
[0224] Optimization goal: min L total , that is, by adjusting the coordinates of all auxiliary equipment, the auxiliary equipment is as close as possible to the core equipment under the premise of meeting the safe distance.
[0225] S407: Align the equipment.
[0226] The core equipment on the same flow line is arranged in a straight line according to the material flow direction, forming a clear main axis, from left to right, and maintaining vertical alignment.
[0227] Arranging the core equipment on the same flow line in a straight line according to the material flow direction (such as vertical alignment from left to right) in the P&ID diagram can significantly improve the engineering practicability and systematicness of the paper diagram: by intuitively displaying the process sequence and material flow path along the main axis, reducing visual interference and interpretation difficulty; straight-line layout directly reduces the length of pipe bends and intersection points, not only saving material cost and energy consumption, but also providing clear physical positioning reference for construction and installation, reducing installation error risk; the standardized orientation of equipment interfaces also facilitates the unified planning of maintenance access and instrument interfaces, avoiding maintenance space conflicts; at the same time, the axial centralized layout is beneficial for marking the location of safety-critical equipment (such as reactors, pressure relief valves), avoiding physical interference risks caused by pipe intersection, and meeting the requirements of HAZOP review and industry standards, providing a unified logical framework for multi-disciplinary collaborative design and digital modeling, ensuring the full-cycle consistency and scalability from paper diagram to construction.
[0228] S408: Pipe layout.
[0229] For pump-type equipment, the inlet and outlet pipes are determined according to the form of the pump. By default, the left inlet and the upper or right outlet.
[0230] Other pipe ports need to consider the position of the pipe port in the three-dimensional model, and generate the pipe port in the corresponding area in the P&ID diagram, considering the following factors:
[0231] The pipe port position of the equipment should be as consistent as possible with the three-dimensional model, as the inlet and outlet positions of different types of equipment are slightly different. For example, in a cooling tower, in order to increase the heat exchange area, the water vapor is inlet from the bottom and outlet from the top, while the cooling water is inlet from the top and outlet from the bottom.
[0232] The pipe port direction should be arranged symmetrically on both sides of the equipment, facing outward, but the pipe ports on the head are generally at a 90-degree angle to the pipe ports on the cylinder. Therefore, the head pipe ports are considered separately.
[0233] Based on the above factors, the pipe port direction setting method is as shown in Figure 11 .
[0234] 1) For vertical equipment ( Figure 11 left equipment), except for the head (upper head and lower head), the orientation of the pipe ports on the equipment body is calculated using the following formula:
[0235]
[0236] The coordinates are all relative coordinates, with the lower end of the equipment body as the zero point.
[0237] For vertical equipment, the rest of the pipe nozzle can be arranged left and right, and the left position is preferred to take the left in and the right out.
[0238] For horizontal equipment, Figure 11 For the right equipment, in addition to the head (left head and right head), the pipe nozzle on the equipment body is calculated by the following formula:
[0239]
[0240] The coordinates are all relative coordinates, and the left end of the equipment body is taken as the zero point.
[0241] For horizontal equipment, in addition to the head, the rest of the pipe nozzle is arranged up and down, and the arrangement direction is referred to the three-dimensional pipe nozzle direction. The head nozzle and the three-dimensional model keep consistent orientation.
[0242] In the drawing of P&ID diagram, the pipe nozzle layout calculation based on three-dimensional model realizes the deep integration and automatic configuration of multi-dimensional design data. By establishing the proportional mapping relationship between two-dimensional coordinates and three-dimensional model parameters (such as the Y-axis coordinate of vertical equipment is proportionally scaled according to the three-dimensional Z-axis height, and the X-axis coordinate of horizontal equipment is linked with the three-dimensional model length), it can be ensured that the paper diagram and the actual structure of the factory strictly correspond, and the deviation of the pipe nozzle position caused by human error in traditional drawing is avoided. At the same time, the algorithm has built-in industry engineering rules: the non-head pipe nozzle of vertical equipment is preferentially arranged in a symmetrical layout of left in and right out, and the head nozzle is kept orthogonal to the cylinder nozzle, effectively avoiding the physical interference of pipe flange or support structure; the nozzle of horizontal equipment is automatically mapped to up and down arrangement according to the three-dimensional model orientation, and the head nozzle is kept left and right orientation, ensuring the consistency of the logic of paper diagram and installation requirements. Such rules can also trigger intelligent warning, when the three-dimensional model parameters conflict with the preset rules (such as the inlet and outlet nozzles of pump equipment are not generated according to the default left in and right out), the system automatically prompts the exception to assist quick correction.
[0243] S409: Pipe layout.
[0244] The pipe layout needs to comply with the topological relationship of the three-dimensional model (i.e. the front and back sequence relationship), and also consider the aesthetics. In this invention, the element spacing is set as follows, which can be adjusted by the user according to actual needs.
[0245] Branch pipe: drawn from the right side or the top of the main pipe, with a fixed angle of 90°.
[0246] The spacing between parallel pipelines is as follows:
[0247] When there is no pipe on the pipeline, the minimum spacing S min of the pipeline is 2×H symbol . H symbol = symbol height.
[0248] When there are fittings on the pipeline, the height of the fittings should be considered to avoid collision, and dynamic adjustment is as follows:
[0249]
[0250] H symbol1 and H symbol2 Indicates the height of the symbol on two parallel pipelines.
[0251] For the fittings in front and back sequential layout, the drawing of the two-dimensional symbol needs to refer to the front and back sequence relationship in the three-dimensional model, and follow the following principles:
[0252] First, if two elements in the three-dimensional model are directly connected (i.e. there is no intermediate straight pipe segment between them), then in the two-dimensional symbol representation, the direct connection of the fittings should also be adopted.
[0253] Second, for the fittings connected in sequence in the three-dimensional model, the corresponding two-dimensional symbols need to be arranged in sequence according to the sequence of fluid flow in the three-dimensional model. It should be noted here that no matter how long the actual pipe segment length between the elements in the three-dimensional model is, a gap should be reserved between these symbols in the P&ID diagram, and the size of the gap is uniformly taken as 1 times the width of the symbol itself.
[0254] S500: P&ID diagram output.
[0255] The output processing module 150 includes format conversion and parameter configuration.
[0256] The output processing module 150 supports exporting the following format files: PDF / A-3 (long-term archive format), DWG2023 (AutoCAD native format), SVG 2.0 (vector graphics).
[0257] The parameter configuration of the output processing module 150 includes:
[0258] PDF resolution: engineering drawing ≥ 300 dpi, schematic drawing ≥ 150 dpi;
[0259] DWG layer division rule: equipment layer (EQUIP), pipeline layer (PIPE), instrument layer (INST);
[0260] SVG color mode: CMYK and sRGB dual mode can be selected.
[0261] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to devise modifications which, though perhaps not explicitly described or shown herein, nonetheless fall within the scope of the application. Accordingly, the patent application includes all modifications encompassed within the scope of the claims and their equivalents. The patent application contains several inventive concepts, and the applicant reserves the right to file separate applications on each of these concepts, or on any combination or sub-combination of these concepts.
Claims
1. A system for generating an overall P&ID diagram based on a three-dimensional model, characterized by, The processor (100) comprises: an extraction module (110) for parsing a specified area of a three-dimensional model and extracting a three-dimensional symbol type and a topological relationship of the three-dimensional model; a symbol mapping module (120) for establishing a mapping relationship table of the three-dimensional symbol type and a two-dimensional symbol type based on the three-dimensional symbol type and a mapping rule, so as to search for the two-dimensional symbol type based on the three-dimensional symbol type; a relationship construction module (130) for establishing a logical graph data table based on the topological relationship, so as to store a connection relationship and a sequence relationship; a layout module (140) for performing layout of a two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, so as to form a complete P&ID graph.
2. The system of claim 1, wherein, The extraction module (110) extracts the three-dimensional symbol type and the topological relationship of the three-dimensional model, and the steps comprise: identifying an object ID and a three-dimensional symbol type from an attribute field of the three-dimensional model; analyzing a connection relationship between objects based on the three-dimensional symbol type; removing a connection body symbol and merging the connection relationship into a topological relationship with a logical relationship.
3. The system of claim 1 or 2, wherein, The symbol mapping module (120) establishes the mapping relationship table, and the steps comprise: obtaining a symbol attribute based on a symbol library; matching a two-dimensional symbol type in the symbol attribute and a three-dimensional symbol type of the three-dimensional model, and establishing a mapping relationship table.
4. The system according to any one of claims 1 to 3, characterized in that The symbol mapping module (120) matches the two-dimensional symbol type and the three-dimensional symbol type, and the steps comprise: in a case where the three-dimensional symbol type is completely consistent with the two-dimensional symbol type, performing accurate matching thereon; in a case where the three-dimensional symbol type cannot be accurately matched with the two-dimensional symbol type, performing fuzzy matching based on part of a field of the three-dimensional symbol type; in a case where the three-dimensional symbol type cannot be matched with the two-dimensional symbol type, automatically generating a placeholder and recording an exception log.
5. The system according to any one of claims 1 to 4, characterized in that The relationship construction module (130) establishes the logical graph data table, and the steps comprise: taking a directory tree ID of a pipeline table as a root node, taking a parent node of a branch pipeline table as a branch, and taking a parent node of an element reference table as a leaf node to form a complete tree structure, so as to convert a three-dimensional space relationship of the three-dimensional model into a queryable tree index.
6. The system according to any one of claims 1 to 5, characterized in that The layout module (140) performs layout of the two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, and the steps comprise: generating a process sequence based on the logical graph data table; distinguishing core equipment and ordinary equipment based on a symbol level field of the two-dimensional symbol; calculating a main shaft reference coordinate of the core equipment, and linearly arranging the core equipment according to a process flow direction; arranging ordinary equipment serving the core equipment as auxiliary equipment on both sides of the core equipment to form a core equipment functional island; performing layout of the core equipment functional island based on a position of the core equipment as a coordinate system origin; minimizing a total length of pipelines in the core equipment functional island.
7. The system according to any one of claims 1 to 6, characterized in that The layout module (140) performs layout of the two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type, and the steps further comprise: linearly arranging the core equipment on a same flow line according to a material flow direction and forming a clear main shaft line, and maintaining vertical alignment.
8. The system according to any one of claims 1 to 7, characterized in that The layout module (140) sets the inlet and outlet ports of the core equipment functional island according to the standard form of the pump type equipment.
9. A method of generating an overall P&ID diagram based on a three-dimensional model, characterized by, The method comprises: Resolving a specified area of a three-dimensional model, extracting a three-dimensional symbol type and a topological relationship of the three-dimensional model; Based on the three-dimensional symbol type and the mapping rule, a mapping relationship table of the three-dimensional symbol type and the two-dimensional symbol type is established, so as to retrieve the two-dimensional symbol based on the three-dimensional symbol type; Based on the topological relationship, a logical graph data table is established; Based on the two-dimensional symbol type and the three-dimensional symbol type, the layout of the two-dimensional symbol is performed to form a complete P&ID graph.
10. The method of claim 9, wherein, The step of performing the layout of the two-dimensional symbol based on the two-dimensional symbol type and the three-dimensional symbol type comprises: Generating a process sequence based on the logical graph data table; Based on the symbol level field of the two-dimensional symbol, the core equipment and the ordinary equipment are distinguished; The main shaft reference coordinates of the core equipment are calculated, and the core equipment is linearly arranged according to the process flow direction; The ordinary equipment serving the core equipment is arranged as auxiliary equipment on both sides of the core equipment to form a core equipment functional island; The position of the core equipment is taken as the origin of the coordinate system for layout; The total length of the pipelines in the core equipment functional island is minimized.
Citation Information
Patent Citations
Method for automatically checking and matching system chart and three-dimensional model in pipeline design
CN107194056A
Cited By
Method for generating axial survey single line diagram of three-dimensional pipeline of hydropower station
CN121389390A