Three-dimensional model modeling method and device, storage medium and electronic equipment
By constructing and transforming implicit functions, generating mathematical trees and executing them to generate 3D model files, the existing implicit surface modeling methods solve the problems of performance bottlenecks and poor user interaction when dealing with complex or large models, and achieve more efficient, accurate and easy-to-interact 3D modeling.
Patent Information
- Application Number
- CN202510302283.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing implicit surface modeling methods have performance bottlenecks when dealing with complex or large three-dimensional models, and are not easy to integrate into computer-aided design (CAD) systems, with poor user interactivity.
By obtaining the three-dimensional model described by the triangular facet, building implicit functions, and converting them into a math tree, executing the math tree to generate a two-dimensional image file or a three-dimensional model file, optimizing implicit function processing and post-processing to improve model quality and rendering.
It improves the efficiency and accuracy of three-dimensional model modeling, reduces computing and storage costs, enhances user interaction and integration, and promotes the application of implicit surface modeling technology in the fields of industrial design and manufacturing.
Smart Images

Figure CN119810342A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a three-dimensional modeling method, device, storage medium and electronic device. Background Art
[0002] In traditional computer-aided design, modeling of various complex shapes usually relies on explicit geometric representation, such as polygonal meshes. Although this explicit representation method is widely used in many applications, it has many inherent limitations. As an alternative, implicit surface modeling provides a more flexible and accurate geometric representation by defining shapes through mathematical functions. Implicit surface modeling can better handle topological changes, perform accurate geometric operations, and has higher efficiency when processing large-scale data.
[0003] However, implicit surface modeling requires efficient kernel devices to implement, which need to be able to process complex mathematical expressions, perform efficient Boolean operations, and convert implicit functions into explicit geometric data that can be used for rendering and manufacturing. Although there are some implicit surface modeling software, the implicit surface modeling methods used often have performance bottlenecks, especially when dealing with complex or large models. In addition, these methods also have certain difficulties in user interaction and integration into existing Computer Aided Design (CAD) workflows.
[0004] Therefore, how to achieve implicit modeling with higher efficiency and accuracy and more intuitive user interaction is an urgent problem to be solved. Summary of the invention
[0005] The present specification provides a three-dimensional modeling method, device, storage medium and electronic device to at least partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions: This specification provides a three-dimensional modeling method, including: Acquire an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets; Constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model; Converting the implicit function into a mathematical tree; The mathematical tree is executed to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
[0007] Optionally, constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model specifically includes: Sampling the triangular patch data describing the target three-dimensional model to obtain point cloud data describing the target three-dimensional model; An implicit function of the target three-dimensional model is constructed according to the point cloud data.
[0008] Optionally, converting the implicit function into a mathematical tree specifically includes: Decomposing the implicit function into steps to obtain a number of calculation steps; A mathematical tree is constructed with the calculation operations included in the calculation steps as nodes and the operands involved in the calculation operations as edges.
[0009] Optionally, before executing the mathematical tree, the method further includes: The mathematical tree is structurally designed according to a pre-built operator library, and the structural design at least includes a shelling operation and a filling operation.
[0010] Optionally, the operator library is a constructed entity set CSG operator library, and the CSG operator library includes at least basic model operators, geometric transformation algorithm operators, and CSG operation algorithm operators.
[0011] Optionally, executing the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model specifically includes: Rendering the mathematical tree using a renderer to obtain a two-dimensional image file of the target three-dimensional model; and / or, The mathematical tree is processed by a decoder to obtain a three-dimensional model file of the target three-dimensional model.
[0012] Optionally, the three-dimensional model file includes at least one of an stl file and an stp file.
[0013] This specification provides a three-dimensional modeling device, the device comprising: An acquisition module, used for acquiring an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets; A construction module, used for constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model; A conversion module, used for converting the implicit function into a mathematical tree; An execution module is used to execute the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
[0014] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned three-dimensional modeling method is implemented.
[0015] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned three-dimensional modeling method when executing the program.
[0016] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects: In the three-dimensional modeling method provided in the present specification, an original file of a target three-dimensional model to be modeled is obtained, wherein the original file describes the target three-dimensional model through triangular facets; an implicit function of the target three-dimensional model is constructed according to the triangular facets of the target three-dimensional model; the implicit function is converted into a mathematical tree; and the mathematical tree is executed to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
[0017] When the target three-dimensional model is modeled by the three-dimensional model modeling method provided in this specification, the mesh data describing the target three-dimensional model can be first converted into an implicit function, and an easy-to-process mathematical tree can be obtained according to the implicit function, and finally the target three-dimensional model is modeled according to the mathematical tree to obtain the required output file. This method can be used to improve the quality and rendering effect of the generated three-dimensional model by optimizing the processing and post-processing of the implicit function, while reducing the calculation and storage costs. At the same time, this method is easy to integrate into the existing CAD system, provides more intuitive user interaction and a wider range of applications, and helps to promote the application of implicit surface modeling technology in the field of industrial design and manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings: Figure 1 A schematic diagram of a three-dimensional modeling method in this specification; Figure 2 A schematic diagram of a mathematical tree provided in this specification; Figure 3 A schematic diagram of a three-dimensional modeling device provided in this specification; Figure 4 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0019] For traditional CAD modeling, explicit geometric representation has difficulty in handling complex topological changes, which limits design flexibility and complexity. Secondly, explicit geometric representation is inefficient and prone to errors when performing precise geometric operations, such as Boolean operations and deformations. In addition, explicit geometric representation has high computational and storage costs when processing large-scale data, which is particularly evident when processing complex or large models. Therefore, implicit modeling is often used to replace traditional explicit modeling methods. However, implicit surface modeling requires efficient kernel devices to implement, which need to be able to process complex mathematical expressions, perform efficient Boolean operations, and convert implicit functions into explicit geometric data that can be used for rendering and manufacturing. The methods used in various implicit surface modeling software known at this stage have certain performance bottlenecks and are not easy to integrate into CAD systems.
[0020] To solve the above problems, this specification provides a three-dimensional modeling method that has stronger performance and is easier to integrate and interact with.
[0021] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0023] Figure 1 The following is a flow chart of a three-dimensional modeling method in this specification, which specifically includes the following steps: S100: Acquire an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets.
[0024] All steps in the three-dimensional model building method provided in this specification can be implemented by any electronic device with computing functions, such as terminals, servers and other devices.
[0025] This method is mainly used to realize the modeling of three-dimensional models of arbitrary shapes, such as various free-body parts or periodically repeated lattices, in computer-aided design software. Based on this, the original file of the target three-dimensional model to be modeled can be first obtained in this step. Before starting modeling, the design of the three-dimensional model will be completed first. This step can usually be completed by using a grid, that is, a triangular facet to describe the three-dimensional model. In the original file, there will be all the triangular facets that make up the target three-dimensional model, and each triangular facet is stored in the coordinates of the three vertices of the triangular facet. The type of the original file can be any file that can store mesh data, such as a .stl file, etc.
[0026] S102: Constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model.
[0027] After the target three-dimensional model to be modeled is obtained in step S100, an implicit function for describing the target three-dimensional model can be constructed in this step according to the triangular facets contained in the target three-dimensional model. There are many ways to express and construct the implicit function, and this specification provides a specific embodiment for reference. Specifically, the triangular facet data describing the target three-dimensional model can be sampled to obtain point cloud data describing the target three-dimensional model; and the implicit function of the target three-dimensional model can be constructed according to the point cloud data.
[0028] Before starting to construct the implicit function of the target three-dimensional model, the data contained in the original file of the target three-dimensional model can be preprocessed to a certain extent, including but not limited to file loading, data cleaning and data repair. When constructing the implicit function of the target three-dimensional model, the conversion of the triangular face data of the target three-dimensional model to the point cloud data can be completed first. Specifically, sampling can be performed in the triangular face of the target three-dimensional model to obtain a number of point data to form a point cloud. Among them, the sampling method and the number of samples can be set according to specific needs. According to the point cloud data, the signed distance field function of the target three-dimensional model can be generated as its implicit function by, for example, calculating the signed distance field (SDF). After completing the post-processing of the implicit function, such as optimization, smoothing, etc., and verifying the correctness of the implicit function, the final constructed implicit function can be output.
[0029] In addition, in the field of three-dimensional model technology, the technology for constructing implicit functions of three-dimensional models has become relatively mature. By directly inputting the original file of the target three-dimensional model into the free body encoder, the implicit function of the three-dimensional model can be automatically calculated. The calculation method and the results obtained are no different from the above method.
[0030] S104: Convert the implicit function into a mathematical tree.
[0031] In this method, the implicit function constructed in step S102 is further converted into a mathematical tree that is easy to interact and read and can be recognized by a computer. Before the conversion operation, the implicit function can first be simplified, standardized, merged or decomposed to ensure that the amount of data required to be processed in the subsequent conversion steps is minimized.
[0032] The implicit function is parsed into a mathematical tree, which is represented as a tree structure. Each node on the tree represents a mathematical operation in the implicit function, such as common addition ADD (F1+F2), subtraction SUB (F1-F2), multiplication MUL (F1×F2), division DIV (F1 / F2), square SQUARE, square root SQRT, intersection MIN (F1, F2), union MAX (F1, F2), constants (1, 2...), variables (x, y, z...), Oracle extension (can realize geometric transformations such as rotation, scaling, displacement, etc.). The left and right edges input to the node represent the left operand LHS and the right operand RHS respectively (such as F1+F2, then the left operand is F1, the right operand is F2, and the operation of the current node is "+"). The calculation is carried out in the order of subsequent traversal (left and right roots). For the abstract implicit function expression F (x, y, z), it can also be defined as a special operation node on the tree as Oracle. The characteristic of this type of operation node is that it is a leaf node. When calculating this node, the implicit function method bound to the node will be called to calculate the implicit field value, such as the signed distance field (SDF). Based on this method, geometric transformations such as rotation, scaling, and displacement can also be realized, and the result value of the node can be used as the left and right operands of other mathematical operations.
[0033] Figure 2 A possible mathematical tree diagram is provided for this specification, such as Figure 2 As shown, it shows an example of a mathematical tree obtained by converting an implicit function. The corresponding implicit function formula is as follows:
[0034] The above implicit function is split into several consecutive calculation steps, and each operand and each node are connected in series according to the original calculation order to obtain the corresponding mathematical tree. Among them, (X, Y, Z) represents the coordinate value of any point input into the implicit function, LHS represents the left operand, RHS represents the right operand, SQUARE represents the square operation, SQRT represents the square root operation, ADD represents the addition operation, SUB represents the subtraction operation, and MAX represents the union operation (taking the maximum value).
[0035] Furthermore, the generated mathematical tree can be optimized, for example, by merging subtrees with the same function, reducing redundant nodes, eliminating unnecessary calculations, standardizing the order of operations, etc., so as to improve the calculation efficiency by reducing the number of calculation steps.
[0036] Finally, the obtained mathematical tree can be output for use in subsequent steps. The mathematical tree in this method can be displayed to the user and provide the user with interactive options. The user can modify the implicit function more easily and intuitively by modifying the nodes or edges of the mathematical tree. In addition, before entering the subsequent steps, the necessary structural design of the mathematical tree can be performed. Specifically, the mathematical tree can be structurally designed according to the pre-built operator library, and the structural design at least includes shelling operations and filling operations.
[0037] Among them, the pre-designed operator library can be a constructive solid geometry (CSG) operator library, which can mainly include at least basic CAD model operators, such as sphere, cylinder, cube, etc. operators; geometric transformation algorithm operators, such as rotation, scaling, displacement, shear, etc. operators; CSG operation algorithm operators, such as intersection, difference, union, smoothing, etc. Operators in the CSG operator library can be used to complete the structural design of the mathematical tree, such as shelling, filling, and other operations.
[0038] S106: Execute the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
[0039] Finally, the mathematical tree obtained in step S104 can be executed to complete the modeling of the target three-dimensional model. Generally, when executing the mathematical tree, different output forms can be obtained according to different execution modes, including two-dimensional image files of views and attribute graphs in various directions, and three-dimensional model files describing the three-dimensional model. At the time of output, at least one of the two-dimensional image file and the three-dimensional model file can be output.
[0040] Specifically, a renderer may be used to render the mathematical tree to obtain a two-dimensional image file of the target three-dimensional model; and / or a decoder may be used to process the mathematical tree to obtain a three-dimensional model file of the target three-dimensional model.
[0041] When a renderer is used to execute a mathematical tree, on the one hand, the three-dimensional model can be rendered into a two-dimensional image through rendering processing, and finally the required two-dimensional image file is obtained. The renderer used can be a renderer with a built-in ray tracing algorithm, a ball tracing algorithm, and a large-scale parallel rendering algorithm. On the other hand, the mathematical tree can be processed by a decoder and finally saved as a three-dimensional image file. Among them, the decoder can be selected, for example, an STP decoder or an STL decoder, and a STP type three-dimensional model file or an STL type three-dimensional model file can be obtained accordingly.
[0042] When the target three-dimensional model is modeled by the three-dimensional model modeling method provided in this specification, the mesh data describing the target three-dimensional model can be first converted into an implicit function, and an easy-to-process mathematical tree can be obtained according to the implicit function, and finally the target three-dimensional model is modeled according to the mathematical tree to obtain the required output file. This method can be used to improve the quality and rendering effect of the generated three-dimensional model by optimizing the processing and post-processing of the implicit function, while reducing the calculation and storage costs. At the same time, this method is easy to integrate into the existing CAD system, provides more intuitive user interaction and a wider range of applications, and helps to promote the application of implicit surface modeling technology in the field of industrial design and manufacturing.
[0043] The above is the three-dimensional modeling method provided in this specification. Based on the same idea, this specification also provides a corresponding three-dimensional modeling device, such as Figure 3 shown.
[0044] Figure 3 A schematic diagram of a three-dimensional modeling device provided in this specification specifically includes: An acquisition module 200 is used to acquire an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets; A construction module 202, configured to construct an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model; A conversion module 204, used for converting the implicit function into a mathematical tree; The execution module 206 is used to execute the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
[0045] Optionally, the construction module 202 is specifically configured to sample the triangular patch data describing the target three-dimensional model to obtain point cloud data describing the target three-dimensional model; and construct an implicit function of the target three-dimensional model according to the point cloud data.
[0046] Optionally, the conversion module 204 is specifically used to decompose the implicit function into steps to obtain a plurality of calculation steps; and construct a mathematical tree with the calculation operations included in the calculation steps as nodes and the operands involved in the calculation operations as edges.
[0047] Optionally, the apparatus further comprises a design module 208, which is specifically used to perform structural design on the mathematical tree according to a pre-built operator library, wherein the structural design at least comprises a shelling operation and a filling operation.
[0048] Optionally, the operator library is a constructed entity set CSG operator library, and the CSG operator library includes at least basic model operators, geometric transformation algorithm operators, and CSG operation algorithm operators.
[0049] Optionally, the execution module 206 is specifically used to render the mathematical tree using a renderer to obtain a two-dimensional image file of the target three-dimensional model; and / or, process the mathematical tree using a decoder to obtain a three-dimensional model file of the target three-dimensional model.
[0050] Optionally, the three-dimensional model file includes at least one of an stl file and an stp file.
[0051] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The three-dimensional modeling method provided.
[0052] This manual also provides Figure 4 The schematic structure diagram of the electronic device shown in FIG. Figure 4 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0053] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0054] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0055] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0056] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0057] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0058] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0059] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0060] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0061] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0062] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0063] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0064] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0065] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0066] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0067] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0068] The above description is only an embodiment of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this application.
Claims
1. A three-dimensional modeling method, characterized in that: include: Acquire an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets; Constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model; Converting the implicit function into a mathematical tree; The mathematical tree is executed to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
2. The method according to claim 1, characterized in that Constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model, specifically comprising: Sampling the triangular patch data describing the target three-dimensional model to obtain point cloud data describing the target three-dimensional model; An implicit function of the target three-dimensional model is constructed according to the point cloud data.
3. The method according to claim 1, characterized in that Converting the implicit function into a mathematical tree specifically includes: Decomposing the implicit function into steps to obtain a number of calculation steps; A mathematical tree is constructed with the calculation operations included in the calculation steps as nodes and the operands involved in the calculation operations as edges.
4. The method according to claim 1, characterized in that Before executing the mathematical tree, the method further comprises: The mathematical tree is structurally designed according to a pre-built operator library, and the structural design at least includes a shelling operation and a filling operation.
5. The method according to claim 4, characterized in that The operator library is a construction entity set CSG operator library, and the CSG operator library at least includes basic model operators, geometric transformation algorithm operators, and CSG operation algorithm operators.
6. The method according to claim 1, characterized in that Executing the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model specifically includes: Rendering the mathematical tree using a renderer to obtain a two-dimensional image file of the target three-dimensional model; and / or, The mathematical tree is processed by a decoder to obtain a three-dimensional model file of the target three-dimensional model.
7. The method according to claim 6, characterized in that The three-dimensional model file includes at least one of an stl file and an stp file.
8. A three-dimensional modeling device, characterized in that: include: An acquisition module, used for acquiring an original file of a target three-dimensional model to be modeled, wherein the original file describes the target three-dimensional model by means of triangular facets; A construction module, used for constructing an implicit function of the target three-dimensional model according to the triangular facets of the target three-dimensional model; A conversion module, used for converting the implicit function into a mathematical tree; An execution module is used to execute the mathematical tree to obtain a two-dimensional image file and / or a three-dimensional model file of the target three-dimensional model.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Three-dimensional modeling method, device and system based on implicit function and storage medium
CN110033519A
Three-dimensional model rendering method and device, storage medium and electronic equipment
CN119478195A