A part polishing track generation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202511154146.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-08-18
AI Technical Summary
但这样的方案,在面对零件品种多且各个零件之间误差程度参差不齐的情况下,就需要工作人员耗费大量的时间和精力来给每一个零件进行打磨路径的定制,存在费时费力、总体成本高的问题
[0017]The technical solution of this invention involves determining the contour features corresponding to a first contour of the part to be polished from a first viewpoint. The first viewpoint reflects the orientation of the surface of the part to be polished. A target part template is determined by matching the contour features in a template library. The template library stores multiple candidate part templates. Each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template indicates the edge position information of the part to be polished. The second contour is also the contour from the first viewpoint. This ensures that the determined target part template and the part to be polished have the same contour shape or contour features. Finally, based on the first polishing trajectory associated with the target part template, the second polishing trajectory corresponding to the part to be polished from the first viewpoint is determined. Using this solution, a suitable part template can be matched based on the contour features of the part to be polished, and then the second polishing trajectory of the part to be polished can be determined based on the polishing trajectory associated with the part template. This approach eliminates the need to customize a special template for each part to be polished, enabling rapid identification of the part and quick determination of the polishing trajectory. If a new shape of part appears later, only the candidate part template in the template library needs to be updated, thus providing good versatility for unknown parts.
Smart Images

Figure CN120816369B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of manufacturing technology, and in particular to a method, apparatus, electronic device, and storage medium for generating grinding paths for parts. Background Technology
[0002] Grinding is a crucial step in parts forming and processing. However, current grinding technologies suffer from varying degrees of error during the cutting process, resulting in dimensional inaccuracies in the finished parts. This necessitates customizing a grinding path for each individual part. But this approach becomes problematic when dealing with a wide variety of parts with inconsistent error levels. It requires significant time and effort from staff to customize the grinding path for each part, leading to high overall costs and wasted time. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and storage medium for generating a grinding trajectory for a part. It can match a suitable part template based on the contour features of the part to be ground, thereby achieving rapid identification of the part to be ground and rapid determination of the grinding trajectory.
[0004] In a first aspect, the present invention provides a method for generating a grinding trajectory for a part, comprising:
[0005] Determine the contour features corresponding to the first contour presented by the part to be polished in a first viewpoint; the first contour is a closed figure composed of line segments and / or arcs; the first viewpoint is used to reflect the orientation of the surface of the part to be polished.
[0006] The target part template is determined by matching the contour features in the template library; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour from a first perspective, and the second contour is a closed shape composed of line segments and / or arcs.
[0007] Based on the first grinding trajectory associated with the target part template, a second grinding trajectory corresponding to the part to be ground in a first view is determined; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
[0008] Secondly, the present invention also provides an apparatus for generating a grinding trajectory for a part, comprising:
[0009] The contour feature determination module is used to determine the contour features corresponding to the first contour presented by the part to be polished in a first view; the first contour is a closed shape composed of line segments and / or arcs; the first view is used to reflect the orientation of the surface of the part to be polished.
[0010] The target part template determination module is used to match the contour features in the template library to determine the target part template; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour from a first perspective, and the second contour is a closed shape composed of line segments and / or arcs;
[0011] The second grinding trajectory determination module is used to determine the second grinding trajectory corresponding to the part to be ground in the first view based on the first grinding trajectory associated with the target part template; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
[0012] Thirdly, this invention also provides an electronic device, comprising:
[0013] One or more processors;
[0014] Storage device for storing one or more programs.
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the part grinding trajectory generation method provided in any embodiment of the present invention.
[0016] Fourthly, this invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a method for generating a grinding trajectory for a part as provided in any embodiment of this invention.
[0017] The technical solution of this invention involves determining the contour features corresponding to a first contour of the part to be polished from a first viewpoint. The first viewpoint reflects the orientation of the surface of the part to be polished. A target part template is determined by matching the contour features in a template library. The template library stores multiple candidate part templates. Each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template indicates the edge position information of the part to be polished. The second contour is also the contour from the first viewpoint. This ensures that the determined target part template and the part to be polished have the same contour shape or contour features. Finally, based on the first polishing trajectory associated with the target part template, the second polishing trajectory corresponding to the part to be polished from the first viewpoint is determined. Using this solution, a suitable part template can be matched based on the contour features of the part to be polished, and then the second polishing trajectory of the part to be polished can be determined based on the polishing trajectory associated with the part template. This approach eliminates the need to customize a special template for each part to be polished, enabling rapid identification of the part and quick determination of the polishing trajectory. If a new shape of part appears later, only the candidate part template in the template library needs to be updated, thus providing good versatility for unknown parts.
[0018] The above description of the invention is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0019] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 This is a flowchart illustrating a method for generating a grinding trajectory for a part according to an embodiment of the present invention.
[0021] Figure 2 A schematic diagram illustrating the effect of multiple candidate part templates in a template library provided in an embodiment of the present invention;
[0022] Figure 3 A flowchart illustrating another method for generating a grinding trajectory for a part, provided in an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram illustrating the effect of a first contour provided in an embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of a device for generating a grinding trajectory for a part, provided in an embodiment of the present invention.
[0025] Figure 6 This is a schematic diagram of an electronic device for generating a part grinding trajectory according to an embodiment of the present invention. Detailed Implementation
[0026] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0027] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0028] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0029] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0030] It should be noted that the terms "one", "multiple", and "at least one group" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more".
[0031] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0032] Figure 1This is a flowchart illustrating a method for generating a grinding trajectory for a part according to an embodiment of the present invention. This embodiment is applicable to situations where a required grinding trajectory is generated before grinding a part. This method can be executed by a part grinding trajectory generation device, which can be implemented in software and / or hardware and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server. Figure 1 As shown, the method for generating a part grinding trajectory according to an embodiment of the present invention may include the following process:
[0033] S110. Determine the contour features corresponding to the first contour of the part to be polished in the first view; the first contour is a closed figure composed of line segments and / or arcs; the first view is used to reflect the orientation of the surface of the part to be polished.
[0034] The parts to be ground can be either regularly shaped or irregularly shaped. Of course, the parts to be ground can be of any kind. For example, taking ship hull parts as examples, these parts can be irregularly shaped with a length of 150mm-1500mm, a width of 100mm-700mm, and a thickness of 6mm-18mm. These parts can be internal components of the ship hull, such as elbow plates, watertight patch plates, non-watertight patch plates, reinforcing ribs, and flat iron.
[0035] The first-person perspective reflects the orientation of the surface of the part to be polished. In other words, the first-person perspective is related to the surface of the part to be polished. For example, if the top and bottom surfaces of the part need to be polished, the first-person perspective is the viewpoint formed between the top and bottom surfaces, which is a top-down view, essentially the viewpoint along the Z-axis in the world coordinate system. Similarly, if the left and right sides of the part need to be polished, the first-person perspective is the viewpoint formed between the left and right sides, which is the viewpoint along the X-axis in the world coordinate system.
[0036] Correspondingly, the first contour refers to the contour of the part to be polished as seen from a first perspective; this first contour is a contour within a plane. The first contour is a closed shape composed of line segments and / or arcs. For example, the first contour can be entirely composed of line segments, entirely composed of arcs, or composed of both line segments and arcs. Furthermore, the line segments and arcs constituting the first contour can have the same length or different lengths; this is not further specified here. Correspondingly, contour features are used to indicate the characteristic information possessed by the first contour. For example, the length of the line segments in the first contour can be used as a contour feature; the length or concavity / convexity of the arcs in the first contour can also be used as a contour feature; the number of line segments or arcs in the first contour can also be used as a contour feature. Any type of parameter that can reflect the characteristics of the first contour can be used as a contour feature, and specific settings can be differentiated based on actual needs; this is not further specified here.
[0037] Specifically, before grinding the part to be ground, the first outline of the part as seen from a first-view perspective can be determined. For example, the part can be scanned using a 3D scanning device to determine the first outline, or the part can be photographed from a first-view perspective, and then image recognition and image segmentation can be performed based on the captured image to determine the first outline. After determining the first outline, relevant analysis can be performed to obtain the corresponding outline features.
[0038] S120. Matching is performed in the template library based on contour features to determine the target part template; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least part of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour in the first view, and the second contour is a closed shape composed of line segments and / or arcs.
[0039] The template library stores multiple candidate part templates, each with a different second contour. This can be understood as each candidate part template having its own unique second contour, with different candidate part templates corresponding to different second contours. The second contour is the contour from a first-view perspective, and it is a closed shape composed of line segments and / or arcs. Furthermore, at least a portion of the second contour in each candidate part template indicates the edge position information that needs to be ground on the part. This edge position information can be understood as reflecting which edges at which locations on the part need to be ground. In addition, each candidate part template in the template library also has a corresponding number to uniquely identify it.
[0040] Specifically, since each candidate part template in the template library has a corresponding second contour, and this second contour is also the contour in the first view, the contour features of the first contour of the part to be ground can be matched with the candidate part templates in the template library to determine the template with the matching contour shape or contour features, thereby determining the target part template. Alternatively, it can be considered that, in the same first view, the part to be ground and the matching target part template will exhibit the same contour shape or contour features.
[0041] For example, Figure 2 This is a schematic diagram illustrating the effect of multiple candidate part templates in a template library provided in an embodiment of the present invention, such as... Figure 2 As shown, Figure 2 The document shows 28 candidate part templates, each corresponding to a different second contour. These second contours are all closed shapes composed of line segments and / or arcs. Figure 2 The red outline in the second contour of each candidate part template can indicate the edge position information of the part that needs to be polished, that is, the edge of the part corresponding to the marked red outline needs to be polished.
[0042] S130. Based on the first grinding trajectory associated with the target part template, determine the second grinding trajectory corresponding to the part to be ground in the first view; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
[0043] The first grinding trajectory indicates the edge position information of the part corresponding to the target part template that needs to be ground. The first grinding trajectory is determined based on at least a portion of the second contour of the target part template. The second grinding trajectory is the trajectory actually used when grinding the part to be ground.
[0044] Specifically, the target part template determined after matching indicates that the target part template and the part to be ground have the same contour shape, and their contours have a mapping relationship. At the same time, the target part template is associated with a first grinding trajectory, which indicates which edges need to be ground. Based on this, a second grinding trajectory corresponding to the part to be ground in the first view can be determined based on the first grinding trajectory associated with the target part template, and the part to be ground can be ground based on the second grinding trajectory.
[0045] The technical solution of this invention involves determining the contour features corresponding to a first contour of the part to be polished from a first viewpoint. The first viewpoint reflects the orientation of the surface of the part to be polished. A target part template is determined by matching the contour features in a template library. The template library stores multiple candidate part templates. Each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template indicates the edge position information of the part to be polished. The second contour is also the contour from the first viewpoint. This ensures that the determined target part template and the part to be polished have the same contour shape or contour features. Finally, based on the first polishing trajectory associated with the target part template, the second polishing trajectory corresponding to the part to be polished from the first viewpoint is determined. Using this solution, a suitable part template can be matched based on the contour features of the part to be polished, and then the second polishing trajectory of the part to be polished can be determined based on the polishing trajectory associated with the part template. This approach eliminates the need to customize a special template for each part to be polished, enabling rapid identification of the part and quick determination of the polishing trajectory. If a new shape of part appears later, only the candidate part template in the template library needs to be updated, thus providing good versatility for unknown parts.
[0046] Figure 3 This is a flowchart illustrating another method for generating a grinding trajectory for a part according to an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of determining the contour features corresponding to the first contour presented by the part to be ground in a first viewpoint, based on the technical solutions of the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the method for generating a part grinding trajectory according to an embodiment of the present invention may include the following process:
[0047] S310. The part to be polished is 3D scanned using a 3D scanning device to determine the contour point cloud data; the contour point cloud data is used to reflect the first contour of the part to be polished in the first view.
[0048] Among them, 3D scanning equipment can be laser scanners, structured light scanners, or robots equipped with 3D vision cameras and capable of 3D scanning.
[0049] Specifically, a 3D scanning device can be used to scan the part to be polished, obtaining a large amount of raw point cloud data. After preprocessing and segmentation of the obtained raw point cloud data, the contour point cloud data related to the part to be polished can be determined. The preprocessing of the point cloud data includes noise reduction and filtering, while segmentation is used to segment and determine the data related to the part to be polished. For example, Alpha Shapes (an edge feature extraction method for planar point clouds) can be used to process the point cloud data obtained by the scanning device. This method can capture convex structures and identify details such as concave shapes and holes, thereby determining the contour point cloud data. This contour point cloud data is used to reflect the first contour of the part to be polished from a first-view perspective.
[0050] S320. Based on the contour point cloud data, determine the constituent elements of the first contour corresponding to the part to be polished; the constituent elements include line segments and arcs.
[0051] The constituent elements are used to indicate the components that make up the first contour. The constituent elements include line segments and arcs. That is to say, the constituent elements can reflect what kind of line segments and / or arcs the first contour is specifically composed of.
[0052] Specifically, fitting analysis can be performed on each point cloud data in the contour point cloud data to determine the degree of aggregation between each point cloud data and the shape presented after aggregation, thereby determining the constituent elements of the first contour corresponding to the part to be polished.
[0053] For example, Figure 4 This is a schematic diagram illustrating the effect of a first contour provided in an embodiment of the present invention, such as... Figure 4 As shown, after processing and analysis, it can be concluded that the first contour is composed of 4 line segments and 2 arcs. The 4 line segments are line segments BC, CD, EF, and FA, and the 2 arcs are arcs AB and ED. Therefore, the constituent elements of the first contour are line segments BC, CD, EF, FA, arcs AB and ED.
[0054] S330. Based on the constituent elements, determine the contour features; the contour features include first feature information, second feature information and third feature information; wherein, the first feature information is used to indicate the type of each element constituting the first contour and the corresponding number of elements; the second feature information is used to indicate the included angle between each constituent element of the first contour; the third feature information is used to indicate the concavity and convexity of each constituent element of the first contour.
[0055] The first feature information can be used to indicate the type and quantity of each element constituting the first contour; the element type refers to the type to which the constituent elements of the first contour belong, and the element type includes line segments and arcs. For example, the first feature information can indicate that a certain first contour is composed of 2 line segments and 2 arcs, etc.
[0056] The second feature information can be used to indicate the angles formed between the constituent elements of the first contour. It can be understood that when there are two intersecting line segments in the first contour, then these two intersecting line segments will necessarily form an angle, and the size of the angle also reflects the characteristics of the first contour to a certain extent. For example, the second feature information can indicate that a certain first contour has a 90-degree right angle, etc.
[0057] The third feature information can be used to indicate the concavity or convexity of each component of the first contour, especially the concavity or convexity of components such as arcs in the first contour. For example, the third feature information can indicate that an arc in a certain first contour is an outwardly convex arc relative to the first contour.
[0058] Specifically, after analyzing and obtaining the constituent elements of the first contour, the contour features corresponding to the first contour can be determined based on the constituent elements, that is, the first feature information, second feature information and third feature information corresponding to the first contour can be determined.
[0059] As an optional but non-limiting implementation, the contour features are determined based on the constituent elements, including: determining first element information from the contour point cloud data using the least squares fitting line segment method; the first element information is used to indicate the line segments present in the first contour and the corresponding line segment length values when they exist; determining second element information from the contour point cloud data using the least squares fitting circle method; the second element information is used to indicate the arcs present in the first contour and the corresponding arc radius values when they exist; and determining the contour features based on the first and second element information. Using this optional scheme, the line segments and arcs present in the first contour, as well as their specific length and radius values, can be determined from the contour point cloud data, thereby determining the contour features corresponding to the first contour.
[0060] Specifically, the least squares fitting line segment method can be used to process the contour point cloud data. By setting a distance threshold, a set of point cloud data that conforms to a straight line model is selected. If the selected point cloud data have a high degree of fit and the curvature is close to zero, they are identified as line segments. The mathematical equation and value range corresponding to the line segment are obtained, and the length value of the line segment can be determined. This allows the determination of the first element information. The first element information indicates the line segments present in the first contour and the corresponding line segment length values. Of course, if analysis determines that there are no line segments in the first contour, the determined first element information is empty, which can be represented by 0, meaning that there are absolutely no line segments in the first contour.
[0061] Using the same principle, the least squares circle fitting method can be used to process the contour point cloud data, filtering out the point cloud data set that conforms to the arc model. After calculating the average curvature of the point set and the fitting residual, if the curvature is constant and the residual meets the threshold, it is determined to be an arc. Then, the mathematical equation and value range corresponding to the arc are obtained, and the arc radius value corresponding to the arc can be determined. Furthermore, the second element information can be determined. The second element information is used to indicate the arcs present in the first contour and the corresponding arc radius values when they exist. Of course, if analysis determines that there are no arcs in the first contour, then the determined second element information is empty, or can be represented by 0, meaning that there are absolutely no arcs in the first contour.
[0062] Since the first element information essentially reflects the line segments and related features existing in the first contour, while the second element information reflects the arcs and related features existing in the first contour, after determining the first element information and the second element information, the contour features corresponding to the first contour can be determined based on the first element information and the second element information.
[0063] As an optional but non-limiting implementation, the contour features are determined based on the first element information and the second element information, including: determining the first quantity corresponding to the first line segment and the second quantity corresponding to the second line segment based on the first element information; the line segment length value of the first line segment is greater than a length threshold, and the line segment length value of the second line segment is not greater than a length threshold; determining the third quantity corresponding to the first arc and the fourth quantity corresponding to the second arc based on the second element information; the arc radius value corresponding to the first arc is greater than a radius threshold, and the arc radius value corresponding to the second arc is not greater than a radius threshold; and determining the first feature information in the contour features based on the first quantity, the second quantity, the third quantity, and the fourth quantity. Using this optional scheme, a detailed judgment and analysis can be performed based on the first element information and the second element information to determine the quantity of various types of constituent elements, thereby determining the first feature information in the contour features.
[0064] The first and second line segments are used to distinguish line segments with different length values. The length value of the first line segment is greater than a length threshold, while the length value of the second line segment is not greater than the length threshold. This length threshold can be set differently based on actual needs. For example, the length threshold can be set to 15mm. If the measured length of a line segment 'a' is greater than 15mm, it means that line segment 'a' is a long line segment, that is, it belongs to the first line segment. If the measured length of a line segment 'b' is not greater than 15mm, it means that line segment 'b' is a short line segment, that is, it belongs to the second line segment.
[0065] Similarly, the first and second arcs are used to distinguish arcs with different radius values. The radius value corresponding to the first arc is greater than a radius threshold, while the radius value corresponding to the second arc is not greater than the radius threshold. This radius value can also be set differently based on actual needs. For example, the radius threshold can be set to 50mm. If the measured radius of an arc c is greater than 50mm, it means that arc c is a long arc, that is, arc c belongs to the first arc; if the measured radius of an arc d is not greater than 50mm, it means that arc d is a short arc, that is, arc d belongs to the second arc.
[0066] Specifically, based on the first and second element information already determined in the aforementioned scheme, we can use the first element information to determine which line segments belong to the first line segment and which belong to the second line segment, and count them separately to obtain the first quantity corresponding to the first line segment and the second quantity corresponding to the second line segment. Similarly, based on the second element information, we can determine the third quantity corresponding to the first arc and the fourth quantity corresponding to the second arc. After obtaining the relevant parameters, we can determine the first feature information in the contour feature based on the first, second, third, and fourth quantities.
[0067] As an optional but non-limiting implementation, determining the contour features based on the first element information and the second element information further includes: determining at least one set of adjacent line segments based on the first element information; each set of adjacent line segments includes a third line segment and a fourth line segment; the third line segment and the fourth line segment belonging to the same set of adjacent line segments are two intersecting line segments, and the included angle between the third line segment and the fourth line segment is within a preset included angle range; when both the third line segment and the fourth line segment belonging to the same set of adjacent line segments are greater than a length threshold, determining the included angle between the third line segment and the fourth line segment. Angle is defined as the first included angle; when the third and fourth line segments belonging to the same group of adjacent line segments are not both greater than the length threshold, the included angle between the third and fourth line segments is determined as the second included angle; based on the included angles corresponding to each group of adjacent line segments, the number of first included angles and the number of second included angles are determined; the number of first included angles indicates the number of first included angles existing in each group of adjacent line segments; the number of second included angles indicates the number of second included angles existing in each group of adjacent line segments; based on the number of first included angles and the number of second included angles, the second feature information in the contour features is determined. Using this optional scheme, the included angles formed by line segments existing in the first contour can be determined based on the first element information, thereby determining the second feature information in the contour features.
[0068] The preset angle range can be customized based on actual needs. For example, the preset angle range can be "90 degrees ± 1 degree" or "90 degrees ± 2 degrees".
[0069] Specifically, since the first element information can be used to indicate the line segments present in the first contour and the corresponding line segment length values, at least one set of adjacent line segments can be determined based on the first element information; each set of adjacent line segments includes a third line segment and a fourth line segment. For a set of adjacent line segments, the third line segment and the fourth line segment belonging to the same set of adjacent line segments are two intersecting line segments, and the included angle formed between the third line segment and the fourth line segment is within a preset angle range. Specifically, when determining the included angle between the third line segment and the fourth line segment, the normal vectors of each line segment can be calculated first, and then the included angle between the third line segment and the fourth line segment can be calculated based on the obtained normal vectors.
[0070] Furthermore, when both the third and fourth line segments belonging to the same group of adjacent line segments are greater than the length threshold, the angle between the third and fourth line segments is determined as the first included angle; when neither the third nor the fourth line segment belonging to the same group of adjacent line segments is greater than the length threshold, the angle between the third and fourth line segments is determined as the second included angle. The length threshold is the same as the length threshold used when determining the length value of a line segment; for example, the length threshold here can also be set to 15mm. For example, suppose a group of adjacent line segments contains a third line segment m and a fourth line segment n, and the angle formed between the third line segment m and the fourth line segment n is also within the preset angle range (e.g., the angle is 90 degrees). If the length values of the third line segment m and the fourth line segment n are both greater than the length threshold of 15mm, then the angle formed by the lines of the third line segment m and the fourth line segment n is the first angle; if the length values of the third line segment m and the fourth line segment n are not both greater than the length threshold of 15mm, then if the length value of one of them is less than 15mm, then the angle formed by the lines of the third line segment m and the fourth line segment n is the second angle.
[0071] Following the same principle, the included angles of each group of adjacent line segments can be determined. Based on these included angles, the number of first and second included angles can be counted to determine the total number of first and second included angles. The number of first included angles indicates the number of first included angles present in each group of adjacent line segments; the number of second included angles indicates the number of second included angles present in each group of adjacent line segments. Therefore, based on the number of first and second included angles, the second feature information in the contour features can be determined.
[0072] Of course, it should be noted that if at least one set of adjacent line segments cannot be determined based on the first feature information—for example, if the first feature information only indicates that there is only one line segment in a certain first contour, and the rest are all arcs—then it is impossible to determine at least one set of adjacent line segments that meets the requirements. In such cases, it can be directly determined that the relevant number of first included angles and the number of second included angles are both 0, and therefore the second feature information is also 0.
[0073] As an optional but non-limiting implementation, determining the contour features based on the first and second element information further includes: determining the number of first arcs based on the second element information to obtain a fifth number; the first arcs belong to a preset arc type; the preset arc type is a concave arc or a convex arc; determining the number of second arcs based on the second element information to obtain a sixth number; the second arcs belong to a preset arc type, and the second arcs and the first arcs are different preset arc types from each other; and determining the third feature information in the contour features based on the fifth and sixth numbers. Using this optional scheme, the concavity and convexity of the arcs in the first contour can be determined, thereby determining the third feature information in the contour features.
[0074] The preset arc type is either concave or convex. If the arc's normal vector points inside the part's contour, it is defined as a convex arc; if the arc's normal vector points outside the part's contour, it is defined as a concave arc. In different calculation scenarios, the part's contour can refer to the first contour of the part to be polished, or it can refer to the second contour of the candidate part template.
[0075] Specifically, since the second element information indicates the arcs present in the first contour and their corresponding radius values, the number of first arcs (the fifth number) can be determined based on this information. Similarly, the number of second arcs (the sixth number) can be determined based on this information. Both the first and second arcs belong to a preset arc type, but they are different preset arc types from each other. For example, if the first arc is a convex arc, then the second arc is a concave arc; conversely, if the first arc is a concave arc, then the second arc is a convex arc. In other words, through this process, the convexity or concavity of all arcs in the first contour can be determined. After obtaining the fifth and sixth numbers, the third feature information in the contour features can be further determined.
[0076] S340. Matching is performed in the template library based on contour features to determine the target part template; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least part of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour in the first view, and the second contour is a closed shape composed of line segments and / or arcs.
[0077] As an optional but non-limiting implementation, the target part template is determined by matching contour features in a template library. This includes: determining the fourth, fifth, and sixth feature information associated with each candidate part template; wherein the fourth feature information indicates the type and quantity of each element constituting the second contour; the fifth feature information indicates the angles formed between the constituent elements of the second contour; and the sixth feature information indicates the concavity and convexity of each constituent element of the second contour. The first feature information in the contour features is matched with the fourth feature information associated with each candidate part template to obtain a first matching result; the second feature information in the contour features is matched with the fifth feature information associated with each candidate part template to obtain a second matching result; the third feature information in the contour features is matched with the sixth feature information associated with each candidate part template to obtain a third matching result; and the target part template is determined from the candidate part templates based on the first, second, and third matching results. Using this optional solution, a target part template that matches the same features in all dimensions can be determined from the template library based on the part features of the part to be polished.
[0078] Each candidate part template is associated with corresponding fourth, fifth, and sixth feature information. The fourth feature information indicates the type and quantity of each element constituting the second contour; the fifth feature information indicates the angles formed between the constituent elements of the second contour; and the sixth feature information indicates the concavity and convexity of each constituent element of the second contour. The detailed principles are the same as those for the feature information of the first contour described in the aforementioned scheme, and will not be elaborated further here.
[0079] Specifically, during the matching process with candidate part templates in the template library, the fourth, fifth, and sixth feature information associated with each candidate part template can be determined first. Then, the first feature information in the contour feature is matched with the fourth feature information associated with each candidate part template. Essentially, this involves matching whether the parameter types and specific parameter contents are completely identical, thus obtaining the first matching result. If the detailed content of the first and fourth feature information are completely identical, the first matching result is a successful match; if the detailed content of the first and fourth feature information cannot be completely identical, the first matching result is a failed match. Using the same matching principle, the second feature information in the contour feature is matched with the fifth feature information associated with each candidate part template to obtain the second matching result; and the third feature information in the contour feature is matched with the sixth feature information associated with each candidate part template to obtain the third matching result. Based on the first, second, and third matching results, the target part template can then be determined from the candidate part templates. Specifically, if all three matching results are successful, it means that a matching part template exists in the template library, and the target part template can be determined. If not all three matching results are successful, it means that no matching part template exists in the template library.
[0080] S350. Based on the first grinding trajectory associated with the target part template, determine the second grinding trajectory corresponding to the part to be ground in the first view; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
[0081] As an optional but non-limiting implementation, based on the first grinding trajectory associated with the target part template, the second grinding trajectory corresponding to the part to be ground in a first view is determined, including: determining at least one first grinding path based on the first grinding trajectory associated with the target part template; one first grinding path corresponding to a set of first start and end points; determining at least one set of second start and end points based on the mapping relationship between the first contour of the part to be ground and the second contour of the target part template through at least one set of first start and end points; determining at least one second grinding path based on each set of second start and end points; and determining the second grinding trajectory based on the at least one second grinding path. Using this optional solution, the second grinding trajectory actually needed for the part to be ground can be determined based on the mapping relationship between the first contour of the part to be ground and the second contour of the target part template.
[0082] The grinding path reflects the edge information of the part that needs to be ground; it can be understood as indicating which edge of the part needs to be ground. The start and end points include a starting point and an ending point. The first start and end point are points on the target part template, and correspondingly, the second start and end points are points on the part to be ground.
[0083] Specifically, based on the first grinding trajectory associated with the target part template, it is possible to determine which edges of such parts need to be ground, thereby determining at least one first grinding path; a first grinding path corresponds to a set of first start and end points; then, based on the mapping relationship between the first contour of the part to be ground and the second contour of the target part template, at least one set of second start and end points are determined through at least one set of first start and end points; next, based on each set of second start and end points, at least one second grinding path is determined; finally, based on at least one second grinding path, a second grinding trajectory can be determined.
[0084] The technical solution of this invention involves using a 3D scanning device to perform a 3D scan of the part to be polished, determining the contour point cloud data. The contour point cloud data reflects the first contour of the part to be polished from a first viewpoint. Based on the contour point cloud data, the constituent elements of the first contour corresponding to the part to be polished are determined. These constituent elements include line segments and arcs. Based on the constituent elements, the first feature information, second feature information, and third feature information included in the contour features are determined. A target part template is determined by matching the contour features in a template library. The template library stores multiple candidate part templates. Each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished. The second contour is also the contour from the first viewpoint, ensuring that the determined target part template has the same contour shape or contour features as the part to be polished. Finally, based on the first polishing trajectory associated with the target part template, the second polishing trajectory corresponding to the part to be polished from the first viewpoint is determined. Using this solution, a suitable part template can be matched based on the contour features of the part to be polished, and then the second polishing trajectory of the part to be polished can be determined based on the polishing trajectory associated with the part template. This approach eliminates the need to customize a special template for each part to be polished, enabling rapid identification of the part and quick determination of the polishing trajectory. If a new shape of part appears later, only the candidate part template in the template library needs to be updated, thus providing good versatility for unknown parts.
[0085] Figure 5 This is a schematic diagram of a part grinding trajectory generation device provided in an embodiment of the present invention. This embodiment is applicable to situations where a required grinding trajectory is generated before grinding a part. The part grinding trajectory generation device can be implemented in software and / or hardware and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server. Figure 5As shown, the part grinding trajectory generation device of this embodiment of the invention may include a contour feature determination module 510, a target part template determination module 520, and a second grinding trajectory determination module 530. Wherein:
[0086] The contour feature determination module 510 is used to determine the contour features corresponding to the first contour presented by the part to be polished in the first view; the first contour is a closed shape composed of line segments and / or arcs; the first view is used to reflect the orientation of the surface of the part to be polished.
[0087] The target part template determination module 520 is used to match the contour features in the template library to determine the target part template; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour from a first perspective, and the second contour is a closed shape composed of line segments and / or arcs;
[0088] The second grinding trajectory determination module 530 is used to determine the second grinding trajectory corresponding to the part to be ground in the first view based on the first grinding trajectory associated with the target part template; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
[0089] The technical solution of this invention involves determining the contour features corresponding to the first contour of the part to be polished from a first viewpoint using a contour feature determination module. The first viewpoint reflects the orientation of the surface of the part to be polished. A target part template determination module matches the contour features in a template library to determine a target part template. The template library stores multiple candidate part templates. Each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template indicates the edge position information of the part to be polished. The second contour is also the contour from the first viewpoint, ensuring that the determined target part template has the same contour shape or contour features as the part to be polished. Finally, a second polishing trajectory determination module determines the second polishing trajectory corresponding to the part to be polished from the first viewpoint based on the first polishing trajectory associated with the target part template. Using this solution, a suitable part template can be matched based on the contour features of the part to be polished, and then the second polishing trajectory of the part to be polished can be determined based on the polishing trajectory associated with the part template. This approach eliminates the need to customize a special template for each part to be polished, enabling rapid identification of the part and quick determination of the polishing trajectory. If a new shape of part appears later, only the candidate part template in the template library needs to be updated, thus providing good versatility for unknown parts.
[0090] As an optional but non-limiting implementation, the contour feature determination module 510 includes a contour point cloud data determination submodule, a constituent element determination submodule, and a contour feature determination submodule. Wherein:
[0091] The contour point cloud data determination submodule is used to perform 3D scanning on the part to be polished based on a 3D scanning device to determine the contour point cloud data; the contour point cloud data is used to reflect the first contour of the part to be polished under the first view.
[0092] The constituent element determination submodule is used to determine the constituent elements of the first contour corresponding to the part to be polished based on the contour point cloud data; the constituent elements include line segments and arcs;
[0093] The contour feature determination submodule is used to determine the contour features based on the constituent elements; the contour features include first feature information, second feature information and third feature information; wherein, the first feature information is used to indicate the type of each element constituting the first contour and the corresponding number of elements; the second feature information is used to indicate the included angle between each constituent element of the first contour; and the third feature information is used to indicate the concavity and convexity of each constituent element of the first contour.
[0094] As an optional but non-limiting implementation, the contour feature determination submodule includes a first element information determination unit, a second element information determination unit, and a contour feature determination unit. Wherein:
[0095] The first element information determination unit is used to determine the first element information from the contour point cloud data using the least squares fitting line segment method; the first element information is used to indicate the line segments present in the first contour and the corresponding line segment length values when the line segments are present.
[0096] The second element information determination unit is used to determine the second element information from the contour point cloud data using the least squares fitting circle fitting method; the second element information is used to indicate the arcs present in the first contour and the corresponding arc radius values when the arcs are present.
[0097] A contour feature determination unit is used to determine the contour features based on the first element information and the second element information.
[0098] As an optional but non-limiting implementation, the contour feature determination unit includes a first determination subunit, a second determination subunit, and a first feature information determination subunit. Wherein:
[0099] The first determining subunit is used to determine, based on the first element information, a first quantity corresponding to the first line segment and a second quantity corresponding to the second line segment; the line length value of the first line segment is greater than a length threshold, and the line length value of the second line segment is not greater than a length threshold.
[0100] The second determining subunit is used to determine the third quantity corresponding to the first arc and the fourth quantity corresponding to the second arc based on the second element information; the arc radius value corresponding to the first arc is greater than the radius threshold, and the arc radius value corresponding to the second arc is not greater than the radius threshold.
[0101] The first feature information determination subunit is used to determine the first feature information in the contour features based on the first quantity, the second quantity, the third quantity, and the fourth quantity.
[0102] As an optional but non-limiting implementation, the contour feature determination unit further includes an adjacent line segment determination subunit, a first included angle determination subunit, a second included angle determination subunit, a third determination subunit, and a second feature information determination subunit. Wherein:
[0103] The adjacent line segment determination subunit is used to determine at least one group of adjacent line segments based on the first element information; each group of adjacent line segments includes a third line segment and a fourth line segment; the third line segment and the fourth line segment belonging to the same group of adjacent line segments are two intersecting line segments, and the included angle between the third line segment and the fourth line segment is within a preset included angle range;
[0104] The first included angle determination subunit is used to determine the included angle between the third line segment and the fourth line segment as the first included angle when the third line segment and the fourth line segment, which belong to the same group of adjacent line segments, are both greater than the length threshold.
[0105] The second included angle determination subunit is used to determine the included angle between the third and fourth line segments as the second included angle when the third and fourth line segments belonging to the same group of adjacent line segments are not both greater than the length threshold.
[0106] The third determining subunit is used to determine the number of first included angles and the number of second included angles based on the included angles corresponding to each group of adjacent line segments; the number of first included angles is used to indicate the number of first included angles existing in each group of adjacent line segments; the number of second included angles is used to indicate the number of second included angles existing in each group of adjacent line segments.
[0107] The second feature information determination subunit is used to determine the second feature information in the contour features based on the first included angle number and the second included angle number.
[0108] As an optional but non-limiting implementation, the contour feature determination unit further includes a fourth determination subunit, a fifth determination subunit, and a third feature information determination subunit. Wherein:
[0109] The fourth determining subunit is used to determine the number of the first arcs based on the second element information to obtain the fifth number; the first arc belongs to a preset arc type; the preset arc type is a concave arc or a convex arc;
[0110] The fifth determining subunit is used to determine the number of the second arcs based on the second element information to obtain the sixth quantity; the second arc belongs to a preset arc type, and the second arc and the first arc are different preset arc types from each other;
[0111] The third feature information determination subunit is used to determine the third feature information in the contour features based on the fifth quantity and the sixth quantity.
[0112] As an optional but non-limiting implementation, the target part template determination module 520 includes a candidate information determination submodule, a first matching result determination submodule, a second matching result determination submodule, a third matching result determination submodule, and a target part template determination submodule. Wherein:
[0113] The candidate information determination submodule is used to determine the fourth, fifth, and sixth feature information associated with each candidate part template; wherein, the fourth feature information is used to indicate the type of each element constituting the second contour and the corresponding number of elements; the fifth feature information is used to indicate the included angle between each constituent element of the second contour; and the sixth feature information is used to indicate the concavity and convexity of each constituent element of the second contour.
[0114] The first matching result determination submodule is used to match the first feature information in the contour features with the fourth feature information associated with each candidate part template to obtain the first matching result;
[0115] The second matching result determination submodule is used to match the second feature information in the contour features with the fifth feature information associated with each candidate part template to obtain the second matching result;
[0116] The third matching result determination submodule is used to match the third feature information in the contour features with the sixth feature information associated with each candidate part template to obtain the third matching result;
[0117] The target part template determination submodule is used to determine the target part template from each candidate part template based on the first matching result, the second matching result, and the third matching result.
[0118] As an optional but non-limiting implementation, the second grinding trajectory determination module 530 includes a first grinding path determination submodule, a start and end point determination submodule, a second grinding path determination submodule, and a second grinding trajectory determination submodule. Wherein:
[0119] The first grinding path determination submodule is used to determine at least one first grinding path based on the first grinding trajectory associated with the target part template; one first grinding path corresponds to a set of first start and end points;
[0120] The start and end point determination submodule is used to determine at least one set of second start and end points based on the mapping relationship between the first contour of the part to be ground and the second contour of the target part template, by using at least one set of first start and end points.
[0121] The second polishing path determination submodule is used to determine at least one second polishing path based on the second start and end points of each group.
[0122] The second polishing trajectory determination submodule is used to determine the second polishing trajectory based on the at least one second polishing path.
[0123] The part grinding trajectory generation device provided in this embodiment of the invention can be used to execute the part grinding trajectory generation method, and has the corresponding functional modules and beneficial effects of executing the part grinding trajectory generation method.
[0124] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0125] Figure 6 This is a schematic diagram of an electronic device for generating a part grinding trajectory according to an embodiment of the present invention. The following refers to... Figure 6 The diagram illustrates a structural schematic of an electronic device 610 suitable for implementing embodiments of the present invention. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0126] like Figure 6 As shown, the electronic device 610 includes at least one processor 611 and a memory, such as a read-only memory (ROM) 612 or a random access memory (RAM) 613, communicatively connected to the at least one processor 611. The memory stores computer programs executable by the at least one processor. The processor 611 can perform various appropriate actions and processes based on the computer program stored in the ROM 612 or loaded from storage unit 618 into the RAM 613. The RAM 613 may also store various programs and data required for the operation of the electronic device 610. The processor 611, ROM 612, and RAM 613 are interconnected via a bus 614. An input / output (I / O) interface 615 is also connected to the bus 614.
[0127] Multiple components in electronic device 610 are connected to I / O interface 615, including: input unit 616, such as keyboard, mouse, etc.; output unit 617, such as various types of displays, speakers, etc.; storage unit 618, such as disk, optical disk, etc.; and communication unit 619, such as network card, modem, wireless transceiver, etc. Communication unit 619 allows electronic device 610 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0128] Processor 611 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 611 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 611 executes the method for generating part grinding paths provided in any embodiment of the present invention.
[0129] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method for generating a part grinding trajectory as shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 619, or installed from storage unit 618, or installed from ROM 612. When the computer program is executed by processor 611, it performs the functions defined above in the method for generating a part grinding trajectory according to embodiments of the present invention.
[0130] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0131] The electronic device provided in this embodiment of the invention and the part grinding trajectory generation method provided in the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0132] This invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the part grinding trajectory generation method provided in the above embodiments.
[0133] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0134] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0136] The units described in the embodiments of the present invention can be implemented in software or in hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0137] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0138] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0139] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0140] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0141] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for generating a grinding trajectory for a part, characterized in that, The method includes: Determine the contour features corresponding to the first contour presented by the part to be polished in a first viewpoint; the first contour is a closed figure composed of line segments and / or arcs; the first viewpoint is used to reflect the orientation of the surface of the part to be polished. The target part template is determined by matching the contour features in the template library; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour from a first perspective, and the second contour is a closed shape composed of line segments and / or arcs. Based on the first grinding trajectory associated with the target part template, a second grinding trajectory corresponding to the part to be ground in a first view is determined; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground. The determination of the contour features corresponding to the first contour presented by the part to be polished in the first view includes: The part to be polished is 3D scanned using a 3D scanning device to determine the contour point cloud data; the contour point cloud data is used to reflect the first contour of the part to be polished under the first view. Based on the contour point cloud data, the constituent elements of the first contour corresponding to the part to be polished are determined; the constituent elements include line segments and arcs. Based on the constituent elements, the contour features are determined; the contour features include first feature information, second feature information and third feature information; wherein, the first feature information is used to indicate the type of each element constituting the first contour and the corresponding number of elements; the second feature information is used to indicate the included angle between each constituent element of the first contour; the third feature information is used to indicate the concavity and convexity of each constituent element of the first contour. Determining the contour features based on the constituent elements includes: The least squares fitting line segment method is used to determine the first element information from the contour point cloud data; the first element information is used to indicate the line segments that exist in the first contour and the corresponding line segment length values when the line segments exist. The second element information is determined from the contour point cloud data using the least squares fitting circle fitting method; the second element information is used to indicate the arcs present in the first contour and the corresponding arc radius values when the arcs are present. The contour features are determined based on the first element information and the second element information.
2. The method according to claim 1, characterized in that, Determining the contour features based on the first element information and the second element information includes: Based on the first element information, determine the first quantity corresponding to the first line segment and the second quantity corresponding to the second line segment; the line length value of the first line segment is greater than the length threshold, and the line length value of the second line segment is not greater than the length threshold. Based on the second element information, a third quantity corresponding to the first arc and a fourth quantity corresponding to the second arc are determined; the arc radius value corresponding to the first arc is greater than the radius threshold, and the arc radius value corresponding to the second arc is not greater than the radius threshold. Based on the first quantity, the second quantity, the third quantity, and the fourth quantity, the first feature information in the contour feature is determined.
3. The method according to claim 1, characterized in that, The step of determining the contour feature based on the first element information and the second element information further includes: Based on the first element information, at least one group of adjacent line segments is determined; each group of adjacent line segments includes a third line segment and a fourth line segment; the third line segment and the fourth line segment belonging to the same group of adjacent line segments are two intersecting line segments, and the included angle between the third line segment and the fourth line segment is within a preset included angle range; When the third and fourth line segments belonging to the same group of adjacent line segments are both greater than the length threshold, the included angle between the third and fourth line segments is determined as the first included angle. When the third and fourth line segments belonging to the same group of adjacent line segments are not both greater than the length threshold, the included angle between the third and fourth line segments is determined as the second included angle; Based on the included angles corresponding to each group of adjacent line segments, the number of first included angles and the number of second included angles are determined; the number of first included angles is used to indicate the number of first included angles existing in each group of adjacent line segments; the number of second included angles is used to indicate the number of second included angles existing in each group of adjacent line segments. Based on the first number of included angles and the second number of included angles, the second feature information in the contour features is determined.
4. The method according to claim 1, characterized in that, The step of determining the contour feature based on the first element information and the second element information further includes: Based on the second element information, the number of the first arc is determined to obtain the fifth number; the first arc belongs to a preset arc type; the preset arc type is a concave arc or a convex arc; Based on the second element information, the number of second arcs is determined to obtain the sixth number; the second arc belongs to a preset arc type, and the second arc and the first arc are different preset arc types from each other; Based on the fifth and sixth quantities, the third feature information in the contour features is determined.
5. The method according to claim 1, characterized in that, The step of matching the contour features in the template library to determine the target part template includes: The fourth, fifth, and sixth feature information associated with each candidate part template are determined; wherein, the fourth feature information is used to indicate the type of each element constituting the second contour and the corresponding number of elements; the fifth feature information is used to indicate the included angle between each constituent element of the second contour; and the sixth feature information is used to indicate the concavity and convexity of each constituent element of the second contour. The first feature information in the contour features is matched with the fourth feature information associated with each candidate part template to obtain the first matching result; The second feature information in the contour features is matched with the fifth feature information associated with each candidate part template to obtain the second matching result; The third feature information in the contour features is matched with the sixth feature information associated with each candidate part template to obtain the third matching result; Based on the first matching result, the second matching result, and the third matching result, the target part template is determined from each candidate part template.
6. A device for generating a grinding trajectory for a part, characterized in that, The device includes: The contour feature determination module is used to determine the contour features corresponding to the first contour presented by the part to be polished in a first view; the first contour is a closed shape composed of line segments and / or arcs; the first view is used to reflect the orientation of the surface of the part to be polished. The contour feature determination module includes: The contour point cloud data determination submodule is used to perform 3D scanning on the part to be polished based on a 3D scanning device to determine the contour point cloud data; the contour point cloud data is used to reflect the first contour of the part to be polished under the first view. The constituent element determination submodule is used to determine the constituent elements of the first contour corresponding to the part to be polished based on the contour point cloud data; the constituent elements include line segments and arcs; The contour feature determination submodule is used to determine the contour features based on the constituent elements; the contour features include first feature information, second feature information and third feature information; wherein, the first feature information is used to indicate the type of each element constituting the first contour and the corresponding number of elements; the second feature information is used to indicate the included angle between each constituent element of the first contour; the third feature information is used to indicate the concavity and convexity of each constituent element of the first contour. The contour feature determination submodule includes: The first element information determination unit is used to determine the first element information from the contour point cloud data using the least squares fitting line segment method; the first element information is used to indicate the line segments present in the first contour and the corresponding line segment length values when the line segments are present. The second element information determination unit is used to determine the second element information from the contour point cloud data using the least squares fitting circle fitting method; the second element information is used to indicate the arcs present in the first contour and the corresponding arc radius values when the arcs are present. A contour feature determination unit is used to determine the contour feature based on the first element information and the second element information; The target part template determination module is used to match the contour features in the template library to determine the target part template; the template library stores multiple candidate part templates; each candidate part template has a different second contour, and at least a portion of the second contour in each candidate part template is used to indicate the edge position information of the part that needs to be polished; the second contour is the contour from a first perspective, and the second contour is a closed shape composed of line segments and / or arcs; The second grinding trajectory determination module is used to determine the second grinding trajectory corresponding to the part to be ground in the first view based on the first grinding trajectory associated with the target part template; the first grinding trajectory is used to indicate the edge position information of the part that needs to be ground.
7. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating part grinding trajectories as described in any one of claims 1-5.
8. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the method for generating a grinding trajectory for a part as described in any one of claims 1-5.
Citation Information
Patent Citations
Part polishing edge extraction method and device, terminal equipment and storage medium
CN118037648A
Workpiece polishing track generation method and device
CN120439116A