Method, device and electronic device for generating virtual model

By obtaining virtual models of concrete structures and support structures, cutting and combining them, and using spline curves to simulate the position of steel bars, the problem of poor realistic concrete crushing effect in the existing technology is solved, and the crushing effect is more in line with the real situation.

CN116090071BActive Publication Date: 2025-08-29NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310134689.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-07
Publication Date
2025-08-29
Estimated Expiration
2043-02-07

AI Technical Summary

Technical Problem

When the prior art generates concrete crushing effect, the realistic nature is poor and it is difficult to conform to the crushing performance in building materials science and real-life scenarios.

Method used

By obtaining virtual models of concrete structures and support structures, cutting and combining them, a crushing process that conforms to building materials is generated, and the position of steel bars in concrete is simulated by spline curves, and the model is adjusted to improve the realistic nature of the crushing effect.

Benefits of technology

It improves the realistic nature of the concrete crushing model, making it more in line with the broken performance in real scenes, and enhances the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116090071B_ABST
    Figure CN116090071B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for generating a virtual model. The method includes: obtaining a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure within the concrete structure; cutting the first sub-model and the second sub-model to obtain a first cut model and a second cut model; generating a second virtual model corresponding to the supporting structure based on the first cut model and the spline curve; and combining the second virtual model, the first cut model, and the second cut model to generate a target virtual model. This application solves the technical problem of poor realism in the fragmentation effect of generated virtual models in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to a method, device and electronic device for generating a virtual model. Background Art

[0002] With the development of computer hardware, the artistic effects that can be displayed in games are getting better and better. However, in terms of physical effect generation, it is often difficult to achieve a high degree of realism. Taking the generation of concrete crushing effect as an example, the concrete model is usually cut first, and the normal of the cut surface is sampled. Then, the pre-designed steel bar model is directly inserted into the cut concrete model along the sampling point to generate a concrete crushing model. However, this generation process does not conform to the science of building materials, nor does it conform to the performance process of concrete when crushed in real scenes. The physical effect of concrete crushing that can be displayed is less realistic.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0004] At least some embodiments of the present disclosure provide a method, apparatus, and electronic device for generating a virtual model to at least solve the technical problem of poor realism of generating a fragmentation effect of a virtual model in the related art.

[0005] According to one embodiment of the present disclosure, a method for generating a virtual model is provided, which obtains a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model is used to characterize the sub-model corresponding to the supporting structure, and the second sub-model is used to characterize the sub-models other than the first sub-model in the first virtual model; the first sub-model and the second sub-model are cut to obtain a first cutting model and a second cutting model, wherein the first cutting model includes multiple first cutting blocks and the second cutting model includes multiple second cutting blocks; based on the first cutting model and the spline curve, a second virtual model corresponding to the supporting structure is generated, wherein the second virtual model is located outside the first cutting model; the second virtual model, the first cutting model and the second cutting model are combined to generate a target virtual model.

[0006] According to one embodiment of the present disclosure, a device for generating a virtual model is also provided, including an acquisition module for acquiring a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model being used to characterize the sub-model corresponding to the supporting structure, and the second sub-model being used to characterize the sub-models other than the first sub-model in the first virtual model; a cutting module being used to cut the first sub-model and the second sub-model to obtain a first cutting model and a second cutting model, wherein the first cutting model includes a plurality of first cutting blocks, and the second cutting model includes a plurality of second cutting blocks; a first generating module being used to generate a second virtual model corresponding to the supporting structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model; and a second generating module being used to combine the second virtual model, the first cutting model, and the second cutting model to generate a target virtual model.

[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute any of the above-mentioned methods for generating a virtual model when running.

[0008] According to one embodiment of the present disclosure, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above methods for generating a virtual model.

[0009] In at least some embodiments of the present disclosure, a method is adopted in which a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure are obtained; the first sub-model and the second sub-model are cut to obtain a first cut model and a second cut model; based on the first cut model and the spline curve, a second virtual model corresponding to the supporting structure is generated; and the second virtual model, the first cut model and the second cut model are combined to generate a target virtual model. First, an overall model including multiple structural sub-models is generated according to the concrete structure to ensure that the generated model conforms to building materials science and improves the realism of the model. Then, the overall model is cut according to the crushing effect. At the same time, the sub-models inside the overall model are adjusted and combined according to the distortion deformation occurring when the model is broken, so that the entire crushing process is more consistent with the crushing performance of concrete in real scenes, thereby further improving the realism of the final model crushing effect, thereby solving the technical problem of poor realism of the crushing effect of generating virtual models in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of this application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0011] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method for generating a virtual model according to an embodiment of the present disclosure;

[0012] Figure 2 is a schematic diagram of a traditional concrete crushing model according to one embodiment of the present disclosure;

[0013] Figure 3 is a flowchart of a method for generating a virtual model according to one embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of a first virtual model according to one embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram showing a model scaling adjustment result according to one embodiment of the present disclosure;

[0016] Figure 6 is a schematic diagram of a crushing model according to one embodiment of the present disclosure;

[0017] Figure 7 is a schematic diagram illustrating a spline curve cutting process according to one embodiment of the present disclosure;

[0018] Figure 8 is a structural block diagram of a device for generating a virtual model according to one embodiment of the present disclosure;

[0019] Figure 9 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0022] In one possible implementation, the inventors, after practicing and carefully studying methods commonly used in the field of image processing, have discovered that the fragmentation generation process does not conform to real-world scenarios, resulting in poor realism in the fragmentation effect. Therefore, the game scene used in the embodiments of the present disclosure can be a game scene with an object fragmentation model, and the game type targeted is generally a 3D (three-dimensional) game. A method for generating a virtual model is proposed. The technical concept employed comprises obtaining a first virtual model corresponding to a concrete structure and a spline curve corresponding to a support structure within the concrete structure; cutting the first sub-model and the second sub-model to obtain a first cut model and a second cut model; generating a second virtual model corresponding to the support structure based on the first cut model and the spline curve; and combining the second virtual model, the first cut model, and the second cut model to ensure that the generated model conforms to building materials science, making the entire fragmentation process more consistent with the concrete fragmentation behavior in real-world scenarios, thereby further improving the realism of the resulting model fragmentation effect, thereby resolving the technical problem of poor realism in the fragmentation effect of generated virtual models in the related art.

[0023] The above method embodiments involved in the present disclosure can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a PDA, a mobile Internet device, a PAD, a game console, or other terminal device. Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal for a method of generating a virtual model according to an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field-programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present disclosure, it may also include: an input and output device 108 and a display device 110.

[0024] In some optional embodiments mainly based on gaming scenarios, the above-mentioned device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction functions may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0025] In one embodiment of the present disclosure, the method for generating a virtual model can be executed on a local terminal device or a server. When the method for generating a virtual model is executed on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0026] Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, tablet computer, PDA, mobile Internet device, PAD, game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal for a method of generating a virtual model according to an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 The mobile terminal may further include a processor 102 (only one of which is shown) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input / output device 108, and a display device 110.

[0027] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0028] According to one embodiment of the present disclosure, an embodiment of a method for generating a virtual model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] Currently, the concrete crushing model is generated by directly inserting a pre-designed steel bar model on the sampled normal line after sampling the normal line of the concrete model cutting surface. However, the realism of the crushing effect is not high. Figure 2 is a schematic diagram of a traditional concrete crushing model according to one embodiment of the present disclosure, as shown in FIG. Figure 2 As shown in the figure, the crushing boundary of the concrete model is distorted, and the steel bar model on the crushing surface is disordered, and the steel bars do not have the same directionality, which is inconsistent with the actual building materials science. In addition, since concrete has a process and type when it is crushed, Figure 2 The crushing model generated in the experiment does not have this feature and does not conform to the physical crushing process. This also results in the final concrete crushing model not conforming to the real scene and the crushing effect is poorly realistic.

[0030] In a possible implementation, to address the above-mentioned problem, an embodiment of the present disclosure provides a method for generating a virtual model, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or the client device in the cloud interaction system mentioned above. Figure 3 is a flow chart of a method for generating a virtual model according to one embodiment of the present disclosure, as shown in FIG. Figure 3 As shown, the method includes the following steps:

[0031] Step S302: Acquire a first virtual model corresponding to the concrete structure and a spline curve corresponding to the supporting structure inside the concrete structure.

[0032] The first virtual model includes: a first sub-model and a second sub-model. The first sub-model is used to represent the sub-model corresponding to the support structure, and the second sub-model is used to represent the sub-models in the first virtual model except the first sub-model.

[0033] The first virtual model mentioned above may refer to an overall virtual model corresponding to concrete, such as a virtual model corresponding to a wall.

[0034] The first sub-model described above may refer to a sub-model corresponding to a supporting structure within the concrete. For example, to ensure the rigidity and toughness of concrete, reinforcement bars and other supporting structures are often added to the concrete. Therefore, in an alternative embodiment of this embodiment, the entire region corresponding to the reinforcement bars within the concrete may be used as the supporting structure to generate the first sub-model. The region corresponding to the first sub-model includes both the reinforcement bar region and the cement region, not just the independent region corresponding to the reinforcement bars themselves.

[0035] It should be noted that the first virtual model is only a concrete model, which does not include a steel bar model for maintaining structural stability. The combination of the steel bar model and the concrete model will be specifically embodied below.

[0036] The second sub-model mentioned above may refer to the model corresponding to other areas in the entire concrete except the supporting structure.

[0037] The above-mentioned spline curve may refer to the curve corresponding to the supporting structure inside the concrete. In the supporting structure, an object with high rigidity and toughness is usually required to ensure the stability of the entire structure, such as the steel bars in the concrete. Since the supporting structure refers to the entire area inside the concrete, the spline curve here may refer to the shape curve corresponding to the object used to maintain the stability of the supporting structure, such as the shape curve of the steel bars in the concrete.

[0038] In an optional solution of this embodiment, in order to ensure that the generated concrete model conforms to the actual building materials science and improve the realism of the concrete model, before generating the concrete crushing model, virtual models corresponding to different parts of the concrete can be first produced according to the characteristics of the concrete material in the real scene, such as a first virtual model corresponding to the entire concrete, a first sub-model corresponding to the supporting structure where the steel bars in the concrete are located, and a second sub-model corresponding to the remaining areas except the supporting structure.

[0039] At the same time, in order to avoid the appearance of a messy steel bar model in the final broken model that does not conform to the real scene, it is also possible to formulate a shape curve that the steel bar model can present in the concrete model when generating the first virtual model, that is, the above-mentioned spline curve, and simulate the position of the steel bar in the concrete model based on the spline curve, thereby ensuring that the first virtual model produced is more in line with the real scene, avoiding the messy steel bar effect in the final presentation, and improving the user's viewing experience.

[0040] Figure 4 is a schematic diagram of a first virtual model according to one embodiment of the present disclosure, such as Figure 4As shown, the entire first virtual model can be composed of two parts. The first part is the support structure, such as the area where the steel bars are located in the concrete. This corresponds to the first sub-model, namely the area corresponding to the dashed rectangle. The dotted line within the dashed line represents the aforementioned spline curve. The second part is the area excluding the support structure, corresponding to the second sub-model, namely the area separated by the dashed rectangle and the solid rectangle. In this embodiment, before generating the crushing model, a specific concrete model is first generated based on the concrete material structure given in building materials science. This ensures that the subsequent crushing process of the concrete conforms to the actual crushing process, thereby improving the realism of the final crushing model.

[0041] Step 304 : Cut the first sub-model and the second sub-model to obtain a first cut model and a second cut model.

[0042] The first cutting model includes a plurality of first cutting blocks, and the second cutting model includes a plurality of second cutting blocks.

[0043] The first cutting blocks mentioned above may refer to the fragments corresponding to the supporting structure generated when the concrete model is crushed; the second cutting blocks mentioned above may refer to the fragments outside the supporting structure generated when the concrete model is crushed.

[0044] After the concrete model is produced, it can be cut according to the crushing effect of concrete in real scenes.

[0045] In an optional solution of this embodiment, since the supporting structure inside the concrete will also be broken and fractured when the concrete is broken, when the concrete model is cut, the above-mentioned first sub-model and second sub-model can be further cut accordingly. Since the rigidity and toughness of cement and steel bars in real scenarios are different, the rigidity and toughness of the supporting structure inside the concrete are higher. Therefore, when cutting the model, different cutting parameters can be used to cut the first sub-model and the second sub-model respectively. For example, a smaller cutting range can be set for the second sub-model, and a larger cutting range can be set for the first sub-model.

[0046] Optionally, the first sub-model and the second sub-model are cut to obtain the first cut model and the second cut model, including: determining the distance between the supporting structure and the outer surface of the concrete structure; dividing the first virtual model based on the distance to obtain the first sub-model and the second sub-model; cutting the first sub-model based on the first cutting parameter to obtain the first cut model; cutting the second sub-model based on the second cutting parameter to obtain the second cut model.

[0047] Since in real-world scenarios, when concrete materials are made, supporting structures such as steel bars are wrapped in cement, in the concrete model, the internal supporting structures will be at a certain distance from the outer surface of the concrete model. Furthermore, due to the support of supporting structures such as steel bars, the rigidity and toughness of the concrete area near the steel bars are higher than other areas. In other words, based on the distance between the above-mentioned supporting structures and the outer surface of the model, the concrete model can be divided into two parts: the outer model and the inner model, that is, the first model corresponding to the aforementioned supporting structure and the second model corresponding to the remaining areas. It should be noted that this distance can be designed based on actual conditions and material requirements, and is not specifically limited.

[0048] In an optional solution of this embodiment, before generating the concrete model, a distance a may be preset as the distance between the above-mentioned support structure and the outer surface of the concrete, and then a concrete model with a double-layer structure may be generated based on the distance a.

[0049] In an optional solution of this embodiment, when a concrete model with an inner and outer double-layer structure is generated according to a preset distance a, the outer surface of the model can be first disturbed using the distance a to obtain a smaller inner layer structure, and then a Boolean operation is further performed based on the disturbance and outer surface information, such as size, shape, etc., to obtain an inner layer structure corresponding to the outer surface of the concrete.

[0050] In an alternative solution to this embodiment, as described above, different segmentation parameters can be set for the first sub-model corresponding to the support structure and the second sub-model corresponding to the remaining area, respectively, to simulate the various fragments produced when concrete is crushed in real-world scenarios. The specific segmentation parameters can be designed based on actual conditions and are not specifically limited.

[0051] Step S306: Generate a second virtual model corresponding to the support structure based on the first cutting model and the spline curve.

[0052] The second virtual model is located outside the first cutting model.

[0053] The second virtual model mentioned above may refer to a steel bar model used to improve the stability of the concrete model.

[0054] Since the above-mentioned first cutting model corresponds to the model of the internal support structure of concrete, and the stability of the support structure is provided by steel bars, in an optional scheme of this embodiment, the required steel bar model, i.e. the above-mentioned second virtual model, can be generated based on the first cutting model and the corresponding spline curve on the model.

[0055] When concrete is crushed, the cement surrounding the rebar will fall off due to inertia and gravity, exposing the rebar outside the cement. This results in the rebar model being partially inside and partially outside the first cut model. To improve generation efficiency, in an optional solution of this embodiment, only the rebar portion outside the first cut model can be considered for generation based on the spline curve. In other words, the second virtual model can be located outside the first cut model.

[0056] Optionally, based on the first cutting model and the spline curve, a second virtual model corresponding to the support structure is generated, including: scaling the first cutting model to obtain a scaled model; cropping the spline curve based on the scaled model to obtain a cropped spline curve, wherein the cropped spline curve is located outside the scaled model; and generating a second virtual model based on the cropped spline curve.

[0057] In order to further improve the realism of the generated crushing model, taking into account that concrete will be lost during crushing, resulting in the crushed part being smaller than before crushing, in an optional scheme of this embodiment, before generating the second virtual model, the above-mentioned first cutting model can be first scaled to obtain a scaled model, and then the spline curve corresponding to the scaled model can be trimmed and adjusted to determine the spline curve outside the scaled model. Finally, the steel bar model is generated according to the trimmed and adjusted spline curve, that is, the above-mentioned second virtual model, to obtain a crushing effect that is more in line with the real scene.

[0058] It should be noted that in order to reflect that part of the steel bars will be exposed when broken, the clipped spline curve needs to be outside the first cut model after scaling.

[0059] Figure 5 is a schematic diagram showing a model scaling adjustment result according to one embodiment of the present disclosure, such as Figure 5 As shown in the figure, from left to right are: the first cutting model, the scaled first cutting model, the scaled model including the spline curve, and the spline curve obtained by cutting and adjusting the scaled model.

[0060] In an optional solution of this embodiment, after obtaining the final trimmed and adjusted spline curve, a steel bar model can be generated according to information such as the shape and size of the spline curve.

[0061] Step S308: Combine the second virtual model, the first cutting model, and the second cutting model to generate a target virtual model.

[0062] The target virtual model mentioned above may refer to the finally generated broken concrete-steel model.

[0063] In an optional solution of this embodiment, after all required second virtual models, first cutting models, and second cutting models are generated, the three can be combined to obtain a target virtual model.

[0064] Optionally, the second virtual model, the first cutting model and the second cutting model are combined to generate a target virtual model, including: determining the distance between the second virtual model and each first cutting block; determining the target cutting block corresponding to the second virtual model from multiple first cutting blocks based on the distance; combining the second virtual model with the target cutting block to generate a combined model; combining the second cutting model with the combined model to generate the target virtual model.

[0065] In order to ensure the integrity of the generated steel bar model and improve the efficiency of generating the steel bar model, the steel bar model can be generated directly according to the spline curve on the surface of the first cutting model instead of directly. However, since there are multiple first cutting blocks in the first cutting model, combination errors may occur when combining the second virtual model and the first cutting model. Therefore, in an optional scheme of this embodiment, each time a second virtual model is generated, the target cutting block corresponding to the second virtual model can be determined according to the distance between it and each first cutting block and the volume of each first cutting block, thereby realizing the combination of the second virtual model and the first cutting model. Finally, the combined model is combined with the second cutting model for a second time to obtain the above-mentioned target virtual model.

[0066] In an optional solution of this embodiment, when performing the above-mentioned model combination, Boolean operations can be used to improve the accuracy of the combination.

[0067] In an optional solution of this embodiment, the distance between the second virtual model and the first cutting block may be a vertical distance between the midpoint of the second virtual model and the surface of the first cutting block.

[0068] Optionally, determining a target cutting block corresponding to the second virtual model from a plurality of first cutting blocks based on distance includes: determining the volumes of the plurality of first cutting blocks; determining weight values ​​corresponding to the plurality of first cutting blocks based on distance and volume; and determining the first cutting block corresponding to the maximum weight value among the weight values ​​corresponding to the plurality of first cutting blocks as the target cutting block.

[0069] The above-mentioned weight value may refer to the attraction weight of the first cutting block to the second virtual model. In an optional scheme of this embodiment, as shown above, the attraction weight of each first cutting block to the second virtual model may be determined based on the distance between the second virtual model and each first cutting block, and the volume of each first cutting block. The larger the attraction weight, the greater the possibility that the first cutting block is the target cutting block of the second virtual model. Therefore, after calculating the attraction weights of all first cutting blocks to the second virtual model, the first cutting block with the largest weight value may be used as the target cutting block.

[0070] Optionally, based on the distance and volume, the weight values ​​corresponding to the multiple first cutting blocks are determined, including: performing a square operation on the distance to obtain a first operation result; performing a power operation on the volume to obtain a second operation result; obtaining the ratio of the second operation result to the first operation result to obtain the weight values ​​corresponding to the multiple first cutting blocks.

[0071] Specifically, the formula for determining the above weight value can be as follows:

[0072]

[0073] Among them, W represents the attraction weight of each first cutting block to the second virtual model; S represents the distance from the first cutting block to the second virtual model; K represents the concrete coefficient, which is a constant and can be determined according to actual conditions, for example, according to the viscosity of concrete; V represents the volume of the fragments of the first cutting block.

[0074] Figure 6 is a schematic diagram of a crushing model according to one embodiment of the present disclosure, such as Figure 6 As shown, the structure of the entire broken model is clear, and the steel bar model in the concrete is not messy or irregular, showing high realism.

[0075] In at least some embodiments of the present disclosure, a method is adopted in which a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure are obtained; the first sub-model and the second sub-model are cut to obtain a first cut model and a second cut model; based on the first cut model and the spline curve, a second virtual model corresponding to the supporting structure is generated; and the second virtual model, the first cut model and the second cut model are combined to generate a target virtual model. First, an overall model including multiple structural sub-models is generated according to the concrete structure to ensure that the generated model conforms to building materials science and improves the realism of the model. Then, the overall model is cut according to the crushing effect. At the same time, the sub-models inside the overall model are adjusted and combined according to the distortion deformation occurring when the model is broken, so that the entire crushing process is more consistent with the crushing performance of concrete in real scenes, thereby further improving the realism of the final model crushing effect, thereby solving the technical problem of poor realism of the crushing effect of generating virtual models in related technologies.

[0076] Optionally, the spline curve is cropped based on the scaled model to obtain a cropped spline curve, including: performing a cross-detection on the spline curve and the scaled model to determine a target line segment in the spline curve located inside the scaled model; and removing the target line segment from the spline curve to obtain the cropped spline curve.

[0077] In an optional solution of this embodiment, before clipping the spline curve in the scaled first cutting model, an intersection check may be performed on the spline curve and the model to determine the portion of the spline curve to be clipped.

[0078] Generally, in order to ensure that the generated steel bar model can have a high degree of fit with the first cutting module, the spline curve part inside the scaled model can be determined as the part to be cut, and then the part to be cut can be removed from the spline curve to obtain the above-mentioned cut spline curve.

[0079] Figure 7 is a schematic diagram of a spline curve cutting process according to one embodiment of the present disclosure, such as Figure 7 As shown in the figure, from left to right are the scaled model and the model of the intersection of the spline curve, the cropped spline curve, and the steel bar model generated according to the spline curve.

[0080] Optionally, the spline curve and the scaled model are cross-checked to determine the target line segment in the spline curve located inside the scaled model, including: obtaining the starting point and the ending point of each line segment in the spline curve; determining the starting position of the starting point in the scaled model, and the ending position of the ending point in the scaled model; and determining the target line segment in the spline curve based on the starting position and the ending position.

[0081] When determining the target portion to be cropped in the spline curve, that is, the above-mentioned target line segment, we can first determine whether there is a spline curve that is inferior to the first cutting model after scaling the first cutting model. If there is an intersection, we can further determine the portion to be cropped in the intersecting spline curve based on the starting and ending points of the intersecting spline curve and the position of the scaled model.

[0082] In an optional solution of this embodiment, since the corresponding spline curve will also be cut when the first sub-model is cut, when determining the starting and ending points of the spline curve, it is necessary to obtain the starting and ending points corresponding to each cut line segment in the spline curve to avoid misjudgment.

[0083] Optionally, based on the starting position and the ending position, a target line segment in the spline curve is determined, including: determining the length of each line segment based on the starting position and the ending position; filtering a preset line segment from the spline curve based on the length of each line segment, wherein the length of the preset line segment is greater than or equal to a preset length; and determining a target line segment among the preset line segments.

[0084] In an optional solution of this embodiment, when the part of the spline curve to be cropped can be further determined based on the starting and ending points of each line segment in the curve, the part to be cropped in the curve can be screened by the length.

[0085] In an optional solution of this embodiment, a screening length threshold can be set. When the length of a line segment is greater than the length threshold, it can be considered that the line segment needs to be clipped and can be determined as the part to be clipped, that is, the target line segment mentioned above.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present disclosure.

[0087] In this embodiment, a device is also provided for implementing the above-mentioned embodiments and preferred embodiments. Details already described are omitted for brevity. As used below, the terms "unit" and "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0088] Figure 8 This is a structural block diagram of a virtual model generation device according to one embodiment of the present disclosure, wherein a graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface includes a touch area, such as Figure 8 As shown, the device includes: an acquisition module 802, which is used to acquire a first virtual model corresponding to the concrete structure, and a spline curve corresponding to the supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model is used to characterize the sub-model corresponding to the supporting structure, and the second sub-model is used to characterize the sub-model other than the first sub-model in the first virtual model; a cutting module 804, which is used to cut the first sub-model and the second sub-model to obtain a first cutting model and a second cutting model, wherein the first cutting model includes multiple first cutting blocks, and the second cutting model includes multiple second cutting blocks; a first generating module 806, which is used to generate a second virtual model corresponding to the supporting structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model; a second generating module 808, which is used to combine the second virtual model, the first cutting model, and the second cutting model to generate a target virtual model.

[0089] Optionally, the first generation module 806 includes: a model scaling unit, which scales the first cutting model to obtain a scaled model; a curve clipping unit, which clips the spline curve based on the scaled model to obtain a clipped spline curve, wherein the clipped spline curve is located outside the scaled model; and a first generation unit, which generates a second virtual model based on the clipped spline curve.

[0090] Optionally, the curve clipping unit is further configured to: perform cross detection on the spline curve and the scaled model to determine a target line segment in the spline curve located inside the scaled model; and remove the target line segment from the spline curve to obtain a clipped spline curve.

[0091] Optionally, the curve clipping unit is further used to: obtain the starting point and the ending point of each line segment in the spline curve;

[0092] Determine the starting position of the start point in the scaled model and the ending position of the end point in the scaled model; and determine the target line segment in the spline curve based on the starting position and the ending position.

[0093] Optionally, the curve clipping unit is further used to: determine the length of each line segment based on the starting position and the ending position; filter a preset line segment from the spline curve based on the length of each line segment, wherein the length of the preset line segment is greater than or equal to the preset length; and determine a target line segment among the preset line segments.

[0094] Optionally, the second generation module 808 includes: a first distance determination unit, used to determine the distance between the second virtual model and each first cutting block; a cutting block determination unit, used to determine the target cutting block corresponding to the second virtual model from multiple first cutting blocks based on the distance; a model combination unit, used to combine the second virtual model with the target cutting block to generate a combined model; and a second generation unit, used to combine the second cutting model with the combined model to generate a target virtual model.

[0095] Optionally, the cutting block determination unit is further used to: determine the volumes of multiple first cutting blocks; determine the weight values ​​corresponding to the multiple first cutting blocks based on the distance and volume; and determine the first cutting block corresponding to the maximum weight value among the weight values ​​corresponding to the multiple first cutting blocks as the target cutting block.

[0096] Optionally, the cutting block determination unit is further used to: perform a square operation on the distance to obtain a first operation result; perform a power operation on the volume to obtain a second operation result; obtain a ratio of the second operation result to the first operation result to obtain weight values ​​corresponding to multiple first cutting blocks.

[0097] Optionally, the cutting module 804 includes: a second distance determination unit, used to determine the distance between the supporting structure and the outer surface of the concrete structure; a model cutting unit, used to cut the first virtual model based on the distance to obtain a first sub-model and a second sub-model; a first cutting unit, used to cut the first sub-model based on the first cutting parameters to obtain a first cut model; and a second cutting unit, used to cut the second sub-model based on the second cutting parameters to obtain a second cut model.

[0098] It should be noted that the above-mentioned units and modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units and modules are all located in the same processor; or the above-mentioned units and modules are located in different processors in any combination.

[0099] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0100] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0101] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0102] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0103] S1: Obtain a first virtual model corresponding to the concrete structure and a spline curve corresponding to the supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model being used to represent the sub-model corresponding to the supporting structure, and the second sub-model being used to represent the sub-models in the first virtual model other than the first sub-model;

[0104] S2: cutting the first sub-model and the second sub-model to obtain a first cutting model and a second cutting model, wherein the first cutting model includes a plurality of first cutting blocks, and the second cutting model includes a plurality of second cutting blocks;

[0105] S3: generating a second virtual model corresponding to the support structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model;

[0106] S4: combining the second virtual model, the first cutting model and the second cutting model to generate a target virtual model.

[0107] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: scaling the first cutting model to obtain a scaled model; cropping the spline curve based on the scaled model to obtain a cropped spline curve, wherein the cropped spline curve is located outside the scaled model; and generating a second virtual model based on the cropped spline curve.

[0108] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: performing a cross-check on the spline curve and the scaled model to determine a target line segment in the spline curve that is located inside the scaled model; and removing the target line segment from the spline curve to obtain a cropped spline curve.

[0109] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: obtaining a starting point and an ending point of each line segment in the spline curve; determining a starting position of the starting point in the scaled model and an ending position of the ending point in the scaled model; and determining a target line segment in the spline curve based on the starting position and the ending position.

[0110] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: determining the length of each line segment based on the starting position and the ending position; filtering preset line segments from the spline curve based on the length of each line segment, wherein the length of the preset line segment is greater than or equal to the preset length; and determining a target line segment among the preset line segments.

[0111] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: determining the distance between the second virtual model and each first cutting block; determining a target cutting block corresponding to the second virtual model from multiple first cutting blocks based on the distance; combining the second virtual model with the target cutting block to generate a combined model; and combining the second cutting model with the combined model to generate a target virtual model.

[0112] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: determining the volumes of multiple first cutting blocks; determining the weight values ​​corresponding to the multiple first cutting blocks based on the distance and volume; and determining the first cutting block corresponding to the maximum weight value among the weight values ​​corresponding to the multiple first cutting blocks as the target cutting block.

[0113] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: performing a square operation on the distance to obtain a first operation result; performing a power operation on the volume to obtain a second operation result; obtaining a ratio of the second operation result to the first operation result to obtain weight values ​​corresponding to multiple first cutting blocks.

[0114] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining the distance between the supporting structure and the outer surface of the concrete structure; dividing the first virtual model based on the distance to obtain a first sub-model and a second sub-model; cutting the first sub-model based on the first cutting parameter to obtain a first cutting model; and cutting the second sub-model based on the second cutting parameter to obtain a second cutting model.

[0115] In at least some embodiments of the present disclosure, a method is adopted in which a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure are obtained; the first sub-model and the second sub-model are cut to obtain a first cut model and a second cut model; based on the first cut model and the spline curve, a second virtual model corresponding to the supporting structure is generated; and the second virtual model, the first cut model and the second cut model are combined to generate a target virtual model. First, an overall model including multiple structural sub-models is generated according to the concrete structure to ensure that the generated model conforms to building materials science and improves the realism of the model. Then, the overall model is cut according to the crushing effect. At the same time, the sub-models inside the overall model are adjusted and combined according to the distortion deformation occurring when the model is broken, so that the entire crushing process is more consistent with the crushing performance of concrete in real scenes, thereby further improving the realism of the final model crushing effect, thereby solving the technical problem of poor realism of the crushing effect of generating virtual models in related technologies.

[0116] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0117] In the exemplary embodiments of the present application, a computer-readable storage medium stores a program product capable of implementing the above-described method of the present embodiment. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps described in the "Exemplary Method" section of the present embodiment according to various exemplary embodiments of the present disclosure.

[0118] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited thereto. In the embodiment of the present disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0119] The program product may be implemented in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0120] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any appropriate combination of the above.

[0121] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0122] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0123] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0124] S1: Obtain a first virtual model corresponding to the concrete structure and a spline curve corresponding to the supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model being used to represent the sub-model corresponding to the supporting structure, and the second sub-model being used to represent the sub-models in the first virtual model other than the first sub-model;

[0125] S2: cutting the first sub-model and the second sub-model to obtain a first cutting model and a second cutting model, wherein the first cutting model includes a plurality of first cutting blocks, and the second cutting model includes a plurality of second cutting blocks;

[0126] S3: generating a second virtual model corresponding to the support structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model;

[0127] S4: combining the second virtual model, the first cutting model and the second cutting model to generate a target virtual model.

[0128] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: scaling the first cutting model to obtain a scaled model; cropping the spline curve based on the scaled model to obtain a cropped spline curve, wherein the cropped spline curve is located outside the scaled model; and generating a second virtual model based on the cropped spline curve.

[0129] Optionally, the processor may also be configured to execute the following steps through a computer program: performing a cross-check on the spline curve and the scaled model to determine a target line segment in the spline curve that is located inside the scaled model; and removing the target line segment from the spline curve to obtain a cropped spline curve.

[0130] Optionally, the processor may be configured to perform the following steps through a computer program: obtaining a starting point and an ending point of each line segment in the spline curve; determining a starting position of the starting point in the scaled model and an ending position of the ending point in the scaled model; and determining a target line segment in the spline curve based on the starting position and the ending position.

[0131] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determine the length of each line segment based on the starting position and the ending position; filter preset line segments from the spline curve based on the length of each line segment, wherein the length of the preset line segment is greater than or equal to the preset length; and determine the target line segment among the preset line segments.

[0132] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determining the distance between the second virtual model and each first cutting block; determining the target cutting block corresponding to the second virtual model from multiple first cutting blocks based on the distance; combining the second virtual model with the target cutting block to generate a combined model; combining the second cutting model with the combined model to generate a target virtual model.

[0133] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determining the volumes of multiple first cutting blocks; determining the weight values ​​corresponding to the multiple first cutting blocks based on the distance and volume; and determining the first cutting block corresponding to the maximum weight value among the weight values ​​corresponding to the multiple first cutting blocks as the target cutting block.

[0134] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: performing a square operation on the distance to obtain a first operation result; performing a power operation on the volume to obtain a second operation result; obtaining the ratio of the second operation result to the first operation result to obtain weight values ​​corresponding to multiple first cutting blocks.

[0135] Optionally, the processor can also be configured to perform the following steps through a computer program: determining the distance between the supporting structure and the outer surface of the concrete structure; dividing the first virtual model based on the distance to obtain a first sub-model and a second sub-model; cutting the first sub-model based on the first cutting parameter to obtain a first cutting model; and cutting the second sub-model based on the second cutting parameter to obtain a second cutting model.

[0136] In at least some embodiments of the present disclosure, a method is adopted in which a first virtual model corresponding to a concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure are obtained; the first sub-model and the second sub-model are cut to obtain a first cut model and a second cut model; based on the first cut model and the spline curve, a second virtual model corresponding to the supporting structure is generated; and the second virtual model, the first cut model and the second cut model are combined to generate a target virtual model. First, an overall model including multiple structural sub-models is generated according to the concrete structure to ensure that the generated model conforms to building materials science and improves the realism of the model. Then, the overall model is cut according to the crushing effect. At the same time, the sub-models inside the overall model are adjusted and combined according to the distortion deformation occurring when the model is broken, so that the entire crushing process is more consistent with the crushing performance of concrete in real scenes, thereby further improving the realism of the final model crushing effect, thereby solving the technical problem of poor realism of the crushing effect of generating virtual models in related technologies.

[0137] Figure 9 FIG. 1 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. Figure 9 As shown, the electronic device 900 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0138] like Figure 9 As shown, the electronic device 900 is implemented as a general-purpose computing device. Components of the electronic device 900 may include, but are not limited to, the aforementioned at least one processor 910, the aforementioned at least one memory 920, a bus 930 connecting various system components (including the memory 920 and the processor 910), and a display 940.

[0139] The memory 920 stores program code, which can be executed by the processor 910, so that the processor 910 executes the steps described in the method section of the embodiment of the present application according to various exemplary embodiments of the present disclosure.

[0140] The memory 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 9201 and / or a cache memory unit 9202, and may further include a read-only memory unit (ROM) 9203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0141] In some examples, the memory 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205. Such program modules 9205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The memory 920 may further include a memory remotely located relative to the processor 910. These remote memories may be connected to the electronic device 900 via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0142] Bus 930 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus to processor 910, or any of a variety of bus architectures.

[0143] The display 940 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 900 .

[0144] Optionally, the electronic device 900 may also communicate with one or more external devices 1000 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 900, and / or any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 960. Figure 9 As shown, the network adapter 960 communicates with other modules of the electronic device 900 via the bus 930. Figure 9 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0145] The electronic device 900 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.

[0146] It can be understood by those skilled in the art that Figure 9 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 9 More or fewer components than shown, or with Figure 1 The memory 920 may be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the method for generating a virtual model in the embodiments of the present disclosure. The processor 910 executes the computer program stored in the memory 920 to perform various functional applications and data processing, thereby implementing the aforementioned method for generating a virtual model.

[0147] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.

[0148] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0150] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.

[0151] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0153] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.

Claims

1. A method for generating a virtual model, characterized in that: include: Obtaining a first virtual model corresponding to the concrete structure and a spline curve corresponding to a supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model being used to represent the sub-model corresponding to the supporting structure, and the second sub-model being used to represent sub-models in the first virtual model other than the first sub-model; Cutting the first sub-model and the second sub-model to obtain a first cut model and a second cut model, wherein the first cut model includes a plurality of first cut blocks, and the second cut model includes a plurality of second cut blocks; generating a second virtual model corresponding to the support structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model; The second virtual model, the first cutting model and the second cutting model are combined to generate a target virtual model.

2. The method according to claim 1, characterized in that Generating a second virtual model corresponding to the support structure based on the first cutting model and the spline curve includes: Scaling the first cutting model to obtain a scaled model; Clipping the spline curve based on the scaled model to obtain a clipped spline curve, wherein the clipped spline curve is located outside the scaled model; The second virtual model is generated based on the trimmed spline curve.

3. The method according to claim 2, characterized in that Clipping the spline curve based on the scaled model to obtain the clipped spline curve includes: Performing an intersection check on the spline curve and the scaled model to determine a target line segment in the spline curve that is located inside the scaled model; The target line segment is removed from the spline curve to obtain the clipped spline curve.

4. The method according to claim 3, characterized in that Performing an intersection check on the spline curve and the scaled model to determine a target line segment in the spline curve located inside the scaled model includes: Obtaining the starting point and ending point of each line segment in the spline curve; Determining a starting position of the starting point in the scaled model and an ending position of the ending point in the scaled model; The target line segment in the spline curve is determined based on the starting position and the ending position.

5. The method according to claim 4, characterized in that Determining the target line segment in the spline curve based on the starting position and the ending position includes: Determining the length of each line segment based on the starting position and the ending position; Filtering a preset line segment from the spline curve based on the length of each line segment, wherein the length of the preset line segment is greater than or equal to a preset length; The target line segment among the preset line segments is determined.

6. The method according to claim 1, characterized in that Combining the second virtual model, the first cutting model, and the second cutting model to generate a target virtual model includes: determining a distance between the second virtual model and each first cutting block; Determining a target cutting block corresponding to the second virtual model from the plurality of first cutting blocks based on the distance; combining the second virtual model with the target cut block to generate a combined model; The second cutting model is combined with the combined model to generate the target virtual model.

7. The method according to claim 6, characterized in that Determining a target cutting block corresponding to the second virtual model from the plurality of first cutting blocks based on the distance includes: determining volumes of the plurality of first cutting blocks; Determining weight values ​​corresponding to the plurality of first cutting blocks based on the distance and the volume; A first cutting block corresponding to a maximum weight value among the weight values ​​corresponding to the plurality of first cutting blocks is determined as the target cutting block.

8. The method according to claim 7, characterized in that Determining weight values ​​corresponding to the plurality of first cutting blocks based on the distance and the volume includes: Performing a square operation on the distance to obtain a first operation result; performing a power operation on the volume to obtain a second operation result; A ratio of the second operation result to the first operation result is obtained to obtain weight values ​​corresponding to the plurality of first cut blocks.

9. The method according to claim 1, characterized in that Cutting the first sub-model and the second sub-model to obtain a first cut model and a second cut model, including: determining a distance between the support structure and an outer surface of the concrete structure; Splitting the first virtual model based on the distance to obtain the first sub-model and the second sub-model; Cutting the first sub-model based on first cutting parameters to obtain the first cut model; The second sub-model is cut based on the second cutting parameter to obtain the second cut model.

10. A device for generating a virtual model, characterized in that: include: an acquisition module, configured to acquire a first virtual model corresponding to the concrete structure and a spline curve corresponding to the supporting structure inside the concrete structure, wherein the first virtual model includes: a first sub-model and a second sub-model, the first sub-model being configured to represent the sub-model corresponding to the supporting structure, and the second sub-model being configured to represent sub-models of the first virtual model other than the first sub-model; a cutting module, configured to cut the first sub-model and the second sub-model to obtain a first cutting model and a second cutting model, wherein the first cutting model includes a plurality of first cutting blocks, and the second cutting model includes a plurality of second cutting blocks; a first generating module, configured to generate a second virtual model corresponding to the support structure based on the first cutting model and the spline curve, wherein the second virtual model is located outside the first cutting model; The second generating module is configured to combine the second virtual model, the first cutting model and the second cutting model to generate a target virtual model.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 9 when executed by a processor.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • An indoor post-earthquake three-dimensional virtual scene construction method considering non-structural components

    CN109918710A

  • Reinforced concrete column seismic failure mode probability model and probability prediction method thereof

    CN112883463A