Mold electrode modeling method based on topological point cloud sampling and pointnet++
By using topological point cloud sampling and PointNet++ deep learning network, the problems of traditional electrode design relying on human experience and insufficient recognition accuracy are solved, realizing the automation, accurate recognition and standardization of electrode design, and improving design efficiency and consistency.
Patent Information
- Application Number
- CN202610738475.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional electrode design relies on human experience, resulting in low design efficiency, difficulty in accurately identifying small-sized, deep and narrow features, and loss of topological information during cross-platform data processing, which limits the intelligence and standardization of electrode design.
By employing topological point cloud sampling and the PointNet++ deep learning network, the automatic identification and modeling of electrode features are achieved through point cloud sampling, topological identifier backtracking, and color label mapping. Combined with the electrode processing feature recognition network of the PointNet++ architecture, a point cloud set with category labels is generated and back-mapped to the solid model for feature coloring and electrode shaping.
It automates the entire electrode design process, improves identification accuracy and design efficiency, ensures the consistency and standardization of electrode design, and provides intuitive design feedback to facilitate engineer review and adjustment.
Smart Images

Figure CN122289611A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer-aided manufacturing (CAM) and electrical discharge machining (EDM) for molds, and particularly to a method for mold electrode modeling based on topological point cloud sampling and PointNet++. Background Technology
[0002] Traditional electrode design relies heavily on engineers' experience, requiring manual identification of electrode machining features from workpiece models and the creation of electrode heads one by one. This process is not only time-consuming and labor-intensive, but also inefficient, and the design results lack standardization. While existing CAD / CAM software is equipped with relevant auxiliary tools, and related research focuses primarily on process optimization, it has not effectively combined the accurate identification of complex surface machining areas with subsequent automated modeling. Specifically, the following problems exist: (1) Insufficient accuracy in recognizing small-sized, deep and narrow features: When faced with feature areas with strict geometric constraints such as deep holes, irregular holes, deep grooves and narrow slits, traditional methods based on geometric rules or heuristic search are difficult to guarantee recognition accuracy and are prone to misjudgment or omission.
[0003] (2) Accuracy loss in cross-platform data processing: When converting CAD entity models into data formats that can be processed by deep learning, existing methods often lose the original topological structure information, making it difficult to accurately trace back the recognition results to the original modeling environment, thus limiting the realization of intelligent modeling throughout the entire process.
[0004] Therefore, there is an urgent need to develop a method that can automatically and accurately identify various complex electrode processing features and directly drive the native design environment to complete automated modeling, so as to realize the intelligence and standardization of the entire electrode design process. Summary of the Invention
[0005] To address the problems of low efficiency, reliance on manual experience, poor coordination between feature recognition and modeling, and insufficient accuracy in recognizing small and narrow features, this invention proposes a mold electrode modeling method based on topological point cloud sampling and PointNet++. This method employs a technical approach of topological point cloud sampling + point cloud component segmentation + topological identifier backtracking, and achieves intelligent modeling of mold electrodes by integrating artificial intelligence algorithms with a native CAD modeling environment. The specific technical solution is as follows: A method for modeling mold electrodes based on topological point cloud sampling and PointNet++ includes: S1: Obtain solid models of various types of workpieces containing different electrode processing features, and assign color labels to the geometric surfaces contained in each functional area of each solid model according to the category, and build a solid model library of electrode processing features. S2: Divide all the entity models in the electrode processing feature entity model library into triangular meshes, and perform point cloud sampling on each entity model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points, while recording the topological identifier of each sampling point and the source geometry. S3: Construct a mapping table between color identifiers and label identifiers. Based on the topological identifier, backtrack the color identifier of the geometric surface to which the sampling point belongs. Use the category of the geometric surface to which the sampling point belongs as the semantic label of the sampling point to generate a point cloud with category labels. S4: Train an electrode processing feature recognition network based on the PointNet++ architecture using a point cloud set with category labels; S5: Perform the same meshing and point cloud sampling operations as S2 on the solid model of the workpiece to be designed; S6: Input the structured data of the sampling points obtained in S5 into the trained electrode processing feature recognition network to obtain the predicted category of each sampling point; S7: Based on the topological identifiers of the sampling points and source geometry recorded in S5, the category prediction results obtained in S6 are back-mapped to the geometry of the solid model of the workpiece to be designed; the predicted category distribution of the sampling points within the geometry is statistically analyzed, the surface attributes are determined according to the confidence threshold, and feature coloring is performed. S8: Based on the geometric surface of the target electrode machining feature obtained in S7, generate the smallest cuboid that can contain the geometric surface of the electrode machining feature; and perform Boolean operation and redundant geometry removal on it and the solid model of the workpiece to be designed. After strength optimization and base addition, the electrode solid model is obtained.
[0006] A mold electrode modeling device based on topological point cloud sampling and PointNet++, comprising: The model library building module is used to store solid models of various types of workpieces containing various electrode processing features. The geometric surfaces contained in each functional area of each solid model are color-coded. The mesh generation and point cloud sampling module is used to divide the solid model into triangular meshes and perform point cloud sampling on each solid model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points, while retaining the topological identifier of each sampling point and the source geometry. The category label point cloud generation module is used to construct a mapping table between color identifiers and label identifiers. Based on the topological identifier of each sampling point and the source geometry, it traces back the color identifier of the geometry to which the sampling point belongs, uses the category of the geometry to which the sampling point belongs as the semantic label of the sampling point, and generates a point cloud with category labels. The electrode processing feature recognition module is used to train an electrode processing feature recognition network based on the PointNet++ architecture using a point cloud set with category labels. It receives a point cloud set obtained by sampling the solid model of the workpiece to be designed, inputs it into the trained electrode processing feature recognition network, and outputs the predicted category of each sampling point. The feature mapping and coloring module is used to back-map the category prediction results of each sampling point to the geometric surface of the solid model of the workpiece to be designed based on the recorded sampling points and the topological identifiers of the source geometry of the solid model; and to statistically analyze the predicted category distribution of the sampling points within the geometry, determine the surface attributes according to the confidence threshold, and perform feature coloring. The electrode solid modeling module is used to generate the smallest cuboid that can contain the geometric surfaces of the target electrode machining features to be designed, and to perform Boolean operations on it with the solid model of the workpiece to be designed, thereby constructing the electrode solid model.
[0007] An electronic device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by the electronic device, enable the electronic device to implement a mold electrode modeling method based on topological point cloud sampling and PointNet++.
[0008] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements a method for mold electrode modeling based on topological point cloud sampling and PointNet++.
[0009] The beneficial effects of this invention are as follows: (1) Achieve full-process automation: Connect the entire chain of “sampling-identification-mapping-modeling”, significantly reduce manual intervention and improve electrode design efficiency; (2) High recognition accuracy and generalization: Utilizing the point cloud analysis capability of PointNet++ deep network, it can accurately identify electrode features of various complex shapes; (3) Design standardization: Through a unified identification model and generation rules, the consistency and standardization of electrode design results are ensured, and errors caused by human factors are reduced; (4) Visualize design feedback: The identified electrode features are colored and marked on the original workpiece model, providing engineers with intuitive and clear design feedback, which facilitates subsequent review and adjustment.
[0010] (5) Good engineering integration: The modeling system of the present invention is relatively independent and easy to integrate into the existing CAD / CAM workflow, and has good engineering application prospects. Attached Figure Description
[0011] Figure 1 This is a flowchart of a mold electrode modeling method based on topological point cloud sampling and PointNet++, according to one embodiment of the present invention.
[0012] Figure 2 This is a visual flowchart of a mold electrode modeling method based on topological point cloud sampling and PointNet++, according to one embodiment of the present invention.
[0013] Figure 3 This is a schematic diagram of topological point cloud sampling according to one embodiment of the present invention.
[0014] Figure 4 This is an index diagram of the network training process for a point cloud dataset with electrode processing features in an embodiment of the present invention.
[0015] Figure 5 This is a schematic diagram of a method for determining surface feature attributes based on a confidence threshold in one embodiment of the present invention. Detailed Implementation
[0016] The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. The purpose and effects of the present invention will become clearer. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0017] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be subject to the following interpretations.
[0018] (1) Electrical discharge machining: a non-contact special machining process that uses the instantaneous high temperature generated by the pulse discharge between the tool electrode and the workpiece to erode the conductive workpiece material and achieve precision forming. It is widely used in mold manufacturing to form geometric features that are difficult to machine by traditional cutting, such as complex cavities, deep and narrow grooves, and micro holes. In this invention, it is referred to as electrode machining.
[0019] (2) Electrode: A conductive component used as a discharge tool in electrical discharge machining. Its geometry is the negative shape of the area to be machined. Material removal is controlled by the discharge gap during machining. In this invention, it specifically refers to a complete three-dimensional solid model generated based on a specific machining area of the workpiece model, including an electrode head, a strength-enhancing structure, and a reference platform, which can be used for subsequent CNC machining or discharge.
[0020] like Figure 1 and Figure 2 As shown, the mold electrode modeling method based on topological point cloud sampling and PointNet++ provided in this embodiment of the invention includes the following steps one through eight.
[0021] Step 1: Obtain solid models of various types of workpieces containing different electrode processing features, and assign color IDs to the geometric surfaces contained in each functional area of each solid model according to the category. Construct an electrode processing feature solid model library from the labeled solid models.
[0022] In this embodiment, the geometry of each solid model is divided into three categories and assigned corresponding category labels: background 0, electrode processing feature 1, and redundancy 2, wherein: Background 0: refers to the non-machined area in the solid model of the workpiece that does not participate in electrical discharge machining. It is the outer contour surface or a regular structural surface that does not require electrical discharge forming and is not used as the basis for electrode generation.
[0023] Electrode processing feature 1: The cavities, holes, grooves and other feature areas that require electrical discharge machining are the target objects for component segmentation and the source of electrode generation.
[0024] Redundancy 2: Draft bevels, chamfers, support structures, and other auxiliary / transition surfaces generated during modeling, as well as non-direct electrode processing areas, need to be excluded during segmentation to avoid misidentification.
[0025] Step 2: Divide all the solid models in the electrode processing feature solid model library into triangular meshes, and perform point cloud sampling on each solid model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points. At the same time, record the topological identifier (Face Tag) of each sampling point and the source geometry.
[0026] like Figure 3 As shown, step two specifically includes the following sub-steps: S2.1: Topology information extraction: Traverse all geometric faces of the marked entity model and obtain the color ID and topology tag of each geometric face in real time.
[0027] S2.2: Area-weighted dynamic allocation of sampling points: To avoid the loss of geometric details due to sparse sampling of complex electrode features such as deep and narrow grooves and micro-holes, a dynamic allocation algorithm based on area ratio is adopted to allocate the number of target sampling points for each geometric surface, ensuring the consistency of point cloud density.
[0028] Suppose that the solid model of the workpiece has a total of N The triangular mesh to be sampled is assigned to the first... i Triangular grid F i The number of target sampling points i=1,2,...,N P i The calculation formula is as follows:
[0029] in, Atotal This represents the total area of all the triangular meshes to be sampled. P total This indicates the preset total number of sampling points (e.g., 20000). A i Indicates the first i Triangular grid F i The area; This indicates rounding down (or you can use rounding, such as adding 0.5 to the integer part of the above formula).
[0030] The dynamic allocation algorithm based on area ratio ensures the consistency of point cloud density across the entire workpiece surface, preventing the loss of geometric details in small feature areas due to insufficient point count. This is particularly beneficial for the accurate reconstruction of key electrode processing features such as deep and narrow grooves and micro-holes.
[0031] S2.3: By weighting the three-dimensional coordinates of the three vertices of the triangular mesh with the random centroid coordinate factor, the three-dimensional coordinates P and normal vector N of the sampling point of the triangular mesh are generated, and the logical relationship between the sampling point and the topological identifier of its source geometry is recorded in real time.
[0032] The formulas for calculating the three-dimensional coordinates P and the normal vector N are as follows:
[0033] Where a, b, and c represent random centroid coordinate factors, which represent the position weights of the sampling points relative to the three vertices of the triangle; r1 and r2 are two independent random numbers uniformly distributed between [0,1] introduced to ensure that the sampling points are absolutely uniformly distributed inside the triangular grid (avoiding clustering in a certain area).
[0034] Step 3: Construct a mapping table between color identifiers (Color ID) and label identifiers (Label ID). Based on the topological identifier of each sampling point and its source geometry recorded in Step 2, backtrack the color identifier (ColorID) of the geometry to which the sampling point belongs, and use the category of the geometry to which the sampling point belongs as the semantic label of the sampling point to generate a point cloud with category labels.
[0035] For example, in the mapping table between color ID and label ID, the background area corresponds to Color ID A and is mapped to Label 0, the electrode processing feature area corresponds to Color ID B and is mapped to Label 1, and the redundant area corresponds to Color ID C and is mapped to Label 2. Sampling points of the same color are grouped into the same semantic category label, and the number of classification label categories is consistent with the number of color information (Color ID) categories used to distinguish the processing area in the workpiece entity model.
[0036] Point cloud data format is [ x , y , z , n x , n y , n z [,label], where ( x , y , z () represents three-dimensional coordinates, n x , n y , n z ) is the unit normal vector, and label is the integer category label (e.g., 0 represents the background, 1 represents the electrode processing feature, and 2 represents the redundant area).
[0037] This method eliminates the need for complex post-processing clustering algorithms, achieves high label accuracy, and maintains strict consistency with the design intent of the CAD model. The logical link established through Face Tags ensures that the conversion from the solid model to the labeled point cloud is automated and lossless, providing high-quality input for the subsequent training of the PointNet++ feature recognition network.
[0038] Step 4: Using the point cloud with category labels from Step 3, train an electrode processing feature recognition network based on the PointNet++ architecture. Learn the mapping relationship between the 3D coordinates, normal vectors and category labels of the sampling points to obtain the trained electrode processing feature recognition network.
[0039] This invention uses the existing PointNet++ deep learning network as the basic model for electrode processing feature recognition, and constructs an end-to-end workflow from "CAD model → labeled point cloud → feature recognition → NX electrode automatic modeling".
[0040] The electrode processing feature recognition network adopts the standard PointNet++ network architecture, which includes two parts: an encoder (downsampling path) and a decoder (upsampling path).
[0041] The encoder consists of a multi-level set abstraction (SA) layer. Each layer selects the center point through farthest point sampling (FPS) and constructs a local neighborhood using ball query. After feature extraction by multilayer perceptron (MLP), the features are aggregated by max pooling. The decoder progressively upsamples through the Feature Propagation (FP) layer, uses inverse distance weighted interpolation to pass high-level semantic features back to the original points, and fuses them with shallow geometric features, ultimately outputting a class prediction for each point in the input point cloud.
[0042] Before training, the input point cloud undergoes global coordinate normalization to improve model stability. During model training, accuracy and part IoUs (Intersection over Union) for each feature class are used as core evaluation metrics. Accuracy (including training and testing accuracy) macroscopically reflects the proportion of correct predictions of the overall point cloud and monitors the model's global convergence trend. Part IoU calculates the intersection ratio between the predicted and ground truth regions for different feature classes (e.g., feature class labels 0, 1, and 2). This evaluation method, combining global accuracy and local class IoU, comprehensively and intuitively reflects the model's ability to finely segment different specific feature classes.
[0043] In this embodiment, the accuracy and intersection-union ratio of each feature category are as follows: Figure 4 As shown.
[0044] Step 5: Divide the solid model of the workpiece to be designed into triangular meshes, and perform the same point cloud sampling operation as in Step 2 to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points. At the same time, record the topological identifier (Face Tag) of each sampling point and the source geometry.
[0045] This step is a technical prerequisite for accurately tracing the subsequent recognition results back from the discrete point cloud to the CAD entity surface.
[0046] Step 6: Input the structured data of the sampling points obtained in Step 5 into the trained electrode processing feature recognition network in Step 4, and output the predicted category of each sampling point.
[0047] After training on labeled data, the electrode processing feature recognition network uses deep learning to infer the category index corresponding to the maximum probability, and determines the final predicted label of each sampling point (0=background, 1=electrode processing feature, 2=redundant region). This generates feature recognition prediction results that correspond one-to-one with the spatial location of the input point cloud, and constructs a structured point cloud containing predicted labels, providing a basis for subsequent topology backtracking and accurate coloring.
[0048] Step 7: Based on the topological identifiers of the sampling points and source geometric surfaces recorded in Step 5, back-map the category prediction results of Step 6 to the geometric surfaces of the solid model of the workpiece to be designed; statistically analyze the predicted category distribution of the sampling points within the geometric surfaces, determine the surface attributes according to the confidence threshold, and perform feature coloring.
[0049] In this embodiment, the topological identifier association between the sampling points and the source geometric surfaces recorded in step five is used to establish a bidirectional lossless mapping channel from the prediction tag space to the CAD geometric space. Based on the unique Face Tag of the sampling point, the geometric surface object to which it belongs in the original solid model can be accurately traced back. Face i .
[0050] To eliminate edge prediction noise in deep learning inference, a proportion statistics and high-confidence judgment algorithm are introduced to ensure the accuracy of the model input, such as... Figure 5 As shown, step seven specifically includes: S7.1: For each geometric surface on the solid model of the workpiece to be designed Face i The Face Tag index accurately retrieves the set of all sampling points originating from that face; S7.2: Calculate the distribution weights of each predicted category in the statistical sampling point set, and then calculate the target category proportion R using the following formula:
[0051] in, Count target This indicates the number of sampling points for the target category (e.g., "electrode processing features", label=1). Count total This represents the total number of sampling points within the plane.
[0052] S7.3: Determine R. If R exceeds a preset high confidence threshold (preferably 95% in this embodiment), then determine the geometric surface. Face i The entire area belongs to the target category (such as electrode processing features); otherwise, it is determined to be a non-processed area.
[0053] S7.4: After completing the determination of the surface region attributes, assign a color value to the determined geometric surface according to the preset mapping table of color identifier (Color ID) and label identifier (Label ID) to realize the visual marking of the electrode processing feature surface region.
[0054] Step 8: Based on the geometric surface of the target electrode machining feature obtained in Step 7, generate the minimum cuboid that can contain the geometric surface of the electrode machining feature; and perform Boolean operations and redundant geometry removal on the generated minimum cuboid and the solid model of the workpiece to be designed. After strength optimization and base addition, the electrode solid model is obtained.
[0055] Step eight specifically includes the following sub-steps: S8.1: Automatic bounding box generation: Calculate the smallest bounding box of all the electrode machining feature surfaces with dye marks in the workpiece coordinate system, and extend it upward along the electrode extension direction to generate a cuboid bounding box whose bottom surface completely covers the dyed area, ensuring the clamping and discharge length of the electrode.
[0056] S8.2: Boolean difference operation: Perform a Boolean difference operation between the cuboid bounding box and the original solid model of the workpiece to be designed, remove the interference part of the solid model from the cuboid bounding box, and obtain the preliminary negative geometry of the electrode head.
[0057] This geometry accurately replicates the three-dimensional negative shape of the cavity to be processed.
[0058] S8.3: Redundant Geometry Removal and Feature Refinement: Based on the surface color attributes of the initial negative geometry of the electrode head, identify non-target areas introduced by Boolean operations; construct a local extruded body covering the entire electrode height with the cross-sectional contour of the non-target surface along the electrode extension direction of the workpiece coordinate system; perform a Boolean difference operation between the initial negative geometry of the electrode head and the extruded body to completely remove redundant geometry.
[0059] S8.4: After strength optimization and base addition, a complete 3D solid model of the electrode with a clean topology and regular geometry is output.
[0060] On the other hand, embodiments of the present invention also provide a mold electrode modeling device based on topological point cloud sampling and PointNet++. The device includes a model library construction module, a mesh generation and point cloud sampling module, a category label point cloud set generation module, an electrode processing feature recognition module, a feature mapping and coloring module, and an electrode entity modeling module.
[0061] The model library construction module is used to store solid models of various types of workpieces containing different electrode processing features. The geometric surfaces contained in each functional area of each solid model are color-coded.
[0062] The mesh generation and point cloud sampling module is used to divide the solid model into triangular meshes and perform point cloud sampling on each solid model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points, while retaining the topological identifier of each sampling point and the source geometry.
[0063] The category-labeled point cloud generation module is used to construct a mapping table between color identifiers and label identifiers. Based on the topological identifier of each sampling point and the source geometry, it traces back the color identifier of the geometry to which the sampling point belongs, uses the category of the geometry to which the sampling point belongs as the semantic label of the sampling point, and generates a point cloud with category labels.
[0064] The electrode processing feature recognition module is used to train an electrode processing feature recognition network based on the PointNet++ architecture using a point cloud set with category labels. By learning the mapping relationship between the three-dimensional coordinates, normal vectors and category labels of the sampling points, the trained feature recognition network is obtained. It also receives a point cloud set obtained by sampling the solid model of the workpiece to be designed, inputs it into the trained electrode processing feature recognition network, and outputs the predicted category of each sampling point.
[0065] The feature mapping and coloring module is used to back-map the category prediction results of each sampling point to the geometric surface of the solid model of the workpiece to be designed based on the recorded sampling points and the topological identifiers of the source geometry of the solid model; and to statistically analyze the predicted category distribution of the sampling points within the geometry, determine the surface attributes according to the confidence threshold, and perform feature coloring.
[0066] The electrode solid modeling module is used to generate a minimum cuboid that can contain the geometric surface of the target electrode machining feature, based on the geometric surface of the target electrode machining feature. The cuboid is then used to perform Boolean operations with the solid model of the workpiece to be designed to obtain a preliminary electrode head. Redundant geometry removal, strength optimization, and base addition are then performed on the preliminary electrode head to obtain the electrode solid model.
[0067] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0068] This invention also provides a computer-readable storage medium storing a program that, when executed by a processor, implements the mold electrode modeling method based on topological point cloud sampling and PointNet++ described in the above embodiments.
[0069] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0070] It will be understood by those skilled in the art that the above descriptions are merely preferred examples of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention.
Claims
1. A mold electrode modeling method based on topological point cloud sampling and PointNet++, characterized in that, include: S1: Obtain solid models of various types of workpieces containing different electrode processing features, and assign color labels to the geometric surfaces contained in each functional area of each solid model according to the category, and build a solid model library of electrode processing features. S2: Divide all the entity models in the electrode processing feature entity model library into triangular meshes, and perform point cloud sampling on each entity model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points, while recording the topological identifier of each sampling point and the source geometry. S3: Construct a mapping table between color identifiers and label identifiers. Based on the topological identifier, backtrack the color identifier of the geometric surface to which the sampling point belongs. Use the category of the geometric surface to which the sampling point belongs as the semantic label of the sampling point to generate a point cloud with category labels. S4: Train an electrode processing feature recognition network based on the PointNet++ architecture using a point cloud set with category labels; S5: Perform the same meshing and point cloud sampling operations as S2 on the solid model of the workpiece to be designed; S6: Input the structured data of the sampling points obtained in S5 into the trained electrode processing feature recognition network to obtain the predicted category of each sampling point; S7: Based on the topological identifiers of the sampling points and source geometry recorded in S5, the category prediction results obtained in S6 are back-mapped to the geometry of the solid model of the workpiece to be designed; the predicted category distribution of the sampling points within the geometry is statistically analyzed, the surface attributes are determined according to the confidence threshold, and feature coloring is performed. S8: Based on the geometric surface of the target electrode machining feature obtained in S7, generate the smallest cuboid that can contain the geometric surface of the electrode machining feature; and perform Boolean operation and redundant geometry removal on it and the solid model of the workpiece to be designed. After strength optimization and base addition, the electrode solid model is obtained.
2. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 1, wherein, The geometric surfaces in S1 are categorized into three types: background, electrode processing features, and redundancy. The background is assigned the identifier 0, the electrode processing features are assigned the identifier 1, and the redundancy is assigned the identifier 2.
3. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 1, wherein, S2 includes the following sub-steps: S2.1: Traverse all geometric faces of the marked solid model and obtain the color and topology identifiers of each geometric face in real time; S2.2: The number of target sampling points for each geometric surface is allocated using a dynamic allocation algorithm based on area proportion; S2.3: By weighting the three-dimensional coordinates of the three vertices of the triangular mesh with the random centroid coordinate factor, the three-dimensional coordinates and normal vectors of the sampling points of the triangular mesh are generated, and the logical relationship between the sampling point and the topological identifier of its source geometry is recorded in real time.
4. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 3, wherein, The sum of the random barycentric coordinate factors of the three vertices is 1, and the value of each random barycentric coordinate factor is in the interval [0,1].
5. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 1, wherein, S7 specifically includes the following sub-steps: S7.1: For each geometric surface on the solid model of the workpiece to be designed, retrieve the set of all sampling points originating from that surface by using topological identifiers; S7.2: Calculate the distribution weight of each predicted category in the set of sampling points, and calculate the ratio of the number of sampling points of the target category to the total number of sampling points in the area; S7.3: Compare the ratio with a preset confidence threshold. If the ratio exceeds the confidence threshold, it is determined that the geometric surface to which the sampling point belongs belongs to the surface region corresponding to the target category; otherwise, it is determined to be a non-processed area. S7.4: Assign a color to the determined geometric surface according to the mapping table of color identifiers and label identifiers.
6. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 1, characterized in that, S8 includes the following sub-steps: S8.1: Calculate the smallest bounding box of the electrode machining feature surface of all dyed marks in the workpiece coordinate system, and extend it upward along the electrode extension direction to generate a cuboid bounding box whose bottom surface completely covers the dyed area. S8.2: Perform a Boolean difference operation between the cuboid bounding box and the original solid model of the workpiece to be designed, remove the interference part of the solid model from the cuboid bounding box, and obtain the preliminary negative geometry of the electrode head. S8.3: Based on the surface color attributes of the initial negative geometry of the electrode head, identify the non-target areas introduced by Boolean operations; construct a local extruded body covering the entire electrode height with the cross-sectional contour of the non-target surface along the electrode extension direction of the workpiece coordinate system; perform a Boolean difference operation between the initial negative geometry of the electrode head and the extruded body to completely eliminate redundant geometry. S8.4: After strength optimization and base addition, a complete 3D solid model of the electrode with a clean topology and regular geometry is output.
7. The mold electrode modeling method based on topological point cloud sampling and PointNet++ according to claim 1, characterized in that, The electrode processing feature recognition network based on the PointNet++ architecture consists of two parts: an encoder and a decoder.
8. A mold electrode modeling device based on topological point cloud sampling and PointNet++, characterized in that, include: The model library building module is used to store solid models of various types of workpieces containing various electrode processing features. The geometric surfaces contained in each functional area of each solid model are color-coded. The mesh generation and point cloud sampling module is used to divide the solid model into triangular meshes and perform point cloud sampling on each solid model to obtain structured data containing the three-dimensional coordinates and normal vectors of the sampling points, while retaining the topological identifier of each sampling point and the source geometry. The category label point cloud generation module is used to construct a mapping table between color identifiers and label identifiers. Based on the topological identifier of each sampling point and the source geometry, it traces back the color identifier of the geometry to which the sampling point belongs, uses the category of the geometry to which the sampling point belongs as the semantic label of the sampling point, and generates a point cloud with category labels. The electrode processing feature recognition module is used to train an electrode processing feature recognition network based on the PointNet++ architecture using a point cloud set with category labels. It receives a point cloud set obtained by sampling the solid model of the workpiece to be designed, inputs it into the trained electrode processing feature recognition network, and outputs the predicted category of each sampling point. The feature mapping and coloring module is used to back-map the category prediction results of each sampling point to the geometric surface of the solid model of the workpiece to be designed based on the recorded sampling points and the topological identifiers of the source geometry of the solid model; and to statistically analyze the predicted category distribution of the sampling points within the geometry, determine the surface attributes according to the confidence threshold, and perform feature coloring. The electrode solid modeling module is used to generate the smallest cuboid that can contain the geometric surfaces of the target electrode machining features to be designed, and to perform Boolean operations on it with the solid model of the workpiece to be designed, thereby constructing the electrode solid model.
9. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the electronic device, cause the electronic device to implement the mold electrode modeling method based on topological point cloud sampling and PointNet++ as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the mold electrode modeling method based on topological point cloud sampling and PointNet++ as described in any one of claims 1 to 7.