Three-dimensional model hole digging method, device, equipment and storage medium
By generating hole outlines and hole outline regions on a 3D solid model, and directly generating hole walls using a 3D extended modeling method, the inefficient Boolean algorithm problem in existing technologies is solved, and convenient interaction for efficiently generating through-hole and blind-hole models is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG SANWEIJIA INFORMATION TECH CO LTD
- Filing Date
- 2022-09-29
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies use Boolean algorithms to generate holes in building information modeling, resulting in low efficiency and difficult interaction methods, making it difficult to efficiently generate through-hole and blind hole models.
By generating hole outlines and hole outline regions on the target surface of a 3D solid model, and directly generating hole walls using a 3D extended modeling method, Boolean operations are avoided, improving drilling efficiency and ease of interaction.
It achieves efficient generation of 3D hole models, avoids a large number of intersection calculations, improves hole excavation efficiency and interactive convenience, and is suitable for constructing various complex types of holes.
Smart Images

Figure CN115512069B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of building information modeling technology, and more specifically, to a method, apparatus, device, and storage medium for drilling holes in a three-dimensional model. Background Technology
[0002] Building Information Modeling (BIM) is a set of processes for creating a 3D digital representation of a building and applying that representation to construction projects (e.g., buildings, roads, and bridges). In the field of BIM technology, there are many scenarios where it is necessary to generate holes in a solid model, such as creating openings for windows and doors in a wall model. If the hole penetrates the entire solid model, it is called a through hole; if it does not penetrate the entire model, it is called a blind hole.
[0003] Currently, the existing technology to achieve this requirement generally uses Boolean algorithms: at the location where a hole needs to be drilled in the wall, first create a solid model of the same size as the hole, and then subtract the hole solid model from the wall model to obtain a wall with a hole. However, this algorithm involves a large number of intersection operations, which is inefficient, difficult to implement, and not conducive to interaction. Summary of the Invention
[0004] In view of this, the purpose of this application embodiment is to provide a building information modeling method, apparatus, device and storage medium, which directly generates hole outlines and hole outline regions on the constructed three-dimensional solid model, and then directly generates the final blind hole model or through hole model, thereby improving efficiency and solving the above-mentioned technical problems of "involving a large number of intersection operations, low efficiency, difficult implementation and not conducive to interaction".
[0005] In a first aspect, embodiments of this application provide a method for drilling holes in a three-dimensional model. The method includes: generating a hole outline and a hole outline region on a target surface of a three-dimensional solid model; wherein the three-dimensional solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes; performing three-dimensional expansion based on the hole outline and the hole outline region to generate a hole wall surface inside the three-dimensional solid model; and combining the hole wall surface and the three-dimensional solid model to obtain a target hole model.
[0006] In the above implementation process, hole outlines and hole outline regions are directly generated on the constructed three-dimensional solid model. Three-dimensional hole walls are formed inside the solid model using three-dimensional extended modeling techniques. The two are combined to generate the final blind hole model or through hole model. That is, the target hole model is generated by directly editing the solid model, avoiding a large number of Boolean operations, thereby avoiding a large number of intersection calculations, improving hole drilling efficiency, and making the interaction more intuitive and convenient.
[0007] Optionally, generating the hole outline and hole outline region on the target surface of the three-dimensional solid model includes: drawing a two-dimensional graphic of the closed outline; projecting the two-dimensional graphic onto the target surface of the three-dimensional solid model to obtain a projection region on the target surface; determining the outer edge line of the projection region as the hole outline; and determining the projection region as the hole outline region.
[0008] In the above implementation process, firstly, the polygonal shape of the target hole model to be generated is drawn. Then, a projection modeling method is used to project this polygon onto the target surface of the 3D solid model, thereby forming a projection area of the same size as the polygon on the target surface. Finally, the generated hole outline can be determined by the outer edge line of the projection area, and the generated hole outline region can be determined by the projection area. The above-mentioned projection graphic modeling method for generating the hole outline region and hole outline on the target surface is convenient, fast, intuitive, and improves the efficiency of hole drilling modeling.
[0009] Optionally, generating the hole outline and hole outline region on the target surface of the three-dimensional solid model includes: generating the hole outline by drawing the hole outline on the target surface of the three-dimensional solid model; and determining the area surrounded by the drawn hole outline on the target surface as the hole outline region.
[0010] In the above implementation process, compared with the projection-based graphical modeling method, the direct drawing-based graphical modeling method can further improve the efficiency of target hole model construction by generating hole outlines and hole outline regions.
[0011] Optionally, the target hole model includes: a through-hole model; the step of three-dimensionally expanding based on the hole outline and hole outline region to generate a hole wall within the three-dimensional solid model includes: generating opposing hole outlines and opposing hole outline regions on opposing surfaces of the three-dimensional solid model; wherein, the opposing surface is any surface among the plurality of curved surfaces or planes other than the target surface and its adjacent surfaces; deleting the hole outline region and the opposing hole outline region; and lofting within the three-dimensional solid model based on the deleted hole outline and opposing hole outline to obtain the hole wall of the through-hole model.
[0012] In the above implementation process, a three-dimensional hole wall between two contour lines is generated by using a lofting graphical modeling method, and then the various surfaces are combined to form a complete through hole model. Compared with the Boolean operation algorithm, a large number of intersection calculations are avoided, and the interaction method is more intuitive and convenient.
[0013] Optionally, the opposing hole profile line has a different shape from the hole profile line.
[0014] In the above implementation process, the lofting graphic modeling method is used to generate hole walls based on two hole positions with different contour shapes, which is conducive to the construction of various complex types of through hole models, thereby increasing the applicable scenarios of this hole-digging method.
[0015] Optionally, the target hole model includes a blind hole model; the step of three-dimensionally expanding the hole contour line and the hole contour region to generate a hole wall within the three-dimensional solid model includes: offsetting the hole contour region along the hole depth direction within the three-dimensional solid model by a distance; wherein the distance is the blind hole depth value; and stretching the hole contour line towards the offset hole contour region to obtain the hole wall of the blind hole model.
[0016] In the above implementation process, a three-dimensional hole wall surface in the depth direction of the contour line is generated by using a stretched graphic modeling method, and then the various surfaces are combined to form a complete blind hole model. Compared with the Boolean operation algorithm, a large number of intersection calculations are avoided, and the interaction method is more intuitive and convenient.
[0017] Optionally, the three-dimensional solid model includes: a wall model; the target hole model includes: a window hole model.
[0018] In the above implementation process, the three-dimensional hole wall between the inner wall and outer wall of the wall model is generated by using the lofting graphic modeling method. Then, the various surfaces are combined to form a complete window hole model. Compared with the Boolean operation algorithm, a large number of intersection calculations are avoided, which improves the efficiency of hole excavation modeling.
[0019] Secondly, embodiments of this application provide a three-dimensional model drilling device, the device comprising: a hole contour generation module, used to generate hole contour lines and hole contour regions on a target surface of a three-dimensional solid model; wherein, the three-dimensional solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes; a hole wall generation module, used to perform three-dimensional expansion based on the hole contour lines and hole contour regions to generate hole wall surfaces inside the three-dimensional solid model; and a hole generation module, used to combine the hole wall surfaces and the three-dimensional solid model to obtain a target hole model.
[0020] Thirdly, embodiments of this application also provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the above-described method.
[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.
[0022] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a method for drilling holes in a three-dimensional model, as provided in this application embodiment;
[0025] Figure 2 This is a schematic diagram of the functional modules of the three-dimensional model drilling device provided in the embodiments of this application;
[0026] Figure 3 A block diagram of an electronic device that provides a three-dimensional model drilling device for embodiments of this application.
[0027] Icons: 210-Hole contour generation module; 220-Hole wall generation module; 230-Hole generation module; 300-Electronic device; 311-Memory; 312-Memory controller; 313-Processor; 314-Peripheral interface; 315-Input / output unit; 316-Display unit. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0029] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0030] Boolean operations are a method of logical deduction using symbolic representations of numbers, including union, intersection, and subtraction. This logical operation method is used in graphics processing to combine simple basic graphics to create new shapes, and has evolved from two-dimensional Boolean operations to three-dimensional Boolean operations. Due to Boole's special contribution to symbolic logic operations, many computer languages refer to logical operations as Boolean operations, and their results as Boolean values.
[0031] The inventors of this application noted that in 3D modeling design, intersection, union, and difference operations on models are generally implemented using Boolean operations. The first technically considered implementation for drilling holes in a 3D model is to use Boolean operations. This involves using the hole location information to generate a temporary model of the same size as the hole, and then subtracting the temporary model from the target model using Boolean operations to obtain the desired result. This method has the following drawbacks: (1) Boolean algorithms are inefficient because they involve a large number of intersection operations on points, lines, and surfaces, as well as spatial searches, inevitably leading to low efficiency. If multiple walls in a scene need to have their window and door holes generated, the operation will be very cumbersome and time-consuming; (2) Interactive implementation is difficult because an intermediate model of the hole location needs to be generated during the process, making interactive implementation difficult. Based on the above research, this application uses a direct model editing method to generate hole locations, avoiding Boolean operations, thus avoiding a large number of intersection calculations, and making the interactive method more intuitive and convenient.
[0032] Specifically, this application provides a method for drilling holes in a three-dimensional model, as described below:
[0033] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for drilling holes in a three-dimensional model, as provided in an embodiment of this application. The method may include steps 100, 120, and 140.
[0034] Step 100: Generate hole outline and hole outline region on the target surface of the 3D solid model; wherein, the 3D solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes;
[0035] Step 120: Perform a three-dimensional expansion based on the hole outline and hole outline region to generate the hole wall surface inside the three-dimensional solid model;
[0036] Step 140: Combine the hole wall surface and the 3D solid model to obtain the target hole model.
[0037] For example, a 3D solid model can be a regular cube model, sphere model, prism model, pyramid model, or other basic model, or it can be an irregular hybrid solid model that contains multiple basic models. Specifically, a 3D solid model can be a cube model composed of multiple planes, a sphere model composed of one or more curved surfaces, or a hybrid closed model such as a prism model or pyramid model composed of some planes and some curved surfaces. In computers, a cube solid model is generally described as a hollow box, which is a closed region composed of six faces. Each face can be divided into a front and a back; therefore, the target face here can refer to the face where the current hole is added. The hole outline region can be a two-dimensional graphic on a plane of a regular 3D solid model, or a 3D graphic on a curved surface or a hybrid surface of curved surfaces and planes of an irregular 3D solid model. The hole outline can be the edge line of the figure where the hole outline area is located. The shape of the hole outline can be a circular hole, a square hole, or a pentagonal hole. It can be uniformly described by a polygon. Specifically, it can be a closed line. This closed outline can be a closed figure formed by multiple straight lines, a closed figure formed by a single or multiple curves, or a closed figure formed by a mixture of straight lines and curves.
[0038] 3D expansion can be a modeling technique that generates a 3D annular hole wall by directional scaling based on the hole outline or hole outline region, such as lofting or extrusion. Combining can be a modeling technique that combines the generated 3D hole wall with a 3D solid model to form a complete 3D hole model, such as stitching.
[0039] After constructing any regular or irregular 3D solid model, a hole outline and corresponding hole outline region are generated on a curved surface or a hybrid surface of curved and planar surfaces within the 3D solid model. On the target surface of the model where the hole needs to be generated, a polygon with the hole outline is generated. This polygon divides the surface into two parts: an outer surface with the hole (the target surface without the hole outline region) and an inner surface of the same size as the hole (the hole outline region). After directional extrusion or lofting along the target surface perpendicular to the polygon, a hole wall with a cross-sectional size equal to the hole outline is generated. Finally, the hole wall is stitched to the faces of the 3D solid model to form a 3D extruded hole model. This method of generating hole positions by directly editing the model avoids Boolean operations, thus avoiding a large number of intersection calculations, and the interactive method is more intuitive and convenient.
[0040] In one embodiment, step 100 may include steps 101, 102, 103, and 104.
[0041] Step 101: Draw a two-dimensional graphic of a closed outline;
[0042] Step 102: Project the two-dimensional graphic onto the target surface of the three-dimensional solid model to obtain the projection area on the target surface;
[0043] Step 103: Determine the outer edge line of the projection area as the hole outline;
[0044] Step 104: Define the projection area as the hole contour area.
[0045] For example, projection can be the process of projecting the shape of an object onto a plane using a set of rays, and the resulting image on that plane is also called a "projection". Projections can be divided into orthographic projection and oblique projection. Orthographic projection is in which the center line of the projection rays is perpendicular to the projection plane, while oblique projection is in which the center line of the projection rays is not perpendicular to the projection plane.
[0046] For generating hole outline regions and hole outlines of closed polygons—which can be 2D graphics on a plane of a regular 3D solid model or 3D graphics on a curved surface or a hybrid surface of curved and flat surfaces of an irregular 3D solid model—a projection method can be used. First, the polygonal shape of the target hole model to be generated can be drawn in a blank area of the BIM modeling environment. Then, projection modeling is used to project this polygon onto the target surface of the 3D solid model, thus forming a projection area of the corresponding size of the polygon on the target surface. The final hole outline is determined by the outer edge of the projection area, and the generated hole outline region is determined by the projection area. Using the projection graphic modeling method to generate hole outline regions and hole outlines on the target surface is convenient, fast, intuitive, and improves the efficiency of hole excavation modeling.
[0047] In one embodiment, step 100 may include steps 105 and 106.
[0048] Step 105: Generate the hole outline by drawing the hole outline on the target surface of the 3D solid model;
[0049] Step 106: Define the area enclosed by the drawn hole outline on the target surface as the hole outline region.
[0050] For example, for the generation of hole outline regions and closed polygon hole outlines of 3D graphics that can be either 2D graphics on a plane of a regular 3D solid model or 3D graphics on a curved surface or a hybrid surface of curved and flat surfaces of an irregular 3D solid model, in addition to projection methods, direct drawing methods can also be used. In a BIM modeling environment, a 3D solid model is constructed, and then the hole outline polygons are drawn directly on the target surface determined by the 3D solid model. The generated hole outline can then be directly determined by these hole outline polygons, and the generated hole outline region can be determined by the closed region surrounded by these hole outline polygons. Compared to the projection-based graphical modeling method, the direct drawing graphical modeling method for generating hole outlines and hole outline regions can further improve the efficiency of target hole model construction.
[0051] In one embodiment, the target hole model includes: a through hole model; step 120 may include: step 121, step 122 and step 123.
[0052] Step 121: Generate the outline of the opposing hole and the outline region of the opposing hole on the opposing surface of the 3D solid model; wherein, the opposing surface is any surface among multiple curved surfaces or planes other than the target surface and the adjacent surface of the target surface;
[0053] Step 122: Delete the hole outline area and the opposite hole outline area;
[0054] Step 123: Based on the deleted hole outline and the opposite hole outline, perform lofting inside the 3D solid model to obtain the hole wall surface of the through hole model.
[0055] For example, lofting can be used to create complex 3D objects by using a 2D shape as a cross-section along a path. Different shapes can be assigned to different segments along the same path, thus allowing for the construction of more 3D models. In 3ds Max, lofting is a method for converting 2D graphics into 3D graphic modeling. Similar methods include extrude, lathe, and bevel.
[0056] Since the final target hole model is a through hole, the same method used in steps 101-104 or 105-106 above to generate the hole outline and hole outline region is first applied to generate the opposite hole outline and opposite hole outline region on any opposing face (opposite face) of the target surface. Then, using the inner ring outlines of the two faces with the hole generated, a lofting technique is used to generate the hole wall surface of the through hole. Finally, the faces are stitched together to obtain the final through hole model. By using a lofting graphical modeling method to generate the three-dimensional hole wall surface between two outlines, and then combining the various faces to form a complete through hole model, compared with Boolean operation algorithms, a large number of intersection calculations are avoided, and the interactive method is more intuitive and convenient.
[0057] In one embodiment, the opposing hole profile line has a different shape from the hole profile line.
[0058] For example, since lofting can be an algorithm that forms the pipe wall based on the shapes of both ends, the pipe wall can be generated even if the contour shapes are inconsistent. The two end faces of the through-hole model generated in steps 121-123 above can have different shapes. For example, the hole contour line can be a circular hole, and the opposite hole contour line can be a circular hole, a square hole, or a hole of other shapes. Using the lofting graphical modeling method to generate the hole wall based on two hole positions with different contour shapes is beneficial for constructing various complex types of through-hole models, thereby increasing the applicability of this hole-digging method.
[0059] In one embodiment, the target hole model includes a blind hole model; step 120 may further include steps 124 and 125.
[0060] Step 124: Offset the hole contour region along the hole depth direction within the 3D solid model by a certain distance; where the distance is the blind hole depth value;
[0061] Step 125: Stretch the hole outline towards the offset hole outline region to obtain the hole wall surface of the blind hole model.
[0062] For example, similar to lofting, stretching can be a graphical modeling method that uses a two-dimensional object as a cross-section along a certain path and stretches it a certain distance to form a corresponding three-dimensional object.
[0063] Since the final target hole model is a blind hole, the hole contour region generated in steps 101-104 or 105-106 is first offset along the depth direction of the hole by a distance equal to the hole depth. Then, the hole contour line generated in steps 101-104 or 105-106 is stretched along the depth direction of the hole by a distance equal to the hole depth, thus obtaining the hole wall surface of the blind hole. Finally, the surfaces are stitched together to obtain the final blind hole model. By using a stretched graphic modeling method to generate the three-dimensional hole wall surface along the depth direction of the contour line, and then combining the various surfaces to form a complete blind hole model, a large number of intersection calculations are avoided compared to Boolean operation algorithms, and the interaction method is more intuitive and convenient.
[0064] In one embodiment, the three-dimensional solid model includes: a wall model; the target hole model includes: a window hole model.
[0065] For example, the 3D solid model can be a common wall model, and the target hole model can be a window hole. A window hole is generated on the wall model. Since the window hole is a through hole in the wall, the outline polygon of the window hole is generated at corresponding positions on the inner and outer wall surfaces. The hole is generated on both the inner and outer wall surfaces. Then, using the edge lines of the hole on the inner and outer wall surfaces, a lofting technique is used to generate the hole wall. Finally, the surfaces are stitched together to obtain the wall model with the window hole. By using a lofting graphical modeling method to generate the 3D hole wall between the inner and outer wall surfaces of the wall model, and then combining the various surfaces to form a complete window hole model, compared to Boolean operation algorithms, a large number of intersection calculations are avoided, improving the efficiency of hole-cutting modeling.
[0066] Please see Figure 2 , Figure 2 This is a functional module diagram of a three-dimensional model hole-drilling device provided in an embodiment of this application. The device includes: a hole contour generation module 210, a hole wall generation module 220, and a hole generation module 230.
[0067] Hole contour generation module 210 is used to generate hole contour lines and hole contour regions on the target surface of a three-dimensional solid model; wherein, the three-dimensional solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes.
[0068] Hole wall generation module 220 is used to perform three-dimensional expansion based on hole contour lines and hole contour regions to generate hole wall surfaces inside the three-dimensional solid model.
[0069] Hole generation module 230 is used to combine the hole wall surface and the three-dimensional solid model to obtain the target hole model.
[0070] Optionally, the hole contour generation module 210 can be used for:
[0071] Draw a two-dimensional graphic with a closed outline;
[0072] Projecting a two-dimensional graphic onto the target surface of a three-dimensional solid model yields the projection area on the target surface.
[0073] The outer edge of the projection area is defined as the hole outline;
[0074] The projection area is defined as the hole contour area.
[0075] Optionally, the hole contour generation module 210 can be used for:
[0076] The hole outline is generated by drawing the hole outline on the target surface of the 3D solid model;
[0077] The area enclosed by the drawn hole outline on the target surface is defined as the hole outline region.
[0078] Optionally, the target hole model includes: a through-hole model; the hole wall generation module 220 can be used for:
[0079] Generate opposing hole outlines and opposing hole outline regions on the opposing surfaces of the 3D solid model; wherein, the opposing surface is any surface among multiple curved surfaces or planes other than the target surface and its adjacent surfaces.
[0080] Delete the hole outline region and the opposite hole outline region;
[0081] Based on the deleted hole outline and the opposing hole outline, a loft is performed inside the 3D solid model to obtain the hole wall surface of the through hole model.
[0082] Optionally, the shape of the opposing hole profile line is different from that of the hole profile line.
[0083] Optionally, the target hole model includes: a blind hole model; the hole wall generation module 220 can be used for:
[0084] Offset the hole outline region along the hole depth direction within the 3D solid model by a certain distance; where the distance is the blind hole depth value.
[0085] The hole contour line is stretched in the direction of the offset hole contour area to obtain the hole wall surface of the blind hole model.
[0086] Optionally, the three-dimensional solid model includes: a wall model; the target hole model includes: a window hole model.
[0087] Please see Figure 3 , Figure 3This is a block diagram of an electronic device. The electronic device 300 may include a memory 311, a memory controller 312, a processor 313, a peripheral interface 314, an input / output unit 315, and a display unit 316. Those skilled in the art will understand that... Figure 3 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 300. For example, the electronic device 300 may also include components that are more... Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown.
[0088] The aforementioned memory 311, memory controller 312, processor 313, peripheral interface 314, input / output unit 315, and display unit 316 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The aforementioned processor 313 is used to execute executable modules stored in the memory.
[0089] The memory 311 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 311 stores programs, and the processor 313 executes these programs upon receiving execution instructions. The methods executed by the electronic device 300, as defined in any embodiment of this application, can be applied to or implemented by the processor 313.
[0090] The aforementioned processor 313 may be an integrated circuit chip with signal processing capabilities. The processor 313 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0091] The peripheral interface 314 described above couples various input / output devices to the processor 313 and the memory 311. In some embodiments, the peripheral interface 314, the processor 313, and the memory controller 312 can be implemented in a single chip. In other instances, they can be implemented by separate chips.
[0092] The input / output unit 315 described above is used to provide user input data. The input / output unit 315 may be, but is not limited to, a mouse and keyboard.
[0093] The aforementioned display unit 316 provides an interactive interface (e.g., a user interface) for the user to reference between the electronic device 300 and the user. In this embodiment, the display unit 316 may be a liquid crystal display (LCD) or a touch screen display. The LCD or touch screen display can show the process of the processor executing the program.
[0094] The electronic device 300 in this embodiment can be used to perform the various steps in the various methods provided in the embodiments of this application.
[0095] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps described in the above method embodiments.
[0096] The computer program product of the above-described method provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps in the above-described method embodiments. For details, please refer to the above-described method embodiments, which will not be repeated here.
[0097] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms. The functional modules in the embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0098] It should be noted that if the function is implemented as a software module 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 this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0099] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0100] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for drilling holes in a three-dimensional model, characterized in that, The method includes: A hole outline and a hole outline region are generated on the target surface of a three-dimensional solid model; wherein, the three-dimensional solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes; the three-dimensional solid model is an irregular three-dimensional solid model; the hole outline region is a three-dimensional graphic on a curved surface or a mixture of curved surfaces and planes in the irregular three-dimensional solid model; Based on the hole outline and hole outline region, a three-dimensional expansion is performed to generate the hole wall surface inside the three-dimensional solid model; The target hole model is obtained by combining the hole wall surface and the three-dimensional solid model; The target hole model includes: a through-hole model; The step of expanding the hole contour line and hole contour region in three dimensions to generate the hole wall surface within the three-dimensional solid model includes: Generate opposing hole outlines and opposing hole outline regions on the opposing surface of the three-dimensional solid model; wherein, the opposing surface is any surface among the plurality of curved surfaces or planes other than the target surface and the adjacent surface of the target surface; Delete the hole outline region and the opposing hole outline region; Based on the deleted hole outline and the opposing hole outline, a loft is performed inside the three-dimensional solid model to obtain the hole wall surface of the through hole model. Wherein, the shape of the opposing hole outline is different from that of the hole outline; The target hole model includes a blind hole model; the step of expanding the hole contour line and hole contour region in three dimensions to generate a hole wall within the three-dimensional solid model includes: The hole contour region is offset within the three-dimensional solid model by a certain distance along the hole depth direction; wherein, the magnitude of the distance is the blind hole depth value; The hole contour line is stretched in the direction of the offset hole contour region to obtain the hole wall surface of the blind hole model.
2. The method according to claim 1, characterized in that, The process of generating hole contour lines and hole contour regions on the target surface of the three-dimensional solid model includes: Draw a two-dimensional graphic with a closed outline; The two-dimensional graphic is projected onto the target surface of the three-dimensional solid model to obtain the projection area on the target surface; The outer edge line of the projection area is defined as the hole outline line; The projection area is defined as the hole contour area.
3. The method according to claim 1, characterized in that, The process of generating hole contour lines and hole contour regions on the target surface of the three-dimensional solid model includes: The hole contour line is generated by drawing the hole contour line on the target surface of the three-dimensional solid model; The area enclosed by the drawn hole outline on the target surface is defined as the hole outline region.
4. The method according to any one of claims 1-3, characterized in that, in, The three-dimensional solid model includes: a wall model; the target hole model includes: a window hole model.
5. A three-dimensional model drilling device, characterized in that, The device includes: The hole contour generation module is used to generate hole contour lines and hole contour regions on the target surface of a three-dimensional solid model; wherein, the three-dimensional solid model is a closed region formed by multiple curved surfaces or planes, and the target surface is one of the multiple curved surfaces or planes; The hole wall generation module is used to perform three-dimensional expansion based on the hole outline and hole outline region to generate hole wall surfaces inside the three-dimensional solid model. The hole generation module is used to combine the hole wall surface and the three-dimensional solid model to obtain the target hole model; The target hole model includes: a through-hole model; The hole wall generation module is specifically used for: Generate opposing hole outlines and opposing hole outline regions on the opposing surface of the three-dimensional solid model; wherein, the opposing surface is any surface among the plurality of curved surfaces or planes other than the target surface and the adjacent surface of the target surface; Delete the hole outline region and the opposing hole outline region; Based on the deleted hole outline and the opposing hole outline, a loft is performed inside the three-dimensional solid model to obtain the hole wall surface of the through hole model. Wherein, the shape of the opposing hole outline is different from that of the hole outline; The target hole model includes: a blind hole model; The hole wall generation module is specifically used for: The hole contour region is offset within the three-dimensional solid model by a certain distance along the hole depth direction; wherein, the magnitude of the distance is the blind hole depth value; The hole contour line is stretched in the direction of the offset hole contour region to obtain the hole wall surface of the blind hole model.
6. An electronic device, characterized in that, include: The processor and memory, wherein the memory stores machine-readable instructions executable by the processor, wherein when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 4.