An Additive Manufacturing System Rendering Method, Device, Storage Medium, and Electronic Device
By using implicit modeling and smoothing algorithms in additive manufacturing, the problem of low rendering efficiency of complex structural parts in additive manufacturing is solved, and fast and accurate rendering and real-time improvement are achieved.
Patent Information
- Application Number
- CN202510323451.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-19
AI Technical Summary
In the additive manufacturing process, parts with complex structures use display modeling methods due to the existing CAD software, resulting in huge polygon mesh and complex Boolean operations, which are prone to gaps and vulnerabilities, affecting the computing efficiency and processing speed.
By obtaining the first implicit function of the model of the component to be manufactured and the second implicit function of the cell-filled array of the fill model, performing Boolean operations and using a smoothing algorithm to transition the boundary area, obtaining the to-determined implicit function, and then adjusting the target implicit function according to the preset shell thickness, and finally rendering the target implicit function according to the rendering parameters.
Fast and accurate rendering in additive manufacturing is achieved, and the problems of complex geometric information and large amount of data and complex Boolean operations are solved. The rendering exception caused by unsmoothing of boundary areas is avoided through the smoothing algorithm, and the real-timeness of the rendering process is improved.
Smart Images

Figure CN119850812B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to a rendering method, device, storage medium, and electronic device for an additive manufacturing system. Background Art
[0002] Additive manufacturing technology, also known as three-dimensional (3D) printing technology, creates three-dimensional objects by stacking materials layer by layer. The working principle of additive manufacturing is based on computer-aided design (CAD) and computer-aided manufacturing (CAM) technologies, which convert digital models into physical objects.
[0003] In additive manufacturing technology, many parts usually have complex structures. Currently, CAD software uses a display modeling method to store models through the geometric information of points and surfaces. For complex scenarios, the polygon meshes of display modeling will become very large, and the Boolean operations between surfaces are very complex. When gaps and holes appear due to Boolean operation errors, geometric model designers need to perform subsequent repairs, which increases the workload and complexity and seriously affects the computing efficiency and processing speed.
[0004] Therefore, how to achieve faster and more accurate rendering during the additive manufacturing process is an urgent problem to be solved. Summary of the Invention
[0005] This specification provides a rendering method, device, storage medium, and electronic device for an additive manufacturing system to at least partially solve the above problems existing in the prior art.
[0006] This specification adopts the following technical solutions:
[0007] This specification provides a rendering method for an additive manufacturing system, including:
[0008] Obtaining a first implicit function of the model of the component to be manufactured and a second implicit function of the cell filling array for filling the model;
[0009] Performing a Boolean operation on the first implicit function and the second implicit function, and using a smoothing algorithm to transition the boundary region between the model and the cell filling array to obtain a pending implicit function;
[0010] Obtaining a target implicit function according to the preset shell thickness of the component to be manufactured and the pending implicit function;
[0011] Rendering the target implicit function according to the preset rendering parameters.
[0012] Optionally, obtain the model of the component to be manufactured, specifically including:
[0013] Determine the model of the component to be manufactured constructed by the user, or obtain the 3D model file input by the user for describing the component to be manufactured.
[0014] Optionally, the first implicit function, the second implicit function, the implicit function to be determined, and the target implicit function are distance field functions.
[0015] Optionally, obtain the target implicit function according to the preset shell thickness of the component to be manufactured and the implicit function to be determined, specifically including:
[0016] Perform a shelling operation on the implicit function to be determined according to the preset shell thickness of the component to be manufactured to obtain the target implicit function.
[0017] Optionally, the rendering parameters at least include position, rotation angle, scaling size, projection method, field of view angle, camera position, near clipping plane, far clipping plane, step value, and minimum distance.
[0018] Optionally, render the target implicit function, specifically including:
[0019] Determine the number of rays for rendering and the initial position of each ray according to the preset resolution;
[0020] Determine the direction vector of each ray according to the adopted projection method;
[0021] Filter the rays outside the rendering area according to the initial positions of the rays and the rendering area;
[0022] For each ray, continuously update the position of the ray according to the specified step value, and at each position, judge and record whether the ray intersects with the model to obtain the ray state of the ray;
[0023] Calculate the normal information of the target implicit function according to the ray states of the rays, and obtain the depth information according to the step numbers of the rays;
[0024] Draw a normal map, a depth map, and a color map according to the normal information and the depth information.
[0025] Optionally, the method further includes:
[0026] Taking the center of the component to be manufactured as the origin, establish the component coordinate system of the component to be manufactured;
[0027] Rotate the component to be manufactured along each coordinate axis of the component coordinate system respectively, and collect images of the component to be manufactured at different angles during the rotation to obtain a set of rotation images;
[0028] Determine an implicit function for cutting the cube according to the origin and a preset cutting position;
[0029] For each coordinate axis of the component coordinate system, according to the target implicit function and the implicit function of the sectioning cube, a plurality of sectioning structures are sequentially generated along the coordinate axis at specified intervals;
[0030] Each sectioned structure is rendered to obtain a sectioned image set.
[0031] This specification provides an additive manufacturing system rendering device, the device comprising:
[0032] An acquisition module, used for acquiring a first implicit function of a model of a component to be manufactured and a second implicit function of a cell filling array filling the model;
[0033] An operation module, used for performing Boolean operation on the first implicit function and the second implicit function, and using a smoothing algorithm to transition the boundary area between the model and the cell filling array to obtain a pending implicit function;
[0034] An adjustment module, used for obtaining a target implicit function according to a preset shell thickness of the component to be manufactured and the to-be-determined implicit function;
[0035] The rendering module is used to render the target implicit function according to preset rendering parameters.
[0036] 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 additive manufacturing system rendering method is implemented.
[0037] 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 additive manufacturing system rendering method when executing the program.
[0038] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0039] In the additive manufacturing system rendering method provided in the present specification, a first implicit function of a model of a component to be manufactured and a second implicit function of a cell filling array filling the model are obtained; a Boolean operation is performed on the first implicit function and the second implicit function, and a smoothing algorithm is used to transition the boundary area of the model and the cell filling array to obtain a pending implicit function; a target implicit function is obtained based on a preset shell thickness of the component to be manufactured and the pending implicit function; and the target implicit function is rendered according to pre-set rendering parameters.
[0040] When rendering a component using the additive manufacturing system rendering method provided in this specification, the boundary region between the model of the component to be manufactured and the cell filling array can be smoothed through a smoothing algorithm to obtain a pending implicit function with strong continuity, and the pending implicit function can be adjusted according to the shell thickness of the component to be manufactured to obtain the target implicit function, thus completing the rendering task. Using this method can not only solve the problems of complex geometric information and large data volume in display modeling and complex Boolean operations, but also solve the problem of abnormal rendering of the spherical tracing algorithm caused by uneven boundary regions by using a smoothing algorithm in Boolean operations. At the same time, by using the method of rendering with a set of pictures, it avoids converting the data model into a polygon mesh in the traditional way, reduces the calculation and storage overhead, and improves the real-time performance of the rendering process. Brief Description of the Drawings
[0041] The drawings described herein are used to provide a further understanding of this specification and form a part of this specification. The illustrative embodiments of this specification and their descriptions are used to explain this specification and do not constitute an improper limitation to this specification. In the drawings:
[0042] Figure 1 is a schematic flowchart of a rendering method for an additive manufacturing system in this specification;
[0043] Figure 2 is a schematic diagram of an additive manufacturing system rendering device provided in this specification;
[0044] Figure 3 corresponding to that provided in this specification Figure 1 schematic diagram of an electronic device. Detailed Description of the Embodiments
[0045] To make the purpose, technical solutions and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0046] The following will describe in detail the technical solutions provided in each embodiment of this specification with reference to the drawings.
[0047] Figure 1 is a schematic flowchart of a rendering method for an additive manufacturing system in this specification, which specifically includes the following steps:
[0048] S100: Obtain the first implicit function of the model of the component to be manufactured and the second implicit function of the cell filling array for filling the model.
[0049] All steps in the additive manufacturing system rendering method provided in this specification can be implemented by any electronic device with computing capabilities, such as terminals, servers, and other devices.
[0050] This method is mainly applied to the rendering link in additive manufacturing technology. Based on this, in this step, the first implicit function of the model of the component to be manufactured that needs to be rendered and the second implicit function of the voxel filling array used to fill the model can be obtained first.
[0051] Implicit modeling defines the shape of an object through continuous mathematical functions, which gives it unique advantages in dealing with complex geometries and topological changes and can better solve the problems of model data storage and complex Boolean operations in explicit modeling.
[0052] Among them, the component to be manufactured is the component that finally needs to be manufactured in this additive manufacturing. Its specifications such as shape and size can be in any form based on specific requirements, including any regular shapes such as spherical, cylindrical, cubic, or any irregular complex structure. When obtaining the model of the component to be manufactured, it can be mainly through two methods. Specifically, the model of the component to be manufactured constructed by the user can be determined, or a 3D model file input by the user for describing the component to be manufactured can be obtained. Simply put, on the one hand, the user can design and construct the model of the component to be manufactured by himself in 3D modeling software; on the other hand, the user can directly input the 3D model file of the pre-designed model into the 3D modeling software, such as an STL file, etc. This specification does not make specific restrictions on this.
[0053] The voxel filling array is an array composed of a large number of voxels through a specific arrangement and combination method, and its function is to fill the internal space of the model of the component to be manufactured. This means is mainly used to simulate the process of filling a designed shape with materials during actual manufacturing. During actual printing, each filled voxel will be converted into a solid part and output one by one, and finally a complete component will be formed. Among them, the voxel is also a 3D model, and the shape and size of the voxel can also be freely designed according to specific requirements. The specifications such as the arrangement method, distribution density, and connection method of each voxel inside the component need to be designed differently according to the different components to be manufactured.
[0054] In this method, both the component to be manufactured and the voxel can be implicit functions in pure function form or stl files. Among them, if the voxel and the component are stl files, tools such as the libigl library need to be used to convert the stl file into a discrete implicit field. Since a continuous signed distance field (SDF) function is required in rendering so that the distance field value of any given point coordinate can be obtained, the discrete SDF field also needs to be converted into a continuous implicit function. The specific method is as follows:
[0055] First, for the points within the sampling range, linear interpolation is used. Based on the discrete distance length and the maximum and minimum coordinate point information of the STL, the bounding box can be determined. For the points within the bounding box, their signed distance values are calculated using linear interpolation. Specifically, it can be processed according to the following formula:
[0056]
[0057] where p i is the grid point enclosing the point p, and w i is the weight.
[0058] Subsequently, for the points outside the sampling range, calculate the point p nearest nearest to the bounding box and d of the point. Specifically, it can be processed according to the following formula:
[0059]
[0060] where x, y, and z represent the coordinates of the point.
[0061] Finally, the gradient field of the entire distance field can be calculated and Gaussian smoothed. The smoothed gradient value is used for calculation, and finally the SDF value outside the sampling point range is obtained. Specifically, it can be processed according to the following formula:
[0062]
[0063] where smoothed represents the smoothing process.
[0064] The process of filling the cells of the component to be manufactured can be divided into uniform filling and variable density filling. Among them, for uniform filling, only one type of cell is used to repeat the splicing in three dimensions respectively, and finally a filled cell array is obtained; for variable density filling, appropriate cells are selected according to the stress field data to fill in the specified areas respectively. The smoothing function used in the above Boolean operation can be used between the cells to smooth the edges of the two cells, and finally an implicit function of the cell filling array is obtained.
[0065] In this step, the implicit function of the model of the component to be manufactured, that is, the first implicit function, and the implicit function of the cell filling array for filling the model, that is, the second implicit function, will be obtained first. In the initial stage of design, without specific calculation, the cell filling array usually cannot be perfectly fitted with the model of the component to be manufactured directly. Therefore, the implicit functions of the model and the cell filling array need to be obtained respectively and used for the subsequent rendering process.
[0066] Among them, the representation forms of implicit functions can include various types, such as distance field functions, occupancy field functions, radiation field functions, etc. Correspondingly, there can also be various specific ways to obtain implicit functions. This specification provides a specific embodiment for reference here. Taking the implicit function as a signed distance field function as an example, in this method, the first implicit function, the second implicit function involved in this step, and the undetermined implicit function and the target implicit function to be used in subsequent steps can all be SDFs. When obtaining the SDF, the SDF can be obtained by means of grid isosurface extraction. Generally, the grid is a triangular patch used to describe the shell. By extracting the points on the triangular patch, the SDF of each point in the rendering space to the 3D model can be further obtained.
[0067] S102: Perform a Boolean operation on the first implicit function and the second implicit function, and use a smoothing algorithm to transition the boundary region between the model and the cell filling array to obtain an undetermined implicit function.
[0068] In this step, a Boolean operation can be performed on the first implicit function and the second implicit function obtained in step S100. Through the Boolean operation, the overlapping region between the model of the component to be manufactured and the cell filling array can be calculated, and based on this, the position of the model, as well as the position and arrangement of the cell filling array, can be adjusted so that the cell filling array can gradually completely fill the model of the component to be manufactured.
[0069] At the same time, in order to ensure a better fit and continuity between the model of the component to be manufactured and the cell filling array, a smoothing algorithm can also be used to process the boundary region between the two in this step. Among them, there are various smoothing algorithms that can be adopted, such as various linear smoothing algorithms, including but not limited to moving average smoothing algorithm, interpolation smoothing algorithm, convolution smoothing algorithm, etc. This specification does not make specific restrictions on this.
[0070] This method provides a specific embodiment for smoothing the Boolean operation for reference here. Common Boolean operations can include, for example, intersection max(a, b), union min(a, b), difference max(a, -b), etc. For the above Boolean operations, the smoothing process can be carried out according to the following formulas:
[0071] Intersection operation with smoothing:
[0072]
[0073] Union operation with smoothing:
[0074]
[0075] Difference operation with smoothing:
[0076]
[0077] Among them, m is a hyperparameter that can be set according to specific requirements.
[0078] When the cell filling array can perfectly coincide with the internal space of the model of the component to be manufactured, there is no need to adjust the positions of the cell filling array and the model anymore. At this time, the two can be regarded as a whole. According to the position of the model at this time, a to-be-determined implicit function can be obtained again for subsequent rendering processes.
[0079] S104: Obtain a target implicit function according to the preset outer shell thickness of the component to be manufactured and the to-be-determined implicit function.
[0080] Before starting the rendering, it is also necessary to adjust the to-be-determined implicit function obtained in step S102 according to the preset outer shell thickness of the component to be manufactured. Specifically, the to-be-determined implicit function can be shelled according to the preset outer shell thickness of the component to be manufactured to obtain a target implicit function.
[0081] When performing the shelling operation, different operations can be performed on the to-be-determined implicit function according to different outer shell thicknesses t. Specifically, it can be divided into three cases: t > 0, t < 0, and t = 0.
[0082] When t > 0, that is, when shelling outward, the calculation can be carried out according to the following formula:
[0083]
[0084] When t < 0, that is, when shelling inward, the calculation can be carried out according to the following formula:
[0085]
[0086] When t = 0, the calculation can be carried out according to the following formula:
[0087]
[0088] Among them, a is the first implicit function of the component to be manufactured, and b is the second implicit function of the cell filling array. The to-be-determined implicit function obtained by performing a Boolean operation on the first implicit function and the second implicit function can be obtained in step S102.
[0089] S106: Render the target implicit function according to the preset rendering parameters.
[0090] Finally, the target implicit function can be rendered in this step to complete the current rendering task. Among them, the rendering parameters can include but are not limited to parameters such as the rendering position, rotation angle, scaling size, projection method, field of view angle, camera position, near clipping plane, far clipping plane, step value, minimum distance, etc.
[0091] The rendering process can be implemented through a variety of different rendering techniques. This specification provides a specific embodiment of rendering using the spherical tracing algorithm. Specifically, the number of rays for rendering and the initial positions of each ray can be determined according to a preset resolution; the direction vectors of each ray can be determined according to the adopted projection method; the rays outside the rendering area can be filtered according to the initial positions of each ray and the rendering area; for each ray, the position of the ray is continuously updated according to a specified step value, and at each position, it is judged and recorded whether the ray intersects the model to obtain the ray state of the ray; the normal information is calculated from the ray states of each ray to obtain the target implicit function, and the depth information is obtained from the step numbers of each ray; a normal map, a depth map, and a color map are drawn according to the normal information and the depth information. Among them, when determining the normal information, the SDF value at the ray intersection position can be first determined, and then the normal information at this point can be calculated using the central difference method.
[0092] In actual rendering, models constructed by implicit modeling are usually converted into files in STL or OBJ format for rendering. Since these models need to store detailed information of geometric elements, the data volume is usually large and time-consuming, and it is also a challenge in terms of data storage and transmission. For some explicit models, especially high-resolution models, rendering and processing may require high computational costs, affecting real-time performance.
[0093] As a technique for rendering surfaces, the spherical tracing algorithm is a process of "marching" along the light rays, which is achieved by dividing points in space. This method is often used in volume rendering, where there is no specific surface, but rather the intersection points of the light rays with the surface defined by the "implicit distance" equation need to be found, which requires the function to be continuous and satisfy the Lipschitz condition. In traditional methods, the Boolean operations of the signed distance field function will result in the final obtained SDF not being an exact SDF. The spherical tracing algorithm uses the SDF as the step, and the inaccurate SDF will cause the algorithm to skip the surface and thus affect the rendering effect. In this method, by adopting a smoothing algorithm in the Boolean operation, the problem of abnormal rendering caused by the discontinuity of the boundary between the model and the voxel filling array is solved.
[0094] The "rays" used for rendering in the spherical tracking algorithm are represented in the form of rays, and there are several of them during a single rendering process. The specific number of rays and the initial position of each ray will vary according to the adopted resolution. Generally speaking, the higher the resolution, the more voxels need to be rendered, and the more rays for rendering will also be. The initial position of a ray is the endpoint of the ray. The initial positions of each ray are usually affected by the number of rays and are evenly distributed within the rendering space. The direction of a ray is usually associated with the projection method. For example, in orthographic projection, all rays are parallel to each other and all perpendicular to the projection plane; in perspective projection, all rays diverge from a point (usually the focus or viewpoint of the camera) and converge on the same projection plane. Therefore, the direction vector of each ray can be determined according to the projection method adopted in the rendering. At the same time, different projection methods can be used simultaneously, and the determination methods of the direction vectors of each ray may not be completely unified.
[0095] After determining the initial position and direction vector of each ray, some unused rays can be filtered out first according to the position where the rendering area is located. Specifically, the filtering of rays can be completed through, for example, the Axis-Aligned Bounding Box (AABB) algorithm. Among them, the AABB algorithm can be implemented through CUDA (Compute Unified Device Architecture) kernel functions, and the rendering area can be set according to specific situations, such as [-1, -1, -1] to [1, 1, 1], etc.
[0096] After filtering some rays, the remaining rays can be used to complete the rendering task. For each ray participating in the rendering, the position of the ray can be continuously updated according to a preset specified step value. At the same time, at each position passed by the ray, it is judged whether the ray can intersect with the model, and the judgment result of each time is recorded. This process can continue until the ray completely traverses the rendering area and returns to its initial position. All the judgment results recorded during this process can be recorded as the ray state of this ray. Among them, the position of the ray refers to the position where the endpoint of the ray is located, and whether the ray intersects with the model is whether the direction vector of the ray can intersect with the outer shell of the model. The specified step value is usually related to the target implicit function. For example, the specified step value can be the product of the value of the target implicit function at the current position and a constant step size stepsize, that is, SDF × stepsize. The judgment result hit has two values, "true" representing "yes" and "false" representing "no". When the ray intersects with the model, the value of the judgment result hit is "true", otherwise the value of hit is "false".
[0097] After all the rays are processed according to the above process, the target implicit function can finally be calculated and rendered based on the ray states of the rays to obtain normal information; meanwhile, the depth information can be obtained according to the step numbers of the rays. According to the obtained information, images such as normal maps, depth maps, and color maps that can intuitively display the component conditions can be finally drawn as the final output results of the rendering.
[0098] Furthermore, in this method, rotation images and sectioning images can also be additionally output to provide users with more aspects of rendering information. Specifically, a component coordinate system of the to-be-manufactured component can be established with the center of the to-be-manufactured component as the origin; the to-be-manufactured component can be rotated along each coordinate axis of the component coordinate system, and images of the to-be-manufactured component at different angles can be collected during the rotation to obtain a set of rotation images; according to the origin and a preset sectioning position, the implicit function of the sectioning cube can be determined; for each coordinate axis of the component coordinate system, a number of sectioning structures can be sequentially generated at a specified interval along this coordinate axis according to the target implicit function and the implicit function of the sectioning cube; and the sectioning structures are rendered to obtain a set of sectioning images.
[0099] For the rotation images, a component coordinate system can be established with the center of the to-be-manufactured component as the origin, and rotations can be performed along each coordinate axis of the component coordinate system. During the rotation, both the number of rotations and the angles can be set according to specific requirements, and a rotation image can be collected each time a rotation is performed, and finally a set of rotation images on each axis can be obtained.
[0100] For the sectioning images, any position can be preset as the sectioning position, and the center of the rotation, that is, the center of the to-be-manufactured component, can be used as the rendering position to determine the implicit function of the sectioning cube. Under each coordinate axis, a difference operation can be performed on the target implicit function of the model and the implicit function of the sectioning cube to generate a number of sectioning structures at a fixed specified interval. Rendering each sectioning structure can obtain a set of sectioning images.
[0101] When using the rendering method of the additive manufacturing system provided in this specification to render a component, the boundary region between the model of the to-be-manufactured component and the cell filling array can be smoothed through a smoothing algorithm to obtain a pending implicit function with strong continuity, and the pending implicit function can be adjusted according to the shell thickness of the to-be-manufactured component to obtain the target implicit function, thus completing the rendering task. Using this method can not only solve the problems of complex geometric information and large data volume and complex Boolean operations in display modeling, but also solve the problem of abnormal rendering of the spherical tracing algorithm caused by uneven boundary regions by using a smoothing algorithm in the Boolean operation. At the same time, by using the method of rendering with a set of pictures, it is avoided to convert the data model into a polygon mesh in the traditional way, reducing the calculation and storage overhead and improving the real-time performance of the rendering process.
[0102] The above is the rendering method of the additive manufacturing system provided in this specification. Based on the same idea, this specification also provides a corresponding additive manufacturing system rendering device, as Figure 2 shown.
[0103] Figure 2 is a schematic diagram of an additive manufacturing system rendering device provided in this specification, specifically including:
[0104] An acquisition module 200, configured to acquire a first implicit function of the model of the component to be manufactured and a second implicit function of the voxel filling array for filling the model;
[0105] An operation module 202, configured to perform a Boolean operation on the first implicit function and the second implicit function, and use a smoothing algorithm to transition the boundary region between the model and the voxel filling array to obtain a to-be-determined implicit function;
[0106] An adjustment module 204, configured to obtain a target implicit function according to the preset outer shell thickness of the component to be manufactured and the to-be-determined implicit function;
[0107] A rendering module 206, configured to render the target implicit function according to preset rendering parameters.
[0108] Optionally, the acquisition module 200 is specifically configured to determine the model of the component to be manufactured constructed by the user, or acquire a three-dimensional model file input by the user for describing the component to be manufactured.
[0109] Optionally, the first implicit function, the second implicit function, the to-be-determined implicit function, and the target implicit function are distance field functions.
[0110] Optionally, the adjustment module 204 is specifically configured to perform a shelling operation on the to-be-determined implicit function according to the preset outer shell thickness of the component to be manufactured to obtain a target implicit function.
[0111] Optionally, the rendering parameters at least include position, rotation angle, scaling size, projection method, field of view angle, camera position, near clipping plane, far clipping plane, step value, and minimum distance.
[0112] Optionally, the rendering module 206 is specifically used to determine the number of rays used for rendering and the initial position of each ray according to a preset resolution; determine the direction vector of each ray according to the adopted projection method; filter the rays outside the rendering area according to the initial position of each ray and the rendering area; for each ray, continuously update the position of the ray according to a specified step value, and determine and record at each position whether the ray intersects with the model to obtain the ray state of the ray; calculate the target implicit function according to the ray state of each ray to obtain normal information, and obtain depth information according to the number of steps of each ray; draw a normal map, a depth map, and a color map according to the normal information and the depth information.
[0113] Optionally, the device also includes an image generation module 208, which is specifically used to establish a component coordinate system of the component to be manufactured with the center of the component to be manufactured as the origin; rotate the component to be manufactured along each coordinate axis of the component coordinate system, and collect images of the component to be manufactured at different angles during the rotation process to obtain a set of rotated images; determine the implicit function of the cutting cube according to the origin and the preset cutting position; for each coordinate axis of the component coordinate system, generate a number of cutting structures in sequence along the coordinate axis at specified intervals according to the target implicit function and the implicit function of the cutting cube; render each cutting structure to obtain a set of cutting images.
[0114] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A rendering method for an additive manufacturing system is provided.
[0115] This manual also provides Figure 3 The schematic structure diagram of the electronic device shown in FIG. Figure 3 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 The additive manufacturing system rendering method. 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.
[0116] Improvements to a technology can be clearly distinguished as being hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. 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 an improvement to a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. The designer can program a digital system "integrated" on a single PLD by themselves, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a hardware description language (HDL), and there is not just one type of HDL, but many types, 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 currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into the integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0117] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to make the controller implement the same function in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.
[0118] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can 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 any combination of these devices.
[0119] For the convenience of description, when describing the above devices, they are described separately as 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.
[0120] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0121] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0122] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0124] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0125] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] The various embodiments in this specification are described in a progressive manner. For the same or similar parts among the various embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate 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 for the relevant parts, reference can be made to the partial description of the method embodiment.
[0131] The above description is only for the embodiments of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this application.
Claims
1. A rendering method for an additive manufacturing system, characterized in that: include: Obtaining a first implicit function of a model of a component to be manufactured and a second implicit function of a cell filling array filling the model; Performing Boolean operations on the first implicit function and the second implicit function, and using a smoothing algorithm to transition the boundary area between the model and the cell filling array to obtain a pending implicit function; Obtaining a target implicit function according to a preset shell thickness of the component to be manufactured and the to-be-determined implicit function; The target implicit function is rendered according to preset rendering parameters.
2. The method according to claim 1, characterized in that Obtain the model of the component to be manufactured, including: Determine the model of the component to be manufactured constructed by the user, or obtain the three-dimensional model file input by the user for describing the component to be manufactured.
3. The method according to claim 1, characterized in that The first implicit function, the second implicit function, the pending implicit function, and the target implicit function are distance field functions.
4. The method according to claim 1, characterized in that According to the preset shell thickness of the component to be manufactured and the to-be-determined implicit function, a target implicit function is obtained, which specifically includes: According to the preset shell thickness of the component to be manufactured, a shell extraction operation is performed on the implicit function to be determined to obtain a target implicit function.
5. The method according to claim 1, characterized in that The rendering parameters include at least position, rotation angle, scaling size, projection mode, field of view, camera position, near clipping plane, far clipping plane, step value, and minimum distance.
6. The method according to claim 1, characterized in that Rendering the target implicit function specifically includes: According to the preset resolution, determine the number of rays used for rendering and the initial position of each ray; Determine the direction vector of each ray according to the adopted projection method; According to the initial positions of the rays and the rendering area, filtering the rays outside the rendering area; For each ray, the position of the ray is continuously updated according to the specified step value, and at each position, it is determined and recorded whether the ray intersects with the model to obtain the ray state of the ray; Calculating the target implicit function according to the ray state of each ray to obtain normal information, and obtaining depth information according to the number of steps of each ray; A normal map, a depth map, and a color map are drawn according to the normal information and the depth information.
7. The method according to claim 1, characterized in that After rendering the target implicit function according to the preset rendering parameters, the method further includes: Taking the center of the component to be manufactured as the origin, establishing a component coordinate system of the component to be manufactured; Rotating the component to be manufactured along each coordinate axis of the component coordinate system respectively, and collecting images of the component to be manufactured at different angles during the rotation process to obtain a rotation image set; Determine an implicit function for cutting the cube according to the origin and a preset cutting position; For each coordinate axis of the component coordinate system, according to the target implicit function and the implicit function of the sectioning cube, a plurality of sectioning structures are sequentially generated along the coordinate axis at specified intervals; Each sectioned structure is rendered to obtain a sectioned image set.
8. A rendering device for an additive manufacturing system, characterized in that: include: An acquisition module, used for acquiring a first implicit function of a model of a component to be manufactured and a second implicit function of a cell filling array filling the model; An operation module, used for performing Boolean operation on the first implicit function and the second implicit function, and using a smoothing algorithm to transition the boundary area between the model and the cell filling array to obtain a pending implicit function; An adjustment module, used for obtaining a target implicit function according to a preset shell thickness of the component to be manufactured and the to-be-determined implicit function; The rendering module is used to render the target implicit function according to preset rendering parameters.
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
Triangular mesh model distance field generation method and system based on multi-information voxel
CN115423973A
Three-dimensional model rendering method and device, storage medium and electronic equipment
CN119478195A