Method, device and computer equipment for generating pipe cap model

By generating a pipe cap model, the problem of unnatural multi-pass modeling at pipeline connections is solved, and the natural display of pipeline connections is realized, meeting the modeling needs of "digital city" underground pipelines.

CN114595534BActive Publication Date: 2025-08-19AERIAL PHOTOGRAMMETRY & REMOTE SENSING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210248514.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2025-08-19
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

The modeling of multi-pass situations at pipeline connections is not yet mature, resulting in unnatural connection between pipelines and multi-pass models, affecting the authenticity of the system.

Method used

The method of generating a tube cap model is to obtain pipeline data, use the pipeline outer diameter to generate a tube cap model, and overlap its top at the intersection to ensure that the tube cap model is naturally nested on the pipeline.

Benefits of technology

It realizes natural display at the pipeline connection, meets the modeling needs of "digital city" underground pipelines, and improves the authenticity and display effect of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595534B_ABST
    Figure CN114595534B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, and computer equipment for generating a pipe cap model. The method includes: first, obtaining pipeline data, the pipeline data including the location information of each pipeline and the outer diameter of each pipeline, that is, the distribution of the pipelines in space; when the pipelines in space intersect, that is, the first pipeline and at least one second pipeline among all the pipelines intersect, the intersection is used as the center point; then, using the outer diameter of each pipeline, a pipe cap model corresponding to each pipeline is generated, wherein the outer diameter of the pipeline is used to ensure that the generated pipe cap model can be reasonably nested on the pipeline, and the top of each pipe cap model is placed at the center point. Therefore, the embodiment of the present invention generates corresponding pipe cap models for multiple pipelines with intersections, and makes the top of each pipe cap model overlap at the center point, so that the connection of the pipelines is highlighted and displayed naturally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of modeling, and in particular to a method, device and computer equipment for generating a pipe cap model. Background Art

[0002] In the digital management of underground pipelines in "Digital Cities," 3D visualization, querying, analysis, and statistics are now mandatory requirements for system development. However, modeling technology for pipeline joints with multiple connections, such as elbows, tees, and crosses, is not yet mature.

[0003] A common solution for multi-way pipe connections, such as elbows, tees, and crosses, is to dynamically load dozens of fixed multi-way models based on angles and sizes. However, when unique connection situations arise and matching multi-way models are not pre-built, gaps may appear between the pipes and the multi-way models at the connection points, reducing system realism. Summary of the Invention

[0004] In view of this, the present invention provides a method, device and computer equipment for generating a pipe cap model, which are used to improve the current situation where the modeling technology for multiple connections such as elbows, tees and crosses at pipeline joints is not yet mature, resulting in unnatural connections between the pipelines at the pipeline joints and the multi-connection models.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating a pipe cap model, comprising:

[0006] Acquiring pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline;

[0007] If a first pipeline and at least one second pipeline among all the pipelines intersect, the intersection point of the first pipeline and at least one second pipeline is used as the center point;

[0008] A pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes are generated using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes, wherein the top of the pipe cap model corresponding to the first pipe and the top of the pipe cap model corresponding to each of the second pipes coincide at the center point.

[0009] Optionally, in an embodiment of the present invention, the pipe cap model includes a top and a body;

[0010] The generating of a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes by using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes includes:

[0011] For each candidate pipeline, generating a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline;

[0012] The top of the pipe cap model corresponding to each candidate pipe is placed at the center point, and the body of each pipe cap model is made parallel to the corresponding candidate pipe, to obtain the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each second pipe.

[0013] Furthermore, in an implementation manner provided by an embodiment of the present invention, generating a corresponding pipe cap model for each candidate pipe according to the outer diameter of the candidate pipe includes:

[0014] For each candidate pipe, calculate the scaling ratio of the pipe cap model corresponding to the candidate pipe according to the outer diameter of the candidate pipe and the preset inner diameter of the pipe cap, wherein the outer diameter of the candidate pipe is proportional to the scaling ratio of the pipe cap model corresponding to the candidate pipe;

[0015] The corresponding pipe cap model of the candidate pipe is generated by utilizing the scaling ratio of the corresponding pipe cap model.

[0016] Furthermore, in an implementation manner provided by an embodiment of the present invention, generating a corresponding pipe cap model by using a scaling ratio of the corresponding pipe cap model of the candidate pipe includes:

[0017] Acquire a pre-stored initial pipe cap model, wherein the initial pipe cap model includes the preset pipe cap inner diameter;

[0018] The initial pipe cap model is scaled according to the scaling ratio of the pipe cap model corresponding to the candidate pipe to obtain the pipe cap model corresponding to the candidate pipe.

[0019] Optionally, in an implementation manner provided in an embodiment of the present invention, the method further includes:

[0020] The pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes are stored, so that when the first pipe and each of the second pipes are displayed, the corresponding pipe cap models are displayed.

[0021] Optionally, in an implementation manner provided by an embodiment of the present invention, storing the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes includes:

[0022] Based on the cache slicing technology, corresponding slice data is generated using the first pipe, the pipe cap model corresponding to the first pipe, each of the second pipes and the pipe cap model corresponding to each of the second pipes;

[0023] The slice data is stored and published, so that when the first pipeline and each of the second pipelines are displayed, the corresponding pipe cap models are displayed.

[0024] In a second aspect, an embodiment of the present invention provides a device for generating a pipe cap model, comprising:

[0025] An acquisition module, configured to acquire pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline;

[0026] a center point confirmation module, configured to, if a first pipeline and at least one second pipeline among all the pipelines intersect, use the intersection of the first pipeline and the at least one second pipeline as the center point;

[0027] A generation module is configured to generate a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes, wherein a top of the pipe cap model corresponding to the first pipe and a top of the pipe cap model corresponding to each of the second pipes coincide with the center point.

[0028] Optionally, in an embodiment of the present invention, the pipe cap model includes a top and a body;

[0029] The generation module includes:

[0030] A construction submodule is configured to generate, for each candidate pipeline, a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline;

[0031] A placement submodule is configured to place the top of the pipe cap model corresponding to each candidate pipe at the center point, and to make the body of each pipe cap model parallel to the corresponding candidate pipe, thereby obtaining a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each second pipe.

[0032] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes the method for generating a pipe cap model as disclosed in any one of the first aspects.

[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run on a processor, the method for generating a pipe cap model as disclosed in any one of the first aspects is executed.

[0034] A method for generating a pipe cap model provided in an embodiment of the present invention first obtains pipeline data, the pipeline data including the location information and the outer diameter of each pipeline, that is, the distribution of the pipelines in space. When the pipelines in space intersect, that is, a first pipeline intersects with at least one second pipeline among all the pipelines, the intersection of the first pipeline and the at least one second pipeline is used as the center point. Then, using the outer diameter of the first pipeline and the outer diameter of each second pipeline, a pipe cap model corresponding to the first pipeline and a pipe cap model corresponding to each second pipeline are generated, wherein the outer diameter of the pipeline is used to ensure that the generated pipe cap model can be reasonably nested on the pipeline, and the top of each pipe cap model is placed at the center point.

[0035] Therefore, the embodiment of the present invention generates corresponding pipe cap models for multiple intersecting pipes, and makes the top of each pipe cap model overlap at the center point, so that the connection between the pipes is highlighted and displayed naturally, thereby meeting the needs of establishing a "digital city". BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0037] Figure 1 A schematic flow chart of a first method for generating a pipe cap model provided by an embodiment of the present invention is shown;

[0038] Figure 2 A schematic diagram of a pipe cap model provided by an embodiment of the present invention is shown;

[0039] Figure 3 A schematic diagram showing a flow chart of a second method for generating a pipe cap model provided by an embodiment of the present invention;

[0040] Figure 4 An entity diagram of an application scenario of a pipe cap model provided by an embodiment of the present invention is shown;

[0041] Figure 5 A schematic flow chart of a third method for generating a pipe cap model provided by an embodiment of the present invention is shown;

[0042] Figure 6 A schematic structural diagram of a device for generating a pipe cap model provided by an embodiment of the present invention is shown.

[0043] Description of main component symbols:

[0044] 101 - top of the pipe cap model, 102 - body of the pipe cap model, 103 - first pipe, 104 - second pipe, 105 - top of the first pipe cap, 106 - body of the first pipe cap, 107 - top of the second pipe cap, 108 - body of the second pipe cap, 109 - center point. DETAILED DESCRIPTION

[0045] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0046] The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the figures is not intended to limit the scope of the claimed invention, but rather merely represents selected embodiments of the present invention. All other embodiments derived by those skilled in the art based on the embodiments of the present invention without inventive effort are intended to be within the scope of protection of the present invention.

[0047] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0048] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0049] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present invention pertain. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.

[0050] Reference Figure 1 , Figure 1 A schematic flow chart of a method for generating a pipe cap model according to an embodiment of the present invention is shown. The method for generating a pipe cap model according to an embodiment of the present invention includes:

[0051] S110 , acquiring pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline.

[0052] Specifically, pipeline data is used to indicate the distribution of all pipelines in space, such as the distribution of underground pipelines and the layout of pipelines in buildings.

[0053] It is understandable that the pipeline data in the embodiment of the present invention is stored in a preset database, and the pipeline data is published in the form of cache slices so that users can view pipeline distribution or obtain pipeline data on any client.

[0054] It can also be understood that the position information of the pipeline includes a three-dimensional coordinate set of the pipeline, indicating the position of the pipeline in space.

[0055] S120: If a first pipeline and at least one second pipeline among all the pipelines intersect, take the intersection of the first pipeline and the at least one second pipeline as a center point.

[0056] It is understood that pipes in space may intersect. When multiple pipes intersect, that is, when the first pipe intersects with the at least one second pipe, embodiments of the present invention determine the intersection of the intersecting pipes based on the position information of each pipe and use the intersection as the center point. It should be noted that the center point is used to determine the placement position of the pipe cap model in embodiments of the present invention.

[0057] S130: Generate a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes, wherein a top of the pipe cap model corresponding to the first pipe and a top of the pipe cap model corresponding to each of the second pipes overlap at the center point.

[0058] Optionally, the process of generating a pipe cap model in an embodiment of the present invention may include: first, determining the position of the head of the pipe cap model based on the center point; then, determining the inner diameter of the corresponding pipe cap model based on the outer diameter of the first pipe and the outer diameter of each of the second pipes, and determining the orientation of the pipe cap model corresponding to the first pipe and the orientation of the pipe cap model corresponding to each of the second pipes based on the position information of the first pipe and the position information of each of the second pipes; finally, generating the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes based on a preset pipe cap shape according to the position of the head of the pipe cap model, the inner diameter of the pipe cap model, and the orientation of the pipe cap model.

[0059] It should be noted that the outer diameter of the pipe mentioned in the embodiment of the present invention is used to determine the inner diameter of the pipe cap model to ensure that the pipe cap model can be naturally nested on the pipe and naturally connected to the pipe.

[0060] Optionally, the cap shape of the cap model can refer to Figure 2 , Figure 2 The schematic diagram of the pipe cap model provided by the embodiment of the present invention is shown, wherein the portion above the dotted line represents the top 101 of the pipe cap model, and the portion below the dotted line represents the body 102 of the pipe cap model. It should be noted that the specific composition of the pipe cap model can be set according to actual conditions, and the embodiment of the present invention only provides an optional implementation method. It should also be noted that Figure 2 The dotted lines are only used to better illustrate the components of the pipe cap model. In the actual modeling process, the dotted lines can be set according to the actual situation.

[0061] It is easy to understand that the execution order of each step in the process of generating the pipe cap model, or the specific steps of generating the pipe cap model, can be adjusted according to actual conditions.

[0062] As an optional implementation provided in an embodiment of the present invention, reference may be made to Figure 3 , Figure 3 A schematic diagram showing a flow chart of a second method for generating a pipe cap model provided by an embodiment of the present invention is shown. That is, in this embodiment provided by the present invention, the pipe cap model includes a top portion and a body portion;

[0063] Then S130 includes:

[0064] S131, for each candidate pipeline, generating a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline;

[0065] S132: Place the top of the pipe cap model corresponding to each candidate pipe at the center point, and make the body of each pipe cap model parallel to the corresponding candidate pipe, to obtain the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each second pipe.

[0066] It can be understood that, in this embodiment, the process of generating the pipe cap model includes: first, generating a corresponding pipe cap model for the candidate pipes that have an intersection, that is, any one of the first pipe and the at least one second pipe, at this time, the pipe cap model is not displayed on the corresponding candidate pipe, that is, it is not nested on the candidate pipe; then, placing the top of each of the pipe cap models at the center point, and aligning the body of each pipe cap model with the corresponding candidate pipe, so that each of the pipe cap models matches the corresponding candidate pipe, indicating that each of the pipe cap models is nested in the corresponding candidate pipe.

[0067] Furthermore, a corresponding pipe cap model is generated for each pipeline, and the top of each pipe cap model is located at the center point, that is, the tops of the pipe cap models overlap, thereby obtaining a multi-pass model for representing pipeline connections.

[0068] Exemplary, reference Figure 4 , Figure 4 An entity diagram of an application scenario of a pipe cap model provided by an embodiment of the present invention is shown, which is used to represent a multi-pass model at a pipe connection, including a first pipe 103, a second pipe 104, a first pipe cap top 105 of the pipe cap model corresponding to the first pipe 103, a first pipe cap body 106 of the pipe cap model corresponding to the first pipe 103, a second pipe cap top 107 of the pipe cap model corresponding to the second pipe 104, a second pipe cap body 108 of the pipe cap model corresponding to the second pipe 104, and a center point 109.

[0069] It is understandable that Figure 4 The computer device generates the following for the first pipeline 103 and the second pipeline 104 that have an intersection: Figure 2 The cap models shown are the first cap top 105 and the first cap body 106 of the cap model corresponding to the first pipe 103, and the second cap top 107 and the second cap body 108 of the cap model corresponding to the second pipe 104. Furthermore, the first cap top 105 overlaps with the second cap body 108, and the second cap top 107 overlaps with the first cap body 106.

[0070] It should be understood that the first cap top 105 is a closed figure formed by the dotted line at the center point 109 and the dotted line to the right of the center point, and the second cap top 107 is a closed figure formed by the dotted line at the center point 109 and the dotted line to the left of the center point. It should also be noted that Figure 4 The dotted lines shown in the figure are only used to better illustrate the multi-pass model provided by the embodiment of the present invention. In the actual modeling process, each dotted line can be set according to actual conditions.

[0071] It should be understood that the pipe cap models generated in the embodiments of the present invention do not have practical engineering applications, i.e., they are not used to plug pipes. The pipe cap models provided in the embodiments of the present invention are intended to be nested on pipes to illustrate that the pipe cap models of one pipe are connected to the pipe cap models of other pipes, thereby representing the connection of multiple pipes.

[0072] Therefore, the embodiment of the present invention generates corresponding pipe cap models for multiple intersecting pipes, and makes the top of each pipe cap model overlap at the center point, so that the connection of the pipes is highlighted and displayed naturally, thereby meeting the needs of establishing a "digital city".

[0073] Furthermore, in order to reduce the computer resources required for generating the pipe cap model and improve the efficiency of generating the pipe cap model, in an embodiment of the present invention, reference may be made to Figure 5 , Figure 5A schematic flow chart of a third method for generating a pipe cap model provided by an embodiment of the present invention is shown, namely, S131 includes:

[0074] S133: For each candidate pipe, calculate a scaling ratio of a pipe cap model corresponding to the candidate pipe based on the outer diameter of the candidate pipe and a preset inner diameter of the pipe cap, wherein the outer diameter of the candidate pipe is proportional to the scaling ratio of the pipe cap model corresponding to the candidate pipe;

[0075] S134 , generating a corresponding pipe cap model by using the scaling ratio of the corresponding pipe cap model of the candidate pipe.

[0076] Optionally, before generating corresponding pipe cap models for the candidate pipes, embodiments of the present invention first calculate the scaling ratio of each pipe cap model, and then generate pipe cap models based on the scaling ratios of the pipe cap models corresponding to the candidate pipes. That is, after generating a default pipe cap model for each candidate pipe, the pipe cap model is scaled using the calculated scaling ratio to generate the corresponding pipe cap model. In another feasible approach, parameters such as the diameter and length of the pipe cap model may also be adjusted based on the scaling ratio, and then the corresponding pipe cap model is generated based on the scaled parameters.

[0077] It should be understood that the scaling ratio of the pipe cap model plays a similar role as the inner diameter of the pipe cap model, and both are used to ensure that the pipe cap model can be reasonably nested on the corresponding candidate pipe.

[0078] Therefore, the embodiment of the present invention scales the generated default pipe cap model by scaling the ratio, thereby reducing the computer resources required for generating the pipe cap model and improving the generation efficiency of the pipe cap model.

[0079] Furthermore, to further improve the efficiency of generating the pipe cap model, an embodiment of the present invention pre-stores an initial pipe cap model. When generating the pipe cap model of the candidate pipe, the model construction can be completed based on the pre-stored initial pipe cap model. That is, S133 includes:

[0080] Acquire a pre-stored initial pipe cap model, wherein the initial pipe cap model includes the preset pipe cap inner diameter;

[0081] The initial pipe cap model is scaled according to the scaling ratio of the pipe cap model corresponding to the candidate pipe to obtain the pipe cap model corresponding to the candidate pipe.

[0082] That is, in this embodiment of the present invention, when generating a corresponding pipe cap model for each candidate pipe, the computer device directly obtains a pre-stored initial pipe cap model and then scales the initial pipe cap model using the scaling ratio of the pipe cap model corresponding to the candidate pipe to obtain the corresponding pipe cap model. This further reduces the computer resources required to generate the pipe cap model, thereby improving the efficiency of pipe cap model generation.

[0083] Optionally, in an implementation manner provided in an embodiment of the present invention, the method further includes:

[0084] The pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes are stored, so that when the first pipe and each of the second pipes are displayed, the corresponding pipe cap models are displayed.

[0085] It can be understood that in the embodiment of the present invention, based on this implementation method, the computer device generates corresponding pipe cap models for multiple pipes that have intersections, and then stores the pipe cap models. When the user needs to check the intersection of each pipe connection again, the computer device can directly obtain the data of the stored pipe cap model, and there is no need for the computer device to generate the pipe cap model again.

[0086] Furthermore, to improve the efficiency of viewing pipeline data for users, in an embodiment of the present invention, storing the pipe cap model corresponding to the first pipeline and the pipe cap model corresponding to each second pipeline includes:

[0087] Based on the cache slicing technology, corresponding slice data is generated using the first pipe, the pipe cap model corresponding to the first pipe, each of the second pipes and the pipe cap model corresponding to each of the second pipes;

[0088] The slice data is stored and published, so that when the first pipeline and each of the second pipelines are displayed, the corresponding pipe cap models are displayed.

[0089] It's understood that cache slicing technology is used to divide image data into a preset number of image sets of varying resolutions. When viewing an image using cache slicing technology, the computer first displays a lower-resolution, relatively blurry image. When the user needs to see more detail, the computer then displays a higher-resolution, relatively clear image. This prevents the computer from having to load all the image data simultaneously when the user views it, speeding up image loading and rendering while ensuring a consistent user experience.

[0090] The embodiment of the present invention is based on cache slicing technology, which divides the image data corresponding to the first pipeline, the pipe cap model corresponding to the first pipeline, each second pipeline and the pipe cap model corresponding to each second pipeline into cache slices, stores them in a computer device and publishes them, so that when a user views the intersection of pipelines in the pipeline on other devices, he can quickly view and / or obtain the situation of multiple pipelines with intersections, without the user using a computer device to generate the corresponding pipe cap model again according to the intersection of the pipelines, thereby meeting the user's need for quick data viewing.

[0091] Corresponding to the method for generating a pipe cap model provided in the embodiment of the present invention, the embodiment of the present invention further provides a device for generating a pipe cap model, referring to Figure 6 , Figure 6 FIG. 2 shows a schematic structural diagram of a device for generating a pipe cap model according to an embodiment of the present invention. The device 200 for generating a pipe cap model according to an embodiment of the present invention includes:

[0092] An acquisition module 210 is configured to acquire pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline;

[0093] a center point confirmation module 220, configured to use, if a first pipe and at least one second pipe among all the pipes intersect, an intersection point of the first pipe and at least one second pipe as a center point;

[0094] A generation module 230 is configured to generate a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes, wherein the top of the pipe cap model corresponding to the first pipe and the top of the pipe cap model corresponding to each of the second pipes coincide at the center point.

[0095] Optionally, in an embodiment of the present invention, the pipe cap model includes a top and a body;

[0096] The generation module includes:

[0097] A construction submodule is configured to generate, for each candidate pipeline, a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline;

[0098] A placement submodule is configured to place the top of the pipe cap model corresponding to each candidate pipe at the center point, and to make the body of each pipe cap model parallel to the corresponding candidate pipe, thereby obtaining a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each second pipe.

[0099] Furthermore, in an implementation manner provided by an embodiment of the present invention, the construction submodule includes:

[0100] a scale calculation unit, configured to calculate, for each candidate pipe, a scaling ratio of the pipe cap model corresponding to the candidate pipe based on the outer diameter of the candidate pipe and a preset inner diameter of the pipe cap, wherein the outer diameter of the candidate pipe is proportional to the scaling ratio of the pipe cap model corresponding to the candidate pipe;

[0101] A creating unit is used to generate a corresponding pipe cap model by using a scaling ratio of the corresponding pipe cap model of the candidate pipe.

[0102] Furthermore, in an implementation manner provided by an embodiment of the present invention, the creating unit includes:

[0103] An initial model acquisition subunit, configured to acquire a pre-stored initial pipe cap model, wherein the initial pipe cap model includes the preset pipe cap inner diameter;

[0104] The scaling subunit is configured to scale the initial pipe cap model according to a scaling ratio of the pipe cap model corresponding to the candidate pipe to obtain the pipe cap model corresponding to the candidate pipe.

[0105] Optionally, in an implementation manner provided in an embodiment of the present invention, the method further includes:

[0106] The storage module is used to store the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes, so that when the first pipe and each of the second pipes are displayed, the corresponding pipe cap models are displayed.

[0107] Optionally, in an implementation manner provided in an embodiment of the present invention, the storage module includes:

[0108] a slicing submodule, configured to generate corresponding slicing data based on a cache slicing technology by using the first pipe, the pipe cap model corresponding to the first pipe, each of the second pipes and the pipe cap model corresponding to each of the second pipes;

[0109] The publishing submodule is used to store and publish the slice data so that when the first pipeline and each of the second pipelines are displayed, the corresponding pipe cap models are displayed.

[0110] The generation device of the pipe cap model provided in the embodiment of the present application can realize Figure 1 The various processes of the method for generating the pipe cap model in the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.

[0111] An embodiment of the present invention further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the method for generating a pipe cap model as disclosed in the embodiment is executed.

[0112] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run on a processor, the method for generating a pipe cap model as disclosed in the embodiment is executed.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0114] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0115] If the functions are implemented in the form of software modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0116] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A method for generating a pipe cap model, characterized in that: include: Acquiring pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline; If a first pipeline and at least one second pipeline among all the pipelines intersect, the intersection point of the first pipeline and at least one second pipeline is used as the center point; Generate a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each second pipe using the pipe outer diameter of the first pipe and the pipe outer diameter of each second pipe, wherein the pipe cap model includes a top portion and a body portion; The generating of a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes by using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes includes: For each candidate pipeline, generating a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline; Placing the top of the pipe cap model corresponding to each candidate pipe at the center point, and making the body of each pipe cap model parallel to the corresponding candidate pipe, to obtain the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each second pipe; The top of the pipe cap model corresponding to the first pipe overlaps with the body of the pipe cap model corresponding to the second pipe, the top of the pipe cap model corresponding to the second pipe overlaps with the body of the pipe cap model corresponding to the first pipe, and the top of the pipe cap model corresponding to the first pipe and the top of the pipe cap model corresponding to each of the second pipes overlap at the center point. The position of the head of the pipe cap model is determined based on the center point; then, the inner diameter of the corresponding pipe cap model is determined based on the outer diameter of the first pipe and the outer diameter of each of the second pipes, and the orientation of the pipe cap model corresponding to the first pipe and the orientation of the pipe cap model corresponding to each of the second pipes are determined based on the position information of the first pipe and the position information of each of the second pipes; finally, the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes are generated based on a preset pipe cap shape according to the position of the head of the pipe cap model, the inner diameter of the pipe cap model, and the orientation of the pipe cap model.

2. The method according to claim 1, characterized in that For each candidate pipe, generating a corresponding pipe cap model according to the outer diameter of the candidate pipe includes: For each candidate pipe, calculate the scaling ratio of the pipe cap model corresponding to the candidate pipe according to the outer diameter of the candidate pipe and the preset inner diameter of the pipe cap, wherein the outer diameter of the candidate pipe is proportional to the scaling ratio of the pipe cap model corresponding to the candidate pipe; The corresponding pipe cap model of the candidate pipe is generated by utilizing the scaling ratio of the corresponding pipe cap model.

3. The method according to claim 2, characterized in that The generating of the corresponding pipe cap model by using the scaling ratio of the corresponding pipe cap model of the candidate pipe includes: Acquire a pre-stored initial pipe cap model, wherein the initial pipe cap model includes the preset pipe cap inner diameter; The initial pipe cap model is scaled according to the scaling ratio of the pipe cap model corresponding to the candidate pipe to obtain the pipe cap model corresponding to the candidate pipe.

4. The method according to claim 1, wherein Also includes: The pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes are stored, so that when the first pipe and each of the second pipes are displayed, the corresponding pipe cap models are displayed.

5. The method according to claim 4, characterized in that The storing the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes includes: Based on the cache slicing technology, corresponding slice data is generated using the first pipe, the pipe cap model corresponding to the first pipe, each of the second pipes and the pipe cap model corresponding to each of the second pipes; The slice data is stored and published, so that when the first pipeline and each of the second pipelines are displayed, the corresponding pipe cap models are displayed.

6. A device for generating a pipe cap model, characterized in that: include: An acquisition module, configured to acquire pipeline data, wherein the pipeline data includes location information of each pipeline and an outer diameter of each pipeline; a center point confirmation module, configured to, if a first pipeline and at least one second pipeline among all the pipelines intersect, use the intersection of the first pipeline and the at least one second pipeline as the center point; a generating module, configured to generate a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each of the second pipes using the pipe outer diameter of the first pipe and the pipe outer diameter of each of the second pipes, wherein the pipe cap model includes a top portion and a body portion; The generation module includes: A construction submodule is configured to generate, for each candidate pipeline, a corresponding pipe cap model according to the outer diameter of the candidate pipeline, wherein the candidate pipeline includes the first pipeline and the at least one second pipeline; a placement submodule, configured to place the top of the pipe cap model corresponding to each candidate pipe at the center point, and to align the body of each pipe cap model with the corresponding candidate pipe, thereby obtaining a pipe cap model corresponding to the first pipe and a pipe cap model corresponding to each second pipe; The top of the pipe cap model corresponding to the first pipe overlaps with the body of the pipe cap model corresponding to the second pipe, the top of the pipe cap model corresponding to the second pipe overlaps with the body of the pipe cap model corresponding to the first pipe, and the top of the pipe cap model corresponding to the first pipe and the top of the pipe cap model corresponding to each of the second pipes overlap at the center point. The position of the head of the pipe cap model is determined based on the center point; then, the inner diameter of the corresponding pipe cap model is determined based on the outer diameter of the first pipe and the outer diameter of each of the second pipes, and the orientation of the pipe cap model corresponding to the first pipe and the orientation of the pipe cap model corresponding to each of the second pipes are determined based on the position information of the first pipe and the position information of each of the second pipes; finally, the pipe cap model corresponding to the first pipe and the pipe cap model corresponding to each of the second pipes are generated based on a preset pipe cap shape according to the position of the head of the pipe cap model, the inner diameter of the pipe cap model, and the orientation of the pipe cap model.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the method for generating a pipe cap model according to any one of claims 1 to 5 is executed.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run on a processor, the method for generating a pipe cap model according to any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Pipe network drainage enhancement visualization method and device, storage medium, and electronic equipment

    CN113627038A

  • Correlation analysis method and device of pipe network road, storage medium and electronic device

    CN113704945A