Insulator string model parameterization construction method, device and computer equipment

By decomposing the 3D model into basic primitives and building a rendering tree, the problem of the inability to reuse widgets in the model in the existing technology is solved, and the effect of model size reduction and fineness maintenance is achieved.

CN114330001BActive Publication Date: 2025-05-09GUANGZHOU KETENG INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111674101.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-05-09
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing 3D software platform cannot effectively realize the reuse of multiple widgets in the model.

Method used

By dividing the insulator string model object to be constructed into multiple sets of basic primitives and creating these basic primitives separately, including simple and special basic primitives. Then, a rendering tree of the model object is built based on these basic primitives and a model of the model object is generated.

Benefits of technology

Multiple widgets in a model are realized, reducing the model size without affecting the fineness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330001B_ABST
    Figure CN114330001B_ABST
Patent Text Reader

Abstract

The present application relates to a parametric construction method, device, computer equipment, storage medium and computer program product for an insulator string model. The method comprises: taking an insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library, dividing the model object into multiple groups of basic primitives, and creating the basic primitives respectively; the basic primitives include simple basic primitives and special basic primitives, constructing a rendering tree of the model object based on the basic primitives, and generating a model of the model object based on the rendering tree. The method can realize the reuse of multiple small components in a model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of parametric modeling, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for parametric construction of an insulator string model. Background Art

[0002] Open CASCADE, referred to as OCC, is an open source CAD / CAM / CAE geometry model core, originated from the French company Matra Datavision. It is widely used in the industrial field, especially in the development of 2D and 3D geometry modeling applications, including general or professional computer-aided design CAD systems, manufacturing or analysis applications, simulation applications or graphic presentation tools. In addition, there is also a mainstream library OPENSCAD that can be used for model parametric construction. Compared with OCC, OPENSCAD started later. Although both are open source software, OPENSCAD's community is not active enough and BUG repairs are not as responsive as OCC. As a rising star, OPENSCAD supports a wider range of platforms and the interface design of the source code is more modern.

[0003] Existing 3D software platforms and even design software all support parametric modeling, such as FreeCAD and derivative platforms under the BIM standard. FreeCAD also provides a callable API for parametric modeling, while platforms derived from the BIM standard support parametric modeling in the form of scripts.

[0004] However, current tools cannot reuse multiple small components within a model. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for parameterizing the construction of an insulator string model that can realize the reuse of multiple components within the model in order to address the above technical problems.

[0006] In a first aspect, the present application provides a method for parameterizing an insulator string model. The method comprises:

[0007] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0008] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0009] Constructing a rendering tree of the model object based on the basic graphic elements;

[0010] A model of the model object is generated based on the rendering tree.

[0011] In one embodiment, dividing the model object into a plurality of groups of basic primitives and creating the basic primitives respectively comprises:

[0012] Dividing the model object into a plurality of groups of basic graphic elements according to a preset splitting rule;

[0013] A simple basic primitive is created, and a unique key is set for the simple basic primitive; the simple basic primitive includes at least one of a cylinder, a cone, a cube and a cuboid.

[0014] In one embodiment, dividing the model object into a plurality of groups of basic primitives and creating the basic primitives respectively further comprises:

[0015] Create a special basic primitive and set a unique key for the special basic primitive.

[0016] In one embodiment, creating a special basic primitive and setting a unique key for the special basic primitive includes:

[0017] Create basic primitives of topological structure based on the preset Open CASCADE;

[0018] Performing intersection, union and / or difference processing on a plurality of basic graphic elements of the topological structure to obtain the special basic graphic element;

[0019] The special basic primitive is triangulated to generate and store vertex information, and a unique key is set for the special basic primitive.

[0020] In one embodiment, constructing the rendering tree of the model object based on the basic primitives includes:

[0021] Constructing a rendering tree of the model object, and calculating a matrix of basic graphics elements constituting the model object according to the parameters of the model object;

[0022] The matrix and key value of each basic primitive are stored in the corresponding node in the rendering tree.

[0023] In one embodiment, generating the model of the model object based on the rendering tree includes:

[0024] The rendering tree is written to a preset text file to generate a model of the model object.

[0025] In a second aspect, the present application also provides a device for parameterizing an insulator string model. The device comprises:

[0026] A parameter input module, used to take the insulator string to be constructed as a model object and input the parameters of the model object into a preset programming library;

[0027] A graphic primitive creation module, used for dividing the model object into a plurality of groups of basic graphic primitives, and creating the basic graphic primitives respectively; the basic graphic primitives include simple basic graphic primitives and special basic graphic primitives;

[0028] A rendering tree construction module, used for constructing a rendering tree of the model object based on the basic primitives;

[0029] A model generation module is used to generate a model of the model object based on the rendering tree.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0031] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0032] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0033] Constructing a rendering tree of the model object based on the basic graphic elements;

[0034] A model of the model object is generated based on the rendering tree.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0036] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0037] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0038] Constructing a rendering tree of the model object based on the basic graphic elements;

[0039] A model of the model object is generated based on the rendering tree.

[0040] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0041] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0042] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0043] Constructing a rendering tree of the model object based on the basic graphic elements;

[0044] A model of the model object is generated based on the rendering tree.

[0045] The above-mentioned parametric construction method, device, computer equipment, storage medium and computer program product of the insulator string model take the insulator string to be constructed as the model object, input the parameters of the model object into a preset programming library, divide the model object into multiple groups of basic primitives, and create the basic primitives respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 An application environment diagram of a parameterized construction method of an insulator string model in an embodiment;

[0047] Figure 2 A schematic diagram of a process of parameterizing an insulator string model in an embodiment;

[0048] Figure 3 A schematic flow chart of the steps of outputting an insulator string model in one embodiment;

[0049] Figure 4 It is a structural block diagram of a device for parameterizing and constructing an insulator string model in one embodiment;

[0050] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The parameterized construction method of the insulator string model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0053] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0054] In one embodiment, Figure 2 As shown in the figure, a parameterized construction method of an insulator string model is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0055] Step 202: Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library.

[0056] Among them, the insulator string refers to a component that combines two or more insulator elements to flexibly suspend the conductor. The insulator string is a protective device with fixing and operation requirements, used to suspend the conductor and insulate the conductor from the tower and the ground; the programming library refers to the dll file, and other developers can also reference the corresponding dll file when doing software development.

[0057] Specifically, the insulator string to be constructed is taken as a model object, and the parameters of the model object are input into a preset programming library; wherein the parameters of the model object include the number of connections, double string spacing, the number of insulator pieces in a single string, the connection height of a single insulator piece, the large shed radius, the small shed radius, the insulator string radius, the front end length, the rear end length and the number of connection conductor splits.

[0058] Step 204, dividing the model object into multiple groups of basic primitives, and creating the basic primitives respectively; the basic primitives include simple basic primitives and special basic primitives.

[0059] Specifically, the model object is divided into multiple groups of basic primitives, and the way of dividing the model object into basic primitives is in a preset way. Basic primitives are basic elements constituting the model object, and basic primitives include simple basic primitives and special basic primitives. Special basic primitives require simple basic primitives to be created by performing intersection, union and / or difference, and simple basic primitives and special basic primitives are created separately.

[0060] Step 206: construct a rendering tree of the model object based on the basic primitives.

[0061] Specifically, each node in the rendering tree corresponds to a basic primitive and a corresponding key value. The rendering tree of the model object is constructed based on the basic primitive. The rendering tree is a binary tree structure. If the insulator pieces that constitute the insulator string are the same but have different positions, then the insulator piece as a basic primitive corresponds to a key, and the basic primitive can be found through the key.

[0062] Step 208: Generate a model of the model object based on the rendering tree.

[0063] Specifically, a model of a model object is generated based on a render tree, and the model of the model object is saved in a preset format. Existing tools support fewer formats when exporting created models. The method of this embodiment not only supports the basis of mainstream model formats on the market, but also supports FBX, glb and other formats.

[0064] In the parametric construction method of the insulator string model, the insulator string to be constructed is used as the model object, the parameters of the model object are input into a preset programming library, the model object is divided into multiple groups of basic primitives, and the basic primitives are created respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is achieved.

[0065] In one embodiment, dividing the model object into a plurality of groups of basic primitives and creating the basic primitives respectively comprises:

[0066] Dividing the model object into a plurality of groups of basic graphic elements according to a preset splitting rule;

[0067] A simple basic primitive is created, and a unique key is set for the simple basic primitive; the simple basic primitive includes at least one of a cylinder, a cone, a cube and a cuboid.

[0068] Specifically, the model object is composed of multiple groups of basic primitives. The model object is divided into multiple groups of basic primitives according to the preset splitting rules, and then simple basic primitives are created, and a unique key is set for the simple basic primitives. The basic primitives can be found through the key. Among them, the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid, which can be set as needed.

[0069] In this embodiment, the model object is divided into multiple groups of basic primitives according to preset splitting rules, and simple basic primitives are created, and unique keys are set for the simple basic primitives, thereby supporting model reuse. For example, a large model is composed of several small components, and these small components are often the same, but the positions of these components are different. Therefore, the small components can be reused to reduce the model size without affecting the refinement.

[0070] In one embodiment, dividing the model object into a plurality of groups of basic primitives and creating the basic primitives respectively further comprises:

[0071] Create a special basic primitive and set a unique key for the special basic primitive.

[0072] Specifically, the creation of basic primitives includes not only the creation of simple basic primitives but also the creation of special basic primitives. The special basic primitives are created by obtaining the intersection, union and / or difference of simple basic primitives.

[0073] In this embodiment, by creating special basic primitives and setting unique keys for the special basic primitives, the creation of special basic primitives and the reuse of special basic primitives are achieved.

[0074] In one embodiment, creating a special basic primitive and setting a unique key for the special basic primitive includes:

[0075] Create basic primitives of topological structure based on the preset Open CASCADE;

[0076] Performing intersection, union and / or difference processing on a plurality of basic graphic elements of the topological structure to obtain the special basic graphic element;

[0077] The special basic primitive is triangulated to generate and store vertex information, and a unique key is set for the special basic primitive.

[0078] Specifically, when creating a special basic primitive, a basic primitive of a topological structure is created based on the preset Open CASCADE, and then the basic primitives of multiple topological structures are subjected to intersection, union, or / and difference processing to obtain a special basic primitive, and the type of the special basic unit is set as required. Afterwards, the special basic primitive is triangulated, vertex information is generated and stored, and a unique key is set for the special basic primitive. The parametric construction tool in this embodiment can generate three different precision models of high, medium, and low according to requirements.

[0079] In this embodiment, basic primitives of a topological structure are created based on the preset Open CASCADE, and intersection, union, and / or difference processing is performed on the basic primitives of multiple topological structures to obtain special basic primitives. Finally, the special basic primitives are triangulated to generate and store vertex information. At the same time, a unique key is set for the special basic primitive, thereby realizing the creation of special basic primitives and realizing the reuse of special basic primitives.

[0080] In one embodiment, constructing the rendering tree of the model object based on the basic primitives includes:

[0081] Constructing a rendering tree of the model object, and calculating a matrix of basic graphics elements constituting the model object according to the parameters of the model object;

[0082] The matrix and key value of each basic primitive are stored in the corresponding node in the rendering tree.

[0083] Specifically, a rendering tree of the model object is constructed, and the matrix of each basic primitive that constitutes the model object is calculated according to the parameters of the model object, and the matrix information contains the position information of the corresponding basic primitives; the matrix and key value of each basic primitive are stored in the corresponding node in the rendering tree, and each node corresponds to a basic primitive or a group of multiple basic primitives.

[0084] In this embodiment, by constructing a rendering tree of the model object, the matrix of each basic primitive that constitutes the model object is calculated according to the parameters of the model object, and the matrix and key value of each basic primitive are stored in the corresponding node in the rendering tree, the construction of the rendering tree is realized, creating the prerequisite for further generating the model.

[0085] In one embodiment, generating the model of the model object based on the rendering tree includes:

[0086] The rendering tree is written to a preset text file to generate a model of the model object.

[0087] Specifically, when a model corresponding to a model object is generated based on a rendering tree, the rendering tree is written to a preset text file to generate a model of the model object; in addition to supporting the basis of mainstream model formats on the market, the method of this embodiment also supports FBX, glb and other formats.

[0088] In this embodiment, by writing the rendering tree to a preset text file, a model of the model object is generated. In addition to supporting the general model description file format, the required format can also be customized, and multiple widgets in a model can be reused.

[0089] Existing parametric modeling platforms are often self-contained, such as platforms based on BIM standards, which cannot meet the customization needs of users. Although FreeCAD also provides a basic library for use to customize its own parametric modeling platform, as a rising star, its maintenance status and bug fixes are relatively slow. In addition to supporting the general model description file format, the parametric modeling in this embodiment can also customize the format.

[0090] Although existing platforms also provide model simplification solutions, they are unable to achieve precise control during the generation process. For example, a complete model is often composed of multiple small components. The platform in this embodiment can control the fineness of a small component, and can also control the fineness of the entire model file as a whole, and provide three levels of high, medium and low to choose from.

[0091] Although the model can be simplified and its size can be reduced by controlling the model's precision, in most cases it is not desirable to sacrifice accuracy in exchange for a reduction in size. Therefore, the platform in this embodiment also supports model reuse. For example, a large model is composed of several small components, and these small components are often the same, but the positions of these components are different. Therefore, the small components can be reused to reduce the model size without affecting the precision.

[0092] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0093] Based on the same inventive concept, the embodiment of the present application also provides a device for parameterizing the construction of an insulator string model for implementing the method for parameterizing the construction of an insulator string model involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more device for parameterizing the construction of an insulator string model provided below can refer to the limitations of the method for parameterizing the construction of an insulator string model above, and will not be repeated here.

[0094] In one embodiment, Figure 4 As shown, a device for constructing a parameterized insulator string model is provided, comprising: a parameter input module 401, a primitive creation module 402, a rendering tree construction module 403 and a model generation module 404, wherein:

[0095] A parameter input module 401 is used to take the insulator string to be constructed as a model object and input the parameters of the model object into a preset programming library;

[0096] A primitive creation module 402, used for dividing the model object into multiple groups of basic primitives, and creating the basic primitives respectively; the basic primitives include simple basic primitives and special basic primitives;

[0097] A rendering tree construction module 403, configured to construct a rendering tree of the model object based on the basic primitives;

[0098] The model generation module 404 is configured to generate a model of the model object based on the rendering tree.

[0099] In one embodiment, the primitive creation module 402 is specifically used to: divide the model object into multiple groups of basic primitives according to preset splitting rules; create simple basic primitives and set unique keys for the simple basic primitives; the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid.

[0100] In one embodiment, the primitive creation module 402 is further used to: create a special basic primitive and set a unique key for the special basic primitive.

[0101] In one embodiment, the primitive creation module 402 is also used to: create basic primitives of a topological structure based on a preset Open CASCADE; perform intersection, union and / or difference processing on multiple basic primitives of the topological structure to obtain the special basic primitive; triangulate the special basic primitive, generate vertex information and store it, and set a unique key for the special basic primitive.

[0102] In one embodiment, the rendering tree construction module 403 is specifically used to: construct a rendering tree for the model object, calculate the matrix of each basic primitive constituting the model object according to the parameters of the model object; and store the matrix and key value of each basic primitive in the corresponding node in the rendering tree.

[0103] In one embodiment, the model generation module 404 is specifically used to write the rendering tree to a preset text file to generate a model of the model object.

[0104] The above-mentioned parametric construction device for the insulator string model takes the insulator string to be constructed as the model object, inputs the parameters of the model object into a preset programming library, divides the model object into multiple groups of basic primitives, and creates the basic primitives respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is realized.

[0105] Each module in the above-mentioned insulator string model parameter construction device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a parameterized construction method of an insulator string model is implemented.

[0107] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0109] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0110] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0111] Constructing a rendering tree of the model object based on the basic graphic elements;

[0112] A model of the model object is generated based on the rendering tree.

[0113] In one embodiment, when the processor executes the computer program, the following steps are also implemented: dividing the model object into multiple groups of basic primitives according to preset splitting rules; creating simple basic primitives and setting unique keys for the simple basic primitives; the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid.

[0114] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: creating a special basic graphic element, and setting a unique key for the special basic graphic element.

[0115] In one embodiment, when the processor executes the computer program, the following steps are also implemented: creating basic primitives of a topological structure based on a preset OpenCASCADE; performing intersection, union and / or difference processing on multiple basic primitives of the topological structure to obtain the special basic primitive; triangulating the special basic primitive, generating vertex information and storing it, and setting a unique key for the special basic primitive.

[0116] In one embodiment, when the processor executes the computer program, the following steps are also implemented: constructing a rendering tree of the model object, calculating the matrix of each basic primitive that constitutes the model object according to the parameters of the model object; and storing the matrix and key value of each basic primitive in the corresponding node in the rendering tree.

[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: writing the rendering tree to a preset text file to generate a model of the model object.

[0118] The computer device uses the insulator string to be constructed as a model object, inputs the parameters of the model object into a preset programming library, divides the model object into multiple groups of basic primitives, and creates the basic primitives respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is achieved.

[0119] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0120] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0121] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0122] Constructing a rendering tree of the model object based on the basic graphic elements;

[0123] A model of the model object is generated based on the rendering tree.

[0124] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: dividing the model object into multiple groups of basic primitives according to preset splitting rules; creating simple basic primitives and setting unique keys for the simple basic primitives; the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid.

[0125] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: creating a special basic graphic element, and setting a unique key for the special basic graphic element.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating basic primitives of a topological structure based on a preset OpenCASCADE; performing intersection, union and / or difference processing on multiple basic primitives of the topological structure to obtain the special basic primitive; triangulating the special basic primitive, generating vertex information and storing it, and setting a unique key for the special basic primitive.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: constructing a rendering tree of the model object, calculating the matrix of each basic primitive constituting the model object according to the parameters of the model object; and storing the matrix and key value of each basic primitive in the corresponding node in the rendering tree.

[0128] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: writing the rendering tree to a preset text file to generate a model of the model object.

[0129] The storage medium uses the insulator string to be constructed as a model object, inputs the parameters of the model object into a preset programming library, divides the model object into multiple groups of basic primitives, and creates the basic primitives respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is realized.

[0130] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0131] Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library;

[0132] Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements;

[0133] Constructing a rendering tree of the model object based on the basic graphic elements;

[0134] A model of the model object is generated based on the rendering tree.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: dividing the model object into multiple groups of basic primitives according to preset splitting rules; creating simple basic primitives and setting unique keys for the simple basic primitives; the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: creating a special basic graphic element, and setting a unique key for the special basic graphic element.

[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating basic primitives of a topological structure based on a preset OpenCASCADE; performing intersection, union and / or difference processing on multiple basic primitives of the topological structure to obtain the special basic primitive; triangulating the special basic primitive, generating vertex information and storing it, and setting a unique key for the special basic primitive.

[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: constructing a rendering tree of the model object, calculating the matrix of each basic primitive constituting the model object according to the parameters of the model object; and storing the matrix and key value of each basic primitive in the corresponding node in the rendering tree.

[0139] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: writing the rendering tree to a preset text file to generate a model of the model object.

[0140] The computer program product uses the insulator string to be constructed as a model object, inputs the parameters of the model object into a preset programming library, divides the model object into multiple groups of basic primitives, and creates the basic primitives respectively; wherein the basic primitives include simple basic primitives and special basic primitives. A rendering tree of the model object is constructed based on the basic primitives, and a model of the model object is generated based on the rendering tree. By dividing the model object into multiple groups of basic primitives and creating the basic primitives respectively, the reuse of multiple small components in a model is achieved.

[0141] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0144] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A parameterized construction method for an insulator string model, characterized in that: The method comprises: Taking the insulator string to be constructed as a model object, inputting the parameters of the model object into a preset programming library; Dividing the model object into multiple groups of basic graphic elements, and creating the basic graphic elements respectively; the basic graphic elements include simple basic graphic elements and special basic graphic elements; A rendering tree of the model object is constructed based on the basic primitives; each node in the rendering tree corresponds to a basic primitive and a corresponding Key, wherein the basic primitives include insulator pieces, and basic primitives constituting insulator pieces of the same type but in different positions that constitute an insulator string correspond to one Key; Generate a model of the model object based on the rendering tree; The step of dividing the model object into a plurality of groups of basic graphic elements and creating the basic graphic elements respectively comprises: Dividing the model object into a plurality of groups of basic graphic elements according to a preset splitting rule; Creating a simple basic primitive and setting a unique key for the simple basic primitive; the simple basic primitive includes at least one of a cylinder, a cone, a cube and a cuboid; The step of dividing the model object into a plurality of groups of basic graphic elements and creating the basic graphic elements respectively further comprises: Create a special basic primitive and set a unique key for the special basic primitive; The creating of a special basic primitive and setting a unique key for the special basic primitive includes: Create basic primitives of topological structure based on the preset Open CASCADE; Performing intersection, union and / or difference processing on a plurality of basic graphic elements of the topological structure to obtain the special basic graphic element; Triangulate the special basic primitive, generate vertex information and store it, and set a unique key for the special basic primitive; The model for generating the model object based on the rendering tree comprises: Writing the rendering tree to a preset text file to generate a model of the model object; The refinement of the components of the model and the refinement of the text file include high, medium and low grades respectively.

2. The method according to claim 1, characterized in that The constructing the rendering tree of the model object based on the basic primitives comprises: Constructing a rendering tree of the model object, and calculating a matrix of basic graphics elements constituting the model object according to the parameters of the model object; The matrix and key value of each basic primitive are stored in the corresponding node in the rendering tree.

3. The method according to claim 1, characterized in that The parameters of the model object include the number of connections, double string spacing, the number of insulator pieces in a single string, the connection height of a single insulator piece, the large shed radius, the small shed radius, the insulator string radius, the front end length, the rear end length and the number of connection conductor splits.

4. The method according to claim 1, characterized in that The method further includes: saving the model of the model object in a preset format.

5. The method according to claim 4, characterized in that The preset format includes FBX format or glb format.

6. A parameterized construction device for an insulator string model, characterized in that: The device comprises: A parameter input module, used to take the insulator string to be constructed as a model object and input the parameters of the model object into a preset programming library; A graphic primitive creation module, used for dividing the model object into a plurality of groups of basic graphic primitives, and creating the basic graphic primitives respectively; the basic graphic primitives include simple basic graphic primitives and special basic graphic primitives; A rendering tree construction module, used to construct a rendering tree of the model object based on the basic primitives; each node in the rendering tree corresponds to a basic primitive and a corresponding Key, wherein the basic primitives include insulator pieces, and basic primitives with the same insulator pieces but different positions constituting an insulator string correspond to one Key; A model generation module, used to generate a model of the model object based on the rendering tree; The primitive creation module is specifically used to divide the model object into multiple groups of basic primitives according to a preset splitting rule; create simple basic primitives and set a unique key for the simple basic primitives; the simple basic primitives include at least one of a cylinder, a cone, a cube and a cuboid; The primitive creation module is also used to create special basic primitives and set a unique key for the special basic primitives; The primitive creation module is also used to create basic primitives of a topological structure based on a preset Open CASCADE; perform intersection, union and / or difference processing on a plurality of basic primitives of the topological structure to obtain the special basic primitive; perform triangulation processing on the special basic primitive, generate vertex information and store it, and set a unique key for the special basic primitive; The model generation module is specifically used to write the rendering tree to a preset text file to generate a model of the model object; the fineness of the components of the model and the fineness of the text file include high, medium and low grades respectively.

7. The device according to claim 6, characterized in that The rendering tree construction module is specifically used to construct a rendering tree of the model object, calculate the matrix of each basic primitive constituting the model object according to the parameters of the model object; and store the matrix and key value of each basic primitive in the corresponding node in the rendering tree.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.