Topological optimization structure post-processing method and system based on U-net and wireframe analysis network
Through the combination of U-net and wireframe analysis network, the problem that topological optimization structure cannot be directly imported into CAD software is solved, and the regularization of the structure is realized, the design process is simplified and efficiency is improved.
Patent Information
- Application Number
- CN202411100545.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The structure obtained by topology optimization cannot be directly imported into CAD software, which causes designers to edit and modify to improve manufacturability, increasing the problem of design difficulty and inefficiency.
Using the method of U-net and wireframe analysis network analysis, the U-Net neural network model is constructed through offline training, and irregular geometric shapes are converted into regular geometric shapes. In online applications, contour recognition and wireframe analysis network extraction holes and The outer contour forms a closed CAD model.
Effectively process the holes and outer contours of the topologically optimized structure into regular geometric shapes, simplifying the design process, improving the generalization ability of neural networks, and being able to directly import CAD software, improving the overall efficiency of topological optimization.
Smart Images

Figure CN119066962A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to topology optimization structures, and more specifically, relates to a topology optimization structure post-processing method and system based on U-net and wireframe analysis network. Background Art
[0002] With the increasing complexity of structural application scenarios and industrial design requirements in recent years, traditional structural design methods have become increasingly inadequate. Structural analysis, based on computational mechanics, has become increasingly widely used in structural design, replacing traditional design methods. Structural topology optimization, a key branch of structural optimization, calculates the efficient distribution of materials within the design domain based on structural operating conditions, thereby achieving a theoretically optimal structural design.
[0003] However, even though the structures obtained through topology optimization have extremely excellent performance, most topology optimization methods use a variable density method—in which intermediate densities are introduced to describe the distribution of materials. Since CAD primarily deals with the geometry and size of structures, the results of topology optimization cannot be directly used in product design. Structural designers often need to edit and modify topology-optimized structures to meet manufacturability or other standards before using them as final product designs. Therefore, there is an urgent need for a method that can post-process topology-optimized structures, reduce the difficulty of importing them into CAD software, and help improve the overall efficiency of topology optimization. Summary of the Invention
[0004] In response to the above defects or improvement needs of the prior art, the present invention provides a topology optimization structure post-processing method and system based on U-net and wireframe analysis network to solve the problem that the topology optimized structure cannot be directly imported into CAD software.
[0005] To achieve the above object, according to one aspect of the present invention, a topology optimization structure post-processing method based on U-net and wireframe analysis network is provided, the method comprising the following steps:
[0006] Offline training:
[0007] Constructing a processing domain, constructing a regular geometric shape in the processing domain, adding disturbance points to the edges of the regular geometric shape, connecting the disturbance points with vertices of the regular geometric shape using curve fitting to form an irregular geometric shape corresponding to the regular geometric shape, repeating this process multiple times to form a database with a one-to-one correspondence between regular geometric shapes and irregular geometric shapes;
[0008] Constructing a U-Net neural network model with irregular geometric shapes as input and regular geometric shapes as output, and training the U-Net neural network model using a database corresponding to the regular geometric shapes and the irregular geometric shapes, thereby obtaining a trained U-Net neural network model;
[0009] Online application stage:
[0010] Extracting holes in the topology optimization structure to be processed by contour recognition, inputting the holes into the trained U-Net neural network model to obtain corresponding regular geometric shapes; replacing the corresponding holes in the topology optimization structure to be processed with the obtained regular geometric shapes, thereby obtaining a simplified model of the topology optimization structure to be processed;
[0011] The contours of all regular geometric shapes in the simplified model are extracted respectively, and the contours are connected into closed wireframes to obtain the CAD model corresponding to the topology optimization structure to be processed.
[0012] Further preferably, the outer contour is extracted using a wireframe analysis network method.
[0013] Further preferably, in the offline training, the curve fitting adopts B-spline curve fitting.
[0014] Further preferably, the input and output of the U-Net neural network model correspond to a density matrix of an irregular geometric shape and a density matrix of a regular geometric shape, respectively.
[0015] Further preferably, the network of the U-Net neural network model includes upsampling and downsampling, the upsampling is to use convolution kernel to perform convolution operation to reduce the size of the image, and the downsampling uses a bilinear interpolation method to expand the pixels, thereby expanding the image whose size is reduced by upsampling to its original size.
[0016] Further preferably, in the online application stage, before extracting irregular geometric shapes in the topology optimization structure to be processed by contour recognition, the density matrix corresponding to the topology optimization structure to be processed needs to be binarized to remove units with intermediate density.
[0017] Further preferably, before inputting the hole into the trained U-Net neural network model, the hole needs to be compressed or stretched to a size acceptable to the trained U-Net neural network model.
[0018] Further preferably, when extracting holes in the topology optimization structure to be processed, the coordinates, width and height corresponding to each hole need to be recorded. After obtaining the regular geometric shapes corresponding to the holes, the coordinates, width and height corresponding to each hole are used to splice the regular geometric shapes into the topology optimization structure to be processed.
[0019] Further preferably, after connecting each contour into a closed wireframe, the coordinates of each vertex on each contour are obtained, the point with the smallest horizontal coordinate value in the vertex coordinates is point P, the wireframe containing point P is the outer contour of the CAD model, and the other wireframes are the contours of the holes.
[0020] According to another aspect of the present invention, a topology optimization structure post-processing system based on U-net and wireframe analysis network is provided, which includes an executor for executing the above-mentioned topology optimization structure post-processing method based on U-net and wireframe analysis network.
[0021] In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:
[0022] 1. The present invention processes both the holes and outer contours of the topology optimization structure to be processed into regular geometric shapes. This is because most topology optimization structures have complex topological features, but the holes in the structure are mostly close to simple polygons. Setting the topology optimization structure to be processed as a hole in the structure can greatly improve the generalization ability of the neural network. In addition, the part of the structure's outer surface to the edge of the image is also treated as a hole and processed together, so the outer contour of the topology optimization structure to be processed is also processed into a regular graphic. Processing both the holes and the outer contour into regular geometric shapes to form a CAD model can be directly imported into CAD software for use, thereby improving the overall efficiency of topology optimization.
[0023] 2. The present invention uses B-spline curves to generate various irregular hole shapes in topology optimization structures. B-spline curves are one of the mainstream methods in shape description mathematics. They have powerful functions for representing and designing free-form curves and surfaces, and can fit common geometric shapes. Using them in the present invention, a rich set of geometric shapes can be generated for the data set, covering the vast majority of hole shapes in topology optimization structures.
[0024] 3. The present invention uses a U-net neural network model to process irregularly shaped holes and convert them into simple regular shapes. The U-net network is a widely used semantic segmentation model with strong nonlinear fitting and image processing capabilities. The network outputs and inputs pixel matrices of the same size, which is consistent with the requirements of the present invention. Furthermore, the network has a simple structure and a small number of parameters, allowing training on limited equipment (NVIDIA graphics card 4060).
[0025] 4. The wireframe extraction in the present invention adopts a wireframe analysis network, which can not only obtain the coordinates of the starting and ending points of all line segments of the structural surface contour, but also automatically connect the line segments to form a closed figure, avoiding the problem of incomplete structural wireframe caused by inaccurate coordinate recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of a topology optimization structure post-processing method based on U-net and wireframe analysis network constructed according to a preferred embodiment of the present invention;
[0027] Figure 2 This is an example of a curved edge graphics dataset based on B-spline curves constructed according to a preferred embodiment of the present invention;
[0028] Figure 3 Schematic diagram of the U-net network structure constructed according to the preferred embodiment of the present invention;
[0029] Figure 4 Schematic diagram of the L-CNN network structure constructed according to the preferred embodiment of the present invention;
[0030] Figure 5 is a schematic structural diagram of a topology optimization structure to be processed constructed according to a preferred embodiment of the present invention;
[0031] Figure 6 is a schematic diagram of a hole structure extracted from a topology optimization structure to be processed constructed according to a preferred embodiment of the present invention;
[0032] Figure 7 is a regular geometric shape corresponding to the hole constructed according to the preferred embodiment of the present invention:
[0033] Figure 8 is a simplified model structure schematic diagram corresponding to the topology optimization structure to be processed constructed according to the preferred embodiment of the present invention;
[0034] Figure 9 is a structural schematic diagram of a closed wireframe corresponding to a topology optimization structure to be processed constructed according to a preferred embodiment of the present invention;
[0035] Figure 10 It is a CAD model corresponding to a topology optimized structure constructed according to a common geometric reconstruction algorithm in accordance with a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0037] A topology optimization structure post-processing method based on U-net and wireframe analysis network includes the following steps:
[0038] (1) Using B-spline curves, we simulate holes in real topological structures and construct datasets of complex holes and regular geometric shapes, as follows:
[0039] Construct a set of control points {P1,P2,P3,...,P n} and the node set {t1,t2,t3,...,t m Control points control the shape of the curve. Nodes are a concept unrelated to control points. They artificially divide the target curve into several parts. Their purpose is to allow each part to influence each other while maintaining a certain degree of independence, so that changes to a few control points will not significantly affect the entire curve. The curve is divided into m segments through m+1 nodes. A segment of a spline function can be expressed as follows:
[0040]
[0041] Among them, B i,k (t) is the k-order spline basis function, which satisfies the following recursive formula:
[0042]
[0043] Irregular shapes are formed by adding nodes and random perturbations to the control points using B-spline curves. Regular polygons are obtained by directly connecting the nodes. A dataset is constructed with a one-to-one correspondence between the irregular shapes.
[0044] The B-spline method has a powerful function of representing and designing free-form curves and surfaces. It is one of the mainstream methods for mathematical description of shapes. It can describe the boundaries of most shapes and is the basis of the current international standard for geometric definition of industrial products - rational B-spline method (NURBS). A series of control points are used to define the boundaries of the graphics according to the B-spline function described in formulas (1) and (2) to generate various graphics. First, the control points {P1, P2, P3, ..., P} representing each vertex and the midpoint of each edge of the polygon are used. n} and nodes {t1,t2,t3,...,t m}Define the polygon as the output of the dataset. Then add any number of points {R1, R2, R3, ..., R l}, thus turning it into a more complex curved edge graph as the input of the dataset. Select individual examples from the dataset, such as Figure 2 shown.
[0045] (2) constructing a U-Net neural network model with irregular geometric shapes as input and regular geometric shapes as output, and training the U-Net neural network model using a database corresponding to regular geometric shapes and irregular geometric shapes to obtain a trained U-Net neural network model;
[0046] The U-net network structure diagram is as follows Figure 3 As shown. The input and output of the network are both images with a width and height of 128 pixels. The entire network is divided into two parts: downsampling and upsampling. Downsampling is the process of extracting feature maps by convolution operation using convolution kernels. A maximum pooling operation is performed every time 2 to 3 convolution feature maps are extracted to reduce the image size and prevent overfitting. Upsampling is the inverse process of downsampling. It uses the bilinear interpolation method to calculate the expanded pixels and expand the image to its original size. The bilinear interpolation formula is:
[0047] Assume that the pixel values and coordinates of the four pixels are: Q 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22 (x2, y2). The pixel values of interpolated pixel points R1(x, y1), R2(x, y2), and P(x, y) are calculated by the following formula:
[0048]
[0049] Figure 3 The gray arrows in the figure represent the concatenation of feature maps. The feature maps in the downsampling process are directly concatenated to the channel dimension of the upsampling feature map, so that the deep network can obtain the feature maps of the shallow network, thereby reducing the impact of information loss in the layer-by-layer convolution process of the network layer. The effect is similar to the residual operation of Resnet.
[0050] (3) Use the contour recognition algorithm to extract the holes in the structure and record the coordinates of all holes in the original structure. To obtain a better output result, the extracted irregular holes are input into the U-net network four times in sequence to obtain a simplified regular graph. Then, according to the coordinates of the holes, the original structure is spliced back to achieve the simplified effect of the structure. Specifically:
[0051] First, binarize the read topology optimization density matrix and remove the intermediate density units. Then, use the findContours contour recognition algorithm provided by Python's OpenCV graphics library to extract the holes in the topology optimization results and record the coordinates, width, and height information of all holes.
[0052] In this embodiment, after resizing these hole images to 128 pixels × 128 pixels through image compression or stretching, in order to obtain better output results, they can be cyclically input into the U-net network to be processed into a regular shape, and then resized to the original size according to the recorded width and height, and spliced according to the coordinates to obtain a simplified structure diagram.
[0053] (4) Using the wireframe analysis network L-CNN to extract geometric information from the simplified structure. L-CNN was originally a network used to extract straight line segments in images, but because it can automatically process the connection relationship between line segments and process them into closed wireframes, in this embodiment, after the structure is simplified by the U-net network, the surface of the structure is all straightened into straight line segments, so using L-CNN will greatly simplify post-processing. The structure of L-CNN is as follows: Figure 4 The network outputs two lists. The first list is the confidence of all line segments of the wireframe, and the second list is the starting and ending coordinates of each line segment.
[0054] As described in 4, once the start and end coordinates of each line segment are determined, a common reconstruction algorithm can be used to obtain the CAD model of the structure. For example, the above line segments are topologically reconstructed to generate several closed wireframes. All vertices are traversed to find the point P with the smallest X component. Each wireframe is then evaluated. The wireframe containing point P is the outer ring. The remaining wireframes are considered inner rings. All vertices in the ring are traversed, and the fillet size is set. Finally, a B-Rep model is generated by extrusion. The 3D solid can then be converted into CAD-readable files such as step and iges.
[0055] The present invention will be further described below with reference to specific embodiments.
[0056] like Figure 5 Shown is a cantilever beam calculated using the parameterized level set method. Figure 6 The extracted holes are resized to 128×128. It is worth mentioning that the extracted holes also include the blank areas outside the structure. This is to ensure that after the holes are stitched together, the simplified structure can be directly obtained by inverting the black and white colors of the structure. The hole images are fed into the U-net in sequence to obtain the simplified holes, as shown in the following example. Figure 7 Then, the simplified holes are spliced according to the original coordinates and width and height to obtain the simplified structure as shown in Figure 8 shown.
[0057] Input the simplified structure into L-CNN and set the confidence level to 0.9. The line segments with a probability greater than 0.9 are drawn as follows: Figure 9 The information of these vertices and edges can be easily used for geometric reconstruction. An example of a reconstructed CAD model is shown in Figure 10 shown.
[0058] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A topology optimization structure post-processing method based on U-net and wireframe analysis network, It is characterized in that The method comprises the following steps: Offline training: Constructing a processing domain, constructing a regular geometric shape in the processing domain, adding disturbance points on the edges of the regular geometric shape, connecting the disturbance points and vertices of the regular geometric shape using curve fitting, thereby forming an irregular geometric shape corresponding to the regular geometric shape, repeating multiple times, thereby forming a database in which regular geometric shapes correspond to irregular geometric shapes one by one; Constructing a U-Net neural network model with irregular geometric shapes as input and regular geometric shapes as output, and training the U-Net neural network model using a database corresponding to the regular geometric shapes and the irregular geometric shapes, thereby obtaining a trained U-Net neural network model; Online application stage: Extracting holes in the topology optimization structure to be processed by contour recognition, inputting the holes into the trained U-Net neural network model to obtain corresponding regular geometric shapes; replacing the corresponding holes in the topology optimization structure to be processed with the obtained regular geometric shapes, so as to obtain a simplified model of the topology optimization structure to be processed; The contours of all regular geometric shapes in the simplified model are extracted respectively, and the contours are connected into a closed wireframe, so as to obtain a CAD model corresponding to the topology optimization structure to be processed.
2. A topology optimization structure post-processing method based on U-net and wireframe analysis network as described in claim 1, It is characterized in that The outer contour is extracted by using a wireframe analysis network method.
3. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 1 or 2, It is characterized in that In the offline training, the curve fitting adopts B-spline curve fitting.
4. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 1 or 2, It is characterized in that The input and output of the U-Net neural network model correspond to the density matrix of irregular geometric shapes and the density matrix of regular geometric shapes, respectively.
5. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 4, It is characterized in that The network of the U-Net neural network model includes upsampling and downsampling. The upsampling is to use convolution kernel to perform convolution operation to reduce the size of the image, and the downsampling uses a bilinear interpolation method to expand the pixels to expand the image whose size is reduced by upsampling to its original size.
6. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 1 or 2, It is characterized in that In the online application stage, before extracting the irregular geometric shapes in the topology optimization structure to be processed by contour recognition, the density matrix corresponding to the topology optimization structure to be processed needs to be binarized to remove the units with intermediate density.
7. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 1 or 2, It is characterized in that Before inputting the holes into the trained U-Net neural network model, the holes need to be compressed or stretched to a size acceptable to the trained U-Net neural network model.
8. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 7, It is characterized in that When extracting holes in the topology optimization structure to be processed, it is necessary to record the coordinates, width and height corresponding to each hole. After obtaining the regular geometric shapes corresponding to the holes, the regular geometric shapes are spliced into the topology optimization structure to be processed using the coordinates, width and height corresponding to each hole.
9. A topology optimization structure post-processing method based on U-net and wireframe analysis network as claimed in claim 1, It is characterized in that After connecting each contour into a closed wireframe, obtain the coordinates of each vertex on each contour. The point with the smallest horizontal coordinate value among the vertex coordinates is point P. The wireframe containing point P is the outer contour of the CAD model, and the other wireframes are the contours of the holes.
10. A topology optimization structure post-processing system based on U-net and wireframe analysis network, It is characterized in that The system includes an actuator, which is used to execute the topology optimization structure post-processing method based on U-net and wireframe analysis network as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Spline curve-based geometric model modeling method after topological optimization
CN112182794A
Energy-absorbing metamaterial design method based on diffusion model and parameter optimization
CN118335257A
Tracking a topology optimization to construct an editable topology
WO2020005274A1
Method and system for automatically constructing editable model of isogeometric topology optimization result
WO2022179097A1
