Overcut anomaly detection method and device based on area intersection analysis
By constructing contour and trajectory regions and using the separating axis theorem to identify intersections, the problem of insufficient overcut detection accuracy based on discrete point distance analysis in existing technologies is solved, and high-precision overcut anomaly detection is achieved.
Patent Information
- Application Number
- CN202512044829.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-05
AI Technical Summary
Existing overcut detection methods based on discrete point distance analysis have insufficient detection accuracy, especially for overcut regions with complex contours, which may be missed.
A method based on surface region intersection analysis is adopted. By constructing contour surface regions and trajectory surface regions, the intersection is identified using the separating axis theorem to determine overcutting anomalies.
It enables continuous detection of the processing, covering all possible overcut areas, improving detection accuracy and precision, and reducing missed detections.
Smart Images

Figure CN121981965A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of design and manufacturing, and more specifically, to a method and apparatus for detecting overcutting anomalies based on surface region intersection analysis. Background Technology
[0002] In modern manufacturing, CNC turning is widely used due to its high precision, high efficiency, and automation. With the transformation of industrial technology and the advancement of intelligent manufacturing, the requirements for the precision and efficiency of part machining are increasing, making CNC turning software increasingly important. It can generate complex machining trajectories to meet the needs of precision manufacturing. However, ensuring the accuracy of the software-generated trajectories, especially avoiding overcutting, has become a key challenge in the industry.
[0003] In related technologies, overcut detection mainly relies on discrete point distance analysis. This involves selecting a series of discrete points on the machining trajectory and calculating the distances from these points to the theoretically machined contour of the workpiece to determine if overcutting exists. However, this method has limitations in detection accuracy. Because it is based on discrete points, the detection results may be inaccurate due to variations in the sampling density and location of the sampling points. Especially for complex contours composed of arcs and spline curves, the sampling points may not completely cover potential overcut areas, leading to missed detections.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method and apparatus for detecting overcut anomalies based on surface intersection analysis, which at least solves the technical problem of low detection accuracy in related technologies that rely on discrete point distance calculations to detect overcut anomalies.
[0006] According to one aspect of the present invention, an overcut anomaly detection method based on surface region intersection analysis is provided, comprising: acquiring design data of a part and parsing the design data to obtain geometric information; extracting contour lines from the geometric information and constructing a contour surface region based on the contour lines; extracting trajectory data from the geometric information and constructing a trajectory surface region based on the trajectory data; identifying the intersection of the contour surface region and the trajectory surface region using the separating axis theorem; determining that the part has an overcut anomaly when the contour surface region and the trajectory surface region have an intersection; and obtaining the overcut surface region based on the intersection.
[0007] Further, the step of extracting contour lines from the geometric information and constructing a contour region based on the contour lines includes: identifying and extracting regional contour elements constituting a closed region from the geometric elements in the geometric information to obtain the contour lines; selecting associated contour lines with an association relationship based on the association relationship between the contour lines; and constructing a closed region based on the associated contour lines to obtain the contour region.
[0008] Further, the step of extracting trajectory data from the geometric information and constructing a trajectory surface region based on the trajectory data includes: extracting toolpaths from the geometric information; configuring different path markers for different types of toolpaths; obtaining the trajectory data based on the toolpaths and the path markers; and constructing a closed region based on the toolpaths with the same path marker in the trajectory data to obtain the trajectory surface region.
[0009] Furthermore, the step of identifying the intersection of the contour surface region and the trajectory surface region using the separating axis theorem includes: approximating the contour surface region to construct a contour polygon; approximating the trajectory surface region to construct a trajectory polygon; selecting a separating axis for the contour polygon and the trajectory polygon; calculating the projection range of the contour polygon and the trajectory polygon on the separating axis to obtain the contour projection range and the trajectory projection range; identifying whether the contour projection range and the trajectory projection range overlap, and determining that the contour surface region and the trajectory surface region intersect if there is an overlap.
[0010] Furthermore, the steps for parsing the design data include: converting the design data according to a preset data format; extracting geometric elements from the converted design data; and extracting processing parameters, material information, and processing accuracy from the converted design data.
[0011] Furthermore, after extracting trajectory data from the geometric information, the method further includes: acquiring the position data of the tool's entry point and retraction point; and optimizing the trajectory data based on the position data of the entry point and retraction point.
[0012] Further, the step of determining that the part has an overcutting anomaly when the contour surface region and the trajectory surface region intersect includes: obtaining the intersection range of the contour surface region and the trajectory surface region when the contour surface region and the trajectory surface region intersect; comparing the intersection range with a preset range threshold to obtain a comparison result; and determining that the part has an overcutting anomaly when the comparison result indicates that the intersection range is greater than the preset range threshold.
[0013] According to another aspect of the present invention, an overcut anomaly detection device based on surface region intersection analysis is also provided, comprising: an acquisition unit for acquiring design data of a part and parsing the design data to obtain geometric information; an extraction unit for extracting contour lines from the geometric information and constructing a contour surface region based on the contour lines; a construction unit for extracting trajectory data from the geometric information and constructing a trajectory surface region based on the trajectory data; and an identification unit for identifying the intersection of the contour surface region and the trajectory surface region using the separating axis theorem, determining that the part has an overcut anomaly when the contour surface region and the trajectory surface region have an intersection, and obtaining the overcut surface region based on the intersection.
[0014] Further, the extraction unit includes: a first extraction module, used to identify and extract the region contour elements constituting the closed region from the geometric elements in the geometric information to obtain the contour lines; a first selection module, used to select associated contour lines with an association relationship based on the association relationship between the contour lines; and a first construction module, used to construct the closed region based on the associated contour lines to obtain the contour region.
[0015] Furthermore, the construction unit includes: a second extraction module for extracting toolpaths from the geometric information; a first configuration module for configuring different path markers for different types of toolpaths; a first acquisition module for obtaining the trajectory data based on the toolpaths and the path markers; and a second construction module for constructing a closed region based on the toolpaths with the same path marker in the trajectory data to obtain the trajectory surface region.
[0016] Further, the recognition unit includes: a first processing module for approximating the contour region to construct a contour polygon; a second processing module for approximating the trajectory region to construct a trajectory polygon; a first selection module for selecting a separating axis for the contour polygon and the trajectory polygon; a first calculation module for calculating the projection ranges of the contour polygon and the trajectory polygon on the separating axis to obtain the contour projection range and the trajectory projection range; and a first recognition module for identifying whether the contour projection range and the trajectory projection range overlap, and determining that the contour region and the trajectory region intersect if the contour projection range and the trajectory projection range overlap.
[0017] Furthermore, the acquisition unit includes: a first conversion module, used to convert the design data according to a preset data format; a third extraction module, used to extract geometric elements from the converted design data; and a fourth extraction module, used to extract processing parameters, material information, and processing accuracy from the converted design data.
[0018] Furthermore, the overcut anomaly detection device based on surface intersection analysis further includes: a second acquisition module for acquiring the position data of the tool's entry point and retraction point; and a first optimization module for optimizing the trajectory data based on the position data of the entry point and retraction point.
[0019] Furthermore, the identification module further includes: a third acquisition module, used to acquire the intersection range of the contour surface region and the trajectory surface region when there is an intersection between the contour surface region and the trajectory surface region; a first comparison module, used to compare the intersection range with a preset range threshold to obtain a comparison result; and a first determination module, used to determine that the part has an overcutting abnormality when the comparison result indicates that the intersection range is greater than the preset range threshold.
[0020] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform any of the above-described overcut anomaly detection methods based on surface intersection analysis.
[0021] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described overcut anomaly detection methods based on surface intersection analysis.
[0022] In this application, the following steps are performed: obtaining the design data of the part and parsing the design data to obtain geometric information; extracting the contour line from the geometric information and constructing the contour region based on the contour line; extracting the trajectory data from the geometric information and constructing the trajectory region based on the trajectory data; using the separating axis theorem to identify the intersection of the contour region and the trajectory region; determining that the part has an overcut anomaly when the contour region and the trajectory region have an intersection; and obtaining the overcut region based on the intersection.
[0023] In this application, surface regions are directly extracted and constructed using the original part design data. This accurately captures complex contours and trajectories composed of straight lines, arcs, spline curves, etc. By constructing contour and trajectory surface regions, continuous detection of the machining process is achieved, ensuring that the detection covers all possible overcut areas and reducing missed detections due to insufficient point sampling. A surface region intersection determination method based on the separating axis theorem is adopted, which can accurately determine whether two surface regions intersect and the specific location of the intersection. This improves the detection accuracy and the accuracy of the detection results for overcut detection, thereby solving the technical problem of low detection accuracy in related technologies that rely on discrete point distance calculations for overcut anomaly detection. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0025] Figure 1 This is a flowchart of an optional overcut anomaly detection method based on surface intersection analysis according to an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of an optional overcut anomaly detection process based on surface intersection analysis according to an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of an optional overcut anomaly detection device based on surface intersection analysis according to an embodiment of the present invention;
[0028] Figure 4 This is a hardware structure block diagram of an electronic device (or mobile device) that performs an overcut anomaly detection method based on surface intersection analysis according to an embodiment of the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0032] Computer-aided design (CAD) is mainly used in the field of CNC turning for part design and machining path planning.
[0033] It should be noted that the overcut anomaly detection method and apparatus based on surface region intersection analysis in this application can be used in the field of design and manufacturing to detect overcut anomalies in part manufacturing based on surface region intersection analysis, and can also be used in any field other than design and manufacturing to detect overcut anomalies in part manufacturing based on surface region intersection analysis. This application does not limit the application field of the overcut anomaly detection method and apparatus based on surface region intersection analysis.
[0034] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) involved in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of such data all comply with the relevant laws, regulations, and standards of the relevant regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.
[0035] It should be noted that in this application, when collecting and analyzing customer information, users are provided with corresponding operation entry points to choose whether to agree to or reject the automated decision-making results; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0036] The following embodiments of the present invention can be applied to various overcut anomaly detection systems / applications / devices based on surface intersection analysis. The present invention extends the focus of overcut detection to the entire surface region. By constructing contour and trajectory surface regions, continuous detection of the machining process is achieved. This continuity ensures that the detection covers all possible overcut areas, reducing missed detections due to insufficient point sampling and effectively improving the accuracy and reliability of the detection.
[0037] The present invention will now be described in detail with reference to various embodiments.
[0038] Example 1
[0039] According to an embodiment of the present invention, an embodiment of an overcut anomaly detection method based on surface intersection analysis is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0040] Figure 1 This is a flowchart of an optional overcut anomaly detection method based on surface intersection analysis according to an embodiment of the present invention, as follows: Figure 1 As shown, the method includes the following steps:
[0041] Step S101: Obtain the design data of the part and parse the design data to obtain geometric information.
[0042] In step S101 above, during the part design and manufacturing process, the design data typically exists in the form of CAD files, containing key data such as the part's geometric information, dimensional specifications, and manufacturing requirements. Acquiring the original design data and converting this complex design data into analyzable digital data lays the foundation for subsequent region construction and intersection analysis.
[0043] First, the design data of the part is imported through the CAD file reading interface. This can be done by importing from an external file using the software's import option, or by directly reading real-time data from the CAD design environment. After acquiring the design data, the system needs to parse it and extract key geometric information. This includes identifying all geometric elements constituting the workpiece, such as lines, arcs, and spline curves, and converting them into a format that is easy to calculate and analyze. For example, a curve might be discretized into a series of coordinate points for subsequent processing. The parsed geometric information may need to be converted into a specific data format to be compatible with subsequent processing flows. This typically involves converting curves and lines into parametric line segment representations to facilitate the construction of regions and intersection analysis.
[0044] Furthermore, the steps for parsing the design data include: converting the design data according to a preset data format; extracting geometric elements from the converted design data; and extracting processing parameters, material information, and processing accuracy from the converted design data.
[0045] Specifically, when parsing design data, the process begins by reading the raw design data from the CAD system. This data may be contained in files of specific formats (such as .DWG, .DXF, .STEP). Then, using a built-in or externally invoked data parser, this data is converted into a unified internal format for easier subsequent processing. After the design data has been converted, each set of data is analyzed in depth, and all geometric elements constituting the part are parsed and extracted, including but not limited to lines, arcs, and spline curves. These geometric elements are organized into a structured dataset for subsequent contour region construction, ensuring the accuracy of the region analysis.
[0046] In addition to geometric elements, the system also needs to extract detailed machining parameters from the design data, such as feed rate, depth of cut, and toolpath. Furthermore, material information (such as material hardness and coefficient of thermal expansion) and machining accuracy requirements (such as tolerance range and surface roughness) are also indispensable. This information will guide the construction of the trajectory domain, ensuring that overcut detection considers both geometric constraints and the actual conditions of the machining process, thereby achieving higher detection accuracy and practicality.
[0047] Step S102: Extract contour lines from geometric information and construct contour regions based on the contour lines.
[0048] In step S102 above, the geometric information extracted in step S101 is analyzed to identify and separate the contour lines that constitute the boundary of the part. These contour lines may be composed of various geometric elements such as straight lines, arcs, and spline curves. The system needs to accurately determine the position and shape of each contour line to ensure that the subsequent surface region construction can reflect the true dimensions of the part. Based on this, a contour surface region is constructed, effectively setting a clear detection range for overcut detection and improving detection efficiency by focusing on key areas.
[0049] A contour region is a closed space enclosed by contour lines in a part design, including straight lines, arcs, spline curves, etc. It not only contains the boundary information of the part, but also forms a two-dimensional or three-dimensional surface that accurately reflects the actual machining range of the part, based on the part's geometry, size, and machining requirements.
[0050] The role of the contour region is to provide a clear detection boundary for verifying the correctness of the machining trajectory. In overcut detection, the system compares the constructed trajectory region (the area enclosed by the actual tool travel path) with the contour region. Through region intersection analysis, it can be determined whether the trajectory region exceeds the range of the contour region, that is, whether the tool path exceeds the actual boundary of the part or the boundary of the machining requirements at some point, thereby identifying the overcut area. Compared with traditional point or line-level detection, this region-based detection method can provide more comprehensive and accurate results, avoid errors caused by discretization processing, and significantly improve the accuracy and reliability of overcut detection.
[0051] Further, the step of extracting contour lines from the geometric information and constructing a contour region based on the contour lines includes: identifying and extracting regional contour elements constituting a closed region from the geometric elements in the geometric information to obtain the contour lines; selecting associated contour lines with an association relationship based on the association relationship between the contour lines; and constructing a closed region based on the associated contour lines to obtain the contour region.
[0052] Specifically, by deeply analyzing geometric information, all geometric elements constituting the boundary of a part are identified, including straight lines, arcs, spline curves, etc. These elements must form one or more closed regions, meaning they are connected end-to-end without breaks or overlaps. For each closed region, the key geometric elements constituting its boundary are determined; these elements are the region contour elements, and their set constitutes the contour line. This process may involve topological analysis to ensure that only those elements that truly constitute the closed boundary are selected. The topological relationships between contour lines are analyzed to distinguish which contour lines are independent and which are interconnected. For example, for multiple holes on a part, the boundary contour lines of each hole are independent, while the outer contour line of the part may have some correlation with the boundary contour lines of the holes. Based on this analysis, the system uses the set of interconnected contour lines as the basis for constructing the contour region, which helps to perform more accurate region intersection analysis in subsequent steps, avoiding misjudgments or omissions.
[0053] The selected associated contour lines will be used to generate a closed geometric region, representing a specific machined surface or area of the part. When constructing the contour region, the system ensures that all contour lines are connected end-to-end, forming a closed boundary without gaps or overlaps. This process may involve geometric calculations and optimizations to ensure that the boundary of the contour region is as accurate as possible and best reflects the actual machining requirements of the part.
[0054] Step S103: Extract trajectory data from geometric information and construct a trajectory surface region based on the trajectory data.
[0055] In step S103 above, the geometric information extracted from the CAD file is analyzed in depth to identify each point on the toolpath and obtain the toolpath, thus obtaining trajectory data, which is the basis for constructing the trajectory region. Subsequently, based on the points and lines in the trajectory data, one or more closed trajectory regions are constructed. A trajectory region refers to a closed area enclosed by the tool's movement trajectory. In the overcut detection process, if the trajectory region overlaps with the contour region, and the overlapping part exceeds the range required for normal machining, then this part will be marked as an overcut area. This is because the trajectory region covers all the material that the tool may come into contact with, while the contour region is the actual or designed machining range required for the part. Comparing the two can quickly and accurately identify situations where the toolpath exceeds the part's machining requirements.
[0056] Furthermore, after extracting trajectory data from geometric information, the process also includes: acquiring the position data of the tool's entry and exit points; and optimizing the trajectory data based on the position data of the entry and exit points.
[0057] Specifically, the system analyzes previously extracted trajectory data and combines it with machining parameters input by the designer to accurately calculate and record the tool's entry and exit points. The entry point is the position where the tool first contacts the workpiece for machining, usually located at an edge of the workpiece or a specific machining starting point. The exit point is the position where the tool safely withdraws from the workpiece after machining is completed. It typically needs to consider factors such as the tool's current position, workpiece shape, and machine tool limitations to ensure a smooth transition and safe exit of the tool. This positional data includes not only coordinate information in three-dimensional space but also the tool's attitude and orientation to ensure that subsequent optimizations more realistically reflect the actual machining scenario.
[0058] Subsequently, using the approach and retraction point position data as constraints, the toolpath in the trajectory data is re-evaluated and adjusted to optimize the trajectory data. This optimization may involve adjusting the tool's approach and retraction paths to ensure that the tool's movement between the approach and retraction points meets machining requirements while avoiding unnecessary collision risks. The system may also further enhance the safety and efficiency of the trajectory by introducing additional safety boundaries or altering the tool attitude.
[0059] Furthermore, the steps of extracting trajectory data from geometric information and constructing a trajectory surface region based on the trajectory data include: extracting toolpaths from geometric information; configuring different path markers for different types of toolpaths; obtaining trajectory data based on toolpaths and path markers; and constructing a closed region based on toolpaths with the same path marker in the trajectory data to obtain the trajectory surface region.
[0060] Specifically, when constructing the trajectory region, the system deeply analyzes the geometric information in the CAD file to identify toolpaths related to part machining. This includes, but is not limited to, the tool's start point, end point, turning points, and straight and curved segments running through the entire path. The extracted toolpaths are categorized and assigned specific labels based on machining characteristics such as path and machining position (e.g., straight-line machining, circular arc machining, spline curve machining). These labels help the system accurately distinguish and process various paths when constructing the trajectory region. Combining the path labels, the system refines the toolpaths, generating detailed trajectory data. This may include converting the paths into coordinate data in a specific format to facilitate region construction and subsequent intersection analysis. Using trajectory data under the same path label, the system constructs one or more closed trajectory regions through geometric calculations and topological analysis. This process requires enclosing toolpaths with the same label into a continuous region, ensuring that the area covered by all cutting actions is included.
[0061] Step S104: The intersection of the contour surface region and the trajectory surface region is identified using the separation axis theorem. If there is an intersection between the contour surface region and the trajectory surface region, it is determined that the part has an overcutting anomaly. The overcutting surface region is obtained based on the intersection.
[0062] In step S104 above, the separating axis theorem is an efficient geometric algorithm for determining whether polygons intersect. It is particularly suitable for intersection detection of convex polygons and convex polyhedra in two-dimensional and three-dimensional space. The basic idea of the separating axis theorem is that if two convex sets can be completely separated in a certain direction without overlapping, then the two sets do not intersect in space. This certain direction refers to the separating axis. When performing overcut determination, the system first selects a series of possible separating axes based on the contour surface region and the trajectory surface region. The separating axis is usually along the direction of the boundary line of the surface region or perpendicular to the boundary line, aiming to cover all possible intersection angles and directions. Then, the system determines whether the contour surface region and the trajectory surface region intersect by projecting them onto the separating axis, thereby determining whether there is an overcut anomaly in the part machining, and calculates the actual intersection area using a polygon intersection algorithm.
[0063] Once the intersection of the contour region and the trajectory region is determined, the system will generate a visual representation of the overcut region, which is usually highlighted or marked with different colors for easy viewing by the user.
[0064] Furthermore, the steps for identifying the intersection of the contour region and the trajectory region using the separating axis theorem include: approximating the contour region to construct a contour polygon; approximating the trajectory region to construct a trajectory polygon; selecting a separating axis for the contour polygon and the trajectory polygon; calculating the projection range of the contour polygon and the trajectory polygon on the separating axis to obtain the contour projection range and the trajectory projection range; identifying whether there is an overlap between the contour projection range and the trajectory projection range, and determining that the contour region and the trajectory region intersect if there is an overlap.
[0065] Specifically, the complex curved boundaries in the contour region are converted into a set of straight line segments to form an approximate polygon model. This ensures that the polygon accurately reflects the boundary features of the original contour region, thereby simplifying the geometric objects of intersection analysis and facilitating efficient intersection determination using the separating axis theorem.
[0066] Subsequently, the toolpath within the trajectory surface is transformed into a polygon boundary. This boundary closely follows the actual range of tool movement and may include approximate representations of straight and curved segments. Matched with the contour polygon, a clear and concise model is provided for subsequent projection and intersection analysis.
[0067] From the constructed outline polygons and trajectory polygons, the normal directions of each edge are selected as candidate separating axes, ensuring coverage of all possible directions. For each separating axis, the outline polygon and trajectory polygon are projected separately, and the minimum and maximum projection values along that axis are calculated to form the projection range. Calculating the projection range helps to quickly determine the relative position of two polygons along a specific axis. If the projection ranges overlap, it indicates that there may be an intersection along that axis.
[0068] Compare the contour projection range and trajectory projection range of each set of corresponding separation axes to check for overlapping intervals. Overlapping projection ranges indicate the potential intersection of the two polygons along that axis, which is a necessary condition for further confirming the possibility of intersection. If overlapping projection ranges are found along any separation axis, it is determined that the contour region and the trajectory region intersect.
[0069] Furthermore, when the contour surface region and the trajectory surface region intersect, the step of determining that the part has an overcutting anomaly includes: when the contour surface region and the trajectory surface region intersect, obtaining the intersection range of the contour surface region and the trajectory surface region; comparing the intersection range with a preset range threshold to obtain a comparison result; and determining that the part has an overcutting anomaly when the comparison result indicates that the intersection range is greater than the preset range threshold.
[0070] Specifically, when an intersection is detected between the contour surface region and the trajectory surface region, the system calculates the precise range of the intersection. This typically involves analyzing the geometric features of the intersection area, such as area and width, to quantify the degree of overcutting. A pre-set range threshold serves as a standard for judging the severity of overcutting. This threshold can be the maximum allowable value of the intersection area or a proportional threshold relative to the part's machining area. The calculated intersection range is compared with this preset threshold to obtain a comparison result. The purpose of threshold comparison is to determine whether the overcutting has reached a level requiring attention and correction. By comparing the intersection range with the standard threshold, the impact of overcutting can be objectively assessed. If the value of the intersection range exceeds the preset range threshold, the system will immediately mark the part's machining trajectory as having an overcutting anomaly, which may require manual review or automatic adjustment of machining parameters for correction. The direct purpose of identifying overcutting anomalies is to prevent parts from being damaged due to improper machining, and also to prevent unnecessary stress on the cutting tools and machine tools, thereby protecting equipment and reducing maintenance costs and downtime.
[0071] By introducing precise calculation of the intersection range of the contour surface region and the trajectory surface region, as well as a comparison mechanism with the preset range threshold, the accuracy and response speed of overcut detection are significantly improved.
[0072] Through the above steps, the design data of the part is obtained and parsed to obtain geometric information. Contour lines are extracted from the geometric information and a contour region is constructed based on the contour lines. Trajectory data is extracted from the geometric information and a trajectory region is constructed based on the trajectory data. The intersection of the contour region and the trajectory region is identified using the separating axis theorem. When there is an intersection between the contour region and the trajectory region, it is determined that the part has an overcut anomaly. The overcut region is obtained based on the intersection.
[0073] In this embodiment, surface regions are directly extracted and constructed using the original part design data. This accurately captures complex contours and trajectories composed of straight lines, arcs, spline curves, etc. By constructing contour and trajectory surface regions, continuous detection of the machining process is achieved, ensuring that the detection covers all possible overcut areas and reducing missed detections due to insufficient point sampling. A surface intersection determination method based on the separating axis theorem is adopted, which can accurately determine whether two surface regions intersect and the specific location of the intersection. This improves the detection accuracy and the accuracy of the overcut detection results, thereby solving the technical problem of low detection accuracy in related technologies that rely on discrete point distance calculations for overcut anomaly detection.
[0074] The following describes in detail another optional implementation method.
[0075] Figure 2This is a schematic diagram of an optional overcut anomaly detection process based on surface region intersection analysis according to an embodiment of the present invention, as shown below. Figure 2 As shown, the overcut anomaly detection process based on surface domain intersection analysis includes:
[0076] Step 1, Begin;
[0077] Step 2: Start the CNC lathe software;
[0078] Step 3: Draw the part graphic;
[0079] Step 4: Set the processing parameters;
[0080] Step 5: Pick the processing outline;
[0081] Step 6: Set the tool entry and exit points;
[0082] Step 7: Generate the machining trajectory;
[0083] Step 8: Determine the trajectory outline;
[0084] Step 9: Detect overcutting anomalies;
[0085] The separation axis theorem is used to determine whether there is an intersection between the contour surface region and the trajectory surface region, thereby determining whether there is an overcutting anomaly in the part machining. If an overcutting anomaly exists, the machining parameters can be adjusted to avoid overcutting.
[0086] Step 10: Highlight the overcut area;
[0087] Step 11, End.
[0088] This invention extends the focus of overcut detection to the entire surface region. By constructing contour and trajectory surface regions, continuous detection of the machining process is achieved. This continuity ensures that the detection covers all possible overcut areas, reduces the problem of missed detection due to insufficient point sampling, and effectively improves the accuracy and reliability of the detection.
[0089] The following is a detailed description with reference to another embodiment.
[0090] Example 2
[0091] The overcut anomaly detection device based on surface intersection analysis provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in the above embodiment one. The specific implementation method and beneficial effects can be referred to the foregoing method embodiment, and will not be repeated here.
[0092] Figure 3 This is a schematic diagram of an optional overcut anomaly detection device based on surface intersection analysis according to an embodiment of the present invention, as shown below. Figure 3As shown, the overcut anomaly detection device based on surface domain intersection analysis may include: an acquisition unit 31, an extraction unit 32, a construction unit 33, and an identification unit 34, wherein,
[0093] The acquisition unit 31 is used to acquire the design data of the part and parse the design data to obtain geometric information;
[0094] Extraction unit 32 is used to extract contour lines from geometric information and construct contour regions based on the contour lines;
[0095] Construction unit 33 is used to extract trajectory data from geometric information and construct a trajectory surface region based on the trajectory data;
[0096] The identification unit 34 is used to identify the intersection of the contour surface region and the trajectory surface region using the separation axis theorem. When there is an intersection between the contour surface region and the trajectory surface region, it is determined that the part has an overcutting anomaly, and the overcutting surface region is obtained based on the intersection.
[0097] The overcut anomaly detection device based on surface region intersection analysis described above acquires the design data of the part through the acquisition unit 31 and parses the design data to obtain geometric information; extracts the contour lines from the geometric information through the extraction unit 32 and constructs the contour surface region based on the contour lines; extracts the trajectory data from the geometric information through the construction unit 33 and constructs the trajectory surface region based on the trajectory data; and identifies the intersection of the contour surface region and the trajectory surface region through the identification unit 34 using the separating axis theorem. When there is an intersection between the contour surface region and the trajectory surface region, it is determined that the part has an overcut anomaly, and the overcut surface region is obtained based on the intersection.
[0098] In this embodiment, surface regions are directly extracted and constructed using the original part design data. This accurately captures complex contours and trajectories composed of straight lines, arcs, spline curves, etc. By constructing contour and trajectory surface regions, continuous detection of the machining process is achieved, ensuring that the detection covers all possible overcut areas and reducing missed detections due to insufficient point sampling. A surface intersection determination method based on the separating axis theorem is adopted, which can accurately determine whether two surface regions intersect and the specific location of the intersection. This improves the detection accuracy and the accuracy of the overcut detection results, thereby solving the technical problem of low detection accuracy in related technologies that rely on discrete point distance calculations for overcut anomaly detection.
[0099] Furthermore, the extraction unit includes: a first extraction module, used to identify and extract the region contour elements constituting the closed region from the geometric elements in the geometric information to obtain contour lines; a first selection module, used to select associated contour lines with an association relationship based on the association relationship between the contour lines; and a first construction module, used to construct the closed region based on the associated contour lines to obtain the contour region.
[0100] Furthermore, the construction unit includes: a second extraction module for extracting toolpaths from geometric information; a first configuration module for configuring different path markers for different types of toolpaths; a first acquisition module for obtaining trajectory data based on toolpaths and path markers; and a second construction module for constructing closed regions based on toolpaths with the same path marker in the trajectory data to obtain trajectory surface regions.
[0101] Furthermore, the recognition unit includes: a first processing module for approximating the contour region to construct a contour polygon; a second processing module for approximating the trajectory region to construct a trajectory polygon; a first selection module for selecting a separating axis for the contour polygon and the trajectory polygon; a first calculation module for calculating the projection range of the contour polygon and the trajectory polygon on the separating axis to obtain the contour projection range and the trajectory projection range; and a first recognition module for identifying whether the contour projection range and the trajectory projection range overlap, and determining that the contour region and the trajectory region intersect if there is an overlap.
[0102] Furthermore, the acquisition unit includes: a first conversion module for converting the design data according to a preset data format; a third extraction module for extracting geometric elements from the converted design data; and a fourth extraction module for extracting processing parameters, material information, and processing accuracy from the converted design data.
[0103] Furthermore, the overcut anomaly detection device based on surface intersection analysis also includes: a second acquisition module for acquiring the position data of the tool's entry point and retraction point; and a first optimization module for optimizing the trajectory data based on the position data of the entry point and retraction point.
[0104] Furthermore, the identification module also includes: a third acquisition module, used to acquire the intersection range of the contour surface region and the trajectory surface region when there is an intersection; a first comparison module, used to compare the intersection range with a preset range threshold to obtain a comparison result; and a first determination module, used to determine that the part has an overcutting abnormality when the comparison result indicates that the intersection range is greater than the preset range threshold.
[0105] The above-mentioned overcut anomaly detection device based on surface domain intersection analysis may also include a processor and a memory. The above-mentioned acquisition unit 31, extraction unit 32, construction unit 33, identification unit 34, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0106] The processor described above contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and over-cutting anomalies can be detected by adjusting kernel parameters.
[0107] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0108] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any of the above-described overcut anomaly detection methods based on surface intersection analysis.
[0109] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described overcut anomaly detection methods based on surface intersection analysis.
[0110] According to another aspect of the present invention, a computer program product is also provided, the computer program product including a computer program, wherein when the computer program is executed by a processor, it implements any of the above-described overcut anomaly detection methods based on surface intersection analysis.
[0111] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: acquiring design data of a part and parsing the design data to obtain geometric information; extracting contour lines from the geometric information and constructing a contour region based on the contour lines; extracting trajectory data from the geometric information and constructing a trajectory region based on the trajectory data; using the separating axis theorem to identify the intersection of the contour region and the trajectory region; determining that the part has an overcut anomaly when the contour region and the trajectory region have an intersection; and obtaining the overcut region based on the intersection.
[0112] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: identifying and extracting region contour elements constituting a closed region from geometric elements in geometric information to obtain contour lines; selecting associated contour lines with associated relationships based on the relationships between contour lines; and constructing a closed region based on the associated contour lines to obtain a contour region.
[0113] This application also provides a computer program product that, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: extracting toolpaths from geometric information; configuring different path markers for different types of toolpaths; obtaining trajectory data based on the toolpaths and path markers; and constructing a closed region based on toolpaths with the same path marker in the trajectory data to obtain a trajectory surface region.
[0114] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: approximating a contour region to construct a contour polygon; approximating a trajectory region to construct a trajectory polygon; selecting a separating axis for the contour polygon and the trajectory polygon; calculating the projection ranges of the contour polygon and the trajectory polygon on the separating axis to obtain the contour projection range and the trajectory projection range; identifying whether there is an overlap between the contour projection range and the trajectory projection range, and determining that the contour region and the trajectory region intersect if there is an overlap.
[0115] This application also provides a computer program product that, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: converting design data according to a preset data format; extracting geometric elements from the converted design data; and extracting machining parameters, material information, and machining accuracy from the converted design data.
[0116] This application also provides a computer program product that, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: acquiring the position data of the tool's entry point and retraction point; and optimizing the trajectory data based on the position data of the entry point and retraction point.
[0117] Furthermore, when the contour surface region and the trajectory surface region intersect, the step of determining that the part has an overcutting anomaly includes: when the contour surface region and the trajectory surface region intersect, obtaining the intersection range of the contour surface region and the trajectory surface region; comparing the intersection range with a preset range threshold to obtain a comparison result; and determining that the part has an overcutting anomaly when the comparison result indicates that the intersection range is greater than the preset range threshold.
[0118] Figure 4 This is a hardware structure block diagram of an electronic device (or mobile device) that performs an overcut anomaly detection method based on surface region intersection analysis according to an embodiment of the present invention. Figure 4 As shown, an electronic device may include one or more processors ( Figure 4The processor, denoted by 402a, 402b, ..., 402n, can include, but is not limited to, a processing device such as a microprocessor (MCU) or a programmable logic device (FPGA), and a memory 404 for storing data. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports in the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 4 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown.
[0119] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0120] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0122] The units described as separate components may or may not be physically separate. 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0125] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting overcut anomalies based on surface region intersection analysis, characterized in that, include: The design data of the part is acquired and parsed to obtain geometric information; Extract contour lines from the geometric information and construct contour regions based on the contour lines; Trajectory data is extracted from the geometric information, and a trajectory surface region is constructed based on the trajectory data; The intersection of the contour surface region and the trajectory surface region is identified using the separation axis theorem. If the contour surface region and the trajectory surface region have an intersection, it is determined that the part has an overcut anomaly, and the overcut surface region is obtained based on the intersection.
2. The method according to claim 1, characterized in that, The steps of extracting contour lines from the geometric information and constructing contour regions based on the contour lines include: The contour lines are obtained by identifying and extracting the region contour elements that constitute the closed region from the geometric elements in the geometric information. Select associated contour lines based on the relationships between the contour lines; A closed region is constructed based on the associated contour lines to obtain the contour surface region.
3. The method according to claim 1, characterized in that, The steps of extracting trajectory data from the geometric information and constructing a trajectory surface region based on the trajectory data include: Extract the toolpath from the geometric information; Configure different path markers for different types of toolpaths; The trajectory data is obtained based on the toolpath and the path marker; A closed region is constructed based on the tool path marked with the same path in the trajectory data to obtain the trajectory surface region.
4. The method according to claim 1, characterized in that, The steps for identifying the intersection of the contour region and the trajectory region using the separating axis theorem include: The contour region is approximated to construct a contour polygon; The trajectory surface region is approximated to construct a trajectory polygon; For the contour polygon and the trajectory polygon, a separating axis is selected; Calculate the projection ranges of the contour polygon and the trajectory polygon on the separation axis to obtain the contour projection range and the trajectory projection range; Identify whether there is an overlap between the contour projection range and the trajectory projection range. If there is an overlap between the contour projection range and the trajectory projection range, determine that the contour surface region and the trajectory surface region intersect.
5. The method according to claim 1, characterized in that, The steps for parsing the design data include: The design data is converted according to a preset data format. Extract geometric elements from the transformed design data; Extract processing parameters, material information, and processing accuracy from the converted design data.
6. The method according to claim 1, characterized in that, After extracting trajectory data from the geometric information, the process further includes: Obtain the position data of the tool's entry and exit points; The trajectory data is optimized based on the position data of the tool entry point and the tool retraction point.
7. The method according to claim 1, characterized in that, When the contour surface region and the trajectory surface region intersect, the step of determining that the part has an overcut anomaly includes: If the contour surface region and the trajectory surface region intersect, obtain the intersection range of the contour surface region and the trajectory surface region; The intersection range is compared with a preset range threshold to obtain the comparison result; If the comparison result indicates that the intersection range is greater than a preset range threshold, it is determined that the part has an overcutting anomaly.
8. An overcut anomaly detection device based on surface region intersection analysis, characterized in that, include: The acquisition unit is used to acquire the design data of the part and parse the design data to obtain geometric information; An extraction unit is used to extract contour lines from the geometric information and construct a contour region based on the contour lines; A construction unit is used to extract trajectory data from the geometric information and construct a trajectory surface region based on the trajectory data; The identification unit is used to identify the intersection of the contour surface region and the trajectory surface region using the separating axis theorem. If there is an intersection between the contour surface region and the trajectory surface region, it determines that the part has an overcutting anomaly and obtains the overcutting surface region based on the intersection.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the overcut anomaly detection method based on surface intersection analysis as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The method includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the overcut anomaly detection method based on surface intersection analysis as described in any one of claims 1 to 7.