Method and system for generating machining part process model
By identifying and constructing feature bodies, the machine parting process model is automatically generated, which solves the problems of manual interactions in the prior art, and the design error-prone design, and improves the accuracy and efficiency of process models generation of complex products.
Patent Information
- Application Number
- CN202410972110.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as long manual interaction, prone to design errors, and low applicability of complex products when generating machine parting process models.
By identifying and constructing features such as holes, grooves, roundings, chamfers, and outer cylindrical surfaces, manufacturing feature bodies are generated, and process models are automatically generated using Boolean difference operations to simplify the process model generation process and improve computing efficiency and accuracy.
It reduces manual interaction, improves the accuracy of process model generation and the applicability of complex products, and reduces production cycle and costs.
Smart Images

Figure CN118963251A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of three-dimensional digital process design, and more specifically, relates to a method and system for generating a machining process model. Background Art
[0002] Machining is the process of using a tool to cut off excess material from a blank (or profile) in order to obtain a part that meets the requirements in terms of shape, size, accuracy and surface quality. Parts formed by machining methods are called machined parts. The process design methods for machined parts can be roughly divided into two categories: two-dimensional process design and three-dimensional process design. The three-dimensional process design technology fully expresses the product process information through a three-dimensional process model, and specifies in detail the expression method of product definition and process information in the three-dimensional model. The process model refers to the model state corresponding to each process of the part model during the process from the raw material form to the final finished product.
[0003] There are three main methods for generating process models in common use. The first is to draw the process model through forward modeling. The principle is to construct a series of three-dimensional process models through manual interaction according to the requirements of the process route, so as to realize the evolution between the blank and the final product model. The second is the feature suppression generation method. This method takes the last process as the starting point and gradually evolves to the previous process. It performs geometric operations on the geometric model according to the features and processing information associated with each step, and gradually restores the process model to the model state before processing. The third method is a three-dimensional process model construction method based on processing elements. The principle is to construct a manufacturing feature body according to the manufacturing feature, and discretize the manufacturing feature body into a series of processing elements according to the processing allowance. The processing element is used as the basic unit, and a three-dimensional process model is gradually generated through Boolean operations.
[0004] However, the above-mentioned process model construction methods all have some defects that cannot be ignored.
[0005] First, the method of drawing the process model through forward modeling requires a lot of manual interaction, which is time-consuming. When the parts are complex and there are many processes, the workload is huge, which will extend the product production cycle and increase production costs;
[0006] Second, the process model design sequence of the feature suppression method is opposite to the actual part processing sequence. The process model design is more prone to errors and difficult to verify. At the same time, for complex machined parts, after complex features are suppressed, the remaining features cannot automatically complete the model, so the process model cannot be generated;
[0007] Third, most methods based on processing elements require the construction of a parameterized processing element library, which usually contains simple features such as simple grooves, holes, stepped holes, etc. For simple products, the process model can be correctly generated, but for complex products, this method is not very applicable. Summary of the invention
[0008] In response to the above defects or improvement needs of the prior art, the present invention provides a method and system for generating a process model of a machined part, with the purpose of solving the technical problems that the existing method of drawing a process model through forward modeling requires a large amount of manual interaction and is time-consuming. When the parts are relatively complex and the processes are relatively numerous, the workload is enormous, which will extend the product production cycle and increase production costs; the technical problem that the process model design of the existing feature suppression method is prone to errors and difficult to verify, and at the same time, for complex machined parts, after the complex features are suppressed, the remaining features cannot automatically complete the model, thereby making it impossible to generate a process model; and the technical problem that the existing method based on processing elements is not highly applicable to complex products.
[0009] To achieve the above object, according to one aspect of the present invention, a method for generating a machining process model is provided, comprising the following steps:
[0010] (1) Obtain the design model, read all faces in the design model, and add each face to the pre-set manager AllFaces;
[0011] (2) For each face obtained in step (1), identify all hole features and construct hole feature objects, obtain hole feature data and save them into empty feature objects, and add all obtained hole feature objects to the pre-established manager AllFeatures.
[0012] (3) For each face in the manager AllFaces obtained in step (1), obtain the slot feature corresponding to the face, add the obtained slot feature to the pre-established manager AllFeatures, and calculate the corresponding parameters of each slot feature.
[0013] (4) For each face in the manager AllFaces obtained in step (1), obtain the fillet feature of the face, and add the obtained fillet feature of the face to the manager AllFeatures.
[0014] (5) For each face in the manager AllFaces obtained in step (1), obtain the chamfer feature of the face, and add the obtained chamfer feature of the face to the manager AllFeatures.
[0015] (6) For each face in the manager AllFaces obtained in step (1), obtain the outer cylindrical features of the face (such as the position of the axis of the cylinder, the positions of the centers of the two ends of the cylinder, etc.), and add the obtained outer cylindrical features of the face to the manager AllFeatures.
[0016] (7) For each face in the manager AllFaces obtained in step (1), obtain the plane features of the face, and add the obtained plane features of the face to the manager AllFeatures.
[0017] (8) Obtaining a process route compiled by a process designer based on a design model, which includes multiple processing steps, and each processing step is associated with a feature in the manager AllFeatures;
[0018] (9) For each feature in the manager AllFeatures, generate a manufacturing feature body corresponding to the feature, and record the manufacturing feature body into the feature in the manager AllFeatures.
[0019] (10) For each processing step in the process route obtained in step (8), obtain the feature associated with the processing step in the manager AllFeatures, obtain the recorded manufacturing feature body from the feature, obtain the process model of the previous processing step in the process route, and perform a Boolean difference operation between the process model and the manufacturing feature body corresponding to the feature to obtain the process model of the processing step.
[0020] Preferably, the hole features include simple holes, countersunk holes, counterbores, and tapered holes;
[0021] The hole feature data corresponding to the hole feature includes the type of hole, the faces constituting the hole, the axial direction of the hole, the major radius of the hole, the minor radius of the hole, a point on the axis of the hole, the entry point of the hole, and the end point of the hole.
[0022] The AllFaces manager, the AllFeatures manager, and the AllHoles manager are container objects used to store multiple data of any type.
[0023] Preferably, step (2) comprises the following sub-steps:
[0024] (2-1) Set the counter i=0 and initialize the manager AllHoles to empty;
[0025] (2-2) Determine whether the counter i is less than the total number of faces in the manager AllFaces. If so, proceed to step (2-3); otherwise, proceed to step (2-8);
[0026] (2-3) Determine whether the i-th face AllFaces[i] in the AllFaces manager is a cylindrical face. If so, proceed to step (2-4); otherwise, proceed to step (2-6);
[0027] (2-4) Use the i-th face AllFaces[i] to construct a simple hole feature, add the constructed hole feature to the manager AllHoles, and then go to step (2-5);
[0028] (2-5) Set counter i=i+1 and return to step (2-2);
[0029] (2-6) Determine whether the i-th face AllFaces[i] is a conical surface. If so, proceed to step (2-7); otherwise, return to step (2-5);
[0030] (2-7) Use the i-th face AllFaces[i] to construct a tapered hole feature, add the constructed tapered hole feature to the manager AllHoles, and then return to step (2-5);
[0031] (2-8) Set counter j = 0;
[0032] (2-9) Determine whether the counter j is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-10), otherwise the process ends;
[0033] (2-10) Determine whether the j-th hole feature AllHoles[j] in the manager AllHoles exists in the pre-set feature manager AllFeatures. If yes, proceed to step (2-20), otherwise proceed to step (2-11);
[0034] (2-11) Set counter k = 0;
[0035] (2-12) Determine whether the counter k is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-14), otherwise proceed to step (2-13);
[0036] (2-13) Add the j-th hole AllHoles[j] to the manager AllFeatures and go to step (2-20);
[0037] (2-14) Determine whether the kth hole AllHoles[k] exists in the manager AllFeatures. If so, go to step (2-19), otherwise go to step (2-15);
[0038] (2-15) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-16); otherwise, proceed to step (2-17);
[0039] (2-16) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the constructed countersunk hole to the manager AllFeatures, and then go to step (2-20);
[0040] (2-17) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-18), otherwise proceed to step (2-19);
[0041] (2-18) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the countersunk hole to the manager AllFeatures, and then go to step (2-20);
[0042] (2-19) Set counter k=k+1 and return to step (2-12);
[0043] (2-20) Set counter j=j+1 and return to step (2-9).
[0044] Preferably, the process of using the i-th face AllFaces[i] to construct a simple hole feature in step (2-4) is specifically to construct a hole feature object, record the face AllFaces[i] in the hole feature object, use the tool opencascade to obtain the data of the face AllFaces[i] such as the center positions of the two ends, the radius, and the axis position, and record the above data of the face AllFaces[i] in the hole feature object.
[0045] The process of using the i-th face AllFaces[i] to construct the tapered hole feature in step (2-7) is to construct a tapered hole feature object, record the face AllFaces[i] in the tapered hole feature object, use the tool opencascade to obtain the data in the face AllFaces[i] (such as the center position of the two ends, radius, and axis position), and finally record the above data of the face AllFaces[i] in the tapered hole feature object.
[0046] In step (2-15), the condition for determining whether hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole is that the surface contained in hole AllHoles[j] is directly connected to the surface contained in hole AllHoles[k], and the axis of hole AllHoles[j] coincides with the axis of hole AllHoles[k]. If these two conditions are met, it means that hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole, otherwise it means that the two cannot form a countersunk hole.
[0047] The process of constructing a countersunk hole using hole AllHoles[j] and hole AllHoles[k] in step (2-16) is to first construct a countersunk hole object, then calculate the countersunk hole parameters using the surface where hole AllHoles[j] is located and the surface where hole AllHoles[k] is located, and then record the calculated countersunk hole parameters in the countersunk hole object, thereby forming the final countersunk hole.
[0048] In step (2-17), the conditions for judging whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole are: ① The surfaces where the holes AllHoles[j] and AllHoles[k] are located are directly connected; ② One of the holes AllHoles[j] and AllHoles[k] is a simple hole and the other is a tapered hole; ③ The axes of the holes AllHoles[j] and AllHoles[k] must coincide. If all three conditions are met, it means that the holes AllHoles[j] and AllHoles[k] can form a countersunk hole, otherwise it means that the holes AllHoles[j] and AllHoles[k] cannot form a countersunk hole.
[0049] The process of constructing a countersunk hole in step (2-18) is: first construct a countersunk hole object, then calculate the countersunk hole parameters based on the faces contained in the j-th hole AllHoles[j] and the k-th hole AllHoles[k], and record the calculated countersunk hole parameters into the countersunk hole object, thereby forming the final countersunk hole.
[0050] Preferably, step (3) comprises the following sub-steps:
[0051] (3-1) Set the counter m=0 and initialize the adjacent face set AllAdjs to be empty;
[0052] (3-2) Determine whether the counter m is less than the total number of faces in the manager AllFaces. If so, proceed to step (3-3), otherwise the process ends;
[0053] (3-3) Determine whether the mth face AllFaces[m] in the AllFaces manager is a plane. If so, proceed to step (3-4); otherwise, proceed to step (3-11);
[0054] (3-4) Get all adjacent faces of the mth face AllFaces[m] in the design model, and add all adjacent faces to the adjacent face set AllAdjs;
[0055] (3-5) Set counter n = 0;
[0056] (3-6) Determine whether the counter n is less than the total number of adjacent faces in the adjacent face set AllAdjs. If so, proceed to step (3-7); otherwise, proceed to step (3-10);
[0057] (3-7) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal plane. If so, proceed to step (3-9); otherwise, proceed to step (3-8);
[0058] (3-8) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal cylindrical face. If so, proceed to step (3-9); otherwise, proceed to step (3-11);
[0059] (3-9) Set counter n=n+1 and return to step (3-6);
[0060] (3-10) Use the face AllFaces[i] in the adjacent face set AllAdjs and all adjacent faces AllAdjs to construct a slot feature, and record the face AllFaces[i] as the bottom face in the slot feature, add the slot feature to the manager AllFeatures for management, and return to step (3-11);
[0061] (3-11) Counter m=m+1, return to step (3-2);
[0062] Preferably, step (4) comprises the following sub-steps:
[0063] (4-1) Set counter o=0;
[0064] (4-2) Determine whether the counter o is less than the total number of faces in the manager AllFaces. If so, proceed to step (4-3), otherwise the process ends;
[0065] (4-3) Determine whether the oth face AllFaces[o] in the AllFaces manager is a legal fillet face. If so, proceed to step (4-4); otherwise, proceed to step (4-5);
[0066] (4-4) Use the oth face AllFaces[o] to construct a fillet feature and add the fillet feature to the manager AllFeatures;
[0067] (4-5) Set counter o=o+1 and return to step (4-2);
[0068] Step (5) includes the following sub-steps:
[0069] (5-1) Set counter p = 0;
[0070] (5-2) Determine whether the counter p is less than the total number of faces in the manager AllFaces. If so, proceed to step (5-3), otherwise the process ends;
[0071] (5-3) Determine whether the p-th face AllFaces[p] in the manager AllFaces is a legal chamfered face. If so, proceed to step (5-4); otherwise, proceed to step (5-5);
[0072] (5-4) Use the pth face AllFaces[p] to construct a chamfer feature and add the chamfer feature to the manager AllFeatures;
[0073] (5-5) Counter p = p + 1, return to step (5-2);
[0074] Preferably, step (6) comprises the following sub-steps:
[0075] (6-1) Set counter q = 0;
[0076] (6-2) Determine whether the counter q is less than the total number of faces in the manager AllFaces. If so, proceed to step (6-3), otherwise the process ends;
[0077] (6-3) Determine whether the qth face AllFaces[q] in the manager AllFaces is a legal outer cylindrical face. If so, proceed to step (6-4); otherwise, proceed to step (6-5);
[0078] (6-4) Use the qth face AllFaces[q] to construct an outer cylindrical feature, and add the outer cylindrical feature to the manager AllFeatures;
[0079] (6-5) Set counter q = q + 1, and return to step (6-2);
[0080] Step (7) includes the following sub-steps:
[0081] (7-1) Set counter r = 0;
[0082] (7-2) Determine whether the counter r is less than the total number of faces in the manager AllFaces. If so, proceed to step (7-3), otherwise the process ends;
[0083] (7-3) Determine whether the rth face AllFaces[r] in the manager AllFaces is a legal plane. If so, proceed to step (7-4); otherwise, proceed to step (7-5);
[0084] (7-4) Use the rth face AllFaces[r] to construct a plane feature and add the plane feature to the manager AllFeatures;
[0085] (7-5) Counter r=r+1, and return to step (7-2).
[0086] Preferably, step (9) comprises the following sub-steps:
[0087] (9-1) Set counter s=0;
[0088] (9-2) Determine whether the counter s is less than the total number of features in the manager AllFeatures. If so, proceed to step (9-3), otherwise the process ends;
[0089] (9-3) Determine whether the sth feature AllFeatures[s] in the manager AllFeatures is a hole feature, if so, proceed to step (9-4), otherwise proceed to step (9-5);
[0090] (9-4) Generate a corresponding manufacturing feature body for the hole feature AllFeatures[s], and record the manufacturing feature body into the hole feature AllFeatures[s], and then go to step (9-11);
[0091] (9-5) Determine whether the sth feature AllFeatures[s] is a slot feature, if so, proceed to step (9-6), otherwise proceed to step (9-7);
[0092] (9-6) Generate a corresponding manufacturing feature body for the slot feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0093] (9-7) Determine whether the feature AllFeatures[s] is an outer cylindrical feature. If so, proceed to step (9-8); otherwise, proceed to step (9-9);
[0094] (9-8) Generate a manufacturing feature body corresponding to the outer cylindrical feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0095] (9-9) Determine whether the feature AllFeatures[s] is a plane feature, if so, proceed to step (9-10), otherwise proceed to step (9-11);
[0096] (9-10) Generate a manufacturing feature body corresponding to the plane feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0097] (9-11) Counter s=s+1, and return to step (9-2);
[0098] Preferably, step (10) is specifically as follows: for each processing step in the process route, first, the feature associated with the processing step in the manager AllFeatures is obtained, and then, according to the type of the feature, the following two types of processing are performed respectively:
[0099] ① If the feature type is a hole, slot, outer cylinder, or plane, directly obtain the manufacturing feature body recorded in the feature, and then use the tool opencascade to perform a Boolean difference operation between the manufacturing feature body and the process model of the previous processing step, so as to obtain the process model of the current processing step;
[0100] ②If the type of feature is fillet or chamfer, first, obtain the corresponding face pFace according to the feature, then obtain the fillet size or chamfer thickness fval, use the tool opencascade to obtain a point pt and direction vec4 on the face pFace, offset the point pt along the direction vec4 by a distance fval to obtain a new point offpt, obtain the process model of the previous processing step, use the tool opencascade to obtain all the edges of the process model, find an edge pedge that is closest to the point offpt from all the edges, use the tool opencascade to fillet or chamfer the edge pedge, and the obtained model is the process model of the processing step.
[0101] According to another aspect of the present invention, there is provided a system for generating a machining process model, comprising:
[0102] The first module is used to obtain the design model, read all the faces in the design model, and add each face to the pre-set manager AllFaces;
[0103] The second module is used to identify all hole features and construct hole feature objects for each face obtained by the first module, obtain hole feature data and save them into empty feature objects, and add all obtained hole feature objects to the pre-established manager AllFeatures.
[0104] The third module is used to obtain the slot features corresponding to each face in the manager AllFaces obtained by the first module, add the obtained slot features to the pre-established manager AllFeatures, and calculate the corresponding parameters of each slot feature.
[0105] The fourth module is used to obtain the chamfer feature of each face in the manager AllFaces obtained by the first module, and add the obtained chamfer feature of the face to the manager AllFeatures.
[0106] The fifth module is used to obtain the chamfer feature of each face in the manager AllFaces obtained by the first module, and add the obtained chamfer feature of the face to the manager AllFeatures.
[0107] The sixth module is used to obtain the outer cylindrical features of each face in the manager AllFaces obtained by the first module (such as the axis position of the cylinder, the positions of the centers of the two ends of the cylinder, etc.), and add the obtained outer cylindrical features of the face to the manager AllFeatures.
[0108] The seventh module is used to obtain the plane features of each face in the manager AllFaces obtained by the first module, and add the obtained plane features of the face to the manager AllFeatures.
[0109] The eighth module is used to obtain the process route compiled by the process designer according to the design model, which includes multiple processing procedures, and each processing procedure is associated with a feature in the manager AllFeatures;
[0110] The ninth module is used to generate a manufacturing feature body corresponding to each feature in the manager AllFeatures, and record the manufacturing feature body in the feature in the manager AllFeatures.
[0111] The tenth module is used to obtain, for each processing procedure in the process route obtained by the eighth module, the feature associated with the processing procedure in the manager AllFeatures, obtain the recorded manufacturing feature body from the feature, obtain the process model of the previous processing procedure in the process route of the processing procedure, and perform Boolean difference operation on the process model and the manufacturing feature body corresponding to the feature to obtain the process model of the processing procedure.
[0112] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0113] (1) The present invention adopts steps (2) to (7), which utilizes a feature recognition algorithm to recognize hole features, groove features, fillet features, chamfer features, outer cylindrical surface features, and plane features, constructs multiple surfaces into a feature management, quickly obtains feature parameters, and prepares data for the automatic generation of subsequent process models. At the same time, since the process model is automatically generated by steps (9) and (10), the calculation process is efficient and the calculation speed is fast.
[0114] (2) The present invention adopts step (9), performs special processing on the process model generation of rounding features and chamfering features, fully considers the property that rounding and chamfering are difficult to generate manufacturing feature bodies due to their complex structures, adopts the method of searching edges and then positively rounding or chamfering, and improves the accuracy of process model generation;
[0115] (3) The logic of the present invention is simple, and the feature recognition steps, manufacturing feature body generation steps, and process model generation steps adopted by the present invention are easy to debug and also convenient to adjust and expand. It can be adapted to different scenarios with slight adjustments, thereby improving the applicability of the present invention;
[0116] (4) The present invention is easy to operate. Both the feature recognition process and the process model automatic generation process can be performed automatically. During operation, only a few steps such as reading the model file are required to generate the process model. The operation is simple and convenient, and the requirements for the user are not high. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] Figure 1 is a schematic diagram of the hole features of the present invention;
[0118] Figure 2 is a detailed flow chart of step (2) in the method of the present invention;
[0119] Figure 3 is a detailed flow chart of step (3) in the method of the present invention;
[0120] Figure 4 is a detailed flow chart of step (9) in the method of the present invention;
[0121] Figure 5 It is a flow chart of the method for generating a machining process model of the present invention. DETAILED DESCRIPTION
[0122] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0123] The basic idea of the present invention is to obtain the three-dimensional model of the machined part, extract the Brep information of the model, and automatically identify the design features in the part according to the Brep information, such as holes, slots, planes, rounded chamfers, etc. After the process engineer arranges the process route, the processing features of each process are determined, and the manufacturing feature body is automatically generated according to the features. The manufacturing feature body is used to perform Boolean subtraction operation with the blank to automatically generate the process model.
[0124] The present invention uses feature recognition technology to quickly extract basic features in the design model, and automatically generates manufacturing feature bodies based on manufacturing features, which solves the problem that the existing method of drawing process models based on forward modeling requires a lot of manual interaction, has a large workload, and is inefficient. The order in which the process model is generated by this method is the same as the actual processing order of the parts, which solves the problem that the process model is difficult to understand and prone to errors in reverse design. The method supports the recognition of holes, grooves, planes, fillets, and outer cylindrical surface features, and the feature recognition module in the method is relatively independent and easy to expand. Compared with the existing three-dimensional process model construction method based on processing elements, it better solves the problem of generating process models for complex products.
[0125] like Figure 5 As shown, the present invention provides a method for generating a machining process model, comprising the following steps:
[0126] (1) Obtain the design model, read all faces in the design model, and add each face to the pre-set manager AllFaces;
[0127] Specifically, this step uses the design model as system input. The system automatically obtains the faces in the design model, including planes, cylinders, cones, tori, spheres, etc., constructs a manager AllFaces, and adds each face to the manager AllFaces for management.
[0128] The design model in this step is a three-dimensional model of the product designed by a mechanical structure designer, such as a three-dimensional model of cavity parts and a three-dimensional model of shaft parts.
[0129] The manager AllFaces in the present invention is specifically a container object, such as std::list, std::vector, etc., which can store multiple data of any type.
[0130] (2) For each face obtained in step (1), identify all hole features and construct hole feature objects, obtain hole feature data and save them into empty feature objects, and add all obtained hole feature objects to the pre-established manager AllFeatures.
[0131] Specifically, hole features include simple holes, countersunk holes, countersunk holes, and tapered holes. The schematic diagram of hole features is as follows: Figure 1 shown.
[0132] The hole feature data corresponding to the hole feature includes the type of hole (the four types mentioned above), the faces that make up the hole, the axial direction of the hole, the large radius of the hole, the small radius of the hole, a point on the axis of the hole, the entry point of the hole, and the end point of the hole.
[0133] The manager AllFeatures in the present invention is specifically a container object, such as std::list, std::vector, etc., which can store multiple data of any type.
[0134] like Figure 2 As shown, this step includes the following sub-steps:
[0135] (2-1) Set the counter i=0 and initialize the manager AllHoles to empty;
[0136] The manager AllHoles in the present invention is specifically a container object, such as std::list, std::vector, etc., which can store multiple data of any type.
[0137] (2-2) Determine whether the counter i is less than the total number of faces in the manager AllFaces. If so, proceed to step (2-3); otherwise, proceed to step (2-8);
[0138] (2-3) Determine whether the i-th face AllFaces[i] in the AllFaces manager is a cylindrical face. If so, proceed to step (2-4); otherwise, proceed to step (2-6);
[0139] (2-4) Use the i-th face AllFaces[i] to construct a simple hole feature, add the constructed hole feature to the manager AllHoles, and then go to step (2-5);
[0140] Specifically, the process of using the i-th face AllFaces[i] to construct a simple hole feature is to construct a hole feature object, record the face AllFaces[i] in the hole feature object, use the tool opencascade to obtain the data of the face AllFaces[i] such as the center positions of the two ends, radius, and axis position, and record the above data of the face AllFaces[i] in the hole feature object.
[0141] (2-5) Set counter i=i+1 and return to step (2-2);
[0142] (2-6) Determine whether the i-th face AllFaces[i] is a conical surface. If so, proceed to step (2-7); otherwise, return to step (2-5);
[0143] (2-7) Use the i-th face AllFaces[i] to construct a tapered hole feature, add the constructed tapered hole feature to the manager AllHoles, and then return to step (2-5);
[0144] Specifically, the process of using the i-th face AllFaces[i] to construct the tapered hole feature is to construct a tapered hole feature object, record the face AllFaces[i] in the tapered hole feature object, use the tool opencascade to obtain the data in the face AllFaces[i] (such as the center position of the two ends, radius, and axis position), and finally record the above data of the face AllFaces[i] in the tapered hole feature object.
[0145] (2-8) Set counter j = 0;
[0146] (2-9) Determine whether the counter j is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-10), otherwise the process ends;
[0147] (2-10) Determine whether the j-th hole feature AllHoles[j] in the manager AllHoles exists in the pre-set feature manager AllFeatures. If yes, proceed to step (2-20), otherwise proceed to step (2-11);
[0148] (2-11) Set counter k = 0;
[0149] (2-12) Determine whether the counter k is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-14), otherwise proceed to step (2-13);
[0150] (2-13) Add the j-th hole AllHoles[j] to the manager AllFeatures and go to step (2-20);
[0151] (2-14) Determine whether the kth hole AllHoles[k] exists in the manager AllFeatures. If so, go to step (2-19), otherwise go to step (2-15);
[0152] (2-15) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-16); otherwise, proceed to step (2-17);
[0153] Specifically, the condition for determining whether hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole is that the face contained in hole AllHoles[j] is directly connected to the face contained in hole AllHoles[k], and the axis of hole AllHoles[j] coincides with the axis of hole AllHoles[k]. If these two conditions are met, it means that hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole, otherwise it means that the two cannot form a countersunk hole.
[0154] (2-16) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the constructed countersunk hole to the manager AllFeatures, and then go to step (2-20);
[0155] Specifically, the process of constructing a countersunk hole using hole AllHoles[j] and hole AllHoles[k] is to first construct a countersunk hole object, and then use the surface where hole AllHoles[j] is located and the surface where hole AllHoles[k] is located to calculate the countersunk hole parameters (such as the radius of the countersunk hole, the axis position, the upper and lower center positions of the circle, etc.), and record the calculated countersunk hole parameters in the countersunk hole object, thereby forming the final countersunk hole.
[0156] (2-17) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-18), otherwise proceed to step (2-19);
[0157] Specifically, the conditions for judging whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole are: ① The surfaces where the holes AllHoles[j] and AllHoles[k] are located are directly connected; ② One of the holes AllHoles[j] and AllHoles[k] is a simple hole and the other is a tapered hole; ③ The axes of the holes AllHoles[j] and AllHoles[k] must coincide. If all three conditions are met, it means that the holes AllHoles[j] and AllHoles[k] can form a countersunk hole, otherwise it means that the holes AllHoles[j] and AllHoles[k] cannot form a countersunk hole.
[0158] (2-18) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the countersunk hole to the manager AllFeatures, and then go to step (2-20);
[0159] The process of constructing a countersunk hole in this step is as follows: first construct a countersunk hole object, then calculate the countersunk hole parameters (such as the radius, axis position, upper and lower center positions of the countersunk hole, etc.) according to the faces included in the j-th hole AllHoles[j] and the k-th hole AllHoles[k], and record the calculated countersunk hole parameters into the countersunk hole object, thereby forming the final countersunk hole;
[0160] (2-19) Set counter k=k+1 and return to step (2-12);
[0161] (2-20) Set counter j = j + 1 and return to step (2-9);
[0162] The advantage of this step is that by identifying hole features and using simple hole feature combinations to form countersunk holes and countersunk holes, the accuracy of hole feature recognition is improved. At the same time, feature data is extracted to provide data support for the automatic generation of subsequent process models.
[0163] (3) For each face in the manager AllFaces obtained in step (1), obtain the slot feature corresponding to the face, add the obtained slot feature to the pre-established manager AllFeatures, and calculate the corresponding parameters of each slot feature (such as the bottom surface of the slot, the depth of the slot, etc.).
[0164] like Figure 3 As shown, this step includes the following sub-steps:
[0165] (3-1) Set the counter m=0 and initialize the adjacent face set AllAdjs to be empty;
[0166] (3-2) Determine whether the counter m is less than the total number of faces in the manager AllFaces. If so, proceed to step (3-3), otherwise the process ends;
[0167] (3-3) Determine whether the mth face AllFaces[m] in the AllFaces manager is a plane. If so, proceed to step (3-4); otherwise, proceed to step (3-11);
[0168] (3-4) Get all adjacent faces of the mth face AllFaces[m] in the design model, and add all adjacent faces to the adjacent face set AllAdjs;
[0169] Specifically, in this step, the process of obtaining all adjacent faces of the face AllFaces[m] is to use the tool pencascade to obtain all edges of the m-th face AllFaces[m], and then for each edge, continue to obtain the face where the edge is located, and finally, add the faces where all edges are located to the adjacent face set AllAdjs.
[0170] (3-5) Set counter n = 0;
[0171] (3-6) Determine whether the counter n is less than the total number of adjacent faces in the adjacent face set AllAdjs. If so, proceed to step (3-7); otherwise, proceed to step (3-10);
[0172] (3-7) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal plane. If so, proceed to step (3-9); otherwise, proceed to step (3-8);
[0173] Specifically, the process of determining whether the adjacent face AllAdjs[n] is a legal plane is to determine whether the normal vector of face AllFaces[m] is perpendicular to the normal vector of face AllAdjs[n]. If so, it means that face AllAdjs[n] is a legal plane; otherwise, it means that face AllAdjs[n] is not a legal plane.
[0174] (3-8) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal cylindrical face. If so, proceed to step (3-9); otherwise, proceed to step (3-11);
[0175] Specifically, the process of determining whether the adjacent face AllAdjs[n] is a legal cylindrical surface is to obtain the normal vector of the face AllFaces[m] and the axis of the face AllAdjs[n]. If the normal vector and the axis are parallel, it means that the adjacent face AllAdjs[n] is a legal cylindrical surface; otherwise, it means that the adjacent face AllAdjs[n] is not a legal cylindrical surface.
[0176] (3-9) Set counter n=n+1 and return to step (3-6);
[0177] (3-10) Use the face AllFaces[i] in the adjacent face set AllAdjs and all adjacent faces AllAdjs to construct a slot feature, and record the face AllFaces[i] as the bottom face in the slot feature, add the slot feature to the manager AllFeatures for management, and return to step (3-11);
[0178] (3-11) Counter m=m+1, return to step (3-2);
[0179] The advantage of this step is that it uses the geometric data of the surface to identify the slot features, which has fewer restrictions. Therefore, it can widely identify key slots, narrow slots, irregular slots, etc., and the algorithm performance is good. At the same time, the feature component surface is quickly obtained by automatic feature recognition counting, and then the surface parameters are extracted, providing data support for the automatic generation of process models in subsequent steps.
[0180] (4) For each face in the manager AllFaces obtained in step (1), obtain the fillet feature of the face (such as the fillet radius), and add the obtained fillet feature of the face to the manager AllFeatures.
[0181] This step includes the following sub-steps:
[0182] (4-1) Set counter o=0;
[0183] (4-2) Determine whether the counter o is less than the total number of faces in the manager AllFaces. If so, proceed to step (4-3), otherwise the process ends;
[0184] (4-3) Determine whether the oth face AllFaces[o] in the AllFaces manager is a legal fillet face. If so, proceed to step (4-4); otherwise, proceed to step (4-5);
[0185] Specifically, to determine whether the oth face AllFaces[o] is a legal fillet face, the following two conditions must be met at the same time:
[0186] ① The number of rings of the face AllFaces[o] obtained through the open source tool opencascade is 1;
[0187] ② The total number of all adjacent faces of the obtained o-th face AllFaces[o] in the design model is at least 2;
[0188] (4-4) Use the oth face AllFaces[o] to construct a fillet feature and add the fillet feature to the manager AllFeatures;
[0189] Specifically, the process of constructing the chamfer feature using the o-th face AllFaces[o] is to first construct a chamfer feature object, record the face AllFaces[o] in the chamfer feature object, then use the tool opencascade to obtain the radius of the face AllFaces[o], and record the radius in the chamfer feature object to obtain the chamfer feature.
[0190] (4-5) Set counter o=o+1 and return to step (4-2);
[0191] The advantage of this step is that the fillet feature is constructed using the surface, and the relevant data is managed in the fillet feature, providing data support for the automatic generation of subsequent process models.
[0192] (5) For each face in the manager AllFaces obtained in step (1), obtain the chamfer feature (such as chamfer thickness) of the face, and add the obtained chamfer feature of the face to the manager AllFeatures.
[0193] Specifically, this step includes the following sub-steps:
[0194] (5-1) Set counter p = 0;
[0195] (5-2) Determine whether the counter p is less than the total number of faces in the manager AllFaces. If so, proceed to step (5-3), otherwise the process ends;
[0196] (5-3) Determine whether the p-th face AllFaces[p] in the manager AllFaces is a legal chamfered face. If so, proceed to step (5-4); otherwise, proceed to step (5-5);
[0197] Specifically, the process of determining whether the p-th face AllFaces[p] is a legal chamfered face is to obtain the total number of all adjacent faces of the p-th face AllFaces[p] in the three-dimensional model. If the total number is greater than or equal to 2, and the angle between the direction of each adjacent face and the direction of the p-th face AllFaces[p] is an acute angle, then the p-th face AllFaces[p] is a legal chamfered face; otherwise, the p-th face AllFaces[p] is not a legal chamfered face.
[0198] (5-4) Use the pth face AllFaces[p] to construct a chamfer feature and add the chamfer feature to the manager AllFeatures;
[0199] Specifically, in this step, the process of constructing a chamfer feature using the p-th face AllFaces[p] is to first construct a chamfer feature object, then record the p-th face AllFaces[p] into the chamfer feature object, and then use the tool opencascade to calculate the chamfer thickness of the p-th face AllFaces[p], and record the chamfer thickness into the chamfer feature object to obtain the chamfer feature.
[0200] (5-5) Counter p = p + 1, return to step (5-2);
[0201] The advantage of this step is that the chamfer feature is constructed using the surface, and the relevant data is managed in the chamfer feature, providing data support for the automatic generation of subsequent process models.
[0202] (6) For each face in the manager AllFaces obtained in step (1), obtain the outer cylindrical features of the face (such as the position of the axis of the cylinder, the positions of the centers of the two ends of the cylinder, etc.), and add the obtained outer cylindrical features of the face to the manager AllFeatures.
[0203] Specifically, this step includes the following sub-steps:
[0204] (6-1) Set counter q = 0;
[0205] (6-2) Determine whether the counter q is less than the total number of faces in the manager AllFaces. If so, proceed to step (6-3), otherwise the process ends;
[0206] (6-3) Determine whether the qth face AllFaces[q] in the manager AllFaces is a legal outer cylindrical face. If so, proceed to step (6-4); otherwise, proceed to step (6-5);
[0207] Specifically, the process of determining whether the qth face AllFaces[q] is a legal outer cylindrical surface is as follows: first determine whether the qth face AllFaces[q] is a cylindrical surface; if not, it means that the qth face AllFaces[q] is not a legal cylindrical surface; if so, further obtain all rings of the qth face AllFaces[q] through the tool opencascade; if the total number of rings is at least 2, it means that the qth face AllFaces[q] is a legal outer cylindrical surface; otherwise, it means that the qth face AllFaces[q] is not a legal outer cylindrical surface.
[0208] (6-4) Use the qth face AllFaces[q] to construct an outer cylindrical feature, and add the outer cylindrical feature to the manager AllFeatures;
[0209] Specifically, the process of constructing an outer cylinder feature using the qth face AllFaces[q] is to first construct an outer cylinder feature object, record the qth face AllFaces[q] in the outer cylinder feature object, and then use the tool opencascade to obtain the radius and the center of the upper and lower ends of the qth face AllFaces[q], and record the radius and the center of the upper and lower ends in the outer cylinder feature object to obtain the outer cylinder feature.
[0210] (6-5) Set counter q = q + 1, and return to step (6-2);
[0211] The advantage of this step is that the outer cylindrical feature is constructed using the surface, and the relevant data is managed in the chamfer feature, providing data support for the automatic generation of subsequent process models.
[0212] (7) For each face in the manager AllFaces obtained in step (1), obtain the plane features of the face, and add the obtained plane features of the face to the manager AllFeatures.
[0213] Specifically, this step includes the following sub-steps:
[0214] (7-1) Set counter r = 0;
[0215] (7-2) Determine whether the counter r is less than the total number of faces in the manager AllFaces. If so, proceed to step (7-3), otherwise the process ends;
[0216] (7-3) Determine whether the rth face AllFaces[r] in the manager AllFaces is a legal plane. If so, proceed to step (7-4); otherwise, proceed to step (7-5);
[0217] Specifically, the process of determining whether the r-th face AllFaces[r] is a legal plane is as follows: first, for each feature in the feature manager AllFeatures, obtain the face featFaces corresponding to the feature, and determine whether the r-th face AllFaces[r] belongs to the face featFaces; if so, it means that the r-th face AllFaces[r] is not a legal plane; otherwise, further determine whether the r-th face AllFaces[r] is a plane; if so, it means that the r-th face AllFaces[r] is a legal plane; otherwise, it means that the r-th face AllFaces[r] is not a legal plane.
[0218] (7-4) Use the rth face AllFaces[r] to construct a plane feature and add the plane feature to the manager AllFeatures;
[0219] Specifically, the process of constructing a plane feature using the r-th face AllFaces[r] is to first construct a plane feature object, and then record the r-th face AllFaces[r] into the plane feature object, thereby obtaining the plane feature.
[0220] (7-5) Counter r = r + 1, and return to step (7-2);
[0221] (8) Obtaining a process route compiled by a process designer based on a design model, which includes multiple processing steps, and each processing step is associated with a feature in the manager AllFeatures;
[0222] (9) For each feature in the manager AllFeatures, generate a manufacturing feature body corresponding to the feature, and record the manufacturing feature body into the feature in the manager AllFeatures.
[0223] like Figure 4 As shown, this step includes the following sub-steps:
[0224] (9-1) Set counter s=0;
[0225] (9-2) Determine whether the counter s is less than the total number of features in the manager AllFeatures. If so, proceed to step (9-3), otherwise the process ends;
[0226] (9-3) Determine whether the sth feature AllFeatures[s] in the manager AllFeatures is a hole feature, if so, proceed to step (9-4), otherwise proceed to step (9-5);
[0227] (9-4) Generate a corresponding manufacturing feature body for the hole feature AllFeatures[s], and record the manufacturing feature body into the hole feature AllFeatures[s], and then go to step (9-11);
[0228] Specifically, the process of generating the manufacturing feature body corresponding to the hole feature AllFeatures[s] is to first obtain the upper and lower center points of the hole feature AllFeatures[s] and the radius of the hole, and then generate a new cylinder based on the upper and lower center points of the hole feature AllFeatures[s] and the radius of the hole through the tool opencascade as the manufacturing feature body corresponding to the hole feature AllFeatures[s].
[0229] (9-5) Determine whether the sth feature AllFeatures[s] is a slot feature, if so, proceed to step (9-6), otherwise proceed to step (9-7);
[0230] (9-6) Generate a corresponding manufacturing feature body for the slot feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0231] Specifically, the process of generating the manufacturing feature body corresponding to the slot feature AllFeatures[s] is to first obtain the bottom surface of the slot feature AllFeatures[s], obtain the boundary bound1 of the bottom surface, the direction vec1 of the bottom surface, and the depth depth of the slot feature AllFeatures[s] through the tool opencascade, and then use the tool opencascade to stretch the boundary bound1 along the direction vec1 to the depth depth, and the result is the manufacturing feature body corresponding to the slot feature AllFeatures[s].
[0232] (9-7) Determine whether the feature AllFeatures[s] is an outer cylindrical feature. If so, proceed to step (9-8); otherwise, proceed to step (9-9);
[0233] (9-8) Generate a manufacturing feature body corresponding to the outer cylindrical feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0234] Specifically, the process of generating the manufacturing feature body corresponding to the outer cylindrical feature AllFeatures[s] is as follows: first, obtain the upper center point pt1 and the lower center point pt2 of the outer cylindrical feature AllFeatures[s], subtract the upper center point pt1 from the lower center point pt2 to obtain the direction vec2, obtain the radius radi of the outer cylindrical feature AllFeatures[s], then use the tool opencascade to draw a circle cir1 with a radius equal to radi at the center pt1, and draw a circle cir2 with a radius equal to radi*2 at the center pt1, then, use cir1 and cir2 as boundaries, stretch along the direction vec2, and the result is the manufacturing feature body corresponding to the outer cylindrical feature AllFeatures[s].
[0235] (9-9) Determine whether the feature AllFeatures[s] is a plane feature, if so, proceed to step (9-10), otherwise proceed to step (9-11);
[0236] (9-10) Generate a manufacturing feature body corresponding to the plane feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11);
[0237] Specifically, the process of generating the manufacturing feature body corresponding to the planar feature AllFeatures[s] is as follows: first, obtain the surface corresponding to the planar feature AllFeatures[s], use the tool opencascade to obtain the boundary bound3 and the direction vec3 of the surface, and then use the tool opencascade to stretch the boundary bound3 along the direction vec3. The result is the manufacturing feature body corresponding to the planar feature AllFeatures[s].
[0238] (9-11) Counter s=s+1, and return to step (9-2);
[0239] The advantage of this step is that different manufacturing feature bodies are generated according to different features, the calculation process is relatively independent and easy to modify, and the manufacturing feature body is saved in the feature object, which is convenient for the subsequent automatic generation of process model calls.
[0240] (10) For each processing step in the process route obtained in step (8), obtain the feature associated with the processing step in the manager AllFeatures, obtain the manufacturing feature body recorded from the feature, obtain the process model of the previous processing step in the process route, and perform a Boolean difference operation between the process model and the manufacturing feature body corresponding to the feature to obtain the process model of the processing step.
[0241] Specifically, for each processing step in the process route, first, obtain the feature associated with the processing step in the manager AllFeatures, and then perform the following two types of processing according to the type of the feature:
[0242] ① If the feature type is a hole, slot, outer cylinder, or plane, directly obtain the manufacturing feature body recorded in the feature, and then use the tool opencascade to perform a Boolean difference operation on the manufacturing feature body and the process model of the previous processing step to obtain the process model of the current processing step.
[0243] ② If the type of feature is fillet or chamfer (since the manufacturing feature body of this type of feature is not calculated in step (9), special processing is required), the specific processing process is, first, obtain the corresponding face pFace according to the feature, then obtain the fillet size or chamfer thickness fval, use the tool opencascade to obtain a point pt and direction vec4 on the face pFace, offset the point pt along the direction vec4 by a distance fval to obtain a new point offpt, obtain the process model of the previous processing step, use the tool opencascade to obtain all the edges of the process model, find an edge pedge that is closest to the point offpt from all the edges, use the tool opencascade to fillet or chamfer the edge pedge, and the obtained model is the process model of the processing step.
[0244] The advantage of this step is that it uses the manufacturing feature body and the process model of the previous processing step to perform Boolean operations to generate a new process model, fully utilizes the existing data, and improves calculation efficiency. At the same time, for the chamfered features, since it is difficult to generate a manufacturing feature body, special processing is performed on them. By finding the edge closest to the point, the edge is directly chamfered or rounded to generate the process model, thereby ensuring the accuracy of process model generation.
[0245] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a machining process model, characterized in that: The following steps are involved: (1) Obtain the design model, read all faces in the design model, and add each face to the pre-set manager AllFaces; (2) For each face obtained in step (1), identify all hole features and construct hole feature objects, obtain hole feature data and save them into empty feature objects, and add all obtained hole feature objects to the pre-established manager AllFeatures. (3) For each face in the manager AllFaces obtained in step (1), obtain the slot feature corresponding to the face, add the obtained slot feature to the pre-established manager AllFeatures, and calculate the corresponding parameters of each slot feature. (4) For each face in the manager AllFaces obtained in step (1), obtain the fillet feature of the face, and add the obtained fillet feature of the face to the manager AllFeatures. (5) For each face in the manager AllFaces obtained in step (1), obtain the chamfer feature of the face, and add the obtained chamfer feature of the face to the manager AllFeatures. (6) For each face in the manager AllFaces obtained in step (1), obtain the outer cylindrical features of the face (such as the position of the axis of the cylinder, the positions of the centers of the two ends of the cylinder, etc.), and add the obtained outer cylindrical features of the face to the manager AllFeatures. (7) For each face in the manager AllFaces obtained in step (1), obtain the plane features of the face, and add the obtained plane features of the face to the manager AllFeatures. (8) Obtaining a process route compiled by a process designer based on a design model, which includes multiple processing steps, and each processing step is associated with a feature in the manager AllFeatures; (9) For each feature in the manager AllFeatures, generate a manufacturing feature body corresponding to the feature, and record the manufacturing feature body into the feature in the manager AllFeatures. (10) For each processing step in the process route obtained in step (8), obtain the feature associated with the processing step in the manager AllFeatures, obtain the recorded manufacturing feature body from the feature, obtain the process model of the previous processing step in the process route, and perform a Boolean difference operation between the process model and the manufacturing feature body corresponding to the feature to obtain the process model of the processing step.
2. The method for generating a machining process model according to claim 1, characterized in that: Hole features include simple holes, countersunk holes, counterbores, and tapered holes; The hole feature data corresponding to the hole feature includes the type of hole, the faces constituting the hole, the axial direction of the hole, the major radius of the hole, the minor radius of the hole, a point on the axis of the hole, the entry point of the hole, and the end point of the hole. The AllFaces manager, the AllFeatures manager, and the AllHoles manager are container objects used to store multiple data of any type.
3. The method for generating a machining process model according to claim 1 or 2, characterized in that: Step (2) includes the following sub-steps: (2-1) Set the counter i=0 and initialize the manager AllHoles to empty; (2-2) Determine whether the counter i is less than the total number of faces in the manager AllFaces. If so, proceed to step (2-3); otherwise, proceed to step (2-8); (2-3) Determine whether the i-th face AllFaces[i] in the AllFaces manager is a cylindrical face. If so, proceed to step (2-4); otherwise, proceed to step (2-6); (2-4) Use the i-th face AllFaces[i] to construct a simple hole feature, add the constructed hole feature to the manager AllHoles, and then go to step (2-5); (2-5) Set counter i=i+1 and return to step (2-2); (2-6) Determine whether the i-th face AllFaces[i] is a conical surface. If so, proceed to step (2-7); otherwise, return to step (2-5); (2-7) Use the i-th face AllFaces[i] to construct a tapered hole feature, add the constructed tapered hole feature to the manager AllHoles, and then return to step (2-5); (2-8) Set counter j = 0; (2-9) Determine whether the counter j is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-10), otherwise the process ends; (2-10) Determine whether the j-th hole feature AllHoles[j] in the manager AllHoles exists in the pre-set feature manager AllFeatures. If yes, proceed to step (2-20), otherwise proceed to step (2-11); (2-11) Set counter k = 0; (2-12) Determine whether the counter k is less than the total number of hole features in the manager AllHoles. If so, proceed to step (2-14), otherwise proceed to step (2-13); (2-13) Add the j-th hole AllHoles[j] to the manager AllFeatures and go to step (2-20); (2-14) Determine whether the kth hole AllHoles[k] exists in the manager AllFeatures. If so, go to step (2-19), otherwise go to step (2-15); (2-15) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-16); otherwise, proceed to step (2-17); (2-16) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the constructed countersunk hole to the manager AllFeatures, and then go to step (2-20); (2-17) Determine whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole. If so, proceed to step (2-18), otherwise proceed to step (2-19); (2-18) Use the j-th hole AllHoles[j] and the k-th hole AllHoles[k] to construct a countersunk hole, add the countersunk hole to the manager AllFeatures, and then go to step (2-20); (2-19) Set counter k=k+1 and return to step (2-12); (2-20) Set counter j=j+1 and return to step (2-9).
4. The method for generating a machining process model according to any one of claims 1 to 3, characterized in that: The process of using the i-th face AllFaces[i] to construct a simple hole feature in step (2-4) is to construct a hole feature object, record the face AllFaces[i] in the hole feature object, use the tool opencascade to obtain the data of the face AllFaces[i] such as the center position of the two ends, radius, and axis position, and record the above data of the face AllFaces[i] in the hole feature object. The process of using the i-th face AllFaces[i] to construct the tapered hole feature in step (2-7) is to construct a tapered hole feature object, record the face AllFaces[i] in the tapered hole feature object, use the tool opencascade to obtain the data in the face AllFaces[i] (such as the center position of the two ends, radius, and axis position), and finally record the above data of the face AllFaces[i] in the tapered hole feature object. In step (2-15), the condition for determining whether hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole is that the surface contained in hole AllHoles[j] is directly connected to the surface contained in hole AllHoles[k], and the axis of hole AllHoles[j] coincides with the axis of hole AllHoles[k]. If these two conditions are met, it means that hole AllHoles[j] and hole AllHoles[k] can form a countersunk hole, otherwise it means that the two cannot form a countersunk hole. The process of constructing a countersunk hole using hole AllHoles[j] and hole AllHoles[k] in step (2-16) is to first construct a countersunk hole object, then calculate the countersunk hole parameters using the surface where hole AllHoles[j] is located and the surface where hole AllHoles[k] is located, and then record the calculated countersunk hole parameters in the countersunk hole object, thereby forming the final countersunk hole. In step (2-17), the conditions for judging whether the j-th hole AllHoles[j] and the k-th hole AllHoles[k] can form a countersunk hole are: ① The surfaces where the holes AllHoles[j] and AllHoles[k] are located are directly connected; ② One of the holes AllHoles[j] and AllHoles[k] is a simple hole and the other is a tapered hole; ③ The axes of the holes AllHoles[j] and AllHoles[k] must coincide. If all three conditions are met, it means that the holes AllHoles[j] and AllHoles[k] can form a countersunk hole, otherwise it means that the holes AllHoles[j] and AllHoles[k] cannot form a countersunk hole. The process of constructing a countersunk hole in step (2-18) is: first construct a countersunk hole object, then calculate the countersunk hole parameters based on the faces contained in the j-th hole AllHoles[j] and the k-th hole AllHoles[k], and record the calculated countersunk hole parameters into the countersunk hole object, thereby forming the final countersunk hole.
5. The method for generating a machining process model according to claim 4, characterized in that: Step (3) includes the following sub-steps: (3-1) Set the counter m=0 and initialize the adjacent face set AllAdjs to be empty; (3-2) Determine whether the counter m is less than the total number of faces in the manager AllFaces. If so, proceed to step (3-3), otherwise the process ends; (3-3) Determine whether the mth face AllFaces[m] in the AllFaces manager is a plane. If so, proceed to step (3-4); otherwise, proceed to step (3-11); (3-4) Get all adjacent faces of the mth face AllFaces[m] in the design model, and add all adjacent faces to the adjacent face set AllAdjs; (3-5) Set counter n = 0; (3-6) Determine whether the counter n is less than the total number of adjacent faces in the adjacent face set AllAdjs. If so, proceed to step (3-7); otherwise, proceed to step (3-10); (3-7) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal plane. If so, proceed to step (3-9); otherwise, proceed to step (3-8); (3-8) Determine whether the nth adjacent face AllAdjs[n] in the adjacent face set AllAdjs is a legal cylindrical face. If so, proceed to step (3-9); otherwise, proceed to step (3-11); (3-9) Set counter n=n+1 and return to step (3-6); (3-10) Use the face AllFaces[i] in the adjacent face set AllAdjs and all adjacent faces AllAdjs to construct a slot feature, and record the face AllFaces[i] as the bottom face in the slot feature, add the slot feature to the manager AllFeatures for management, and return to step (3-11); (3-11) Counter m=m+1, return to step (3-2).
6. The method for generating a machining process model according to claim 5, characterized in that: Step (4) includes the following sub-steps: (4-1) Set counter o=0; (4-2) Determine whether the counter o is less than the total number of faces in the manager AllFaces. If so, proceed to step (4-3), otherwise the process ends; (4-3) Determine whether the oth face AllFaces[o] in the AllFaces manager is a legal fillet face. If so, proceed to step (4-4); otherwise, proceed to step (4-5); (4-4) Use the oth face AllFaces[o] to construct a fillet feature, and add the fillet feature to the manager AllFeatures; (4-5) Set counter o=o+1 and return to step (4-2); Step (5) includes the following sub-steps: (5-1) Set counter p = 0; (5-2) Determine whether the counter p is less than the total number of faces in the manager AllFaces. If so, proceed to step (5-3), otherwise the process ends; (5-3) Determine whether the p-th face AllFaces[p] in the manager AllFaces is a legal chamfered face. If so, proceed to step (5-4); otherwise, proceed to step (5-5); (5-4) Use the pth face AllFaces[p] to construct a chamfer feature and add the chamfer feature to the manager AllFeatures; (5-5) Counter p=p+1, return to step (5-2).
7. The method for generating a machining process model according to claim 6, characterized in that: Step (6) includes the following sub-steps: (6-1) Set counter q = 0; (6-2) Determine whether the counter q is less than the total number of faces in the manager AllFaces. If so, proceed to step (6-3), otherwise the process ends; (6-3) Determine whether the qth face AllFaces[q] in the manager AllFaces is a legal outer cylindrical face. If so, proceed to step (6-4); otherwise, proceed to step (6-5); (6-4) Use the qth face AllFaces[q] to construct an outer cylindrical feature, and add the outer cylindrical feature to the manager AllFeatures; (6-5) Set counter q = q + 1, and return to step (6-2); Step (7) includes the following sub-steps: (7-1) Set counter r = 0; (7-2) Determine whether the counter r is less than the total number of faces in the manager AllFaces. If so, proceed to step (7-3), otherwise the process ends; (7-3) Determine whether the rth face AllFaces[r] in the manager AllFaces is a legal plane. If so, proceed to step (7-4); otherwise, proceed to step (7-5); (7-4) Use the rth face AllFaces[r] to construct a plane feature and add the plane feature to the manager AllFeatures; (7-5) Counter r=r+1, and return to step (7-2).
8. The method for generating a machining process model according to claim 7, characterized in that: Step (9) includes the following sub-steps: (9-1) Set counter s=0; (9-2) Determine whether the counter s is less than the total number of features in the manager AllFeatures. If so, proceed to step (9-3), otherwise the process ends; (9-3) Determine whether the sth feature AllFeatures[s] in the manager AllFeatures is a hole feature, if so, proceed to step (9-4), otherwise proceed to step (9-5); (9-4) Generate a corresponding manufacturing feature body for the hole feature AllFeatures[s], and record the manufacturing feature body into the hole feature AllFeatures[s], and then go to step (9-11); (9-5) Determine whether the sth feature AllFeatures[s] is a slot feature, if so, proceed to step (9-6), otherwise proceed to step (9-7); (9-6) Generate a corresponding manufacturing feature body for the slot feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11); (9-7) Determine whether the feature AllFeatures[s] is an outer cylindrical feature. If so, proceed to step (9-8); otherwise, proceed to step (9-9); (9-8) Generate a manufacturing feature body corresponding to the outer cylindrical feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11); (9-9) Determine whether the feature AllFeatures[s] is a plane feature, if so, proceed to step (9-10), otherwise proceed to step (9-11); (9-10) Generate a manufacturing feature body corresponding to the plane feature AllFeatures[s], and record the manufacturing feature body into the feature AllFeatures[s], and then go to step (9-11); (9-11) Counter s=s+1, and return to step (9-2).
9. The method for generating a machining process model according to claim 8, characterized in that: Step (10) is as follows: for each processing step in the process route, first, the feature associated with the processing step in the manager AllFeatures is obtained, and then, according to the type of the feature, the following two types of processing are performed: ① If the feature type is a hole, slot, outer cylinder, or plane, the manufacturing feature body recorded in the feature is directly obtained, and then the tool opencascade is used to perform a Boolean difference operation between the manufacturing feature body and the process model of the previous processing step, thereby obtaining the process model of the current processing step; ②If the type of feature is fillet or chamfer, first, obtain the corresponding face pFace according to the feature, then obtain the fillet size or chamfer thickness fval, use the tool opencascade to obtain a point pt and direction vec4 on the face pFace, offset the point pt along the direction vec4 by a distance fval to obtain a new point offpt, obtain the process model of the previous processing step, use the tool opencascade to obtain all the edges of the process model, find an edge pedge that is closest to the point offpt from all the edges, use the tool opencascade to fillet or chamfer the edge pedge, and the obtained model is the process model of the processing step.
10. A system for generating a machining process model, characterized in that: include: The first module is used to obtain the design model, read all the faces in the design model, and add each face to the pre-set manager AllFaces; The second module is used to identify all hole features and construct hole feature objects for each face obtained by the first module, obtain hole feature data and save them into empty feature objects, and add all obtained hole feature objects to the pre-established manager AllFeatures. The third module is used to obtain the slot features corresponding to each face in the manager AllFaces obtained by the first module, add the obtained slot features to the pre-established manager AllFeatures, and calculate the corresponding parameters of each slot feature. The fourth module is used to obtain the chamfer feature of each face in the manager AllFaces obtained by the first module, and add the obtained chamfer feature of the face to the manager AllFeatures. The fifth module is used to obtain the chamfer feature of each face in the manager AllFaces obtained by the first module, and add the obtained chamfer feature of the face to the manager AllFeatures. The sixth module is used to obtain the outer cylindrical features of each face in the manager AllFaces obtained by the first module (such as the axis position of the cylinder, the positions of the centers of the two ends of the cylinder, etc.), and add the obtained outer cylindrical features of the face to the manager AllFeatures. The seventh module is used to obtain the plane features of each face in the manager AllFaces obtained by the first module, and add the obtained plane features of the face to the manager AllFeatures. The eighth module is used to obtain the process route compiled by the process designer according to the design model, which includes multiple processing procedures, and each processing procedure is associated with a feature in the manager AllFeatures; The ninth module is used to generate a manufacturing feature body corresponding to each feature in the manager AllFeatures, and record the manufacturing feature body in the feature in the manager AllFeatures. The tenth module is used to obtain the feature associated with each processing procedure in the process route obtained in the eighth module in the manager AllFeatures, obtain the recorded manufacturing feature body from the feature, obtain the process model of the previous processing procedure in the process route, and perform Boolean difference operation between the process model and the manufacturing feature body corresponding to the feature to obtain the process model of the processing procedure.
Citation Information
Patent Citations
Method for building modifiable three-dimensional process model
CN108763787A
Three-dimensional process planning method and platform for typical automobile machined parts based on MBD
CN109117560A
Three-dimensional process automatic modeling method
CN115935446A
Method and system for generating sheet metal part process model
CN117786874A
Process model generation method and device
CN118314279A
