Parameter self-adaptive adjustment method for keeping connection relation of mechanical structure
By modeling the mechanical structure as a directed acyclic graph, identifying the path and decomposing the displacement direction, and automatically adjusting the parameters to absorb the end displacement, the cumbersome operations and error problems in traditional CAD tools are solved, and efficient and robust mechanical structure connection adjustment is achieved.
Patent Information
- Application Number
- CN202510875217.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional CAD tools require users to manually adjust multiple parameters when adjusting the connection relationship of mechanical structures. This operation is cumbersome and prone to errors, especially in multi-terminal or chain structures, where assembly errors are prone to occur.
By modeling the assembly structure as a directed acyclic graph, identifying the unique path from the base to the end, and dividing the parts into main paths and branches, the end displacement is decomposed into three main direction components. The parameter priority is determined based on the geometric distance and relative position, and the parameters of related parts are automatically adjusted to absorb the displacement and avoid interference with irrelevant branches.
It realizes automatic identification and adjustment of relevant part parameters when the end part position is modified, reduces misoperation, improves efficiency, reduces computing overhead, supports the robustness and scalability of complex structures, and avoids modification of irrelevant parts.
Smart Images

Figure CN120805325A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer-aided design, and particularly relates to a parameter adaptive adjustment method for maintaining mechanical structure connection relationship. BACKGROUND
[0002] In modern CAD systems, mechanical structures are usually assembled by multiple parts through geometric parameters and constraint relationships, forming a complex assembly model with a hierarchical structure. When a user modifies the position of an end part in the structure, the structure may be broken, constraint conflicts may occur, or assembly may fail.
[0003] Traditional CAD tools usually require users to manually adjust multiple parameters to maintain the connection relationship of the structure. The operation process is tedious and prone to errors, especially in multi-end or chain structures. Inappropriate parameter selection can easily cause assembly errors, affecting subsequent simulation and manufacturing work. SUMMARY
[0004] The application provides a parameter adaptive adjustment method for maintaining the connection relationship of a mechanical structure, aiming to solve the problem that traditional CAD tools usually require users to manually adjust multiple parameters to maintain the connection relationship of the structure, which is tedious and prone to errors.
[0005] The application is implemented as follows: a parameter adaptive adjustment method for maintaining the connection relationship of a mechanical structure, comprising the following operation steps: S1, structure connectivity identification:
[0006] Modeling the assembly structure as a directed acyclic graph;
[0007] When the end part moves, the system identifies the unique path from the base to the end and the bifurcation node;
[0008] Divide the adjustable parts corresponding to each end part into branch parts and nodes on the main path, and exclude branch parts associated with other ends;
[0009] Classify all parts in the path according to their parameter influence direction as Px, Py, and Pz;
[0010] S2, displacement decomposition and parameter priority sorting:
[0011] Split the end displacement vector ΔT into three main directions Δx, Δy, and Δz;
[0012] Parameter classification results;
[0013] For each parameter set in each direction, an adjustment priority queue is constructed according to the geometric distance between the end part, in addition to the distance priority, there is also a minimum modification principle, when multiple end parts simultaneously occur the same displacement, the displacement can be absorbed by modifying the parameters of the main part;
[0014] S3, response direction judgment based on relative position:
[0015] Calculate the direction vector of the center point of the control parameter part and the center point of the adjacent part
[0016] Determine the vector The angle sign corresponding to the component (take Δx as an example) of the end part displacement vector;
[0017] If the vector Δx and the vector are in the same direction, then the positive Δx corresponds to the increase of the parameter, and vice versa, the parameter is reduced;
[0018] S4, distribution and execution:
[0019] For each direction (x / y / z), respectively, according to the priority distribution parameter to bear displacement;
[0020] If the high priority parameter cannot absorb all the displacement, the remaining amount is automatically transferred to the next parameter;
[0021] After modifying the parameters, it is necessary to modify the rotation displacement matrix of all child nodes of the part node with modified parameters along the direction of the structure tree.
[0022] Preferably, in S1, the parts are divided into main path parts and branch parts, and irrelevant branch parts.
[0023] Preferably, in S1, the modifiable parameters of each part are classified according to the coordinate axis directions X, Y and Z.
[0024] Preferably, in S1, the nodes of the directed graph are parts, and the edges are assembly relationships.
[0025] Preferably, in S2, the total displacement, the parts on the main path are adjusted first.
[0026] Preferably, in S2, the non-common displacement, the parts on the corresponding branch are adjusted first.
[0027] Preferably, in S3, the response direction of each parameter is calculated.
[0028] Preferably, in S4, after the final adjustment, the structure is checked for integrity and assembly consistency.
[0029] Advantages
[0030] Compared with the prior art, the beneficial effects of the present application are: the parameter adaptive adjustment method for maintaining the connection relationship of the mechanical structure of the present application can automatically identify and lock the structure path associated with the current moving end when there are multiple end parts in the structure, only adjust the relevant part parameters on the path, avoid interference to irrelevant branches, decompose the end displacement into three main direction components, and prioritize each adjustable parameter and the spatial distance between the end part to realize direction-aware parameter control and minimum impact adjustment, use the relative geometric position between parts to judge whether the increase or decrease of the parameter can absorb the displacement in the specified direction through the projection judgment method, without modeling or simulation, low cost and high efficiency, when the user modifies the position of the end part, the system can automatically limit the impact range to avoid unrelated parts being modified, the system can intelligently judge the matching relationship between the parameter increase or decrease direction and the displacement direction, automatically derive that the parameter should be "increased" or "decreased", without complex simulation, support multiple parameters in a complex structure to jointly absorb displacement in one direction, have good robustness and scalability, the algorithm design is simple, the calculation overhead is small, and it is easy to integrate into a lightweight CAD plug-in or script system. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 Flowchart of the parameter adaptive adjustment method for maintaining the connection relationship of the mechanical structure of the present application;
[0032] Figure 2 Mechanical assembly structure diagram of the present application;
[0033] Figure 3 Schematic diagram of an example implementation case of the present application;
[0034] Figure 4 Response relationship schematic diagram of an example implementation case of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0036] Please refer to Figure 1The application provides a technical scheme: a parameter self-adaptive adjustment method for maintaining mechanical structure connection relationship, comprising the following operation steps: S1, structure connectivity identification: model the assembly structure as a directed acyclic graph; when the end part moves, the system identifies the unique path from the base to the end and the bifurcation node; the adjustable parts corresponding to each end part are divided into branch parts and nodes on the main path, the branch parts associated with other ends are excluded, all parts in the path are traversed, and the parts are classified into Px, Py and Pz according to the parameter influence direction.
[0037] S2, displacement decomposition and parameter priority sorting: the end displacement vector ΔT is split into Δx, Δy and Δz three main directions; the parameter classification result; for the parameter set in each direction, the geometric distance between the end part is sorted, and the adjustment priority queue is constructed; in addition to the distance priority, there is also a minimum modification principle; when multiple end parts simultaneously occur the same displacement, the displacement can be absorbed by modifying the parameters of the main part.
[0038] S3, response direction judgment based on relative position: calculate the direction vector of the center point of the control parameter part and the center point of the adjacent part; judge the included angle sign of the vector and the corresponding component of the end part displacement vector; if the vector and the vector are in the same direction, the corresponding parameter is increased, otherwise the corresponding parameter is reduced;
[0039] S4, distribution and execution: for each direction x / y / z, the parameter is distributed according to the priority to bear the displacement; if the high-priority parameter cannot absorb all the displacement, the remaining amount is automatically transferred to the next parameter; after modifying the parameter, the rotation displacement matrix of all child nodes of the part node whose parameter is modified needs to be modified along the direction of the structure tree.
[0040] When there are multiple end parts in the structure, the structure path associated with the current moving end part can be automatically identified and locked, only the related part parameters on the path are adjusted, interference on irrelevant branches is avoided, and the end displacement is decomposed into three main direction components.
[0041] According to the spatial distance between each adjustable parameter and the end part, the priority is sorted, the direction-aware parameter control and the minimum impact adjustment are realized, the relative geometric position between parts is used, the increase and decrease of the parameter are judged by the projection judgment method whether the displacement in the specified direction can be absorbed, modeling or simulation is not required, and the cost is low and the efficiency is high.
[0042] Further, in S1, the parts are divided into main path parts and branch parts, and irrelevant branch parts.
[0043] Further, in S1, the parameters of each part that can be modified are classified according to the coordinate axis directions X, Y and Z.
[0044] Further, in the S1, the nodes of the directed graph are parts, and the edges are assembly relationships.
[0045] Further, in the S2, the common displacement, the parts on the main path are preferentially adjusted.
[0046] Further, in the S2, the non-common displacement, the parts on the corresponding branch path are preferentially adjusted.
[0047] Further, in the S3, the response direction of each parameter is calculated.
[0048] Further, in the S4, after the adjustment is finally completed, the integrity and assembly consistency of the structure are checked.
[0049] As shown in Figure 2 , a typical mechanical assembly structure diagram is given, which shows that a plurality of parts extend from the base to the branch paths of two end parts, part 6 and part 9 are two end parts.
[0050] I. Structure connectivity identification:
[0051] The assembly structure is modeled as a directed graph, the nodes are parts, and the edges are assembly relationships. The result is shown in the right graph of Figure 1 .
[0052] II. Displacement decomposition and parameter priority sorting:
[0053] Assuming that the geometric parameters of part 6 and part 9 do not change, and each part can only modify its own length, according to the direction of the part length, all parts can be divided into two groups in x direction and y direction {x:[3,5,8],y:[1,2,4,7]}, wherein part 4 and part 5 can only affect the end part 6, part 7 and part 8 can only affect the end part 9, otherwise, when part 6 is displaced, only the parameters of part 4 and part 5 should be modified, when part 9 is displaced, only the parameters of part 7 and part 8 should be modified.
[0054] III. Response direction judgment based on relative position:
[0055] Take part 4 and part 5 as an example, as shown in Figure 2 , calculate their direction vectors and Calculate the positive and negative of the signed cosine value of the angle between Y axis positive direction, if the angle sign is positive, the elongation of part 4 corresponds to the positive displacement of part 6 in Y direction, calculate the positive and negative of the signed cosine value of the angle between X axis positive direction, if the angle sign is positive, the elongation of part 5 corresponds to the positive displacement of part 6 in X direction.
[0056] AsFigure 3 Figure 2 shows an example implementation use case that demonstrates how to determine the corresponding direction of geometric parameter modification based on the angle between the part's direction vector and the coordinate axis.
[0057] 4. Allocation and Execution:
[0058] like Figure 3 As shown, both Part 6 and Part 9 have negative displacement in the Y direction. According to the calculation in step three, the displacement of Part 6 will cause Part 4 to shorten, while the displacement of Part 9 will cause Part 7 to lengthen. The displacements of the two end parts are absorbed by the part parameters on the branch of the structure diagram, and will not cause changes in the parameters of the main parts 1, 2, and 3. When the displacements of Parts 6 and 9 are exactly the same, it may cause the parameters of the main parts to be modified, thus satisfying the principle of minimum modification.
[0059] When the geometric parameters of part 4 are modified, the rotational displacement matrix of its child node part 5 needs to be modified. The spatial representation is that part 5 as a whole has the same displacement as part 6, and the same applies to part 8.
[0060] like Figure 4 Figure 1 shows an example implementation of how different parameters increase or decrease depending on the structure orientation and response relationship when the end part moves in the Y direction.
[0061] When the user modifies the position of the end part, the system can automatically limit the scope of influence to avoid irrelevant parts from being modified. The system can intelligently judge the matching relationship between the direction of parameter increase and decrease and the direction of displacement, and automatically deduce whether the parameter should be "increased" or "decreased". It does not require complex simulation and supports multiple parameters in complex structures to jointly absorb displacement in one direction. It has good robustness and scalability, simple algorithm design, low computational overhead, and is easy to integrate into lightweight CAD plug-ins or script systems.
[0062] The working principle and usage process of the present invention: After the present invention is installed, when there are multiple end parts in the structure, it can automatically identify and lock the structural path associated with the current moving end, and only adjust the parameters of the relevant parts on the path to avoid interference with irrelevant branches. The end displacement is decomposed into three main direction components, and the priority is sorted according to the spatial distance between each adjustable parameter and the end part to achieve direction-aware parameter control and minimum impact adjustment. The relative geometric position between the parts is used, and the projection judgment method is used to determine whether the increase or decrease of the parameters can absorb the displacement in the specified direction.
[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for adaptively adjusting parameters to maintain a mechanical structure connection relationship, characterized by: The following steps are included: S1. Structural connectivity identification: (1) Model the assembly structure as a directed acyclic graph; (2) When the end part moves, the system identifies the unique path from the base to the end and the bifurcation node; (3) Divide the adjustable parts corresponding to each terminal part into branch parts and nodes on the main path, excluding branch parts associated with other terminals; (4) Traverse all parts in the path and classify them into Px, Py, and Pz according to their parameter influence directions; S2. Displacement decomposition and parameter priority sorting: (1) Split the end displacement vector ΔT into three main directions: Δx, Δy, and Δz; (2) Parameter classification results; (3) For each parameter set in each direction, the adjustment priority queue is constructed based on the geometric distance between the end parts. In addition to the distance priority, there is also a minimum modification principle. When multiple end parts have the same displacement at the same time, the displacement can be absorbed by modifying the parameters of the main parts. S3. Response direction judgment based on relative position: (1) Calculate the direction vector between the center point of the part where the control parameter is located and the center point of the adjacent part (2) Judgment vector The sign of the angle with the corresponding component of the end part displacement vector (taking Δx as an example); (3) If the vector Δx and the vector In the same direction, a positive Δx corresponds to an increasing parameter, and a negative Δx corresponds to a decreasing parameter; S4. Allocation and Execution: (1) Each direction (x / y / z) is processed separately, and the parameters are assigned according to the priority to bear the displacement; (2) If the higher priority parameter cannot absorb all the displacement, the margin is automatically transferred to the next parameter; (3) After the parameters are modified, the rotation displacement matrix of all child nodes of the part node whose parameters have been modified needs to be modified along the direction of the structure tree.
2. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In the above-mentioned S1, the parts are divided into main path parts, branch parts, and irrelevant branch parts.
3. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S1, the modifiable parameters of each part are classified according to the coordinate axis directions X, Y and Z.
4. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S1, the nodes of the directed graph are parts, and the edges are assembly relationships.
5. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S2, there is a total displacement, and the parts on the main path are adjusted first.
6. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S2, for non-shared displacement, the parts on the corresponding branch are adjusted first.
7. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S3, the response direction of each parameter is calculated.
8. The method for adaptively adjusting parameters for maintaining a mechanical structure connection relationship according to claim 1, wherein: In S4, after the adjustment is finally completed, the integrity and assembly consistency of the structure are checked.