CN117113580A - Automatic drawing method and device for shaft part, storage medium and electronic device - Google Patents

Automatic drawing method and device for shaft part, storage medium and electronic device Download PDF

Info

Publication number
CN117113580A
CN117113580A CN202311107601.8A CN202311107601A CN117113580A CN 117113580 A CN117113580 A CN 117113580A CN 202311107601 A CN202311107601 A CN 202311107601A CN 117113580 A CN117113580 A CN 117113580A
Authority
CN
China
Prior art keywords
shaft
features
shaft part
identified
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311107601.8A
Other languages
Chinese (zh)
Inventor
张卿卿
王梦琪
周睿
严佳丽
李克严
王晓兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Siemens Motor China Co ltd
Original Assignee
Siemens Motor China Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Siemens Motor China Co ltd filed Critical Siemens Motor China Co ltd
Priority to CN202311107601.8A priority Critical patent/CN117113580A/en
Publication of CN117113580A publication Critical patent/CN117113580A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design

Landscapes

  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Numerical Control (AREA)

Abstract

The application discloses an automatic drawing method and equipment for shaft parts, a storage medium and an electronic device, wherein the method comprises the following steps: creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features; determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library; determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified; automatically drawing the shaft part to be identified according to the second dimension characteristic; by adopting the steps, the problem that the 2D drawing result is inaccurate due to the fact that complex features cannot be accurately identified in the 2D drawing process of a target component (such as a motor shaft) in the prior art is solved.

Description

Automatic drawing method and device for shaft part, storage medium and electronic device
Technical Field
The application relates to the technical field of industry, in particular to an automatic drawing method and device for shaft parts, a storage medium and an electronic device.
Background
2D mapping is one of the most important parts in the motor shaft development process. There are many important information, such as dimensions, notes and tolerance requirements, that need to be marked in the drawing for ease of manufacture. The traditional method of manually creating these marks is inefficient. Furthermore, manual creation does not guarantee the accuracy, normalization, and integrity of drawing marks. Thus, automatic generation of two-dimensional engineering drawings (i.e., 2D drawings) is very necessary, but one significant obstacle to drawing automation is how to intelligently identify features.
As shown in fig. 1, there are many detailed features to be identified in the process of automatically drawing the motor shaft, including features of the relief groove 11, the relief groove 12, the rounded corners 13, the special-shaped key groove 14, the hole 15, the snap spring groove 16, the rounded corners 17, and the like. Wherein, the chamfer is used for reducing the sharp edge of the shaft and preventing the cutting object or other objects from being damaged or scratched during the use process; the rounded corners are used for reducing sharp edges of the shaft, so that the shaft is smoother and more comfortable, and the strength and durability of the shaft can be improved; the relief slots are used to mount parts on the shaft, such as bearings or seals, which provide a safe location to ensure that the parts are secured to the shaft and prevented from sliding or rotating; the clamp spring groove is used for axially positioning; standard keyways for mounting keys or inserts on the shaft to effect connection of the shaft to other parts and transfer rotational forces, the standard keyways typically being of a particular size and shape to mate with the standard keys; profiled keyways for special-purpose key connections, such as non-standard size or special-shaped keys, may be designed and manufactured according to specific needs.
The feature recognition method provided by the prior art can only recognize some standard features, such as chamfer angles, round angles and the like, but cannot accurately recognize complex features such as special-shaped key grooves, clamp spring grooves and the like.
Aiming at the problems of inaccurate 2D drawing results and the like caused by inaccurate identification of complex features in the 2D drawing process of a target component (such as a motor shaft) in the prior art, no effective solution is proposed.
Disclosure of Invention
In view of this, the present application provides an automatic drawing method and apparatus for shaft parts, a storage medium and an electronic apparatus, so as to at least solve the problem that in the related art, the 2D drawing process of the target component (such as a motor shaft) in the prior art is inaccurate due to the fact that the complex features cannot be accurately identified.
According to an aspect of an embodiment of the present application, there is provided an automatic drawing method of a shaft part, including: creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features; determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library; determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified; and automatically drawing the shaft part to be identified according to the second dimension characteristic.
According to another aspect of the embodiment of the present application, there is also provided an automatic drawing apparatus for shaft parts, including: the creation module is used for creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises the following components: topological structure features corresponding to different types of complex shaft features; the first determining module is used for determining first dimension characteristics of the shaft part to be identified according to the appearance characteristics of the shaft part to be identified and the topological structure characteristic library; the second determining module is used for determining second dimension characteristics corresponding to the first dimension characteristics of the shaft part to be identified; and the drawing module is used for automatically drawing the shaft part to be identified according to the second dimension characteristic.
According to another aspect of the embodiment of the present application, there is also provided a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, and wherein the program runs the automatic drawing method of shaft parts described above.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the automatic drawing method of the shaft part through the computer program.
As can be seen from the scheme, the application creates a topological structure feature library for the shaft part in advance, which is used for storing topological structure features corresponding to complex shaft features of different types; then determining 3D features (namely first dimension features) of the shaft part to be identified according to the appearance features of the shaft part to be identified and the created topological structure feature library, namely determining which features the shaft part to be identified contains; then determining corresponding 2D features (namely second dimension features) according to the 3D features; finally, automatically drawing the shaft part to be identified according to the determined 2D characteristics; by adopting the scheme, the problem that the 2D drawing result is inaccurate due to the fact that complex features cannot be accurately identified in the 2D drawing process of the target assembly (such as a motor shaft) in the prior art in the related art is solved, and then the 2D drawing of the shaft part can be automatically completed.
Drawings
The above and other features and advantages of the present application will become more apparent to those of ordinary skill in the art by describing in detail preferred embodiments thereof with reference to the attached drawings in which:
FIG. 1 is a schematic view of a 3D model structure of an alternative motor shaft according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of automatically drawing a shaft part according to an embodiment of the present application;
Fig. 3 (a) is a block diagram of an optional AAG according to an embodiment of the present application;
FIG. 3 (b) is a schematic diagram of boundary information of an alternative AAG according to an embodiment of the application;
FIG. 3 (c) is a schematic diagram of the boundary relationships of an alternative AAG according to an embodiment of the application;
FIG. 4 is a schematic diagram of a process for creating a topological feature of an alternative shaft component in accordance with an embodiment of the present application;
FIG. 5 is a graph of a profile of an alternative shaft feature of an embodiment of the present application;
FIG. 6 is a logic diagram of an alternative shaft feature identification algorithm in accordance with an embodiment of the present application;
FIG. 7 is a schematic flow chart of mapping an alternative 3D model to a 2D graph according to an embodiment of the present application;
FIG. 8 is a 2D projection view of an alternative 3D model according to an embodiment of the present application;
FIG. 9 is a schematic view of a 2D graphic of an alternative motor shaft according to an embodiment of the present application;
FIG. 10 is a flow chart of an alternative motor shaft sizing according to an embodiment of the present application;
FIG. 11 is an undirected view of motor shaft dimensions of an alternative embodiment of the present application;
FIG. 12 is a schematic flow chart of an alternative size-coded redundancy check according to an embodiment of the present application;
fig. 13 is a block diagram of an automatic drawing device for shaft parts according to an embodiment of the present application.
Wherein, the reference numerals are as follows:
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this embodiment, there is provided an automatic drawing method of shaft parts, and fig. 2 is a flowchart of an alternative automatic drawing method of shaft parts according to an embodiment of the present application, the flowchart including the steps of:
step S202, a topological structure feature library is created for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features;
optionally, before creating the topology feature library for the shaft part, the method further comprises: obtaining shaft features of a plurality of shaft parts from an assembly model of the plurality of shaft parts, wherein the shaft features include at least one of: simple axis features, complex axis features; determining different types of complex shaft features from the shaft features of the plurality of shaft parts; and analyzing the complex shaft features of different types through an Attribute Adjacency Graph (AAG) algorithm to determine topological structure features corresponding to the complex shaft features of different types.
Before a topological structure feature library is created for the shaft parts, a plurality of shaft parts are needed to be used in advance for accumulating data, and shaft features of the shaft parts are acquired from a building model of the shaft parts, wherein the shaft features comprise simple shaft features and complex shaft features; simple shaft features include regular features such as cylinders, chamfers, fillets, hole features, etc.; the complex shaft features comprise key, tool withdrawal groove, clamp spring groove and other features; simple shaft features can be easily identified by the shape (e.g., planar, conical, cylindrical), characteristics (e.g., convexity and concavity) or position (coordinates and size) of the shaft features, but complex shaft features cannot be directly identified, thus requiring separate analysis for complex shaft features; and then analyzing the complex shaft features of different types through an Attribute Adjacency Graph (AAG) algorithm to determine topological structure features corresponding to the complex shaft features of different types.
It should be noted that the AAG (Attributed adjacency graph, attribute adjacency graph) is created based on model B-rep information to express a model topology that will be used to identify complex features on the motor shaft. While the B-rep information is the topology of the model, as exemplified by the boxes in FIG. 3 (a), the B-rep information includes 6 faces, 12 edges and 8 vertices, and the alphabetical representation of these boundary information is shown in FIG. 3 (B), 6 faces being f 1 -f 6 12 sides are e 1 -e 12 8 vertices are v 1 -v 8 The method comprises the steps of carrying out a first treatment on the surface of the The topological relation in the B-rep information is shown in FIG. 3 (c), in the relation network, the body (B 1 ) Connect 6 faces (f) 1 -f 6 ) Each face connects 4 sides, each side connecting 2 vertices.
Since the matrix is easier to store and easy to calculate by computer programming, the present application converts features into a matrix to store, in AAG, complex features are represented by numbered faces first, and the relationship between these faces is extracted, as shown in the relationship diagram in fig. 4, which means that if the numbers of the two faces of the shaft part are connected by a curve, they are adjacent to each other, and if in the disconnected state, they are not adjacent. As shown in fig. 4, based on three complex shaft features extracted from the shaft part shown in fig. 4, a key groove 41, a relief groove 42, and a specially shaped groove (a special-shaped key groove 43); finally, the number and the adjacent relation of the faces are converted into an n matrix (n is the number of feature faces), for example, the key slot 41 in fig. 4 includes 5 feature faces, the feature face 1 is connected with the other 4 feature faces, the feature face 2 is not adjacent to the feature face 4, the feature face 3 is not adjacent to the feature face 5, and a 5*5 matrix is finally formed. In these matrices, M ij The value (representing each value in the matrix) identifies the connection state of i and j, 1 representing the connected relationship, and 0 representing the disconnected relationship. Through the steps, an AAG matrix library (namely the topological structure feature library) of complex axis features is established.
Step S204, determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library;
optionally, the above step S204 is performed: the first dimension characteristic of the shaft part to be identified is determined according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library, and the method can be realized by the following steps: analyzing shape characteristics, attribute characteristics, size data and position characteristics of the shaft part to be identified from the appearance characteristics of the shaft part to be identified; and determining a first dimension characteristic of the shaft part to be identified according to the shape characteristic, the attribute characteristic, the dimension data, the position characteristic and the topological structure characteristic library.
Features on the shaft parts can be divided into two groups: a simple set of features (equivalent to the simple shaft features described above) including cylinder, chamfer, fillet and hole features; and complex sets of features (equivalent to the complex shaft features described above) including keyway, relief groove, and circlip groove features. These simple features can be easily identified by surface shape (e.g., planar, conical, cylindrical, equivalent to the shape features described above), characteristics (e.g., convexity and concavity, equivalent to the attribute features described above), or position (coordinates and size, equivalent to the dimensional data and position features described above). Complex features cannot be identified directly by shape, nature or location and therefore, a library of topological features is required to assist in identifying these complex axis features.
Specifically, according to the shape feature, the attribute feature, the size data, the position feature and the topological structure feature library determine a first dimension feature of the shaft part to be identified, which may be implemented by the following scheme, including: and determining a simple shaft characteristic group and a complex shaft characteristic group corresponding to the shaft characteristics of the shaft part to be identified, wherein the simple shaft characteristic group comprises: one or more simple axis features, the complex axis feature set comprising: one or more complex axis features; according to the shape feature, the attribute feature, the size data and the position feature perform shaft feature recognition on the one or more simple shaft features to obtain a first recognition result, and perform shaft feature recognition on the one or more complex shaft features according to the topological structure features included in the topological structure feature library to obtain a second recognition result; and determining the first identification result and the second identification result as first dimension characteristics of the shaft part to be identified.
In the related art, a feature ring identification method is proposed, features in a 3D model are projected as feature rings in a 2D graph, as shown in fig. 8, and fig. 8 is a 2D projection diagram of an alternative 3D model according to an embodiment of the present application. The following features contained in fig. 8 can be identified by this feature ring identification method: chamfer features 801 and 811, cylindrical features 802, 805, 806, 807 and 809, relief feature 804, keyway feature 808 and taper feature 810, wherein the same features can be distinguished by coordinates and size. By the feature recognition ring recognition method, standard features can be correctly recognized, but in the case that the motor shaft comprises complex features such as key grooves (corresponding to the special-shaped key grooves) and snap spring grooves, the feature ring recognition algorithm cannot accurately recognize the complex features.
The prior art also provides a feature recognition method, wherein features are recognized through the shape and the type of a motor shaft in the drawing. The curve shapes such as straight lines, circular arcs, spline lines and the like are basic information of curve classification. Different curve shapes in the 2D graph identify different features on the 3D model, e.g., an arc curve in the graph represents a rounded corner or hole feature in the modeling module. In order to accurately identify features, curve types (such as extracted curves and contours are also considered as important references.
Thus, the features on the motor shaft can be identified by the shape and type of curve in the view, as shown in FIG. 5, 51 identifying a chamfer feature consisting of two extracted arcs and two short contours, 52 representing a cylindrical feature consisting of two extracted arcs and two long contours; 53 denotes a keyway feature consisting of two extracted lines; 54 denotes rounded features of the open contour; 55 is a complex relief consisting of a few short contours. By means of this feature recognition method it is possible to recognize standard features and some features of special shape, but in some complex cases such as intersecting features, special relief features and other non-standard features cannot be recognized correctly.
Therefore, the application combines the characteristic recognition method, and provides a novel characteristic recognition method, wherein for complex shaft characteristics, a corresponding topological structure characteristic library is created in advance to assist in characteristic recognition, and for simple characteristics, the characteristic recognition is performed according to shape characteristics contained in the shaft characteristics.
Because the complex shaft features need a topological structure feature library to assist in recognition, the shaft features of the shaft parts to be recognized are firstly divided into a simple shaft feature group and a complex shaft feature group, wherein the simple shaft feature group comprises one or more simple shaft features, and the complex shaft feature group comprises one or more complex shaft features; and then carrying out shaft characteristic recognition on the simple shaft characteristics according to the shape characteristics, the attribute characteristics, the size data and the position characteristics to obtain a first recognition result, carrying out shaft characteristic recognition on the complex shaft characteristics with the assistance of the topological structure characteristics contained in the topological structure to obtain a second recognition result, and finally determining the first recognition result and the second recognition result as the first dimension characteristics of the shaft part to be recognized.
The algorithm logic of the shaft feature recognition is shown in fig. 6, and the basic features comprise a shape, an attribute, a position and a topology, which respectively correspond to the shape feature, the attribute feature, the size data and the position feature and the topology structure feature library; wherein the shape comprises a plane, a cone and a cylinder; attributes include convex or concave, locations include size and coordinates, topology includes AAG matrix; the final simple axis feature "cylinder" can be identified based on the shape "cylinder" and the attribute "convex/concave"; the complex axis feature "keyway" may be identified based on a location "size", a location "coordinate" and a topology "AAG matrix".
Step S206, determining second dimension characteristics corresponding to the first dimension characteristics of the shaft part to be identified;
alternatively, the step S206 may be implemented by the following method: obtaining a mapping matrix between the first dimension characteristic and the second dimension characteristic; and determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified according to the mapping matrix.
The 2D feature (corresponding to the second dimension feature) of the motor shaft (shaft part) graph can be determined according to the corresponding relation between the 3D model and the 2D graph, and the mapping relation between the 3D model and the 2D graph is established by the mapping matrix, so that the mapping matrix between the first dimension feature and the second dimension feature is acquired first, and then the first dimension feature is processed according to the mapping matrix to obtain the corresponding second dimension feature. Wherein the structure of the mapping matrix in which the 3*3 matrix in the upper left position is a translation or rotation matrix and the number S of lower right positions is a scaling factor is shown as follows, the mapping relation is a combination of translation, rotation and scaling. The matrices are respectively a translation matrix, a rotation matrix around an X axis, a rotation matrix around a Y axis and a rotation matrix around a Z axis from left to right.
And step S208, automatically drawing the shaft part to be identified according to the second dimension characteristic.
Optionally, the step S208 may be implemented by the following steps, including: identifying equivalent points of the second dimension features corresponding to the shaft part to be identified according to a target identification algorithm, wherein the equivalent points are reference points equivalent to each first dimension feature; and automatically drawing the shaft part to be identified according to the equivalent points and the second dimension characteristics corresponding to the shaft part to be identified.
After the second dimension feature is determined, in order to effectively identify the feature in the drawing module, one or two mark position points, namely equivalent points, can be created on the feature, wherein for the horizontal and vertical dimensions, two mark position points are needed, and for the radius dimension, only one mark position point is needed; after the equivalent points are identified through the target identification algorithm, automatic drawing of the shaft part to be identified is completed in the drawing module according to the equivalent points and the second dimension characteristics.
Through the steps, a topological structure feature library is created for the shaft part in advance and is used for storing topological structure features corresponding to complex shaft features of different types; then determining 3D features (namely first dimension features) of the shaft part to be identified according to the appearance features of the shaft part to be identified and the created topological structure feature library, namely determining which features the shaft part to be identified contains; then determining corresponding 2D features (namely second dimension features) according to the 3D features; finally, automatically drawing the shaft part to be identified according to the determined 2D characteristics; by adopting the scheme, the problem that the 2D drawing result is inaccurate due to the fact that complex features cannot be accurately identified in the 2D drawing process of the target assembly (such as a motor shaft) in the prior art in the related art is solved, and then the 2D drawing of the shaft part can be automatically completed.
Optionally, the embodiment of the present application further provides an optional feature mapping method, as shown in fig. 7, including the following steps:
step S701: 3D feature (corresponding to the first dimension feature) identification is performed based on a 3D feature library (corresponding to the topological feature library);
step S702: determining a mapping matrix between the 3D features and the 2D graph;
step S703: creating a 3D equivalent point;
step S704: mapping the equivalent points to a 2D drawing according to the mapping matrix;
step S705: 2D feature recognition is performed.
Through the method, the 2D characteristics are determined according to the 3D characteristics, the mapping relation (namely the mapping matrix) and the equivalent points, so that the 2D drawing is completed, and finally the 2D motor shaft diagram is obtained. The 2D motor shaft map is shown in fig. 9, which can identify features in the view by equivalent points. Features can be identified more efficiently and accurately than conventional feature identification algorithms. Through the feature recognition algorithm, standard features such as chamfer, fillet, key slot features and the like can be rapidly recognized, and complex special shape features such as a tool withdrawal groove, a clamp spring groove, a special key slot feature and the like can be rapidly recognized.
Based on the steps, after automatically drawing the shaft part to be identified according to the second dimension characteristic, the method further comprises: determining different axial characteristics of the shaft part to be identified after automatic drawing; creating different types of annotation events for the different axis features, wherein the annotation events comprise: sizing events and annotation events; and marking the different coaxial features according to the marking events of different types.
The process of marking shaft features includes: the method comprises the steps of firstly carrying out size marking on a 2D diagram of a motor shaft and then carrying out annotation marking, wherein the size marking process comprises the following steps: three dimensional chains L1, L2, and L3 are created based on the composite mark patterns based on the machining references D1, D2, and D3 as shown in fig. 10, respectively. Taking the dimension chain L1 as an example, L1 is created based on the definition of the matching reference D1. Typically, the dimensions as A1-A5 are directly obtainable by the symbols in the drawings, whereas the dimensions of the closed loop can only be calculated as the B1 ring in L1. In one dimension chain, there is only one closed loop, while the others are open loops, the dimensions of which are finally obtained.
In order to limit the variation in the tooling, the open loop is separated into an increase loop and a decrease loop, in the size chain, the increase in the component size that will cause the closed loop to increase is the increase loop, and the increase in the size that will cause the closed loop to decrease is the decrease loop. In the size chain L1, A1 is an increasing loop and A2-A5 are decreasing loops. Through the above steps, a closed loop and open loop based dimensional chain is established for the motor shaft. All features on the motor shaft can be automatically marked based on the marking pattern algorithm and the feature recognition algorithm, and size marks and annotation marks are added for the features, wherein the recognition functions of the size or the annotation are independently developed and have high robustness.
It should be noted that the horizontal dimension generated based on the dimension chain is susceptible to repeated marking, and therefore, after marking is completed, redundancy of the horizontal dimension must be checked, and in general, there are three characteristics in an integrated horizontal dimension chain without redundancy:
a) Each marker position in the undirected graph has at least one connection;
b) There is no closed loop in the size chain;
c) The amount of connection is n-1 (n is the number of size marker positions in the model).
In the present application, redundancy of horizontal size can be checked based on the undirected graph and the union lookup algorithm, as shown in fig. 11, the undirected graph is created based on the size in the model first, so that the size is converted into a connection state. The size redundancy check problem is then translated into checking the connectivity of two nodes connected in the undirected graph, which means that the size is redundant if the locations of the two markers can be connected with paths in the undirected graph. Whereas the connectivity of the undirected graph can be verified by a union lookup algorithm in which if two nodes are rooted the same in the undirected graph, this means that the size of the two nodes is redundant. The union search algorithm has lower temporal and spatial complexity than BFS (breadth first search) and DFS (depth first search). The flow of size redundancy check through undirected graph and union lookup algorithm is shown in fig. 12, and includes the following steps:
Step S1201: traversing the shaft part size mark;
step S1202: creating an undirected graph based on the size markers;
step S1203: traversing the size, and setting the two ends as a and b;
step S1204: judging whether pre (a) is equal to a; if not, executing step S1205, if yes, executing step S1206;
step S1205: let a equal to pre (a), and then return to step S1204;
step S1206: setting r1 equal to pre (a);
step S1207: judging whether pre (b) is equal to b; if not, executing step S1208, if yes, executing step S1209;
step S1208: let b=pre (b), and then return to execution of step S1207;
step S1209: setting r2=pre (b);
step S1210: comparing whether r1 is equal to r 2; if the two sizes are equal, the redundant size is determined to exist, and if the two sizes are not equal, the redundant size is determined to not exist.
Through the steps, whether the size marks are redundant or not is rapidly checked by adopting the undirected graph and the union searching algorithm, so that the finally drawn 2D graph is more simplified and standard, and the production and manufacturing of engineers according to the drawn 2D graph are facilitated.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present application.
Fig. 13 is an automatic drawing apparatus of a shaft part according to an embodiment of the present application, as shown in fig. 13, including:
a creating module 1302, configured to create a topology feature library for the shaft part, where the topology feature library includes: topological structure features corresponding to different types of complex shaft features;
a first determining module 1304, configured to determine a first dimension feature of the shaft part to be identified according to an appearance feature of the shaft part to be identified and the topology feature library;
a second determining module 1306, configured to determine a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified;
a drawing module 1308 is configured to automatically draw a drawing for the shaft part to be identified according to the second dimension characteristic.
By the device, a topological structure feature library is created for the shaft part in advance and is used for storing topological structure features corresponding to complex shaft features of different types; then determining 3D features (namely first dimension features) of the shaft part to be identified according to the appearance features of the shaft part to be identified and the created topological structure feature library, namely determining which features the shaft part to be identified contains; then determining corresponding 2D features (namely second dimension features) according to the 3D features; finally, automatically drawing the shaft part to be identified according to the determined 2D characteristics; by adopting the scheme, the problem that the 2D drawing result is inaccurate due to the fact that complex features cannot be accurately identified in the 2D drawing process of the target assembly (such as a motor shaft) in the prior art in the related art is solved, and then the 2D drawing of the shaft part can be automatically completed.
Optionally, the automatic drawing device for shaft parts further comprises an acquisition module, configured to acquire shaft features of the shaft parts from a component model of the shaft parts, where the shaft features include at least one of: simple axis features, complex axis features; determining different types of complex shaft features from the shaft features of the plurality of shaft parts; and analyzing the complex shaft features of different types through an Attribute Adjacency Graph (AAG) algorithm to determine topological structure features corresponding to the complex shaft features of different types.
Before a topological structure feature library is created for the shaft parts, a plurality of shaft parts are needed to be used in advance for accumulating data, and shaft features of the shaft parts are acquired from a building model of the shaft parts, wherein the shaft features comprise simple shaft features and complex shaft features; simple shaft features include regular features such as cylinders, chamfers, fillets, hole features, etc.; the complex shaft features comprise key, tool withdrawal groove, clamp spring groove and other features; simple shaft features can be easily identified by the shape (e.g., planar, conical, cylindrical), characteristics (e.g., convexity and concavity) or position (coordinates and size) of the shaft features, but complex shaft features cannot be directly identified, thus requiring separate analysis for complex shaft features; and then analyzing the complex shaft features of different types through an Attribute Adjacency Graph (AAG) algorithm to determine topological structure features corresponding to the complex shaft features of different types.
It should be noted that the AAG (Attributed adjacency graph, attribute adjacency graph) is created based on model B-rep information to express a model topology that will be used to identify complex features on the motor shaft. And the B-rep information is the topological structure of the model, as shown in figure 3 #a) For example, the B-rep information includes 6 faces, 12 sides and 8 vertices, and the alphabetical representation of these boundary information is shown in FIG. 3 (B), 6 faces being f 1 -f 6 12 sides are e 1 -e 12 8 vertices are v 1 -v 8 The method comprises the steps of carrying out a first treatment on the surface of the The topological relation in the B-rep information is shown in FIG. 3 (c), in the relation network, the body (B 1 ) Connect 6 faces (f) 1 -f 6 ) Each face connects 4 sides, each side connecting 2 vertices.
Since the matrix is easier to store and easy to calculate by computer programming, the present application converts features into a matrix to store, in AAG, complex features are represented by numbered faces first, and the relationship between these faces is extracted, as shown in the relationship diagram in fig. 4, which means that if the numbers of the two faces of the shaft part are connected by a curve, they are adjacent to each other, and if in the disconnected state, they are not adjacent. As shown in fig. 4, based on three complex shaft features extracted from the shaft part shown in fig. 4, a key groove 41, a relief groove 42, and a specially shaped groove (a special-shaped key groove 43); finally, the number and the adjacent relation of the faces are converted into an n matrix (n is the number of feature faces), for example, the key slot 41 in fig. 4 includes 5 feature faces, the feature face 1 is connected with the other 4 feature faces, the feature face 2 is not adjacent to the feature face 4, the feature face 3 is not adjacent to the feature face 5, and a 5*5 matrix is finally formed. In these matrices, M ij The value (representing each value in the matrix) identifies the connection state of i and j, 1 representing the connected relationship, and 0 representing the disconnected relationship. Through the steps, an AAG matrix library (namely the topological structure feature library) of complex axis features is established.
Optionally, the first determining module 1304 is further configured to analyze, from the appearance features of the shaft part to be identified, shape features, attribute features, size data, and position features included in the shaft features of the shaft part to be identified; and determining a first dimension characteristic of the shaft part to be identified according to the shape characteristic, the attribute characteristic, the dimension data, the position characteristic and the topological structure characteristic library.
Features on the shaft parts can be divided into two groups: a simple set of features (equivalent to the simple shaft features described above) including cylinder, chamfer, fillet and hole features; and complex sets of features (equivalent to the complex shaft features described above) including keyway, relief groove, and circlip groove features. These simple features can be easily identified by surface shape (e.g., planar, conical, cylindrical, equivalent to the shape features described above), characteristics (e.g., convexity and concavity, equivalent to the attribute features described above), or position (coordinates and size, equivalent to the dimensional data and position features described above). Complex features cannot be identified directly by shape, nature or location and therefore, a library of topological features is required to assist in identifying these complex axis features.
Optionally, the first determining module 1304 is further configured to determine a simple axis feature set and a complex axis feature set corresponding to an axis feature of the axis part to be identified, where the simple axis feature set includes: one or more simple axis features, the complex axis feature set comprising: one or more complex axis features; according to the shape feature, the attribute feature, the size data and the position feature perform shaft feature recognition on the one or more simple shaft features to obtain a first recognition result, and perform shaft feature recognition on the one or more complex shaft features according to the topological structure features included in the topological structure feature library to obtain a second recognition result; and determining the first identification result and the second identification result as first dimension characteristics of the shaft part to be identified.
In the prior art, a feature ring identification method is proposed, features in a 3D model are projected into feature rings in a 2D graph, as shown in fig. 8, and fig. 8 is a 2D projection diagram of an alternative 3D model according to an embodiment of the present application. The following features contained in fig. 8 can be identified by this feature ring identification method: chamfer features 801 and 811, cylindrical features 802, 805, 806, 807 and 809, relief feature 804, keyway feature 808 and taper feature 810, wherein the same features can be distinguished by coordinates and size. By the feature recognition ring recognition method, standard features can be correctly recognized, but in the case that the motor shaft comprises complex features such as key grooves (corresponding to the special-shaped key grooves) and snap spring grooves, the feature ring recognition algorithm cannot accurately recognize the complex features.
The prior art also provides a feature recognition method, wherein features are recognized through the shape and the type of a motor shaft in the drawing. The curve shapes such as straight lines, circular arcs, spline lines and the like are basic information of curve classification. Different curve shapes in the 2D graph identify different features on the 3D model, e.g., an arc curve in the graph represents a rounded corner or hole feature in the modeling module. For accurate identification of features, curve types (such as extracted curves and contours) are also considered as important references. The curve type reflects the presence state of the feature.
Thus, the features on the motor shaft can be identified by the shape and type of curve in the view, as shown in FIG. 5, 51 identifying a chamfer feature consisting of two extracted arcs and two short contours, 52 representing a cylindrical feature consisting of two extracted arcs and two long contours; 53 denotes a keyway feature consisting of two extracted lines; 54 denotes rounded features of the open contour; 55 is a complex relief consisting of a few short contours. By means of this feature recognition method it is possible to recognize standard features and some features of special shape, but in some complex cases such as intersecting features, special relief features and other non-standard features cannot be recognized correctly.
Therefore, the application combines the characteristic recognition method, and provides a novel characteristic recognition method, wherein for complex shaft characteristics, a corresponding topological structure characteristic library is created in advance to assist in characteristic recognition, and for simple characteristics, the characteristic recognition is performed according to shape characteristics contained in the shaft characteristics.
Because the complex shaft features need a topological structure feature library to assist in recognition, the shaft features of the shaft parts to be recognized are firstly divided into a simple shaft feature group and a complex shaft feature group, wherein the simple shaft feature group comprises one or more simple shaft features, and the complex shaft feature group comprises one or more complex shaft features; and then carrying out shaft characteristic recognition on the simple shaft characteristics according to the shape characteristics, the attribute characteristics, the size data and the position characteristics to obtain a first recognition result, carrying out shaft characteristic recognition on the complex shaft characteristics with the assistance of the topological structure characteristics contained in the topological structure to obtain a second recognition result, and finally determining the first recognition result and the second recognition result as the first dimension characteristics of the shaft part to be recognized.
The algorithm logic of the shaft feature recognition is shown in fig. 6, and the basic features comprise a shape, an attribute, a position and a topology, which respectively correspond to the shape feature, the attribute feature, the size data and the position feature and the topology structure feature library; wherein the shape comprises a plane, a cone and a cylinder; attributes include convex or concave, locations include size and coordinates, topology includes AAG matrix; the final simple axis feature "cylinder" can be identified based on the shape "cylinder" and the attribute "convex/concave"; the complex axis feature "keyway" may be identified based on a location "size", a location "coordinate" and a topology "AAG matrix".
Optionally, the second determining module 1306 is further configured to obtain a mapping matrix between the first dimension feature and the second dimension feature; and determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified according to the mapping matrix.
The 2D feature (corresponding to the second dimension feature) of the motor shaft (shaft part) graph can be determined according to the corresponding relation between the 3D model and the 2D graph, and the mapping relation between the 3D model and the 2D graph is established by the mapping matrix, so that the mapping matrix between the first dimension feature and the second dimension feature is acquired first, and then the first dimension feature is processed according to the mapping matrix to obtain the corresponding second dimension feature. Wherein the structure of the mapping matrix in which the 3*3 matrix in the upper left position is a translation or rotation matrix and the number S of lower right positions is a scaling factor is shown as follows, the mapping relation is a combination of translation, rotation and scaling. The matrices are respectively a translation matrix, a rotation matrix around an X axis, a rotation matrix around a Y axis and a rotation matrix around a Z axis from left to right.
Optionally, the drawing module 1308 is further configured to identify, according to a target identification algorithm, an equivalent point of a second dimension feature corresponding to the shaft part to be identified, where the equivalent point is a reference point equivalent to each first dimension feature; and automatically drawing the shaft part to be identified according to the equivalent points and the second dimension characteristics corresponding to the shaft part to be identified.
After the second dimension feature is determined, in order to effectively identify the feature in the drawing module, one or two mark position points, namely equivalent points, can be created on the feature, wherein for the horizontal and vertical dimensions, two mark position points are needed, and for the radius dimension, only one mark position point is needed; after the equivalent points are identified through the target identification algorithm, automatic drawing of the shaft part to be identified is completed in the drawing module according to the equivalent points and the second dimension characteristics.
Optionally, the automatic drawing device of the shaft part further comprises a marking module, wherein the marking module is used for determining different shaft characteristics of the shaft part to be identified after automatic drawing; creating different types of annotation events for the different axis features, wherein the annotation events comprise: sizing events and annotation events; and marking the different coaxial features according to the marking events of different types.
The process of marking shaft features includes: the method comprises the steps of firstly carrying out size marking on a 2D diagram of a motor shaft and then carrying out annotation marking, wherein the size marking process comprises the following steps: three size chains L1, L2, and L3 are created based on the composite mark patterns based on the machining references D1, D2, and D3 as shown in fig. 10, respectively, taking the ring L1 as an example, and creating L1 based on the definition of the matching reference D1. Typically, the dimensions as A1-A5 are directly obtainable by the symbols in the drawings, whereas the dimensions of the closed loop can only be calculated as the B1 ring in L1. In one dimension chain, there is only one closed loop, while the others are open loops, the dimensions of which are finally obtained.
In order to limit the variation in the tooling, the open loop is separated into an increase loop and a decrease loop, in the size chain, the increase in the component size that will cause the closed loop to increase is the increase loop, and the increase in the size that will cause the closed loop to decrease is the decrease loop. In the size chain L1, A1 is an increasing loop and A2-A5 are decreasing loops. Through the above steps, a closed loop and open loop based dimensional chain is established for the motor shaft. All features on the motor shaft can be automatically marked based on the marking pattern algorithm and the feature recognition algorithm, and size marks and annotation marks are added for the features, wherein the recognition functions of the size or the annotation are independently developed and have high robustness.
The embodiment of the application also provides an automatic drawing plug-in/tool of the shaft part, which is used for completing 2D automatic drawing of the shaft part by executing the automatic drawing method of the shaft part, and is arranged in the automatic drawing equipment of the shaft part, and the automatic drawing equipment of the shaft part completes automatic drawing by running the automatic drawing plug-in/tool of the shaft part.
An embodiment of the present application also provides a storage medium including a stored program, wherein the program executes the method of any one of the above.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
s1, creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features;
s2, determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library;
s3, determining second dimension characteristics corresponding to the first dimension characteristics of the shaft part to be identified;
and S4, automatically drawing the shaft part to be identified according to the second dimension characteristic.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features;
s2, determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library;
s3, determining second dimension characteristics corresponding to the first dimension characteristics of the shaft part to be identified;
and S4, automatically drawing the shaft part to be identified according to the second dimension characteristic.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the application.

Claims (10)

1. A method of automatically drawing a shaft element, comprising:
creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises: topological structure features corresponding to different types of complex shaft features;
determining a first dimension characteristic of the shaft part to be identified according to the appearance characteristic of the shaft part to be identified and the topological structure characteristic library;
determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified;
and automatically drawing the shaft part to be identified according to the second dimension characteristic.
2. The method of automated drawing of shaft parts according to claim 1, wherein prior to creating a topological feature library for the shaft parts, the method further comprises:
obtaining shaft features of a plurality of shaft parts from an assembly model of the plurality of shaft parts, wherein the shaft features include at least one of: simple axis features, complex axis features;
determining different types of complex shaft features from the shaft features of the plurality of shaft parts;
and analyzing the complex shaft features of different types through an Attribute Adjacency Graph (AAG) algorithm to determine topological structure features corresponding to the complex shaft features of different types.
3. The method of automatic drawing of shaft parts according to claim 1, wherein determining a first dimension feature of a shaft part to be identified from an appearance feature of the shaft part to be identified and the topology feature library comprises:
analyzing shape characteristics, attribute characteristics, size data and position characteristics of the shaft part to be identified from the appearance characteristics of the shaft part to be identified;
and determining a first dimension characteristic of the shaft part to be identified according to the shape characteristic, the attribute characteristic, the dimension data, the position characteristic and the topological structure characteristic library.
4. A method of automatically mapping a shaft part according to claim 3, wherein determining a first dimension characteristic of the shaft part to be identified from the shape characteristic, the attribute characteristic, the dimension data, the location characteristic and the topology characteristic library comprises:
and determining a simple shaft characteristic group and a complex shaft characteristic group corresponding to the shaft characteristics of the shaft part to be identified, wherein the simple shaft characteristic group comprises: one or more simple axis features, the complex axis feature set comprising: one or more complex axis features;
According to the shape feature, the attribute feature, the size data and the position feature perform shaft feature recognition on the one or more simple shaft features to obtain a first recognition result, and perform shaft feature recognition on the one or more complex shaft features according to the topological structure features included in the topological structure feature library to obtain a second recognition result;
and determining the first identification result and the second identification result as first dimension characteristics of the shaft part to be identified.
5. The method of automatic drawing of a shaft part according to claim 1, wherein determining a second dimension feature corresponding to the first dimension feature of the shaft part to be identified comprises:
obtaining a mapping matrix between the first dimension characteristic and the second dimension characteristic;
and determining a second dimension characteristic corresponding to the first dimension characteristic of the shaft part to be identified according to the mapping matrix.
6. The automatic drawing method of a shaft part according to claim 1, wherein automatically drawing the shaft part to be identified according to the second dimensional feature includes:
identifying equivalent points of the second dimension features corresponding to the shaft part to be identified according to a target identification algorithm, wherein the equivalent points are reference points equivalent to each first dimension feature;
And automatically drawing the shaft part to be identified according to the equivalent points and the second dimension characteristics corresponding to the shaft part to be identified.
7. The automatic drawing method of a shaft part according to claim 1, wherein after automatically drawing the shaft part to be identified according to the second dimensional feature, the method further comprises:
determining different axial characteristics of the shaft part to be identified after automatic drawing;
creating different types of annotation events for the different axis features, wherein the annotation events comprise: sizing events and annotation events;
and marking the different coaxial features according to the marking events of different types.
8. An automatic drawing apparatus for shaft parts, comprising:
the creation module is used for creating a topological structure feature library for the shaft part, wherein the topological structure feature library comprises the following components: topological structure features corresponding to different types of complex shaft features;
the first determining module is used for determining first dimension characteristics of the shaft part to be identified according to the appearance characteristics of the shaft part to be identified and the topological structure characteristic library;
the second determining module is used for determining second dimension characteristics corresponding to the first dimension characteristics of the shaft part to be identified;
And the drawing module is used for automatically drawing the shaft part to be identified according to the second dimension characteristic.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program runs the method according to any one of the preceding claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the method according to any of the claims 1 to 7 by means of the computer program.
CN202311107601.8A 2023-08-30 2023-08-30 Automatic drawing method and device for shaft part, storage medium and electronic device Pending CN117113580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311107601.8A CN117113580A (en) 2023-08-30 2023-08-30 Automatic drawing method and device for shaft part, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311107601.8A CN117113580A (en) 2023-08-30 2023-08-30 Automatic drawing method and device for shaft part, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117113580A true CN117113580A (en) 2023-11-24

Family

ID=88796224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311107601.8A Pending CN117113580A (en) 2023-08-30 2023-08-30 Automatic drawing method and device for shaft part, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117113580A (en)

Similar Documents

Publication Publication Date Title
CN109117560B (en) Three-dimensional process design method and platform for machining parts of automotive typical machine based on MBD
US20140125663A1 (en) 3d model shape analysis method based on perception information
Huttenlocher et al. Finding convex edge groupings in an image
EP2028623B1 (en) Method of computer-aided design of edges connecting faces of a modeled object
US7042451B2 (en) Methods using specific attributes and graph grammars in graph-based techniques for feature recognition
CN110334390B (en) Method and device for identifying outer wall in computer-aided design (CAD), storage medium and processor
Nnaji et al. Feature reasoning for sheet metal components
Chen et al. Intelligent dimensioning for mechanical parts based on feature extraction
Xú et al. STEP-NC based reverse engineering of in-process model of NC simulation
CN108121886B (en) Process knowledge pushing method based on processing characteristics
CN116403207A (en) Processing characteristic identification method for plate parts
CN117113580A (en) Automatic drawing method and device for shaft part, storage medium and electronic device
CN116798028A (en) Automatic dimension marking method for three-dimensional part
CN113111741B (en) Assembly state identification method based on three-dimensional feature points
Lai et al. Recognition and classification of protrusion features on thin-wall parts for mold flow analysis
CN113111458B (en) DXF-based sheet metal part automatic identification and positioning method
CN115797601A (en) Automatic extraction method and system for middle plane of Brep three-dimensional model
CN114092952A (en) dXF format-based house type graph information extraction and vectorization method and device
Lai et al. Automatic recognition and decomposition of rib features in thin-shell parts for mold flow analysis
CN111815619B (en) Manufacturing feature small corner detection and driving geometric construction method based on Gaussian curvature
Ferrari et al. Free-form feature representation and comparison
CN111242130B (en) Automatic generation method of aviation plug type spectrogram
JP6320806B2 (en) 3D model search method and 3D model search system
CN117113455A (en) Automatic three-dimensional geometric feature recognition method based on topological rule
CN113140021B (en) Vector line generating method, system and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination