A method for determining the machinability of solid surfaces with boundary representation based on UG

In computer-aided process generation, the boundary representation model and API of UG software are used, combined with stretching entity and Boolean operations, as well as sampling point and ray method, the machiningability of three-axis machining parts is quickly and accurately judged, which solves the problem of inefficiency in the existing technology and realizes the function of quickly outputting the occlusion relationship between surfaces.

CN114925410BActive Publication Date: 2025-05-16BEIJING ANT FACTORY INTELLIGENT MANUFACTURING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210513115.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2025-05-16
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

In the process of computer-assisted process generation, it is difficult to quickly and accurately determine the machiable surface of three-axis machining parts, especially in large three-dimensional models. The traditional blanking algorithm is inefficient and cannot effectively output the occlusion information of the surface and edge lines.

Method used

A method for determining the processability of solid faces based on UG is provided. By obtaining the brep model file, calling the UG software's Modl API to analyze topology information, filtering the unprocessable surface, and judging the processability through stretching entity and Boolean operations. The sampling point and ray method are used to judge the unstretchable surface.

Benefits of technology

It realizes the rapid and accurate judgment of the machiningability of each face in the entity, reduces the calculation amount of the face blanking algorithm, improves the function of UG software that cannot quickly output the occlusion relationship between faces and faces, and improves the accuracy and efficiency of judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925410B_ABST
    Figure CN114925410B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for determining the machinability of a solid surface represented by a boundary based on UG. The method comprises: inputting a brep model file, calling UG software ModlAPI to parse the file, obtaining the topological information of the part, and calculating the machinability of the solid surface in three steps according to a given machining direction. In the first step, according to the type of the surface and the normal direction, the solid surfaces in the part under the machining direction are preliminarily screened to exclude the non-machinable surfaces; in the second step, it is determined whether the screened solid surface can be stretched along the machining direction; for the surface that can be stretched, the stretching function in the UG software ModlAPI is called to stretch the entity in the opposite direction of the machining direction, and the UG software bool is called to perform Boolean operations on the stretched entity and the part entity, and the machinability of the surface is determined according to the result obtained by the Boolean operation; in the third step, for the surface that cannot be stretched, the machinability is determined by sampling points and ray method. The present invention has the characteristics of being accurate and fast in a step-by-step judgment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer-aided machining, and in particular to a method for determining the machinability of a solid surface based on a boundary representation of UG. Background Art

[0002] In the process of computer-aided process generation (CAPP), there are a lot of studies on intelligent process generation for three-axis machining parts. In the process of process generation, it is necessary to first determine the clamping direction, which determines the machining direction. Different machining directions have different machinable surfaces. How to accurately obtain the machinable surface in a certain machining direction is of great significance to the selection of machining direction.

[0003] For 3-axis machined parts, if the projection of a given face in a specified processing direction is not blocked by other faces, then the face is determined to be able to be processed from that processing direction. This problem is similar to the hidden line removal problem in computer graphics. In the traditional hidden line removal algorithm, the intersection of the projection lines of each edge is calculated separately. The number of edges is n, and its time complexity is o(n2). At the same time, the overlapping order relationship between edges must be calculated. In a large 3D body, the number of edges can reach tens of thousands. The use of traditional hidden line removal algorithms will lead to low efficiency and slow calculation. In the CAPP system, 3D model information is usually stored in a boundary representation (brep), which contains a large amount of topological information. In the prior art, such as UG software, wireframes can be rendered during the 3D model rendering process, but the occlusion information of faces and edges cannot be output. Therefore, based on the above problems existing in the prior art, it is urgent to propose a new method for determining the machinability of a face to make up for the shortcomings of the prior art. Summary of the invention

[0004] The purpose of the present invention is to provide a method for determining the machinability of entity surfaces based on UG boundary representation, which can quickly give the machinability of each surface in the entity, improve the function of UG software that cannot quickly output the occlusion relationship between surfaces, and greatly reduce the calculation amount of the surface hidden surface algorithm process.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] The present invention provides a method for determining the machinability of a solid surface based on a boundary representation of UG, comprising:

[0007] S10, obtaining the input brep model file, calling the UG software Modl API to parse the file, obtaining the topological information of the part, and screening the non-machinable surfaces in the part according to the given machining direction;

[0008] S20, determining whether the screened non-machinable surface can be stretched along the machining direction;

[0009] S30, for the surface that can be stretched, calling the stretching function in the Modl API of the UG software, stretching the entity in the opposite direction of the processing direction, calling the bool of the UG software to perform Boolean operation on the stretched entity and the part entity, and judging the machinability of the surface according to the result obtained by the Boolean operation;

[0010] S40. For the faces that cannot be stretched, their machinability is determined by sampling points and ray method.

[0011] Optionally, the process of screening the non-machinable surfaces in the part in step S10 includes:

[0012] S101, extracting the normal unit vectors of all planes in the part, and calculating the angle between the normal and the machining direction;

[0013] S102, obtaining a non-machinable plane with an angle greater than 90°.

[0014] Optionally, the length of the stretched entity in step S30 is the diagonal length of the part entity envelope.

[0015] Optionally, the Boolean operation in step S30 is a Boolean intersection operation, and the volume of the intersection of the stretching entity and the part entity is calculated by the Boolean intersection operation. If the volume of the intersection is greater than 0, the current surface is a non-machinable surface in the current machining direction.

[0016] Optionally, the method for acquiring the sampling points in step S40 is: calling the UG software Measure API, performing UV unfolding on the surface of the non-stretchable entity, calculating the sampling number m according to the set sampling accuracy c, and uniformly sampling the surface according to the sampling number m.

[0017] Optionally, the calculation formula of the sampling number m is:

[0018]

[0019] Optionally, the method for judging the machinability of the surface of the entity that cannot be stretched in step S30 is: emitting rays from the sampling point in the opposite direction of the machining direction and intersecting with the part body, calling the UG software modl API to obtain the intersection of the ray and the part entity, and judging the machinability of the surface by the intersection type.

[0020] Optionally, there are four types of intersections:

[0021] OSF: Indicates that the intersection point is on the sampled surface where the sampling point is located, including inside the sampled surface and on the edge of the sampled surface.

[0022] OCCE: Indicates that the intersection point is on an edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is a convex edge.

[0023] OCVE: Indicates that the intersection point is on an edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is concave edge.

[0024] OFI: Indicates that the intersection point is inside the surface, and the surface is not the sampled surface where the sampling point is located.

[0025] Optionally, the method for judging the machinability of the surface is as follows: if one or more sampling points of the surface are blocked by parts, the surface is judged to be a non-machinable surface along the machining direction; if all sampling points of the surface are not blocked by parts, the surface is judged to be a machinable surface along the machining direction.

[0026] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0027] The method for determining the machinability of a surface of a UG-based boundary representation entity provided by the present invention makes full use of the information provided by the brep model for determining the machinability of the surface. For the surface of a stretchable entity, the surface is stretched in the opposite direction of the processing direction, and the volume of the intersection of the stretched entity and the part entity is calculated to determine the machinability of the surface. No sampling is required during the determination process, and the determination process is accurate and fast. For the surface of a non-stretchable entity, the sampling point and ray method are used to determine the machinability of the surface by determining the type of intersection between the ray and the entity, which can greatly reduce the number of calculations, and can avoid the problem of different machinability of the surface caused by the simple calculation by the ray method and the inability to determine the concave-convexity of the edge line in the traditional method, so that the occlusion relationship between the surfaces can be quickly output and the accuracy of the determination can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 It is a flow chart of the method for determining the machinability of a solid surface based on the boundary representation of UG in the present invention;

[0030] Figure 2 It is a schematic diagram of a stretched entity of the method for determining the machinability of a solid surface based on the boundary representation of UG according to the present invention;

[0031] Figure 3 It is a schematic diagram of the intersection of the stretching entity and the part entity in the method for determining the machinability of the entity surface based on the boundary representation of UG of the present invention;

[0032] Figure 4It is a schematic diagram of a surface of a non-stretchable entity in the method for determining the machinability of a solid surface based on the boundary representation of UG according to the present invention;

[0033] Figure 5 It is a schematic diagram of UV expansion and sampling points of the method for determining the machinability of a solid surface based on the boundary representation of UG in the present invention;

[0034] Figure 6 The present invention is a flow chart for judging the machinability of a surface in a method for judging the machinability of a solid surface based on UG boundary representation.

[0035] Figure 7 A schematic diagram of the intersection type of the ray emitted from the sampling point in the opposite direction of the processing direction and the part in the present invention;

[0036] in, Figure 7 Among them, (a) and (h) are intersection types OSF; (b) and (c) are intersection types OCCE; (d) is intersection type OCVE; (e), (f) and (g) are intersection types OFI. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The purpose of the present invention is to provide a method for determining the machinability of entity surfaces based on UG boundary representation, which can quickly give the machinability of each surface in the entity, improve the function of UG software that cannot quickly output the occlusion relationship between surfaces, and greatly reduce the calculation amount of the surface hidden surface algorithm process.

[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] Example:

[0041] like Figure 1 As shown, the present invention provides a method for determining the machinability of a solid surface based on the boundary representation of UG, which makes full use of the topological information of the boundary representation model to pre-screen the occluding surface. The solid surface is created using the solid stretching interface of UG, and the Boolean operation interface is used for determination. The number of intersection operations can be greatly reduced, the calculation efficiency can be improved, and the machinability of any surface can be output.

[0042] The above method specifically includes:

[0043] (1) Run the UG software.

[0044] (2) Input the brep model file into the UG software.

[0045] (3) Call the UG software Modl API to obtain part topology information.

[0046] (4) Determine the processing direction that needs to be judged, generate a unit vector, and store it.

[0047] (5) For all planes, extract their normal unit vectors and calculate the angle between the normal and the processing direction. When the angle is > 90°, it can be determined that the plane is on the back of the current processing direction and the surface cannot be processed from this processing direction. This step can screen and judge the machinability of such planes and exclude most of the solid surfaces that cannot be processed from this direction.

[0048] (6) Eliminate the planes whose machinability has been determined in the previous step.

[0049] (7) Calculate the enveloping volume of the part and the diagonal length L of the enveloping volume of the part.

[0050] (8) Figure 2 As shown, the stretching function in the Modl API of the UG software is called to perform stretching operations on all faces (excluding the removed faces). The stretching basis is the current studied face, the stretching direction is the opposite direction of the processing direction, and the stretching distance is L. It is ensured that the stretched entity length is greater than the part length, which can prevent erroneous judgments caused by insufficient stretching length.

[0051] (9) For the generated extruded entity, call the UG software bool operation to perform Boolean intersection calculation on the extruded entity and the part entity, and judge the machinability of the surface based on the volume obtained by the Boolean intersection operation.

[0052] Calculate the volume V of the intersection of the extruded entity and the part entity, such as Figure 3 As shown in the figure, if V>0, it means that machining the surface along this direction will interfere with other solid surfaces of the part. It can be determined that there will be obstacles when machining the current surface along this machining direction, that is, the surface cannot be machined along the current direction. On the contrary, the current surface can be machined along this machining direction. This step can determine the machinability of such stretchable surfaces.

[0053] (10) Eliminate the faces whose machinability has been determined in the previous step.

[0054] (11) For faces that cannot be stretched, such as Figure 4As shown in , the plane cannot be stretched along the current machining direction, and the sampling point and ray method must be used to determine. Since the solid surface cannot be stretched, the fast method in (9) cannot be used to determine the machinability. To determine whether the solid surface is machinable along a certain machining direction, it is necessary to determine whether the tool can fully machine the solid surface along the machining direction without interfering with other surfaces. The complete solution is shown in Figure 6 As shown, first use UV unfolding to obtain the parameter expression of the solid surface, and use the parameter expression to uniformly sample the solid surface. The machining interference judgment of all sampling points can be used to replace the machining interference judgment of the solid surface. The method of extending the entity in the opposite direction of machining is used to judge the interference in the solid surface. When judging the interference of the sampling point, the ray method needs to be used, that is, from the sampling point, the ray is emitted in the opposite direction of machining to judge whether the ray can interfere with the solid surface of the part. There are four types of intersections between the ray and the solid surface, and the intersection type determines whether there is interference.

[0055] The mathematical models of the brep model curves and surfaces input in STEP format are all non-uniform rational B-splines (NURBS for short). The spatial dimension of any solid surface is 2, with two directions U and V, such as Figure 5 As shown, UV expansion can be performed, and the UV expansion parameter expression is:

[0056]

[0057] Where P ij is the control vertex, ω ij is the control vertex P ij The weight factor of the connection. i,p (u) is the p-th order non-rational B-spline basis function on the knot vector U; N j,q (v) is the q-order non-rational B-spline basis function on the node V.

[0058] Call the UG software Measure API to extract the UV range of all faces, and evenly sample the surface according to the UV value and sampling accuracy.

[0059] (12) Emit rays from the sampling point in the opposite direction of the machining direction and intersect with the part body. Call the UG software modlAPI to obtain the intersection of the ray and the part entity. Judge the machinability of the current sampling point according to the intersection type, such as Figure 6 shown.

[0060] (13) If one or more of the n sampling points on the surface cannot be processed, the surface is determined to be unprocessable along the processing direction. The intersection types of the sampling point along the opposite direction of the processing direction and the intersection of the ray with the part are divided into the following four cases: Figure 7 shown.

[0061] OSF: Indicates that the intersection point is on the sampled surface where the sampling point is located, including inside the sampled surface and on the edge of the sampled surface.

[0062] OCCE: Indicates that the intersection point is on an edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is a convex edge.

[0063] OCVE: Indicates that the intersection point is on an edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is concave edge.

[0064] OFI: Indicates that the intersection point is inside the surface, and the surface is not the sampled surface where the sampling point is located.

[0065] Among them, (a) and (h) are intersection types OSF. (b) and (c) are intersection types OCCE. (d) is intersection type OCVE. (e), (f) and (g) are intersection types OFI.

[0066] (14) Emit rays to all sampling points on the surface and make the above judgment on the intersection type. If all sampling points have no interference, it is determined that the surface can be processed from this processing direction.

[0067] (15) Output the machinability of all surfaces.

[0068] (16) Close the UG software.

[0069] The method for determining the machinability of a surface of a UG-based boundary representation entity provided by the present invention makes full use of the information provided by the brep model for determining the machinability of the surface. For the surface of a stretchable entity, the surface is stretched in the opposite direction of the processing direction, and the volume of the intersection of the stretched entity and the part entity is calculated to determine the machinability of the surface. No sampling is required during the determination process, and the determination process is accurate and fast. For the surface of a non-stretchable entity, the sampling point and ray method are used to determine the machinability of the surface by determining the type of intersection between the ray and the entity, which can greatly reduce the number of calculations, and can avoid the problem of different machinability of the surface caused by the simple calculation by the ray method and the inability to determine the concave-convexity of the edge line in the traditional method, so that the occlusion relationship between the surfaces can be quickly output and the accuracy of the determination can be improved.

[0070] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for determining the machinability of a solid surface based on UG boundary representation, characterized in that: include: S10, obtaining the input brep model file, calling the UG software ModlAPI to parse the file, obtaining the topological information of the part, and screening the non-machinable surfaces in the part according to the given machining direction; S20, determining whether the screened non-machinable surface can be stretched along the machining direction; S30, for the surface that can be stretched, call the stretching function in the ModlAPI of the UG software, stretch the entity in the opposite direction of the processing direction, call the bool of the UG software to perform Boolean operation on the stretched entity and the part entity, and judge the machinability of the surface according to the result obtained by the Boolean operation; S40, for the surface that cannot be stretched solid, judging its machinability by sampling points and ray method; The method for acquiring the sampling points in step S40 is as follows: calling the UG software MeasureAPI, performing UV unfolding on the surface that cannot be stretched solid, calculating the sampling number m according to the set sampling accuracy c, and uniformly sampling the surface according to the sampling number m; The calculation formula of the sampling number m is: The method for judging the machinability of the surface of the entity that cannot be stretched in step S40 is: emitting a ray from the sampling point in the opposite direction of the machining direction and intersecting with the part body, calling the UG software modlAPI to obtain the intersection of the ray and the part entity, and judging the machinability of the surface by the intersection type; The intersection types include: OSF: indicates that the intersection point is on the sampled surface where the sampling point is located, including inside the sampled surface and on the edge of the sampled surface; OCCE: indicates that the intersection point is on the edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is convex edge; OCVE: indicates that the intersection point is on the edge line, the edge line does not belong to the sampled surface where the sampling point is located, and the edge line type is concave edge; OFI: Indicates that the intersection point is inside the surface, and the surface is not the sampled surface where the sampling point is located; The method for judging the machinability of the surface is as follows: if one or more sampling points of the surface are blocked by parts, the surface is judged to be a non-machinable surface along the machining direction; if all sampling points of the surface are not blocked by parts, the surface is judged to be a machinable surface along the machining direction.

2. The method for determining the machinability of a solid surface based on UG boundary representation according to claim 1, characterized in that: The process of screening the non-machinable surfaces in the part in step S10 includes: S101, extracting the normal unit vectors of all planes in the part, and calculating the angle between the normal and the machining direction; S102, obtaining a non-machinable plane with an angle greater than 90°.

3. The method for determining the machinability of a solid surface based on UG boundary representation according to claim 1, characterized in that: The length of the stretched entity in step S30 is the diagonal length of the part entity envelope.

4. The method for determining the machinability of a solid surface based on UG boundary representation according to claim 1, characterized in that: The Boolean operation in step S30 is a Boolean intersection operation, and the volume of the intersection of the stretching entity and the part entity is calculated by the Boolean intersection operation. If the volume of the intersection is greater than 0, the current surface is a non-machinable surface in the current machining direction.

Citation Information

Patent Citations

  • Curved body three-dimensional boundary representation model reconstruction method and device based on line boundary

    CN101320486A

  • Middle entity generating method of cutting and machining working procedure

    CN102938005A