Machining feature detection method, electronic device, storage medium, and program product

CN123015997APending Publication Date: 2026-10-30ZHONGSHAN INNORAPID CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611495926.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0007]本申请的主要目的在于提供一种机加工特征检测方法、电子设备、存储介质及程序产品,旨在解决如何提高复杂结构零件的可加工性分析精度,有效识别倒扣、内角及深孔等特征的加工风险,以降低加工过程中的撞机风险并提升生产效率的技术问题

Benefits of technology

[0047]通过获取并预处理目标三维CAD模型,排除了模型缝隙和位置偏移对后续分析的干扰,提供了标准化的数据输入;在此基础上,通过独立调用所述全局空间碰撞引擎完成倒扣特征的全局空间检测,通过协同调用所述精确几何引擎与所述全局空间碰撞引擎完成内部直角特征的几何拓扑判定,通过调用所述精确几何引擎并结合预设刀具极限参数完成深槽风险特征的长径比评估与干涉扫描,从而实现了针对三类核心加工风险特征的并行、高效、精准检测。相比于现有技术中单一依赖法向量判别或纯离散网格分析的方法,本申请实施例通过双引擎的按需调用,兼顾了局部几何精度与全局空间感知能力,提升了复杂结构工件可加工性分析的整体精度与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015997A_ABST
    Figure CN123015997A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of graphic image processing, in particular to a machining feature detection method, an electronic device, a storage medium and a program product. The method comprises the following steps: obtaining and preprocessing a target three-dimensional CAD model to generate a standardized entity; calling a global space collision engine to determine and mark a reverse clamping feature; calling an accurate geometry engine to extract a shared edge of the standardized entity, and calling the global space collision engine to perform ray projection on the shared edge to determine and mark an internal right-angle feature; calling the accurate geometry engine to obtain an actual length-diameter ratio of an inner concave rotary surface, and determining and marking a deep groove risk feature according to a comparison result of the actual length-diameter ratio and a preset tool limit parameter, in combination with an interference scanning result of the global space collision engine; and superimposing and rendering determination results of the reverse clamping feature, the internal right-angle feature and the deep groove risk feature in a three-dimensional view, and outputting an analysis log. The machinability analysis precision of a complex structure part is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of graphics and image processing technology, and in particular to machining feature detection methods, electronic devices, storage media, and program products. Background Technology

[0002] In the CNC (Computer Numerical Control) manufacturing industry, which involves small-batch, multi-variety production, product models iterate rapidly and are diverse. Before processing, a manufacturability analysis (DFM, Design for Manufacturing) must be performed on the 3D CAD model.

[0003] For example, the Chinese invention patent with publication number CN110334421B discloses a method and apparatus for batch analysis of the manufacturability of part design models. By reading the assembly model, a tree structure is generated, and the nodes are divided into root, middle and leaf nodes. Users can select any node to determine the part models to be analyzed in batches. Furthermore, a personalized analysis scheme is configured for each part, realizing batch processing without repeatedly loading files, thereby improving the degree of automation and accuracy.

[0004] However, currently used machinability analysis schemes often misjudge undercut features with complex spatial occlusion relationships due to a lack of global spatial perception capabilities. Furthermore, for clear corner (i.e., internal right angle) regions within the model, the inability to accurately distinguish whether they are convex corners reachable or inaccessible by the tool results in weak machining interference recognition capabilities, which can easily lead to collisions or overcutting accidents. In addition, for deep groove or deep hole features, it is difficult to combine the actual physical parameters of the tool (such as length-to-diameter ratio limitations) to conduct accurate machining risk assessment.

[0005] Therefore, how to improve the accuracy of the machinability analysis of complex structural parts, effectively identify the machining risks of features such as undercuts, internal angles and deep holes, so as to reduce the risk of collisions during the machining process and improve production efficiency, is an urgent problem to be solved.

[0006] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0007] The main objective of this application is to provide a machining feature detection method, electronic device, storage medium, and program product, aiming to solve the technical problem of how to improve the accuracy of the machinability analysis of complex structural parts, effectively identify the machining risks of features such as undercuts, internal angles, and deep holes, so as to reduce the risk of collisions during the machining process and improve production efficiency.

[0008] To achieve the above objectives, this application proposes a method for detecting machining features, the method comprising:

[0009] Acquire and preprocess the target 3D CAD model to generate a standardized entity;

[0010] Call the global space collision engine to perform ray projection and intersection tests in at least two preset processing directions, and determine and mark the undercut features;

[0011] The precise geometry engine is invoked to extract the common edges of the standardized entity, and the global space collision engine is invoked to perform ray projection on the common edges to determine and mark the internal right-angle features;

[0012] The precise geometry engine is invoked to obtain the actual length-to-diameter ratio of the concave rotating surface. Based on the comparison between the actual length-to-diameter ratio and the preset tool limit parameters, combined with the interference scan results of the global space collision engine, the deep groove risk characteristics are determined and marked.

[0013] The determination results of the inverted buckle feature, the internal right angle feature, and the deep trench risk feature are overlaid and rendered in a 3D view, and an analysis log is output.

[0014] In one embodiment, the step of acquiring and preprocessing the target 3D CAD model to generate a standardized entity includes:

[0015] Read the target 3D CAD model;

[0016] The 3D CAD model is subjected to topological surface stitching to generate a topological solid;

[0017] Calculate the global bounding box of the topological entity, extract the geometric center coordinates of the global bounding box, and translate the topological entity to the origin of the coordinate system based on the translation matrix to generate the normalized entity.

[0018] In one embodiment, after the step of acquiring and preprocessing the target 3D CAD model to generate a standardized entity, the method further includes:

[0019] Extract all surface features of the standardized entity, discretize each continuous topological surface, and generate a triangular mesh;

[0020] Obtain the vertex and index data of the triangular mesh, and construct the global spatial collision engine based on ray projection; and,

[0021] Construct a dual-engine hybrid computing environment that coordinates the precise geometry engine based on boundary representation B-Rep with the global spatial collision engine.

[0022] In one embodiment, the step of invoking the global space collision engine to perform ray projection and intersection tests in at least two preset processing directions, and determining and marking the undercut features, includes:

[0023] At least two mutually orthogonal processing direction vectors are preset;

[0024] Traverse the faces in the standardized entity and calculate the local normal vector of each face sampling point;

[0025] Each sampling point is offset outward from the entity by a preset safety distance along its local normal vector. The coordinates obtained after the offset are used as the starting point of the test ray. The direction of the test ray is set to be parallel to each preset processing direction. The test ray is then input to the global space collision engine for intersection testing.

[0026] Based on the ray hit distance returned by the global space collision engine, the directional smoothness rate of each surface in each preset processing direction is calculated, and the surface with the directional smoothness rate lower than the preset threshold is determined to be the undercut surface.

[0027] In one embodiment, the step of determining a face with a directional passability rate lower than a preset threshold as an undercut face based on the ray hit distance returned by the global space collision engine includes:

[0028] A gridded sampling matrix is ​​constructed within the parameter domain of each of the aforementioned surfaces. Physical boundary verification is performed on each sampling point in the gridded sampling matrix, and invalid sampling points are removed.

[0029] Obtain the hit distance of each test ray in the global space collision engine;

[0030] If the hit distance is infinite, or the hit distance is less than or equal to the preset minimum effective collision distance, the corresponding test ray is determined to be unobstructed, and the minimum effective collision distance is greater than the preset safety distance;

[0031] The unobstructed rate of a single preset processing direction is obtained by calculating the proportion of the number of unobstructed test rays to the total number of effective sampling points.

[0032] In one embodiment, the steps of invoking the precise geometry engine to extract the common edges of the normalized entity, and invoking the global space collision engine to perform ray projection on the common edges, and determining and marking the internal right-angle features include:

[0033] Extract all edge features shared by two adjacent faces in the standardized entity, and determine the shared edges;

[0034] Calculate the angle between the local normal vectors of two adjacent faces at the midpoint of each shared edge, and mark the shared edges whose local normal vector angle exceeds a preset angle threshold as candidate edges;

[0035] Calculate the midpoint of the chord of the candidate edge, and emit a ray into the global space collision engine to detect whether the midpoint of the chord is located inside the entity;

[0036] If the midpoint of the chord is located inside the solid, the candidate edge is determined to be an internal right-angle feature, and an unprocessable warning is output.

[0037] In one embodiment, the step of calling the precise geometry engine to obtain the actual length-to-diameter ratio of the concave surface of revolution, and determining and marking the deep groove risk characteristics based on the comparison result of the actual length-to-diameter ratio and the preset tool limit parameters, combined with the interference scan result of the global space collision engine, includes:

[0038] Geometric type identification is performed on each surface within the standardized entity, the axis vector and radius of the revolution surface are extracted, and it is determined whether the revolution surface is the concave revolution surface.

[0039] If it is the concave rotating surface, calculate the actual length-to-diameter ratio based on the radius and machining depth of the concave rotating surface, and retrieve the maximum allowable multiple of the radius in the workpiece material from the preset standard tool parameter table;

[0040] If the actual length-to-diameter ratio is greater than the maximum allowable multiple of the diameter, the corresponding concave rotating surface is marked as a risk feature that the tool cannot reach.

[0041] The global space collision engine is invoked to detect whether there is interference between the tool and the workpiece;

[0042] If interference exists, the concave rotating surface is marked as having a risk of deep machining collision.

[0043] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the machining feature detection method described above.

[0044] In addition, to achieve the above objectives, this application also proposes a readable storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the machining feature detection method described above.

[0045] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the machining feature detection method described above.

[0046] One or more technical solutions proposed in this application have at least the following technical effects:

[0047] By acquiring and preprocessing the target 3D CAD model, interference from model gaps and positional offsets on subsequent analysis is eliminated, providing standardized data input. Based on this, the global spatial collision engine is independently invoked to complete global spatial detection of undercut features. The precise geometry engine and the global spatial collision engine are collaboratively invoked to complete geometric topology determination of internal right-angle features. The precise geometry engine, combined with preset tool limit parameters, is invoked to complete aspect ratio evaluation and interference scanning of deep groove risk features. This achieves parallel, efficient, and accurate detection of three core machining risk features. Compared to existing methods that rely solely on normal vector discrimination or pure discrete mesh analysis, this embodiment, through the on-demand invocation of dual engines, balances local geometric accuracy with global spatial awareness, improving the overall accuracy and reliability of the machinability analysis of complex workpiece structures. Attached Figure Description

[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating the first embodiment of the machining feature detection method of this application.

[0051] Figure 2 This is a flowchart illustrating the second embodiment of the machining feature detection method of this application.

[0052] Figure 3 This is a flowchart illustrating the third embodiment of the machining feature detection method of this application.

[0053] Figure 4 This is a flowchart illustrating the fourth embodiment of the machining feature detection method of this application.

[0054] Figure 5 This is a schematic diagram of the interactive interface for determining and marking undercut features in one embodiment of the machining feature detection method of this application;

[0055] Figure 6 This is a schematic diagram of the interactive interface for determining and marking the risk features of deep grooves in one embodiment of the machining feature detection method of this application;

[0056] Figure 7This is a schematic diagram of the equipment structure of the hardware operating environment involved in the machining feature detection method in the embodiments of this application.

[0057] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0058] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0059] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0060] The main solution of this application embodiment is to automatically detect and analyze the undercut features, internal right angle features and deep groove risk features of the 3D CAD model by constructing a dual-engine hybrid computing environment based on the collaboration of a precise geometry engine and a global spatial collision engine.

[0061] Existing technologies suffer from several drawbacks when dealing with complex, irregularly shaped parts. These include misjudgment of undercut features due to a lack of global spatial awareness, weak identification of machining interference due to the inability to accurately distinguish between convex and concave corners in internal right angles, and difficulty in accurately assessing machining risks in deep grooves and holes by combining tool physical parameters. This application provides a solution that enables machining feature detection for CNC small-batch, multi-variety machining to achieve both high precision and high efficiency, realizing fully automated, highly physically accurate machinability analysis.

[0062] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions. The following description uses an electronic device equipped with the machining feature detection system of this application as an example to illustrate this embodiment and the subsequent embodiments.

[0063] Based on this, embodiments of this application provide a method for detecting machining features, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the machining feature detection method of this application.

[0064] In this embodiment, the machining feature detection method includes steps S100 to S500:

[0065] Step S100: Obtain and preprocess the target 3D CAD model to generate a standardized entity.

[0066] It should be noted that the target 3D CAD model refers to the part model to be analyzed for manufacturability. Its file format is typically an industry-standard format, such as STEP or STP. Because model files exported from different CAD systems may contain topological gaps or positional offsets, direct analysis may lead to misjudgments. Therefore, preprocessing is required to generate a standardized solid model, laying the foundation for subsequent analysis. A standardized solid is a closed manifold solid that has undergone coordinate normalization, with its geometric center located at the origin of the coordinate system, facilitating symmetrical analysis in all machining directions.

[0067] Optionally, the 3D model file to be analyzed (e.g., STEP or STP format) can be read via a file interface. Understandably, the read model file may contain minor gaps or overlapping surfaces due to data conversion errors between different CAD systems. These geometric defects can lead to errors in subsequent ray casting and topology determination. Therefore, topological surface stitching can be performed on the read model beforehand.

[0068] Specifically, a topological stitching algorithm (e.g., setting a stitching tolerance of 0.1 mm) is used to reconstruct free surfaces and open shells into closed manifold entities. After stitching, a closed topological entity is obtained. Subsequently, the global bounding box of the topological entity is calculated, that is, the minimum and maximum values ​​of the entity in the X, Y, and Z axes are calculated to determine a minimum hexahedral space that can completely enclose the entity. The geometric center coordinates of the global bounding box (i.e., the midpoint of the X-axis, Y-axis, and Z-axis) are extracted, and all vertices of the topological entity are translated along the X, Y, and Z directions using a translation matrix so that its geometric center coincides with the origin of the coordinate system, thereby generating a standardized entity. Through translation standardization, the interference of the part's positional offset in space on the subsequent determination of the machining direction is eliminated, ensuring the symmetry and repeatability of the inspection results.

[0069] Thus, by performing topological stitching on the 3D CAD model, gaps caused by model transformation are eliminated, avoiding ray leakage or incorrect intersections due to model defects. By translating to the origin of the coordinate system, subsequent preset machining direction vectors can be determined relative to the same datum. Preprocessing methods ensure the data quality of subsequent dual-engine analysis, reduce the misjudgment rate caused by model quality issues, and improve the robustness of the detection system.

[0070] Step S200: Call the global space collision engine to perform ray projection and intersection tests in at least two preset processing directions, and determine and mark the undercut features.

[0071] It should be noted that the global spatial collision engine refers to a spatial index structure built based on triangular mesh discretization, which can quickly detect the intersection of any ray in space. Undercut features refer to areas in a part that cannot be directly machined by the tool due to their own structural occlusion in the conventional machining direction.

[0072] In this embodiment, the feed direction of the tool is abstracted as the ray direction, and the obstruction of the workpiece entity to the tool path is abstracted as the intersection detection of the ray and the triangular mesh, thereby reducing the interference inspection problem in three-dimensional space to a high-concurrency ray projection problem.

[0073] Optionally, at least two machining direction vectors are preset. For example, for a three-axis machining center, six mutually orthogonal directions are preset: +X, -X, +Y, -Y, +Z, and -Z. For 3+2 axis positioning machining, additional tilt directions can be preset according to the actual clamping posture. Then, for each machining direction, a large number of test rays are emitted into the global space collision engine, and the hit situation of each ray when it penetrates the solid along the machining direction from the surface of the part is recorded. If the vast majority of test rays on a certain surface in a certain machining direction are not blocked by the solid itself, then the surface is unobstructed in this machining direction; if a surface cannot be unobstructed in all preset machining directions, then the surface is determined to be an undercut surface.

[0074] Thus, by invoking the global spatial collision engine to perform ray casting, a rapid and comprehensive assessment of the global occlusion state of each face of the part under multiple machining directions is achieved. This overcomes the problem in traditional technologies that rely solely on the direction of a single face normal for local discrimination and lack global spatial awareness, leading to missed detection of undercut features. Furthermore, compared to algorithms that perform precise geometric intersection calculations one by one, this application improves the efficiency of undercut feature detection by simultaneously completing intersection tests of tens of thousands of rays through the highly parallel ray casting of the global spatial collision engine.

[0075] Step S300: Invoke the precise geometry engine to extract the common edges of the standardized entity, and invoke the global space collision engine to perform ray projection on the common edges, and determine and mark the internal right-angle features.

[0076] It should be noted that the precise geometry engine refers to a geometry engine based on boundary representation (B-Rep). After reading industry-standard format files, it retains the precise parametric mathematical equation description (such as plane equations, cylindrical surface equations, NURBS surfaces, etc.) of the 3D geometric data structure, and can accurately extract the normal vector, curvature, and edge tangential vector at any point. Internal right-angle features (i.e., cleared corners) refer to concave corners located inside a solid where the included angle between two faces is too small. In CNC milling, because the milling cutter is a rotating structure, its bottom cannot completely cut into the root of the concave corner. Electrical discharge machining or a special corner clearing tool is required for root clearing. Failure to identify this can easily lead to residue or tool collision.

[0077] In this embodiment, the precise geometry engine is invoked to extract all edge features shared by two adjacent faces in a standardized entity. This refers to the edge objects in the B-Rep data structure, where each shared edge is associated with two adjacent faces. Then, for each shared edge, the precise geometry engine calculates the angle between the local normal vectors of the two adjacent faces at the midpoint of the shared edge. If this angle is close to 180°, indicating a smooth transition between the two faces, it is considered a regular curved surface; if the angle is less than a preset threshold, such as 170°, it indicates that the edge is a sharp corner. Next, the global spatial collision engine is invoked to emit a probe ray towards the midpoint of the chord of the edge. Using the ray projection topology theorem that "even-order intersections are on the outside, odd-order intersections are on the inside," it is determined whether the midpoint is located inside the entity. If it is inside the entity, it indicates that the sharp corner is a concave sharp corner, i.e., an internal right-angle feature; if it is outside the entity, it indicates a convex sharp corner, which is not a non-machinable feature.

[0078] Thus, by collaboratively invoking the precise geometry engine to extract the precise geometric position of shared edges and the normal vectors of adjacent faces, and by invoking the global spatial collision engine to quickly locate the midpoint of the chord, accurate discrimination of internal right-angle features is achieved. Compared to traditional techniques that rely solely on curvature or the angle between normal vectors for judgment and cannot distinguish between concave and convex angles, this embodiment accurately distinguishes between convex angles that the tool can reach and concave angles that cannot be reached through spatial topology determination using ray projection. This avoids collisions or overcutting accidents caused by misjudgment and improves the safety of machining process planning.

[0079] Step S400: Call the precise geometry engine to obtain the actual length-to-diameter ratio of the concave rotating surface, and determine and mark the deep groove risk characteristics based on the comparison result of the actual length-to-diameter ratio and the preset tool limit parameters, combined with the interference scan result of the global space collision engine.

[0080] It should be noted that deep grooves or deep holes refer to concave rotary structures (such as deep holes, deep grooves, and deep cavities) in parts that are relatively deep but have a small diameter. The machining risks of these features mainly depend on two factors: first, whether the length-to-diameter ratio of the structure exceeds the maximum allowable multiple of the corresponding diameter tool in the standard tool magazine for that workpiece material. The larger the length-to-diameter ratio, the longer the overhang length that the tool needs to extend, the worse the rigidity, and the more likely it is to vibrate or break; second, whether the tool interferes with other parts of the workpiece when entering the feature.

[0081] In this embodiment, a precise geometry engine is invoked to identify the geometric type of each surface within the standardized entity. The B-Rep precise geometry engine is used to determine the surface type (plane, cylindrical surface, conical surface, sphere, NURBS freeform surface, etc.), extract the axis vector and radius of the revolution surface (cylindrical surface, conical surface), and further determine the concavity of the revolution surface. Specifically, whether it is a concave revolution surface can be determined by detecting whether the surface normal vector points to the axis.

[0082] Based on the characteristics of the concave rotating surface, its radius R and machining depth L are obtained, and the actual length-to-diameter ratio is calculated. Subsequently, the preset workpiece material information (e.g., aluminum alloy, steel, titanium alloy, etc.) is obtained, and the corresponding diameter D is retrieved from the preset standard tool parameter table. The maximum permissible multiple of diameter for this material (e.g., for steel, a tool with a diameter of 4mm has a maximum permissible multiple of diameter of 7). If the calculated actual length-to-diameter ratio (Ratio) is greater than this maximum permissible multiple, it indicates that there is no matching tool in the standard tool library for this feature, and it is screened as a suspected high-risk machining feature. Based on this, a global spatial collision engine is further invoked to simulate the spatial motion trajectory of the tool as it enters the feature along the feed direction, detecting whether there is interference between the tool and the workpiece. If interference occurs, the feature is determined to be a deep groove feature with a high risk of deep machining.

[0083] Understandably, by calling the precise geometry engine to obtain the precise geometric parameters (radius, depth, and axial direction) of the concave rotating surface, and combining this with preset tool limit parameters for quantitative assessment of the length-to-diameter ratio, the judgment of machining risks has a clear physical basis. Furthermore, by calling the global spatial collision engine for interference scanning, the accessibility of the tool on the spatial path is verified. This dual-judgment mechanism ensures that the assessment of deep groove risk characteristics considers both the cutting performance limits of the tool itself and the constraints of the part's geometric space on the tool path, significantly improving the accuracy of predicting machining risks for deep holes and deep grooves.

[0084] Step S500: The determination results of the inverted buckle feature, the internal right angle feature and the deep trench risk feature are overlaid and rendered in the three-dimensional view, and the analysis log is output.

[0085] In this embodiment, the various processing risk features identified in steps S200, S300, and S400 are overlaid with standardized entities in the 3D view window. Different colors are assigned to processing features with different risk levels using shaders. For example, undercut surfaces and internal right-angle features are rendered red to indicate severe risk; deep groove risk features with good external lighting but high aspect ratios are rendered yellow to indicate early warning risk; and safe areas without risk are rendered gray or retain their original model colors. Simultaneously, the system outputs a structured analysis log in the sidebar or bottom log window of the interface. The log content includes, but is not limited to, detection time, the number of various features detected, the location identifier of each feature, the risk level, and the corresponding recommended handling measures (such as "recommended to use a T-shaped tool" or "recommended to use electrical discharge machining"). Users can rotate and zoom the 3D view using the mouse to observe the spatial distribution and geometric shape of various risk features from any angle.

[0086] Understandably, by overlaying and rendering the judgment results of the three types of risk characteristics in a 3D view, abstract detection data is transformed into intuitive visual information, allowing users to easily identify the process risk areas of parts. Simultaneously outputting analysis logs provides users with detailed quantitative data and processing suggestions, facilitating targeted development of processing strategies in subsequent CAM programming or process review stages. Visual output enables detection results to directly serve actual production decisions, improving the efficiency of the entire process from model input to process plan formulation.

[0087] In the technical solution provided in this embodiment, by acquiring and preprocessing the target 3D CAD model, the interference of model gaps and positional offsets on subsequent analysis is eliminated, providing standardized data input. Based on this, the global spatial collision engine is independently invoked to complete global spatial detection of undercut features. The precise geometry engine and the global spatial collision engine are collaboratively invoked to complete geometric topology determination of internal right-angle features. The precise geometry engine is invoked in conjunction with preset tool limit parameters to complete aspect ratio evaluation and interference scanning of deep groove risk features, thereby achieving parallel, efficient, and accurate detection of three types of core machining risk features. Compared to existing methods that rely solely on normal vector discrimination or pure discrete mesh analysis, this embodiment, through the on-demand invocation of dual engines, balances local geometric accuracy and global spatial awareness, improving the overall accuracy and reliability of the machinability analysis of complex workpiece structures.

[0088] In one feasible implementation, step S100 includes steps S110 to S130:

[0089] Read the target 3D CAD model;

[0090] The 3D CAD model is subjected to topological surface stitching to generate a topological solid;

[0091] Calculate the global bounding box of the topological entity, extract the geometric center coordinates of the global bounding box, and translate the topological entity to the origin of the coordinate system based on the translation matrix to generate the normalized entity.

[0092] It should be noted that 3D CAD model files are typically in industry standard formats, including but not limited to STEP (.stp, .step), IGES (.igs), and STL (.stl). Among these, the STEP format is the preferred implementation format because it fully preserves the topological and geometric information of the boundary representation (B-Rep), including precise parametric equations describing faces, edges, and vertices, which is beneficial for the high-precision extraction by the subsequent precise geometry engine.

[0093] Different CAD software (such as SolidWorks, CATIA, NX, Creo, etc.) use different tolerance settings when exporting STEP files, which may result in tiny gaps or overlaps between adjacent surfaces in the model. These gaps are typically on the order of micrometers to one-tenth of a millimeter in width. Although visually imperceptible, they can cause rays to leak through these gaps during solid closure checks and ray-to-solid intersection tests, leading to incorrect intersection results. Therefore, a topology stitching algorithm can be used, setting a stitching tolerance (e.g., 0.1 mm), to merge and weld the edges of adjacent surfaces with gaps smaller than this tolerance, eliminating free surfaces and reconstructing a closed manifold topological solid. If the model itself is an open shell (e.g., sheet metal), the stitching generates an effective shell; if the model is a solid, it generates a closed solid. In either case, the stitching creates a topologically closed structure that can be used for solid closure checks, denoted as a topological solid.

[0094] In this embodiment, the Axis-Aligned Bounding Box (AABB) is a minimal hexahedron with sides parallel to the X, Y, and Z axes of the world coordinate system, used to completely enclose all vertices of the topological entity. The steps for calculating the geometric center coordinates of this bounding box include: assuming the minimum value of the bounding box in the X-axis direction is x_min and the maximum value is x_max, then the X-coordinate of the geometric center is (x_min + x_max) / 2; the Y and Z coordinates are calculated similarly. Subsequently, a translation matrix is ​​constructed, translating all vertices of the topological entity along the X, Y, and Z directions by the negative geometric center coordinate values, so that the geometric center coincides with the origin O(0,0,0) of the coordinate system. The translated entity is denoted as the normalized entity. This normalized entity retains all the geometric shapes and topological relationships of the original model, only changing its spatial position.

[0095] Thus, this embodiment of the application eliminates gaps caused by model transformation through topological stitching of the 3D CAD model, avoiding ray leakage or incorrect intersections due to model defects. This allows subsequent ray projection and spatial topology determination to be based on reliable closed entities. By translating to the origin of the coordinate system, subsequent preset processing direction vectors (such as +X direction, -X direction, etc.) can be symmetrically determined relative to the same reference, avoiding the problem of asymmetrical detection results in different directions due to the positional offset of the part in space. This ensures the data quality of subsequent dual-engine analysis, reduces the misjudgment rate caused by model quality issues, and improves the robustness of the detection system.

[0096] As an optional implementation, after step S100, the method further includes:

[0097] Extract all surface features of the standardized entity, discretize each continuous topological surface, and generate a triangular mesh;

[0098] Obtain the vertex and index data of the triangular mesh, and construct the global spatial collision engine based on ray projection; and,

[0099] Construct a dual-engine hybrid computing environment that coordinates the precise geometry engine based on boundary representation B-Rep with the global spatial collision engine.

[0100] Specifically, based on the traversal interface of the Boundary Representation (B-Rep) data structure, all face features contained in a normalized entity are extracted. Each face is defined in the B-Rep by a parametric surface equation (e.g., plane equation, cylindrical surface equation, NURBS surface equation). To build a global spatial collision engine that supports high-speed ray casting, these continuous parametric surfaces need to be discretized into triangular meshes. The discretization process employs an incremental mesh generation algorithm based on chord height error. For each surface edge, the algorithm calculates an adaptive step size based on the surface curvature. Regions with higher curvature (such as small rounded corner transitions) generate denser triangular meshes to ensure discretization accuracy; flat regions with lower curvature generate sparser triangular meshes to save memory and computational resources. The upper limit of the chord height error is strictly limited (e.g., set to 0.01 mm) to ensure that the geometric deviation between the discretized mesh and the original surface is controlled within an acceptable range.

[0101] Then, the 3D coordinate data of all vertices and the vertex index data of all triangles are extracted from the generated triangular mesh. Using this data, a static global bounding volume hierarchy (BVH) is constructed. This is essentially a tree-like spatial index structure where all triangular faces are progressively divided into different bounding box nodes, forming a hierarchical tree. When performing ray-mesh intersection tests, the algorithm starts from the root node of the tree, quickly eliminating bounding boxes corresponding to nodes that do not intersect with the ray, and only performs precise triangle intersection calculations on the triangular faces in the leaf nodes that intersect with the ray, thus reducing the time complexity of the intersection test. The completed BVH structure serves as the global spatial collision engine. Simultaneously, the precise geometry engine, based on the boundary representation (B-Rep) data structure, is used to extract parametric geometric information (such as normal vectors, curvature, edge tangent vectors, etc.) of normalized entities, thereby realizing a dual-engine hybrid computing environment where the precise geometry engine and the global spatial collision engine work together.

[0102] Thus, this embodiment of the application further shortens the time for subsequent ray casting and intersection testing by discretizing the continuous surface into a triangular mesh and constructing a BVH spatial index structure, thereby improving the efficiency of spatial query. Simultaneously, the mesh division controlled by chord height error ensures the geometric approximation accuracy of the discrete mesh to the original surface. The precise geometry engine and the global spatial collision engine work independently but collaboratively. The precise geometry engine is responsible for providing high-precision local geometric parameters at specific points, while the global spatial collision engine is responsible for performing fast global spatial intersection queries. This division of labor and cooperation allows the system to balance local geometric accuracy with global spatial perception capabilities, providing an efficient and accurate computational foundation for subsequent feature detection.

[0103] Based on the first embodiment of this application, in the second embodiment of this application, the same or similar content as the above embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S200 may include steps S210 to S240:

[0104] Step S210: Preset at least two mutually orthogonal machining direction vectors.

[0105] In this embodiment, a set of machining direction vectors is preset according to the type of the target CNC machine tool. For a three-axis vertical machining center, six machining direction vectors are preset: +X direction (1,0,0), -X direction (-1,0,0), +Y direction (0,1,0), -Y direction (0,-1,0), +Z direction (0,0,1), and -Z direction (0,0,-1). For 3+2 axis positioning machining, additional tilt direction vectors (e.g., directions tilted 30° relative to the Z-axis) can be preset according to the clamping posture of the part and the rotary table travel of the machine tool. The machining direction vectors represent the possible feed directions of the tool when machining the part. Only when the tool can reach a certain surface without obstruction in one or more directions is that surface machined.

[0106] Step S220: Traverse the faces in the standardized entity and calculate the local normal vector of each face sampling point.

[0107] Specifically, for each face in the standardized entity, the precise geometry engine is invoked to generate multiple sampling points within its parameter domain. The sampling points can be distributed using uniform grid sampling (e.g., taking 8 sampling points each in the U and V directions of each face to form an 8×8 sampling matrix) or random sampling. For each sampling point, the precise geometry engine is invoked to calculate the coordinate position of the point in 3D space and the local normal vector of the surface at that point, i.e., the unit vector perpendicular to the tangent plane of the surface, pointing outwards from the entity.

[0108] Step S230: Offset each sampling point by a preset safety distance along its local normal vector to the outside of the entity, use the coordinates obtained after offset as the starting point of the test ray, set the direction of the test ray to be parallel to each preset processing direction, and input the test ray to the global space collision engine for intersection testing.

[0109] It should be noted that for each generated sampling point and its corresponding local normal vector, the sampling point is offset outward along the direction of its local normal vector by a preset safety distance (e.g., 0.05mm). This preset safety distance must satisfy the following conditions: it must be greater than the chord height error (0.01mm) in the aforementioned discretization process, and less than the preset minimum effective collision distance used in subsequent judgments (e.g., 0.1mm), thus satisfying the parameterized constraint of "chord height error < preset safety distance < preset minimum effective collision distance". The purpose of the offset operation is to ensure that the starting point of the test ray is located at a small distance outside the solid surface, avoiding the ray starting point falling inside the solid or coinciding with its own surface, which would cause the ray to immediately hit itself upon departure (i.e., self-intersection problem), thereby eliminating the pseudo-interference error caused by the discrete mesh. Using the offset 3D coordinates as the starting point of the test ray, the ray direction is set to be parallel to each preset processing direction vector in sequence (e.g., first emit a set of rays in the +Z direction, then emit a set of rays in the -Z direction, and so on). Each test ray is input into the global space collision engine one by one to perform an intersection test. The global spatial collision engine returns the hit distance for each ray, which is the distance from the ray's origin along the ray's direction to the first intersection point. If there are no intersection points, it returns infinity.

[0110] Step S240: Based on the ray hit distance returned by the global space collision engine, calculate the directional smoothness rate of each surface in each preset processing direction, and determine the surface with the directional smoothness rate lower than the preset threshold as the undercut surface.

[0111] Optionally, for each face and all test rays in each preset processing direction, the directional clearance rate of the face is calculated based on the hit distance returned by the global space collision engine. If the directional clearance rate of a face is lower than a preset threshold (e.g., 80%) in all preset processing directions, it is determined that the face cannot completely avoid physical interference in any processing direction, it is marked as an inverted face, and highlighted in the 3D view (e.g., in red).

[0112] In the technical solution provided in this embodiment, by presetting at least two mutually orthogonal machining direction vectors, all possible feed directions of the three-axis machining center are fully covered, ensuring comprehensive screening of undercut features. By offsetting the sampling points outward along the local normal vector by a preset safety distance, the self-intersection pseudo-interference problem caused by the discrete mesh chord height error is eliminated at the geometric level. At the same time, the high parallel ray projection capability of the global space collision engine is utilized to achieve simultaneous evaluation of the global occlusion state of each face under multiple machining directions. This ensures that the undercut feature detection has both physical authenticity, with the detection results consistent with the actual tool path occlusion situation, and high efficiency, capable of completing a comprehensive scan of tens of thousands of faces within seconds, overcoming the missed and false judgments caused by relying only on single-face normal vectors for local discrimination in traditional technologies.

[0113] Furthermore, step S240 may also include steps S241 to S244:

[0114] Step S241: Construct a gridded sampling matrix within the parameter domain of each of the surfaces, perform physical boundary verification on each sampling point in the gridded sampling matrix, and remove invalid sampling points;

[0115] Step S242: Obtain the hit distance of each test ray in the global space collision engine;

[0116] Step S243: If the hit distance is infinite, or the hit distance is less than or equal to the preset minimum effective collision distance, the corresponding test ray is determined to be unobstructed, and the minimum effective collision distance is greater than the preset safety distance.

[0117] Step S244: Calculate the proportion of the number of unobstructed test rays in a single preset processing direction to the total number of effective sampling points, and obtain the unobstructed rate of the direction.

[0118] Specifically, for each surface, the precise geometry engine is invoked to obtain its parameter domain range. For example, for a NURBS surface, its parameter domain is a rectangular region formed by the U direction [U_min, U_max] and the V direction [V_min, V_max]. An 8×8 meshed sampling matrix is ​​constructed within this parameter domain, i.e., 8 values ​​are uniformly taken in the U direction and 8 values ​​are uniformly taken in the V direction, generating a total of 64 sampling points. Then, a two-dimensional topology classifier is invoked to perform physical boundary verification on each sampling point. Specifically, for a given parameter pair (u,v) in the parameter domain, the corresponding three-dimensional spatial point is calculated using the B-Rep evaluation function, and it is determined whether the three-dimensional point is located inside the true physical boundary of the surface. Since the parameter domain rectangle contains some regions located outside the true geometric boundary of the surface (for example, the parameter domain of a circular surface is square, but the corner regions outside the circular boundary do not belong to the surface), these sampling points outside the boundary are invalid points and need to be discarded, retaining only the points located inside the surface or on the boundary as valid sampling points. After verification, if the number of valid sampling points is less than the preset minimum number of valid points (e.g., less than 10), then the face is skipped or the sampling points are regenerated using an encrypted sampling strategy.

[0119] Then, for each valid sampling point, a test ray is emitted along the preset direction vector of the current processing, using its offset coordinates as the starting point. The intersection query interface of the global space collision engine is called to obtain the distance value of the first intersection point between the ray and the normalized entity. If the ray has no intersection with the entity, the global space collision engine returns a preset infinity value (e.g., a maximum number FLT_MAX).

[0120] In this embodiment, a preset minimum effective collision distance (e.g., 0.1 mm) is set, which is greater than the aforementioned preset safety distance (0.05 mm) and greater than the chord height error (0.01 mm). For the hit distance of each test ray, if the distance is infinite, it means that the ray did not hit any entity after being emitted, i.e., it is completely unobstructed; or if the distance is less than or equal to the minimum effective collision distance, it means that although the ray hit the entity, the hit point is very close to the starting point. This is actually a pseudo-collision caused by the surface undulation of the discrete mesh, rather than a real internal occlusion, and the test ray is judged to be unobstructed. If the distance is greater than the minimum effective collision distance and is a finite value, it is determined that the test ray is occluded by the entity itself. By introducing the minimum effective collision distance as a tolerance band, the intersection distortion caused by mesh approximation can be automatically filtered out from the physical and mathematical level during the BVH traversal stage. There is no need to backtrack and call the inefficient B-Rep for precise intersection at the interference critical point, thereby improving the ray projection performance and achieving the same judgment reliability as precise surface intersection.

[0121] For a given surface F and a preset machining direction D, let the total number of valid sampling points be N_valid, and the number of test rays judged as unobstructed be N_clear. Then, the unobstructed rate of the surface in direction D is R(F,D) = N_clear / N_valid. If R(F,D) ≥ 80% (preset threshold), it indicates that more than 80% of the surface in direction D can be machined without obstruction, and the surface is machined in direction D. If R(F,D) < 80%, it indicates that more than 20% of the surface in direction D is obstructed by itself and cannot be fully machined. It should be noted that the preset threshold is set to 80% instead of 100% to allow for minor local pseudo-interference caused by discrete mesh edges and minor obstruction allowed by tool avoidance strategies in actual machining. If the unobstructed rate of a surface is less than 80% in all preset machining directions, the surface is judged as an undercut surface.

[0122] Thus, this embodiment of the application ensures the accurate selection of effective sampling points and avoids interference from invalid sampling points by constructing a gridded sampling matrix within the parameter domain of each face and combining it with physical boundary verification. By introducing the minimum effective collision distance as a tolerance band and forming a hierarchical constraint with the preset safety distance, automatic immunity to discrete grid errors is achieved. By using the comparison between the directional unobstructed rate and the preset threshold as the judgment criterion, both the accuracy of detection and engineering tolerance requirements are taken into account. This elevates the detection of inverted features from qualitative judgment to quantitative evaluation, and the judgment result has quantifiable confidence, making it convenient for users to adjust the detection sensitivity according to actual manufacturing needs.

[0123] Based on the first embodiment of this application, in the third embodiment of this application, the same or similar content as the above embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S300 may include steps S310 to S340:

[0124] Step S310: Extract all edge features shared by two adjacent faces in the standardized entity and determine the shared edges.

[0125] In this embodiment, all edge objects of the standardized entity in the B-Rep data structure are traversed. In B-Rep, each edge is shared by two adjacent faces, and the edge is the boundary of the face. For each edge, pointers or identifiers of its two associated adjacent faces are obtained. If an edge is associated with only one face (i.e., an open boundary), it belongs to the shell edge and is not included in the analysis of internal right-angle features.

[0126] Step S320: Calculate the angle between the local normal vectors of two adjacent faces at the midpoint of each shared edge, and mark the shared edges whose local normal vector angle exceeds a preset angle threshold as candidate edges.

[0127] For each extracted shared edge, the precise geometry engine is invoked to calculate the 3D coordinates of the edge's midpoint. The midpoint is the 3D spatial point corresponding to the parameter domain parameter value t=0.5. At this midpoint, the local normal vectors n1 and n2 (both pointing outwards from the solid) of the surfaces corresponding to the two adjacent faces are calculated. Then, the angle between these two normal vectors is calculated. . ,in The dot product of two unit normal vectors has a value ranging from 0° to 180°. If the two surfaces transition smoothly (approximately tangent), then... Approaching 180° (e.g., between 175° and 180°), the two surfaces are smoothly connected and not considered sharp corners. If If the angle is less than a preset threshold (e.g., 170°), it indicates that the two faces form a sharp angle transition at the shared edge, and the shared edge is marked as a candidate edge.

[0128] Step S330: Calculate the midpoint of the chord of the candidate edge, and emit a ray to the global space collision engine to detect whether the midpoint of the chord is located inside the entity.

[0129] Specifically, for each marked candidate edge, its chord midpoint is calculated. The calculation of the chord midpoint involves obtaining the normal vectors n1 and n2 of the two adjacent faces of the candidate edge, and calculating the cross product direction vector of the two normal vectors. (After normalization), the direction vector d is perpendicular to the two normal vectors, i.e., along the tangential direction of the shared edge. Then, a small offset (e.g., 0.01 mm) is made on both sides of the midpoint of the shared edge along this tangential direction to obtain two reference points P1 and P2; the geometric center of P1 and P2 is taken as the chord midpoint. This chord midpoint is actually located at the center of the region adjacent to the shared edge, and is used to characterize the orientation of the edge in three-dimensional space. If the chord midpoint is located inside the solid, the edge is a concave edge (i.e., an internal right angle feature); if the chord midpoint is located outside the solid, the edge is a convex edge (i.e., an external sharp angle). To detect whether the chord midpoint is located inside the solid, a probe ray is fired in any direction (e.g., the coordinate axis + Z direction or a random direction) towards the global space collision engine, using the chord midpoint as the starting point, and the number of intersections between the ray and the normalized solid is obtained. According to the topological theorem of ray projection, "even-fold intersections are on the outside, and odd-fold intersections are on the inside." If the number of intersections between the probe ray and the entity is odd, the midpoint of the chord is determined to be inside the entity; if it is even, the midpoint of the chord is determined to be outside the entity.

[0130] Step S340: If the midpoint of the chord is located inside the solid, determine that the candidate edge is an internal right-angle feature and output an unprocessable warning.

[0131] If the detection results confirm that the midpoint of the chord of the candidate edge is located inside the solid, it indicates that the candidate edge is a concave sharp corner edge, meaning that the rotating structure of the CNC milling cutter cannot completely cut into the root of the sharp corner, requiring additional root clearing processes (such as EDM or a dedicated corner clearing toolpath). This candidate edge is determined to be an internal right-angle feature. The system marks this internal right-angle feature in the 3D view (e.g., renders it in red) and outputs an unmachinable warning in the analysis log. The warning includes the edge's position coordinates, the associated face identifier, and suggested processing methods, such as "EDM root clearing is recommended" or "R-angle tool is recommended."

[0132] In the technical solution provided in this embodiment, the accuracy of the angle calculation is ensured by calling the precise geometry engine to extract the precise geometric position of the shared edge and the normal vector of the adjacent face; by calculating the midpoint of the chord and combining it with the ray projection of the global spatial collision engine for spatial position topology determination, the achievable convex angle and the inaccessible concave angle of the tool are accurately distinguished. Compared with the traditional method that relies solely on the angle between curvature or normal vectors for judgment and cannot distinguish between concave and convex angles, this embodiment achieves accurate identification of internal right-angle features through spatial position determination based on the ray projection theorem, avoiding collisions or overcutting accidents caused by missed corner detection.

[0133] Based on the first embodiment of this application, in the fourth embodiment of this application, the same or similar content as the above embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S400 may include steps S410 to S450:

[0134] Step S410: Geometric type identification is performed on each surface within the standardized entity, the axis vector and radius of the revolution surface are extracted, and it is determined whether the revolution surface is the concave revolution surface.

[0135] Step S420: If it is the concave rotating surface, calculate the actual length-to-diameter ratio based on the radius and machining depth of the concave rotating surface, and retrieve the maximum allowable multiple of the radius in the workpiece material from the preset standard tool parameter table;

[0136] Step S430: If the actual length-to-diameter ratio is greater than the maximum allowable multiple of the diameter, mark the corresponding concave rotating surface as a risk feature that the tool cannot reach.

[0137] Step S440: Invoke the global space collision engine to detect whether there is interference between the tool and the workpiece;

[0138] Step S450: If interference exists, mark the concave rotating surface as having a risk of deep processing collision.

[0139] In this embodiment, the precise geometry engine is invoked to traverse all faces in the standardized entity and identify the surface type of each face. Using the surface type query interface of the B-Rep precise geometry engine, the surface equation type is determined, such as plane, cylindrical surface, conical surface, spherical surface, torus, NURBS freeform surface, etc. If it is determined to be a cylindrical or conical surface, the axis vector and radius of the surface are further extracted. For a cylindrical surface, the axis direction is the axial unit vector of the cylinder; for a conical surface, the axis direction is the direction of the cone's central axis, and the radius is the radius of the cone at a specific height. Then, the concavity of the surface is determined. Specifically, the surface normal vector at any point on the surface is obtained, and it is calculated whether the normal vector points to the axis direction. If the surface normal vector points to the axis direction, the surface is concave (i.e., the material is located on the outside of the surface, and the cavity is located on the axis side); if the surface normal vector deviates from the axis direction, the surface is convex. Only when the surface is determined to be a concave rotating surface will the subsequent deep trench risk analysis process begin.

[0140] For features identified as concave surfaces of revolution, the precise geometry engine is invoked to obtain the radius R (for conical surfaces, the midpoint or maximum radius of the machining depth range) and machining depth L of the surface of revolution. The machining depth is calculated as the distance along the axial direction of the surface of revolution from the open end to the closed end (bottom). Then, the actual length-to-diameter ratio is calculated using the length-to-diameter ratio formula. Simultaneously, the system retrieves user-preset workpiece material information (e.g., aluminum alloy 6061, steel S136, titanium alloy TC4, etc.) and searches it in the system's preset standard tool parameter table. The standard tool parameter table is a pre-entered data table containing the maximum permissible diameter multiple (D) for different tool diameters and workpiece materials, i.e., the ratio of the maximum permissible machining depth to the tool diameter. For example, for a carbide end mill with a diameter D=4mm, the maximum permissible diameter multiple when machining steel is 7 times the diameter, i.e., the maximum permissible machining depth is 28mm. The system then retrieves the maximum permissible diameter multiple (Ratio_max) of the tool diameter D (D=2×R) corresponding to the current radius of rotation R for that workpiece material.

[0141] Subsequently, the calculated actual length-to-diameter ratio (Ratio) is compared with the maximum permissible multiple (Ratio_max) retrieved from the standard tool parameter table. If Ratio > Ratio_max, it indicates that the depth of the concave rotating surface exceeds the cutting capability limit of the corresponding diameter tool in the standard tool library for this material. Even if there is theoretically no spatial path interference, in actual machining, insufficient rigidity, tool vibration, or tool breakage may occur due to excessive tool overhang. In this case, the concave rotating surface is marked as a tool unreachable risk feature, and its specific parameters, including radius, depth, actual length-to-diameter ratio, and maximum permissible multiple (Ratio), are recorded in the analysis log.

[0142] For concave surfaces of revolution marked as having unreachable tool characteristics, a global spatial collision engine is further invoked for interference scanning. The interference scanning process involves simulating a tool (as a cylindrical or toroidal model with a diameter equal to the tool diameter D and a length equal to the machining depth L) moving from the opening end to the bottom end along a preset feed direction (i.e., the axial direction of the surface of revolution). At each position of movement, the global spatial collision engine is invoked to detect whether there is spatial overlap (i.e., collision) between the tool model and the standardized entity. If any collision is detected, it indicates that even if a tool meeting the aspect ratio requirement is replaced, interference will still occur in the actual machining path due to the spatial constraints of the part's own structure, and the concave surface of revolution is marked as having a deep machining collision risk. If no collision is detected, it is only marked as having an aspect ratio exceeding the limit, prompting the user to replace it with an extended tool.

[0143] In the technical solution provided in this embodiment, a precise geometry engine is invoked to identify the geometric type of the rotating surface and extract its radius and depth. Combined with a preset standard tool parameter table, a quantitative assessment of the length-to-diameter ratio is performed, providing a clear physical basis for judging the risk of deep grooves. That is, the actual cutting performance parameters of the tool are used as the evaluation benchmark, rather than empirical estimates. Furthermore, by invoking a global spatial collision engine to perform interference scanning of the toolpath, the accessibility of the spatial path is verified, supplementing the spatial interference blind spots that cannot be covered by a simple length-to-diameter ratio assessment. This dual-judgment approach ensures that the assessment of deep groove risk characteristics considers both the cutting performance limits of the tool itself and the constraints of the part's geometric space on the toolpath, improving the accuracy and operability of predicting the machining risks of deep holes and deep grooves.

[0144] Reference Figures 5 to 6 Further, step S500 may include assigning different colors to machining features with different risk levels using shaders. All faces identified as undercut surfaces and all edges identified as internal right-angle features are rendered red, representing severe risk, meaning the feature cannot be machined under normal machining conditions; faces marked as unreachable by the tool are rendered yellow, representing a warning risk, meaning the tool needs to be replaced or process parameters adjusted before machining; areas without any risk markings are rendered gray or retain their original model material color, representing safe areas. This color rendering is implemented through shader programming and displayed overlaid with standardized entities in the 3D view window. Simultaneously, the system outputs a structured analysis log in the sidebar of the interactive interface. The log includes: detection timestamp, the number of detected undercut features and their face ID list, the number of internal right-angle features and their edge ID list, the number of deep groove risk features and their face ID list, detailed parameters for each feature (position, normal vector, aspect ratio, etc.), and suggested handling measures. The system also provides deadlock-free and flicker-free smooth rotation of the 3D view through the micro-incremental orbital ball algorithm, enabling users to observe the spatial distribution and geometric shape of various risk features from any angle.

[0145] In this way, by using shaders to assign different colors to machining features of different risk levels for overlay rendering, abstract detection data is transformed into intuitive visual information, enabling users to clearly identify the process risk areas of parts and their severity. By synchronously outputting structured analysis logs, users are provided with detailed quantitative data and processing suggestions, which facilitates the development of targeted machining strategies in subsequent CAM programming or process review stages.

[0146] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the machining feature detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0147] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the machining feature detection method in Embodiment 1 above.

[0148] The following is for reference. Figure 7 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0149] like Figure 7 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0150] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0151] The electronic device provided in this application, employing the machining feature detection method described in the above embodiments, can solve the technical problem of how to improve the accuracy of machinability analysis for complex structural parts, effectively identify machining risks associated with features such as undercuts, internal angles, and deep holes, thereby reducing the risk of machine collisions during machining and improving production efficiency. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the machining feature detection method provided in the above embodiments, and other technical features in this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0152] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0153] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0154] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the machining feature detection method in the above embodiments.

[0155] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0156] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0157] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by an electronic device, the electronic device causes the following: it acquires and preprocesses the target 3D CAD model to generate a standardized entity; it invokes a global spatial collision engine to perform ray projection and intersection tests on at least two preset machining directions to determine and mark undercut features; it invokes a precise geometry engine to extract the common edges of the standardized entity, and invokes the global spatial collision engine to perform ray projection on the common edges to determine and mark internal right-angle features; it invokes the precise geometry engine to acquire the actual length-to-diameter ratio of the concave revolution surface, and based on the comparison result of the actual length-to-diameter ratio with preset tool limit parameters, combined with the interference scan result of the global spatial collision engine, determines and marks deep groove risk features; it overlays and renders the determination results of the undercut features, the internal right-angle features, and the deep groove risk features in a 3D view, and outputs an analysis log.

[0158] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0160] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0161] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described machining feature detection method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the machining feature detection method provided in the above embodiments, and will not be repeated here.

[0162] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the machining feature detection method described above.

[0163] Compared with the prior art, the computer program product provided in this application has the same beneficial effects as the machining feature detection method provided in the above embodiments, and will not be described in detail here.

[0164] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for detecting machining features, characterized in that, The method includes: Acquire and preprocess the target 3D CAD model to generate a standardized entity; Call the global space collision engine to perform ray projection and intersection tests in at least two preset processing directions, and determine and mark the undercut features; The precise geometry engine is invoked to extract the common edges of the standardized entity, and the global space collision engine is invoked to perform ray projection on the common edges to determine and mark the internal right-angle features; The precise geometry engine is invoked to obtain the actual length-to-diameter ratio of the concave rotating surface. Based on the comparison between the actual length-to-diameter ratio and the preset tool limit parameters, combined with the interference scan results of the global space collision engine, the deep groove risk characteristics are determined and marked. The determination results of the inverted buckle feature, the internal right angle feature, and the deep trench risk feature are overlaid and rendered in a 3D view, and an analysis log is output.

2. The machining feature detection method as described in claim 1, characterized in that, The steps of acquiring and preprocessing the target 3D CAD model to generate a standardized entity include: Read the target 3D CAD model; The 3D CAD model is subjected to topological surface stitching to generate a topological solid; Calculate the global bounding box of the topological entity, extract the geometric center coordinates of the global bounding box, and translate the topological entity to the origin of the coordinate system based on the translation matrix to generate the normalized entity.

3. The machining feature detection method as described in claim 1, characterized in that, After the steps of acquiring and preprocessing the target 3D CAD model to generate a standardized entity, the method further includes: Extract all surface features of the standardized entity, discretize each continuous topological surface, and generate a triangular mesh; Obtain the vertex and index data of the triangular mesh, and construct the global spatial collision engine based on ray projection; and, Construct a dual-engine hybrid computing environment that coordinates the precise geometry engine based on boundary representation B-Rep with the global spatial collision engine.

4. The machining feature detection method as described in claim 1, characterized in that, The step of calling the global space collision engine to perform ray projection and intersection tests in at least two preset processing directions, and determining and marking the undercut features, includes: At least two mutually orthogonal processing direction vectors are preset; Traverse the faces in the standardized entity and calculate the local normal vector of each face sampling point; Each sampling point is offset outward from the entity by a preset safety distance along its local normal vector. The coordinates obtained after the offset are used as the starting point of the test ray. The direction of the test ray is set to be parallel to each preset processing direction. The test ray is then input to the global space collision engine for intersection testing. Based on the ray hit distance returned by the global space collision engine, the directional smoothness rate of each surface in each preset processing direction is calculated, and the surface with the directional smoothness rate lower than the preset threshold is determined to be the undercut surface.

5. The machining feature detection method as described in claim 4, characterized in that, The step of determining a face with a directional passability rate lower than a preset threshold as an undercut face based on the ray hit distance returned by the global space collision engine includes: A gridded sampling matrix is ​​constructed within the parameter domain of each of the aforementioned surfaces. Physical boundary verification is performed on each sampling point in the gridded sampling matrix, and invalid sampling points are removed. Obtain the hit distance of each test ray in the global space collision engine; If the hit distance is infinite, or the hit distance is less than or equal to the preset minimum effective collision distance, the corresponding test ray is determined to be unobstructed, and the minimum effective collision distance is greater than the preset safety distance; The unobstructed rate of a single preset processing direction is obtained by calculating the proportion of the number of unobstructed test rays to the total number of valid sampling points.

6. The machining feature detection method as described in claim 1, characterized in that, The steps of calling the precise geometry engine to extract the common edges of the normalized entity, and calling the global space collision engine to perform ray projection on the common edges, and determining and marking the internal right-angle features include: Extract all edge features shared by two adjacent faces in the standardized entity, and determine the shared edges; Calculate the angle between the local normal vectors of two adjacent faces at the midpoint of each shared edge, and mark the shared edges whose local normal vector angle exceeds a preset angle threshold as candidate edges; Calculate the midpoint of the chord of the candidate edge, and emit a ray into the global space collision engine to detect whether the midpoint of the chord is located inside the entity; If the midpoint of the chord is located inside the solid, the candidate edge is determined to be an internal right-angle feature, and an unprocessable warning is output.

7. The machining feature detection method as described in claim 1, characterized in that, The steps of calling the precise geometry engine to obtain the actual length-to-diameter ratio of the concave surface of revolution, and determining and marking the deep groove risk characteristics based on the comparison result of the actual length-to-diameter ratio and the preset tool limit parameters, combined with the interference scan result of the global space collision engine, include: Geometric type identification is performed on each surface within the standardized entity, the axis vector and radius of the revolution surface are extracted, and it is determined whether the revolution surface is the concave revolution surface. If it is the concave rotating surface, calculate the actual length-to-diameter ratio based on the radius and machining depth of the concave rotating surface, and retrieve the maximum allowable multiple of the radius in the workpiece material from the preset standard tool parameter table; If the actual length-to-diameter ratio is greater than the maximum allowable multiple of the diameter, the corresponding concave rotating surface is marked as a tool-unreachable risk feature. The global space collision engine is invoked to detect whether there is interference between the tool and the workpiece; If interference exists, the concave rotating surface is marked as having a risk of collision during deep processing.

8. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the machining feature detection method as described in any one of claims 1 to 7.

9. A readable storage medium, characterized in that, The readable storage medium is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the machining feature detection method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the machining feature detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for batch analysis of manufacturability of part design models

    CN110334421B