CN113345060A - Rendering method of digital twin model, and visual cone removing method and system - Google Patents

Rendering method of digital twin model, and visual cone removing method and system Download PDF

Info

Publication number
CN113345060A
CN113345060A CN202110608006.7A CN202110608006A CN113345060A CN 113345060 A CN113345060 A CN 113345060A CN 202110608006 A CN202110608006 A CN 202110608006A CN 113345060 A CN113345060 A CN 113345060A
Authority
CN
China
Prior art keywords
sub
model
circuit breaker
bounding volume
production line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110608006.7A
Other languages
Chinese (zh)
Inventor
舒亮
张洁
杨艳芳
陈璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wenzhou University
Original Assignee
Wenzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wenzhou University filed Critical Wenzhou University
Priority to CN202110608006.7A priority Critical patent/CN113345060A/en
Publication of CN113345060A publication Critical patent/CN113345060A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to a rendering method of a digital twin model of a circuit breaker production line, a viewing cone removing method and a system, wherein the twin model of a circuit breaker and production equipment is divided into a plurality of submodels, and each submodel comprises an equal number of triangular patches; constructing a sub-model bounding volume of each sub-model; configuring a plurality of threads for a general-purpose graphic processor in a CPU; and performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with the view frustum range, and eliminating the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the view frustum range. By adopting the method for eliminating the fine granularity of the view cone, the model part except the view cone can be effectively eliminated, the model data volume in the subsequent rendering process is reduced, the rendering burden of a CPU and a general graphic processor is reduced, and the rendering efficiency of the subsequent circuit breaker production line is improved.

Description

Rendering method of digital twin model, and visual cone removing method and system
Technical Field
The invention relates to the field of digital twin model rendering, in particular to a rendering method of a digital twin model of a circuit breaker production line, a view frustum removing method and a system.
Background
The digital twin is to create a virtual model of a physical entity in a digital mode, simulate the behavior of the physical entity in a real environment by means of data, and add or expand new capacity for the physical entity by means of virtual-real interaction feedback, data fusion analysis, decision iteration optimization and the like, so that interactive iteration and virtual-real fusion of a physical space and a virtual space are promoted, and digitalization and informatization of processes such as product design, production, operation and maintenance are facilitated. At present, a digital twinning technology is widely applied to the manufacturing industry, for example, in the production and manufacturing of circuit breakers, enterprises utilize a circuit breaker digital twinning system to perform model simulation, data analysis and behavior prediction on a circuit breaker production line scene, and the method is beneficial to realizing optimization control and accurate control on circuit breaker production line entities.
The circuit breaker production line digital twin model constructs a virtual model for a circuit breaker production line in a digital mode, and is used for reflecting real motion and behavior characteristics of the circuit breaker production process. The method is used for rendering a digital twin model of the circuit breaker production line in real time, dynamically generating a customized space, a model and a scene in real time, and is a key link for constructing the digital twin system of the circuit breaker production line. Therefore, model rendering speed and efficiency have a large impact on breaker production line digital twinning system performance.
In the existing digital twin model rendering method for the circuit breaker production line, rendering work is mainly completed by a graph rendering scheme, in order to improve the running speed, visual cone removing operation is generally required to be carried out on the twin model of the circuit breaker production line, namely, models outside a visual scene are removed, the number of models needing to be rendered is reduced, and further the running efficiency of the models in the visual scene is improved. When a digital twin scene is complex and the model data volume is large, the following defects easily occur in the prior art scheme, and the improvement is urgently needed:
the existing visual cone removing is mainly carried out in a coarse-grained mode, and the model outside the visual cone body cannot be completely removed in the visual cone body removing operation, so that the part of models which are supposed to be removed still enter a subsequent rendering process, the rendering burden of a CPU (Central processing Unit) and a GPU (graphics processing Unit) is aggravated, and the subsequent rendering efficiency is reduced. Aiming at the problems, the invention provides a rendering method of a digital twin model of a circuit breaker production line, a viewing cone removing method and a system.
Disclosure of Invention
The invention aims to provide a rendering method, a view cone removing method and a system for a digital twin model of a circuit breaker production line.
In order to achieve the purpose, the invention provides the following scheme:
a method for eliminating view cones of a digital twin model of a circuit breaker production line comprises the following steps:
dividing twin models of a circuit breaker and production equipment into a plurality of sub models, wherein each sub model comprises an equal number of triangular patches;
constructing a sub-model bounding volume of each sub-model;
configuring a plurality of threads for a general-purpose graphic processor in a CPU;
and performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with the view frustum range, and eliminating the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the view frustum range.
The invention also provides a system for eliminating the view cone of the digital twin model of the production line of the circuit breaker, which comprises the following components:
the sub-model acquisition module is used for dividing the twin model of the circuit breaker and the production equipment into a plurality of sub-models, and each sub-model comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module is used for constructing a sub-model bounding volume of each sub-model;
the thread configuration module is used for configuring a plurality of threads for the general-purpose graphic processor in the CPU;
and the viewing cone removing module is used for performing intersection calculation on the viewing cone data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with the viewing cone range and removing the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the viewing cone range.
The invention also provides a rendering method of the digital twin model of the production line of the circuit breaker, which comprises the following steps:
acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
dividing the twin model into a plurality of sub models, wherein each sub model comprises an equal number of triangular patches;
constructing a sub-model bounding volume of each sub-model;
configuring a plurality of threads for a general-purpose graphic processor in a CPU;
performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part in a view frustum range, and eliminating the sub-model corresponding to the sub-model bounding volume without the intersection part in the view frustum range;
and carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part of the view cone range, and rendering a two-dimensional image.
The invention also provides a rendering system of the digital twin model of the production line of the circuit breaker, which comprises the following components:
the data acquisition module is used for acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
the submodel acquisition module is used for subdividing the twin model into a plurality of submodels, and each submodel comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module is used for constructing a sub-model bounding volume of each sub-model;
the thread configuration module is used for configuring a plurality of threads for the general-purpose graphic processor in the CPU;
the viewing cone removing module is used for performing intersection calculation on the viewing cone data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part in the viewing cone range and removing the sub-model corresponding to the sub-model bounding volume without the intersection part in the viewing cone range;
and the two-dimensional image acquisition module is used for carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part in the view cone range and rendering a two-dimensional image.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
according to the rendering method of the digital twin model of the circuit breaker production line, the view cone removing method and the system, the twin model of the circuit breaker and production equipment is divided into the sub models, the sub model surrounding body is created, the view cone fine-grained removing is implemented, the model part except the view cone can be effectively removed by the fine-grained removing method, compared with the existing coarse-grained removing method, the model data amount in the subsequent rendering process is reduced, the rendering burden of a CPU and a general graphic processor is reduced, and the rendering efficiency of the subsequent circuit breaker production line is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram illustrating a conventional graphics rendering scheme according to embodiment 1 of the present invention;
fig. 2 is a structural diagram of a manufacturing shop of a circuit breaker according to embodiment 1 of the present invention;
fig. 3 is a process flow diagram of a circuit breaker production line provided in embodiment 1 of the present invention;
fig. 4 is a flowchart of a method for removing a view frustum of a digital twin model in a circuit breaker production line according to embodiment 1 of the present invention;
fig. 5 is a view illustrating a view cone structure provided in embodiment 1 of the present invention;
fig. 6 is a structural diagram of a viewing cone removing system of a digital twin model of a circuit breaker production line according to embodiment 2 of the present invention;
fig. 7 is a flowchart of a rendering method of a digital twin model of a circuit breaker production line according to embodiment 3 of the present invention;
fig. 8 is a rendering system structure diagram of a digital twin model of a circuit breaker production line according to embodiment 4 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a rendering method, a view cone removing method and a system for a digital twin model of a circuit breaker production line.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example 1
The traditional graphic rendering scheme is a main mode of rendering by a digital twin development engine at present, and aims to draw a two-dimensional image on a screen by a three-dimensional model according to parameters such as a camera, light, a texture map and the like. The flow of the conventional graphics rendering scheme is divided into three phases: an application phase, a geometry phase and a rasterization phase as shown in figure 1.
(1) Application phase
The application stage mainly runs on a CPU, and the specific steps are divided into three parts: scene preparation, namely preparing all data of a scene, including information such as a camera, a model and light; visual cone removing operation, namely, screening visible objects from the scene model according to the visual cone range; and setting a rendering state, and transmitting the rendering state corresponding to the required rendering model to a GPU (general purpose graphics processor) stage as a rendering primitive.
(2) Geometric phase
The geometry stage is operated based on a GPU and mainly responsible for rendering processes such as a vertex shader, a geometry shader, projection, clipping, screen mapping and the like, finally vertex coordinates, colors and texture coordinates after multiple times of coordinate transformation and projection are output and transmitted to the rasterization stage for pixel shading and other operations, wherein the vertex shader and the geometry shader can process data by users and modify, create and ignore vertex related attributes.
(3) Stage of rasterization
The rasterization stage is based on GPU to calculate, and comprises rendering processes such as triangle setting, triangle traversal, pixel shader and fragment-by-fragment operation, wherein the pixel shader can be used for processing each pixel by a user according to actual shading requirements, and complex shading equations are shaded on each pixel. In the stage, a triangle output in the geometric stage is converted into a segment, the segment is colored, and the colored segment is finally mixed with frame buffer after multiple processing such as cutting test, alpha test, template test, depth test, fusion and the like to form a two-dimensional image.
As can be seen from fig. 1, in the conventional scheme, the frustum removal operation is mainly performed in the CPU, which increases the workload of the CPU, and is performed by a serial method, the frustum removal is mainly performed in a coarse-grained manner, and the frustum removal operation cannot completely remove the model outside the frustum, so that the model that should be removed still enters a subsequent rendering process, thereby aggravating the rendering burden of the CPU and the GPU. In conclusion, the traditional rendering scheme applied to the breaker digital twin workshop also has the problem of low rendering efficiency, and the embodiment provides a breaker production line digital twin model view cone fine-granularity removing method adopting a parallel computing frame based on the view cone removing method in the application stage in the existing rendering scheme,
the circuit breaker is a protective device for controlling the on-off of current, provides overload and short-circuit protection in a circuit system so as to ensure the safety of circuits and equipment, and is widely applied to industries such as electric power, communication, industrial and civil construction, petrochemical industry, mechanical manufacturing and the like. The main body of the circuit breaker manufacturing plant comprises a production line auxiliary group, workers and six circuit breaker production lines of different models, and the structure diagram of the main body is shown in figure 2.
Each type of circuit breaker production line is divided into two mirror image assembly lines and one detection line, and the process flow is shown in figure 3. The circuit breaker assembly line is responsible for automatically assembling internal parts of the circuit breaker and comprises 12 process flows of automatically assembling a handle/torsion spring, a magnetic system, a magnet yoke, a pin shaft, final assembly, detection and the like. The circuit breaker detection line is responsible for the equipment of shell spare part and performance detection, including monopole drift nail, monopole riveting, laser marking, automatic time delay, multipolar assembling, multipolar drift nail, multipolar riveting, sweep sign indicating number instantaneous, break-make withstand voltage, automatic bat printing, assembly buckle, paste 12 process flows such as sealing stopper.
The breaker digital twin workshop comprises a breaker physical workshop, a breaker virtual workshop, workshop twin data and a workshop service system. The circuit breaker manufacturing workshop is a physical workshop, and equipment and logical relations thereof are controlled and managed through devices such as a PLC (programmable logic controller), a displacement sensor and an industrial camera. The virtual workshop is used as real mapping of the physical workshop in the whole virtual space element process, and the movement of the twin body is controlled by three-dimensional modeling and hierarchical modeling of the physical workshop of the circuit breaker, establishment of the movement rule of the twin body and combination of real-time production data.
The embodiment provides a method for removing view cones of a digital twin model of a circuit breaker production line, as shown in fig. 4, the method includes:
s1, dividing twin models of the circuit breaker and the production equipment into a plurality of sub models, wherein each sub model comprises an equal number of triangular patches;
the production line in the digital twin system of the circuit breaker has a complex structure and more production equipment models. In this embodiment, a circuit breaker production line of a certain model in a digital twin plant is taken as an example, and the circuit breaker production line totally comprises 19715 twin models, namely 2.26 × 107Twin model apex, 2.79X 107A triangular patch.
The CPU transfers the number of triangular patches and the vertex data of the triangular patches of the twin model, divides the twin models such as a breaker main body and production equipment according to the triangular patches, sets the number of the divided triangular patches to be 128, divides each twin model into groups containing 128 triangular patches, each group can be equal to a sub-model, therefore, the number of the triangular patches contained in the divided sub-model is not more than 128, and the number of the sub-models of the scene used for testing is about 2.17 multiplied by 105
S2, constructing a sub-model bounding volume of each sub-model;
and constructing a sub-model bounding volume according to the sub-model split in the step S1, firstly calculating the central coordinate and the sub-model range of the sub-model, constructing the sub-model bounding volume corresponding to the sub-model according to the central coordinate and the sub-model range of the sub-model, and replacing the sub-model with the sub-model to perform intersection detection calculation. Finally, transmitting the sub-model bounding volume data of the circuit breaker production line and the view cone data of the scene to a display memory, storing the bounding volume data, and waiting for a general graphic processor to call the bounding volume data;
s3, configuring a plurality of threads for the general purpose graphic processor in the CPU;
and executing a parallel platform starting command at the CPU end, wherein the virtual production line realizes the parallel processing capability of a GPU (general purpose graphic processor) by utilizing a computer loader platform. The CPU configures a fixed number of threads for the general-purpose graphic processor, and the CPU end in the embodiment is configured with 2.17 multiplied by 105Threads, the assigned threads are used for executing the intersection calculation of all sub-model bounding volumes and view cones in the computer shader, wherein each lineThe program is responsible for executing the intersection operation of a sub-model bounding volume and the view frustum;
s4, performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with the intersection part in the view frustum range, and eliminating the sub-models corresponding to the sub-model bounding volumes without the intersection part in the view frustum range.
In this embodiment, when the fine-grained pyramid removal operation is performed, each parallel computing process started in step S4 corresponds to a sub-model and an enclosure of the sub-model, that is, the process performs operations such as intersection computation, position determination, and removal of the sub-model and the enclosure of the sub-model.
Optionally, step S4 specifically includes:
(1) in each thread, obtaining space plane equations of six cutting planes of the view cone according to the coordinate position, the angle, the horizontal direction visual angle, the near cutting plane distance and the far cutting plane distance of a camera in the three-dimensional scene of the circuit breaker production line, and determining the vertex coordinates of the sub-model bounding volume;
the view frustum is the visible region of the camera in a three-dimensional scene, resembling the solid shape of a pyramid with the top cut parallel to the bottom. The view cone is composed of six planes, namely a near cutting plane, a far cutting plane, an upper cutting plane, a lower cutting plane, a left cutting plane and a right cutting plane, as shown in figure 5.
In this embodiment, the size, the orientation, and the position of the view frustum of the camera are calculated according to information such as a coordinate position, an angle, a horizontal viewing angle, a distance between a near cutting plane, a distance between a far cutting plane, and the like of the camera in a three-dimensional scene of a circuit breaker production line, and a space plane equation Ax + By + Cz + D of six cutting planes of the view frustum is obtained as 0, where x, y, and z represent a space coordinate system, a, B, C, and D represent coefficients of planes in a space, and coefficient values thereof are used to determine specific positions of the planes in the space.
(2) Substituting at least one vertex coordinate into a space plane equation of at least one cutting surface of the view cone to perform intersection calculation, obtaining the position relation between the sub-model bounding volume and the view cone, and determining the sub-model bounding volume with an intersection part in the view cone range;
wherein, the determining the sub-model bounding volume with the intersection part with the view cone range specifically comprises:
judging whether the space plane equation value of the cutting surface obtained after the vertex coordinates are substituted is larger than 0;
if so, determining that the vertex is positioned on the inner side of the cutting plane, namely the sub-model bounding volume and the viewing cone range have an intersection part;
if not, determining that the vertex is positioned on the outer side of the viewing surface, substituting the vertex coordinates into other viewing surfaces until each vertex of the sub-model bounding volume is positioned on the outer sides of the six viewing surfaces of the viewing cone, and determining that the sub-model bounding volume and the viewing cone range have no intersection part; otherwise, determining that the sub-model bounding volume has an intersection part with the view cone range as long as any vertex of the sub-model bounding volume is positioned in any plane of the view cone.
(3) And removing the sub-model corresponding to the sub-model bounding volume without intersecting with the view cone range.
When the traditional method is adopted for removing the view cone, as long as a small part of the model is intersected with the view cone, the model is completely reserved, and even if the vast majority of the model is positioned outside the view cone, all model data are cached, calculated and stored, so that a large amount of resources are wasted, and the rendering efficiency is low. In the embodiment, the twin models of the circuit breaker and the production equipment are divided into the sub models, the sub model surrounding bodies corresponding to the sub models are constructed, and the fine granularity elimination of the view cones is implemented.
In addition, in the traditional scheme, the visual cone removing operation is mainly performed in a CPU, the workload of the CPU is increased, and a serial method is adopted for performing the visual cone removing operation and the calculation operation, which are originally performed in the CPU, are transplanted to a general graphics processor, and a parallel calculation method that one thread is responsible for the intersection calculation of a sub-model bounding volume and a visual cone is adopted, so that the calculation efficiency is improved.
Example 2
The present embodiment provides a viewing frustum removing system for a digital twin model of a circuit breaker production line, as shown in fig. 6, the system includes:
the sub-model obtaining module M1 is used for dividing the twin model of the circuit breaker and the production equipment into a plurality of sub-models, and each sub-model comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module M2 is used for constructing a sub-model bounding volume of each sub-model;
a thread configuration module M3 for configuring a plurality of threads for a general purpose graphics processor at the CPU;
and the viewing pyramid removing module M4 is used for performing intersection calculation on the viewing pyramid data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part in the viewing pyramid range, and removing the sub-model corresponding to the sub-model bounding volume without the intersection part in the viewing pyramid range.
Example 3
The embodiment provides a rendering method of a digital twin model of a circuit breaker production line, as shown in fig. 7, the method includes:
s101, acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
and loading three-dimensional scene data of the circuit breaker production line from a hard disk to a system memory and a CPU (central processing unit), and acquiring twin model data and view cone data from the memory by the CPU to determine the visual range of the camera. The acquired data mainly comprises data such as the number, position coordinates, angles and vertexes of the twin model and the triangular patches thereof, and information such as the visual field range and the central coordinates of the visual cone.
S201, dividing the twin model into a plurality of sub models, wherein each sub model comprises triangular patches with equal number;
step S201 is the same as step S1 in embodiment 1, and specific contents thereof may be referred to step S1 in embodiment 1.
S301, constructing a sub-model bounding volume of each sub-model;
step S301 is the same as step S2 in embodiment 1, and specific contents thereof may be referred to step S2 in embodiment 1.
S401, configuring a plurality of threads for a general purpose graphics processor in a CPU;
step S401 is the same as step S3 in embodiment 1, and specific contents thereof may be referred to step S3 in embodiment 1.
S501, performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with a view frustum range, and eliminating the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the view frustum range;
step S501 is the same as step S4 in embodiment 1, and specific contents thereof may be referred to step S4 in embodiment 1.
S601, carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part of the view cone range, and rendering a two-dimensional image.
And the general graphic processor stores the sub-model bounding volume data positioned in the view cone into a video memory, executes a graphic drawing command on the sub-model data corresponding to the sub-model bounding volume data positioned in the view cone at a GPU end, enters the rendering steps of a geometric stage and a rasterization stage, and finally renders a two-dimensional image.
As an optional implementation manner, in this embodiment, after rendering the two-dimensional image, the method further includes:
s701, judging whether to stop operating the rendering method of the digital twin model of the circuit breaker production line;
if so, ending the rendering;
if not, judging whether the three-dimensional scene of the circuit breaker production line is updated or not;
if the three-dimensional scene of the circuit breaker production line is updated, acquiring the updated image data of the three-dimensional scene of the circuit breaker production line, and returning to the step of acquiring the twin model and the view cone data of the three-dimensional scene of the circuit breaker production line;
and if the three-dimensional scene of the circuit breaker production line is not updated, returning to the step of configuring a plurality of threads for the general graphic processor in the CPU.
Wherein, the judging whether the three-dimensional scene of the circuit breaker production line is updated specifically comprises:
acquiring image data of a three-dimensional scene of a current circuit breaker production line;
comparing the image data of the three-dimensional scene of the current circuit breaker production line with the image data of the three-dimensional scene of the previous circuit breaker production line, and judging whether the three-dimensional scene of the circuit breaker production line is updated or not, wherein if the image data of the three-dimensional scene of the current circuit breaker production line is the same as the image data of the three-dimensional scene of the previous circuit breaker production line, the three-dimensional scene of the circuit breaker production line is not updated;
in this embodiment, whether the three-dimensional scene of the circuit breaker is updated or not includes the position change of the view cone or the dynamic update of the model in the digital twin workshop of the circuit breaker, which indicates that the camera is performing roaming movement operation or the production line is running, loads the updated three-dimensional scene of the production line of the circuit breaker to the CPU, and returns to "acquire the twin model and the view cone data of the three-dimensional scene of the production line of the circuit breaker" to continue to perform rendering operation until rendering is finished. If the data of the production equipment and the view cone data in the workshop is not updated, that is, the scene is not updated in any logic, it indicates that the camera and the equipment are not moved, and at this time, the process directly enters step S104 to perform the next rendering operation until the rendering is finished.
In the traditional scheme, the visual cone rejection operation is mainly performed in a CPU, the workload of the CPU is increased, and a serial method is adopted for performing, in the embodiment, the visual cone rejection and calculation originally performed in the CPU are transplanted to a general graphic processor, and a parallel calculation method that one thread is responsible for the intersection calculation of one sub-model bounding body and the visual cone is adopted, so that the calculation efficiency is improved, sub-model data in a buffer area is not transmitted to a CPU end at the moment, the time consumption and the overload of the CPU caused by data transmission are prevented, and the integral speed increase of the rendering efficiency of a digital twin model is facilitated.
Example 4
The present embodiment provides a rendering system of a digital twin model of a circuit breaker production line, as shown in fig. 8, the system includes:
the data acquisition module M11 is used for acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
the submodel obtaining module M21 is used for subdividing the twin model into a plurality of submodels, and each submodel comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module M31 is used for constructing a sub-model bounding volume of each sub-model;
a thread configuration module M41 for configuring a plurality of threads for a general purpose graphics processor at the CPU;
the viewing pyramid removing module M51 is used for performing intersection calculation on the viewing pyramid data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with a viewing pyramid range, and removing the sub-model corresponding to the sub-model bounding volume without the intersection part with the viewing pyramid range;
and the two-dimensional image acquisition module M61 is used for carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part in the view cone range and rendering a two-dimensional image.
The judgment module M71 is used for judging whether to stop running the rendering method of the digital twin model of the circuit breaker production line;
if so, ending the rendering;
if not, judging whether the three-dimensional scene of the circuit breaker production line is updated or not;
if the three-dimensional scene of the circuit breaker production line is updated, acquiring the updated image data of the three-dimensional scene of the circuit breaker production line, and returning to the step of acquiring the twin model and the view cone data of the three-dimensional scene of the circuit breaker production line;
and if the three-dimensional scene of the circuit breaker production line is not updated, returning to the step of configuring a plurality of threads for the general graphic processor in the CPU.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (10)

1. A method for eliminating view cones of a digital twin model of a circuit breaker production line is characterized by comprising the following steps:
dividing twin models of a circuit breaker and production equipment into a plurality of sub models, wherein each sub model comprises an equal number of triangular patches;
constructing a sub-model bounding volume of each sub-model;
configuring a plurality of threads for a general-purpose graphic processor in a CPU;
and performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with the view frustum range, and eliminating the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the view frustum range.
2. The method of claim 1, wherein the constructing of the sub-model bounding volume for each of the sub-models comprises:
calculating the central coordinate and the sub-model range of the sub-model;
and constructing the sub-model bounding volume corresponding to the sub-model according to the central coordinate of the sub-model and the range of the sub-model.
3. The method according to claim 1, wherein the performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume having an intersection part with a view frustum range, and eliminating the sub-model corresponding to the sub-model bounding volume having no intersection part with the view frustum range specifically comprises:
in each thread, obtaining space plane equations of six cutting planes of the view cone according to the coordinate position, the angle, the horizontal direction visual angle, the near cutting plane distance and the far cutting plane distance of a camera in the three-dimensional scene of the circuit breaker production line, and determining the vertex coordinates of the sub-model bounding volume;
substituting at least one vertex coordinate into a space plane equation of at least one cutting surface of the view cone to perform intersection calculation, obtaining the position relation between the sub-model bounding volume and the view cone, and determining the sub-model bounding volume with an intersection part in the view cone range;
and removing the sub-model corresponding to the sub-model bounding volume without intersecting with the view cone range.
4. The method according to claim 3, wherein the determining the sub-model bounding volume having an intersection with a view frustum range comprises:
judging whether the space plane equation value of the cutting surface obtained after the vertex coordinates are substituted is larger than 0;
if so, determining that the vertex is positioned on the inner side of the cutting plane, namely the sub-model bounding volume and the viewing cone range have an intersection part;
if not, determining that the vertex is positioned on the outer side of the viewing surface, substituting the vertex coordinates into other viewing surfaces until each vertex of the sub-model bounding volume is positioned on the outer sides of the six viewing surfaces of the viewing cone, and determining that the sub-model bounding volume and the viewing cone range have no intersection part; otherwise, determining that the sub-model bounding volume has an intersection part with the view cone range as long as any vertex of the sub-model bounding volume is positioned in any plane of the view cone.
5. A view frustum rejection system for a digital twin model of a circuit breaker production line, the system comprising:
the sub-model acquisition module is used for dividing the twin model of the circuit breaker and the production equipment into a plurality of sub-models, and each sub-model comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module is used for constructing a sub-model bounding volume of each sub-model;
the thread configuration module is used for configuring a plurality of threads for the general-purpose graphic processor in the CPU;
and the viewing cone removing module is used for performing intersection calculation on the viewing cone data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part with the viewing cone range and removing the sub-models corresponding to the sub-model bounding volumes without the intersection parts with the viewing cone range.
6. A rendering method of a digital twin model of a circuit breaker production line is characterized by comprising the following steps:
acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
dividing the twin model into a plurality of sub models, wherein each sub model comprises an equal number of triangular patches;
constructing a sub-model bounding volume of each sub-model;
configuring a plurality of threads for a general-purpose graphic processor in a CPU;
performing intersection calculation on the view frustum data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part in a view frustum range, and eliminating the sub-model corresponding to the sub-model bounding volume without the intersection part in the view frustum range;
and carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part of the view cone range, and rendering a two-dimensional image.
7. The method of claim 6, wherein after rendering the two-dimensional image, the method further comprises determining whether to terminate a rendering method of running the breaker production line digital twin model;
if so, ending the rendering;
if not, judging whether the three-dimensional scene of the circuit breaker production line is updated or not;
if the three-dimensional scene of the circuit breaker production line is updated, acquiring the updated image data of the three-dimensional scene of the circuit breaker production line, and returning to the step of acquiring the twin model and the view cone data of the three-dimensional scene of the circuit breaker production line;
and if the three-dimensional scene of the circuit breaker production line is not updated, returning to the step of configuring a plurality of threads for the general graphic processor in the CPU.
8. The method according to claim 7, wherein the determining whether the three-dimensional scene of the circuit breaker production line is updated specifically comprises:
acquiring image data of a three-dimensional scene of a current circuit breaker production line;
and comparing the image data of the three-dimensional scene of the current circuit breaker production line with the image data of the three-dimensional scene of the previous circuit breaker production line, and judging whether the three-dimensional scene of the circuit breaker production line is updated, wherein if the image data of the three-dimensional scene of the current circuit breaker production line is the same as the image data of the three-dimensional scene of the previous circuit breaker production line, the three-dimensional scene of the circuit breaker production line is not updated.
9. A system for rendering a digital twin model of a circuit breaker production line, the system comprising:
the data acquisition module is used for acquiring a twin model and view cone data of a three-dimensional scene of a circuit breaker production line; the twin model comprises virtual models of circuit breakers and production equipment, the view frustum data comprises image data of a see-through camera field of view region;
the submodel acquisition module is used for subdividing the twin model into a plurality of submodels, and each submodel comprises an equal number of triangular patches;
the sub-model bounding volume obtaining module is used for constructing a sub-model bounding volume of each sub-model;
the thread configuration module is used for configuring a plurality of threads for the general-purpose graphic processor in the CPU;
the viewing cone removing module is used for performing intersection calculation on the viewing cone data and each sub-model bounding volume by using each thread to obtain the sub-model bounding volume with an intersection part in the viewing cone range and removing the sub-model corresponding to the sub-model bounding volume without the intersection part in the viewing cone range;
and the two-dimensional image acquisition module is used for carrying out graphic drawing on the sub-model corresponding to the sub-model bounding volume with the intersection part in the view cone range and rendering a two-dimensional image.
10. The system of claim 9, further comprising:
the judging module is used for judging whether to stop operating the rendering method of the digital twin model of the circuit breaker production line;
if so, ending the rendering;
if not, judging whether the three-dimensional scene of the circuit breaker production line is updated or not;
if the three-dimensional scene of the circuit breaker production line is updated, acquiring the updated image data of the three-dimensional scene of the circuit breaker production line, and returning to the step of acquiring the twin model and the view cone data of the three-dimensional scene of the circuit breaker production line;
and if the three-dimensional scene of the circuit breaker production line is not updated, returning to the step of configuring a plurality of threads for the general graphic processor in the CPU.
CN202110608006.7A 2021-06-01 2021-06-01 Rendering method of digital twin model, and visual cone removing method and system Pending CN113345060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110608006.7A CN113345060A (en) 2021-06-01 2021-06-01 Rendering method of digital twin model, and visual cone removing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110608006.7A CN113345060A (en) 2021-06-01 2021-06-01 Rendering method of digital twin model, and visual cone removing method and system

Publications (1)

Publication Number Publication Date
CN113345060A true CN113345060A (en) 2021-09-03

Family

ID=77474047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110608006.7A Pending CN113345060A (en) 2021-06-01 2021-06-01 Rendering method of digital twin model, and visual cone removing method and system

Country Status (1)

Country Link
CN (1) CN113345060A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113808247A (en) * 2021-11-19 2021-12-17 武汉方拓数字科技有限公司 Method and system for rendering and optimizing three-dimensional model of massive three-dimensional scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281654A (en) * 2008-05-20 2008-10-08 上海大学 Method for processing cosmically complex three-dimensional scene based on eight-fork tree
US20170154460A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Viewing frustum culling method and device based on virtual reality equipment
US20170365090A1 (en) * 2016-06-17 2017-12-21 Geomerics Ltd Graphics processing systems
CN112506476A (en) * 2020-11-06 2021-03-16 温州大学 Method and device for quickly constructing digital twin workshop system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281654A (en) * 2008-05-20 2008-10-08 上海大学 Method for processing cosmically complex three-dimensional scene based on eight-fork tree
US20170154460A1 (en) * 2015-11-26 2017-06-01 Le Holdings (Beijing) Co., Ltd. Viewing frustum culling method and device based on virtual reality equipment
US20170365090A1 (en) * 2016-06-17 2017-12-21 Geomerics Ltd Graphics processing systems
CN112506476A (en) * 2020-11-06 2021-03-16 温州大学 Method and device for quickly constructing digital twin workshop system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李红辉等: "基于WebGL的3D可视化告警系统关键技术研究与应用", 《软件》 *
袁畅: "GPU加速的可见性剔除方法研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113808247A (en) * 2021-11-19 2021-12-17 武汉方拓数字科技有限公司 Method and system for rendering and optimizing three-dimensional model of massive three-dimensional scene
CN113808247B (en) * 2021-11-19 2022-02-08 武汉方拓数字科技有限公司 Method and system for rendering and optimizing three-dimensional model of massive three-dimensional scene

Similar Documents

Publication Publication Date Title
US8725466B2 (en) System and method for hybrid solid and surface modeling for computer-aided design environments
US11436800B2 (en) Interactive system and method providing real-time virtual reality visualization of simulation data
US8838419B2 (en) System and method for simulating machining objects
US10108752B2 (en) Engraving a 2D image on a subdivision surface
WO2009145155A1 (en) Cutting process simulation display device, method for displaying cutting process simulation, and cutting process simulation display program
CN113688545B (en) Visualization method and system for finite element post-processing result and data processing terminal
JPH09319891A (en) Image processor and its processing method
KR101944544B1 (en) Designing a modeled volume represented by dexels
CN110570491B (en) Thermodynamic diagram generation method and device
CA2794074A1 (en) Designing a modeled volume represented by dexels
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN113345060A (en) Rendering method of digital twin model, and visual cone removing method and system
James et al. Squashing cubes: Automating deformable model construction for graphics
CN108492371B (en) Three-dimensional building model dynamic visualization method for fire
US11163922B2 (en) Systems and methods for implementing iterative simulation manipulations and results display
KR930003811B1 (en) Apparatus for 3-dimension design and processing method therefor
US11586788B2 (en) Efficient shape-accurate finite element mesh visualization
CN114119835B (en) Hard surface model processing method and device and electronic equipment
Li Flight environment virtual simulation based on OpenGL
JPH1166356A (en) Liquid simulation device
CN115588076A (en) Method for solving threading between three-dimensional human body model and clothes model and electronic equipment
CN118114353A (en) Multi-time sequence FEA data dynamic visualization method and system for dam structure security
CN115359224A (en) Virtual reality display method and device, computer equipment and storage medium
CN115457189A (en) PBD (skeletal driven software) simulation system and method based on cluster coloring
Li Study on the Virtual Simulation of Flight Environment Based on OpenGL.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination