An efficient CAD model modification method with automatic perception of design intent
Through semi-space theory and surface layout matrix technology, the design intention of CAD model is automatically perceived and maintained, and the problem of difficult design intention maintenance in direct modeling technology is solved, and the efficiency and user experience of CAD model modification are improved.
Patent Information
- Application Number
- CN202011530235.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2040-12-22
AI Technical Summary
Existing direct modeling technologies are difficult to effectively maintain the design intention of the CAD model, resulting in the complex and inefficient model modification process, and rely on users' knowledge reserves and interactions, affecting the user experience and the accuracy of modification results.
Semi-space theory is used to automatically extract the two-level surface layout information of the CAD model, quantify the design intention through the surface layout matrix, and automatically adaptively maintain the design intention in the direct modeling operation of users, reduce user interaction and improve modification efficiency.
It realizes automatic perception and efficient maintenance of CAD model design intentions, reduces the workload and complexity of user interaction, improves the user experience and modification efficiency of direct modeling technology, and supports the efficiency and effect of product innovative design.
Smart Images

Figure CN112580120B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of product digital design, and in particular relates to a method for efficiently modifying a CAD model with automatic perception of design intent. Background Art
[0002] Case-based design is an effective method for rapid innovative product design. However, there is little work on how to efficiently modify the CAD models to be reused to meet new needs, which seriously restricts the implementation effect and efficiency of the above innovative design methods. The above situation is particularly severe for mainstream CAD models obtained from public channels - they usually only have boundary representation information and cannot be efficiently modified using parameter-driven mechanisms. The rapid development of direct modeling technology (also known as synchronous modeling technology) in recent years is expected to solve the above problems. This technology directly targets the boundary representation information of the CAD model, and mainly realizes model modification by user interactive selection and operation (moving, rotating or changing the radius) of one or a group of faces in the model. This intuitive model modification method further improves the reusability of CAD models and has gradually become an indispensable part of mainstream 3D CAD systems.
[0003] Nevertheless, the existing direct modeling technology is not mature enough and it is difficult to replace the traditional parametric modeling technology. How to maintain the design intent of the model during the modification of the CAD model is a key issue that needs to be solved for the further development of this technology. The design intent of the CAD model is mainly reflected in the geometric shape, such as the functions it has (such as what kind of mechanism movement is transmitted), the design requirements it meets (such as the hole position is centered and symmetrical) and the processing requirements (such as the array feature spacing meets the drilling processing requirements). In case-based product design, in order to improve efficiency and ensure quality, it is necessary to retrieve the CAD model whose design intent is consistent with the current requirements as much as possible (function, design or processing) for modification. Therefore, the geometric modification of the model is often based on the maintenance of the original design intent. It is adaptive modification, such as changing the geometric dimensions of the entire or local area of the model, adjusting the position or orientation of the local area, the shape of the array feature or the distribution distance, etc. - it is necessary to simultaneously adjust the relative position or relative orientation of one or more faces (not necessarily adjacent) involved in the relevant modification in the CAD model. To achieve the above modification to maintain the design intent, for parametric models, users only need to change a small number of parameters (the model will be automatically rebuilt based on parameter constraints). However, using existing direct modeling technology to complete the above modification requires users to interactively select and operate one or more corresponding faces. For models with a certain degree of complexity, modifying the model by direct modeling is not only labor-intensive and tedious, but also the effectiveness of the modification results depends on the user's own knowledge reserves and understanding of the model design intent.
[0004] In order to improve the above situation, in recent years, some direct modeling research works based on boundary representation to maintain design intent have emerged, such as the method of maintaining design features to carry out direct modeling. This type of work first identifies some design features in the model (symmetry features, array features, fillet features, thin-wall features, etc.) before modifying the CAD model. After that, in the process of manually modifying the model interactively, the design algorithm maintains the above-mentioned identification features, or maintains the feature tree established based on the dependency relationship between features. Considering that the content of design features is highly subjective and flexible, and lacks standards, the accuracy of feature recognition directly affects the correctness of CAD model modification. At the same time, most design features often require a large amount of manual and careful interactive selection to confirm, which undoubtedly increases the user's workload and operation threshold, and also affects the convenience and user experience of direct modeling. Summary of the invention
[0005] In order to overcome the shortcomings of existing direct modeling technology and related research, for any CAD model to be reused (the underlying mainstream boundary representation structure), based on the half-space theory, the present invention proposes an efficient CAD model modification method with automatic perception of design intent. For any given CAD model, the present invention can automatically identify and quantify the design intent of the CAD model, and in the process of users modifying the CAD model using direct modeling operations, it can not only automatically and adaptively maintain the design intent of the model, but also make full use of the design intent to automatically and adaptively transmit the modification operation on one or more faces of the model, greatly reducing the workload and complexity of the user's interactive operations, and improving the user experience of adaptive reuse of CAD models using direct modeling technology.
[0006] The technical solution adopted by the present invention to solve the technical problem comprises the following steps:
[0007] Step (1) Automatically extract the two-level surface layout that reflects the design intent in the CAD model
[0008] According to the half-space theory, the geometric shape of the CAD model is formed by the layout and intersection of all the faces constituting the model in space. Therefore, the design intent in the model shape is actually reflected through the (relative) layout between all the faces in the model. The present invention names the above information as a two-level surface layout - the layout information between the faces without considering the regularity and the layout information between the faces with the regularity. The regular surface layout in the present invention specifically refers to the coplanar layout, the coaxial layout and the symmetrical layout (including the linear array layout, the annular array layout and the mirror layout). The specific extraction process of the above layout information is as follows:
[0009] 1-1. First layer: Automatically extract layout information without considering regularity between faces
[0010] Each face is compared with the rest of the faces in the CAD model in a parallel way: whether the face type is the same, whether the geometric equation is the same, and whether the boundary can be overlapped is quickly determined by a coarse-to-fine optimization method. At the same time, in this process, the relative position and orientation between faces are calculated.
[0011] 1-2. Second layer: Automatically extract regular layout information between faces
[0012] In the process of extracting layout information on the first level, all coplanar face groups, coaxial face groups, and face groups with overlapping boundaries are determined. For each group of faces with overlapping boundaries, the largest face group with symmetrical layout within the group of faces is determined based on the translation, rotation, or mirror transformation between them, that is, a linear array layout face group, a circular array layout face group, or a mirror layout face group. At the same time, for each group of faces with symmetrical layout, based on the center position of the OBB encirclement, it is determined whether it is centered on the face that has common edges with all the faces in the group.
[0013] Step (2) quantitatively describing the two-level surface layout in the CAD model based on the surface layout matrix
[0014] In order to be able to formally describe the design intent in each CAD model, and to automatically maintain the model design intent during the user's direct modeling process, the present invention proposes a face layout matrix to describe the double-level face layout of the model - NxN dimension, where N represents the number of faces of the input CAD model, and any [i, j]∈NxN represents a double-level face layout from face i to face j, with structured content as shown in Table 1 below. The present invention proposes a unified mapping mechanism (see specific implementation steps) to uniformly convert the above structured content into a 21-dimensional vector so that the design layout information can be quantified and efficiently maintained.
[0015] Table 1 Structured content form of each element in the layout matrix
[0016] Relative Position Relative orientation Coplanar Coaxial Symmetric transformation matrix Center on public surface
[0017] Each model corresponds to a surface layout matrix, which is established in the process of extracting the double-level surface layout of the model and is quickly and dynamically updated with the direct modeling process to adapt to the update of the design intent in the CAD model.
[0018] Step (3) Maintain the design intent of the CAD model efficiently and adaptively based on the surface layout matrix
[0019] When the user uses direct modeling operations to modify the CAD model (by moving, rotating or changing the radius of the selected face), the present invention automatically transfers the above modification adaptability to the remaining faces that have a layout rule with the current operation face according to the information recorded in the face layout matrix, and maintains the center position of each symmetrical layout face group on its common face. In this process, the content of the face layout matrix corresponding to the model is locally updated to match the design intent of the modified model. This not only maintains the design intent of the model, but also reduces the workload and operation threshold of the user, and accelerates the efficiency and effect of CAD model modification.
[0020] Considering that the user may want to modify the design intent of the model itself; the modification scale of the automatic maintenance of the design intent may exceed the range supported by the corresponding local area of the model, etc., which will cause the topological structure of the model to be changed (adding or deleting faces). In this case, if the user accepts the modification, the face layout matrix corresponding to the model needs to be regenerated to maintain the new design intent during subsequent modifications. Otherwise, the corresponding operation is canceled and the model is returned to the modification state after the user's modification operation in the previous step.
[0021] The beneficial effects of the present invention are as follows:
[0022] To address the deficiencies of the prior art, the present invention provides an efficient modification method for CAD models with automatic perception of design intent. The present invention develops a new concept that embodies the design intent of the model, a corresponding quantitative descriptor (formalized structure), and a method for automatically adaptively maintaining the design intent. The present invention does not need to identify the design features in the CAD model in advance to maintain the design intent of the model during the modification process. At the same time, it can make full use of the design intent to reduce the workload and complexity of the user's interactive operations, and improve the user experience of adaptive reuse of CAD models using direct modeling technology. The present invention can be combined with the direct modeling function in mainstream CAD systems, can effectively support the efficiency and effectiveness of case-based product design, and is widely applicable to the fields of product three-dimensional auxiliary design, intelligent manufacturing, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 Schematic diagram of the efficient modification steps of CAD models with automatic perception of design intent;
[0024] Figure 2 Matrix representation of the two-level surface layout of the CAD model and its content analysis;
[0025] Figure 3 , Figure 4 , Figure 5 It is a schematic diagram for modifying direct modeling operations that automatically perceives design intent in CAD models. DETAILED DESCRIPTION
[0026] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0027] like Figure 1 As shown, the efficient modification method of the CAD model with automatic perception of design intent of the present invention comprises the following steps:
[0028] Step (1) Automatically extract the two-level surface layout that reflects the design intent in the CAD model
[0029] 1-1. Automatically extract layout information between faces without considering regularity, including whether the types of faces are consistent, whether the geometric equations are the same, whether they are coaxial, whether the boundaries can overlap, relative positions and relative orientations. Specifically:
[0030] 1-1-1. For the input boundary representation CAD model M, which contains n faces (n≥1), each face F1 in M is compared with the remaining n-1 faces in parallel. The purpose is to find all faces with the same type as F1, all faces with overlapping boundaries, all faces with the same geometric equations, and all faces with overlapping rotation axes in M.
[0031] 1-1-2. In the specific implementation of step 1-1-1, in order to determine the relative position of F1 and any other surface F2, first uniformly sample k (k ≥ 10) points in the F1 surface. Afterwards, if more than 50% of the sampling points and their respective vertical projection points on the geometric equation of the F2 surface form a vector that forms an angle greater than 90° with the surface normal of the corresponding projection point, it means that these sampling points are located on the outside of the F2 surface, and F1 is said to be on the outside of F2; if more than 50% of the points and their respective vertical projection points on the geometric equation of the F2 surface form a vector that forms an angle less than 90° with the surface normal of the corresponding projection point, it means that these sampling points are located on the inside of the F2 surface, and F1 is said to be on the inside of F2; otherwise, F1 and F2 are said to have an overlapping area.
[0032] 1-1-3. In the specific implementation of step 1-1-1, in order to determine the relative orientation of F1 and any other face F2, it is necessary to extract the face orientation vectors of F1 and F2, and determine the relative orientation between F1 and F2 by calculating the angle ∈[0°,180°] between the orientation vectors. Here, the orientation vector of a plane is its face normal, the orientation vector of a rotational surface (such as a cylinder, cone, or torus) is the axial vector of its rotation axis, and the orientation vector of a sphere and other types of faces is the face normal where the center point of its parameter domain is located.
[0033] 1-1-4. In the specific implementation of step 1-1-1, in order to efficiently determine whether the boundaries of any two faces F1 and F2 can overlap, the present invention adopts the following coarse-to-fine optimization method to determine:
[0034] 1-1-4-1. Roughly judge whether the boundaries can overlap - whether the surface types are the same; if they are spheres, cones, cylinders, and torus surfaces, whether the positive directions of the surface geometry equations all point to the inside or outside of the model, and whether the radius or half-angle is the same; whether the number of boundary rings is the same (including the number of inner rings and outer rings); and whether they have the same number of vertices and edges. If the rough judgment meets all the conditions, it means that the boundaries may overlap. Figure 2 In a and b, faces 5 and 11 (both are rectangular planes), and faces 12 and 13 (both are partial cylindrical surfaces with one corner missing).
[0035] 1-1-4-2. Based on the optimization algorithm, determine whether the boundary surface can be overlapped - overlap the centroids of F1 and F2. If they are planes, the surface normals are the same. If they are other quadratic surfaces, the axes overlap. Then, fix F1 and rotate F2 counterclockwise (the plane rotates around the normal where the centroid is located; the other surfaces rotate around the axis). Use the particle swarm optimization algorithm to calculate the minimum rotation angle θ of formula (1).
[0036]
[0037] When minf(F1,F2) takes the value of 0, it means that the two faces can be overlapped by translation and rotation. If this result is obtained after the F2 boundary is transformed, it means that the two faces can be overlapped by translation, mirror transformation, and rotation. Figure 2 In a and b, the boundaries of surfaces 12 and 13 are mirror images that can overlap, and the boundaries of surfaces 20, 22, 24 and 26 can be overlapped by translation.
[0038] Herev i (F1) and e j (F1) represents the i-th vertex and j-th edge of F1. Ref(F2) represents the mirror transformation of any plane along the boundary of F2 passing through its centroid. This operation occurs randomly during the optimization calculation process. θ (Ref(F2)) means to rotate F2 (or its mirror image) counterclockwise by θ. i (F1)-v i (R θ (Ref(F2)))) represents the distance between the i-th vertex of F1 and the nearest vertex on F2 (or its mirror image) after rotating counterclockwise by θ. i (F1)-e i (R θ (Ref(F2)))) represents the angle between the i-th side of F1 and the side of F2 (or its mirror image) that is closest to its upper side center point after being rotated counterclockwise by θ.
[0039] 1-2. Automatically extract regular layout information between surfaces, including coplanar layout, coaxial layout, symmetrical layout and centering information. Specifically:
[0040] 1-2-1. After the first level layout information is extracted, for each group of faces with the same face type and face geometry equation, a coplanar layout is established between the faces in the group, such as Figure 2 Surfaces 7, 8, 9 and 10 in part a are the four top surfaces on the four cylindrical bosses, and there is a coplanar layout between them; for each group of surfaces with the same surface type and coincident rotation axis, a coaxial layout is established between the surfaces in the group, such as Figure 2 Surfaces 3, 18 and 19 of part b are arranged coaxially.
[0041] 1-2-2. Based on the information such as the translation vector, rotation angle and mirror image calculated by formula (1), for each group of faces FG of the same type and whose boundaries can overlap, and the output of the specific implementation step 1-1-1, the following method is used to cluster FG into one or more groups of faces with symmetrical layouts:
[0042] 1-2-2-1. In FG, starting from one of its faces F1, using the same translation transformation matrix (which records the movement vector) and transforming it with a positive integer exponent, all faces whose boundaries can overlap, together with F1, constitute the linear array layout face under the translation transformation (the number is not less than 3). Figure 2 The surfaces 14, 15 and 16 of the middle portion b constitute a set of linear array layout surfaces.
[0043] 1-2-2-2. In FG, starting from one of its faces F1, using the same composite transformation matrix (which records the rotation axis and rotation angle) for positive integer exponential transformations, all faces whose boundaries can overlap, together with F1, form the annular array layout faces under the composite transformation (the number is not less than 3). Figure 2 The surfaces 20, 22, 24 and 26 of the middle portion b form a set of annular array surfaces.
[0044] 1-2-2-3. In FG, starting from one of its faces F1, a compound transformation matrix (translation or rotation, there must be a mirror image) is used. The faces whose boundaries can coincide with it, together with F1, constitute the mirror layout faces under the compound transformation (each group consists of 2 faces). Figure 2 The surfaces 12 and 13 in the middle part and the part b form a set of mirrored layout surfaces.
[0045] 1-2-3. For any group of faces with symmetrical layout, the present invention first finds the face that has common edges with these faces, called the common face (usually a plane). Then, the position relationship between the projection point P1' of the center P1 of the OBB bounding box of this group of faces on the common face and the OBB bounding box of the common face (the thickness of the OBB of the plane is ignored) is calculated to determine the layout position of the group of faces on the common face:
[0046] 1-2-3-1. If P1' falls on the line segment connecting the midpoints of the two short sides of the common surface bounding box (the distance is less than the given threshold 0.001), the group of faces is placed in the center of the common surface according to the short side.
[0047] 1-2-3-2. If P1' falls near the line segment connecting the midpoints of the two long sides of the common surface bounding box (the distance is less than the given threshold 0.001), the group of faces is placed in the center of the common surface according to the long side. Figure 2 In part b, faces 20, 22, 24 and 26 form a circular array layout face group, which are centered on face 6 along the directions perpendicular to faces 31 and 32.
[0048] 1-2-3-3. If P1' meets the requirements of both specific implementation steps 1-2-3-1 and 1-2-3-1, the group of faces is placed in the center of the common face. Figure 2 In part b, the linear array surface formed by surfaces 14, 15 and 16 has a projection of the center of their bounding boxes on surface 30 that coincides with the center of the bounding box of surface 30, that is, this group of surfaces is centered on surface 30 in all directions.
[0049] Step (2) quantitatively describing the two-level surface layout in the CAD model based on the surface layout matrix
[0050] The surface layout matrix proposed in the present invention is an NxN dimensional matrix, where N represents the number of surfaces of the input model, and the data at any [i, j] position in the surface layout matrix represents the double-level surface layout from surface i to surface j. In order to make the structured form shown in Table 1 easy to calculate, Figure 2 As shown in part c of , the present invention uniformly maps it into a 21-dimensional row vector, and the mapping steps are as follows:
[0051] 2-1. The first dimension in Table 1, i.e. Figure 2 I1 in part c of corresponds to the specific implementation step 1-1-2 to calculate the relative position between the faces. If it is on the outside, it takes -1, if it is on the inside, it takes 1, and if there is overlap, it takes 0. Figure 2 As shown in part b of , all sampling points of surface 1 fall on the inner side of surface 2, so the position of surface 1 relative to surface 2 is on the inner side.
[0052] 2-2. The second dimension in Table 1, i.e. Figure 2I2 in part c of corresponds to the relative orientation between the surfaces obtained by implementing step 1-1-3. Figure 2 As shown in part b of , the axial direction of surface 1 and the normal direction of surface 2 are in the same direction, so the relative direction between them is 0°.
[0053] 2-3. The third dimension in Table 1, i.e. Figure 2 I3 in part c of corresponds to the judgment of whether the coplanarity is determined in the specific implementation step 1-2-1. If the coplanarity is 1, otherwise it is 0. Figure 2 As shown in part b of , faces 1 and 2 have different geometric equations, so their values in this dimension are 0, while faces 3 and 19 have the same geometric equation, so their values in this dimension are 1.
[0054] 2-4. The fourth dimension in Table 1, i.e. Figure 2 I4 in part c of corresponds to the judgment of whether the coaxial is implemented in step 1-2-1. If it is coaxial, it takes 1, otherwise it takes 0. Figure 2 As shown in part b of , faces 1 and 2 have a value of 1 in this dimension.
[0055] 2-5. Dimensions 5-20 in Table 1, i.e. Figure 2 Part C of I5-I 20 , corresponding to the output of the specific implementation steps 1-1-4 and 1-2-2, determine the change matrix between the faces with symmetrical layouts - the linear array layout corresponds to the translation matrix, the circular array layout corresponds to the composite matrix, and the mirror layout corresponds to the composite matrix. In particular, if the two faces are not in a symmetrical layout, the corresponding change matrices are 0 matrices. Figure 2 As shown in part b of FIG, there is no symmetrical layout between faces 1 and 2, so Figure 2 Part c, d 12 and d 21 is a 16-dimensional 0 vector (corresponding to a 4x4 0 matrix expanded row by row).
[0056] 2-6. The 21st dimension in Table 1, i.e. Figure 2 Part C of I 21 , corresponding to the output of the specific implementation step 1-2-3, determine the position of the face group FG with a symmetrical layout where face i is located on the common face j. If FG meets the requirements of the specific implementation step 1-2-3-1 relative to face j, the value of face i relative to face j in this dimension is 1; if FG meets the requirements of the specific implementation step 1-2-3-2 relative to face j, the value of face i relative to face j in this dimension is 2; if FG meets the requirements of the specific implementation step 1-2-3-3 relative to face j, the value of face i relative to face j in this dimension is 3. If FG does not meet the above conditions relative to face j, or if face i does not belong to a symmetrically arranged face group, the value of i relative to j in this dimension is 0. If Figure 2As shown in part b of , the linear array surface formed by surfaces 14, 15 and 16 is centered on surface 30 in all directions, so their respective values relative to surface 30 in this dimension are 3.
[0057] In particular, the layout of each face relative to itself is not considered - the corresponding position in the face layout matrix is taken as "-". The face layout matrix of each model is established during the implementation of step (1) and is quickly and dynamically updated during the direct modeling process, such as the relative position and relative orientation between faces, and the addition or deletion of certain faces, to adapt to the update of the design intent in the CAD model.
[0058] Step (3) Maintain the design intent of the CAD model efficiently and adaptively based on the surface layout matrix
[0059] Users often use a series of direct modeling operations to gradually modify the CAD model to be reused. In this process, each modification operation includes first selecting one or more faces to be operated, and then performing translation, rotation or radius change operations on them. The present invention automatically detects each of the above modification operations of the user and synchronously transfers the adaptive modification operations to one or more faces of the model to adaptively maintain the design intent of the model while accelerating the model modification. Specifically:
[0060] 3-1. If the current modification operation is to move or rotate, for each currently selected face F1 to be operated, first read the row vector of F1 from the face layout matrix to find all faces FG that have a layout regularity with F1, and then perform the following operations according to different situations:
[0061] 3-1-1. If FG is empty, only operate F1 to modify the model. Figure 3 In part a of the figure, the user now needs to move face 4 along the direction of arrow L1 to stretch the cylindrical boss. Since face 4 does not have a layout pattern with the rest of the faces in the model, the above operation only moves face 4 to modify model M.
[0062] 3-1-2. If FG is not empty, perform automatic operations on all faces in FG according to the layout rule type. Specifically:
[0063] 3-1-2-1. For all faces in FG that are coaxial or coplanar with F1, they will automatically synchronize with F1 to accept the user's modification operations. Figure 3 In part b, the user moves the surface 3 along the L2 direction, and the present invention automatically performs the same movement on the surfaces 18 and 19 coaxial and coplanar with the surface 3 along the L2 direction.
[0064] 3-1-2-2. For all faces in FG that have a linear array layout with F1, when the user rotates F1, all faces in the array rotate synchronously with F1 along the same axis. When the user moves F1 along a certain direction L, the present invention stipulates that: if F1 is a face at both ends of the array, it means that the spacing between all faces in the array is modified along the L direction - if L is toward the outside of the array, the spacing becomes larger, otherwise it becomes smaller; if F1 is a face in the middle of the array, the default is to reduce the spacing between all faces in the array.
[0065] like Figure 3 In part c of , if F1 is face 14 and moves along the L3 direction (towards other faces in the array), face 15 closest to face 14 does not move, and face 16 moves the same distance in the opposite direction. If F1 is face 15 and moves along the L3 direction, face 16 closest to face 15 does not move, and face 14 moves along the L3 direction, so that the three maintain the same spacing distance, as shown in the figure below. Figure 4 As shown in part a of FIG.
[0066] 3-1-2-3. For all faces CFG in FG that have a ring array layout or a mirror layout with F1, the present invention applies the transformation matrix from F1 to other faces in CFG recorded in the face layout matrix to the translation direction or rotation axis borne by F1, thereby obtaining the translation direction or rotation axis corresponding to each face in CFG. Thus, when F1 is operated, the remaining faces in CGF perform synchronous translation or rotation along their respective translation directions or rotation axes.
[0067] like Figure 4 As shown in part b of the figure, the user moves surface 21 along the L4 direction. For surfaces 23, 25 and 27 in the same annular array layout as surface 21, the composite transformation matrix from surface 21 to 23, 25 and 27 is extracted from the surface layout matrix units [21,23], [21,25] and [21,27], respectively, and multiplied by L4 (using homogeneous representation, i.e., 4-dimensional vector), respectively, to obtain the moving directions L5, L6 and L7 of surfaces 23, 25 and 27, respectively. The moving amount is the same as that of surface 21, and is applied to surfaces 23, 25 and 27 respectively. In this process, surfaces 20, 22, 24 and 26 are also moved synchronously because they are coaxially arranged with surfaces 21, 23, 25 and 27, respectively.
[0068] Similarly, if Figure 4 As shown in part c of , the user moves face 12 along the L8 direction, and faces 13, 58, and 59 are symmetrical to face 12 in different mirror transformations. By obtaining the corresponding transformation matrix from the face layout matrix, it is found that faces 12 and 58 are moved along the L8 direction, while faces 13 and 59 are moved along L9, which is opposite to the L8 direction, and the movement amount of all faces is the same.
[0069] 3-2. If the current modification operation is to change the radius of the selected face (for a cylindrical face), for each currently selected face F1 to be operated, first read the row vector of F1 from the face layout matrix to find all faces FG that have a layout regularity with F1, and then perform the following operations according to different situations:
[0070] 3-2-1. If FG is empty, directly modify the radius of F1 to implement the current modification of the model.
[0071] 3-2-2. If FG is not empty, perform synchronization operations on all faces in FG according to the layout rule type. Specifically: for all faces that are coplanar with F1 and all faces that are symmetrically arranged, modify their radii by the same value, such as Figure 5 As shown in a, the user increases the radius of surface 14, and the other two surfaces 15 and 16 in the linear array layout are automatically modified to the same radius as surface 14; for all surfaces (with different radii) that are coaxially arranged with F1, the radius adjustment is maintained with equal radius difference, as shown in Figure 5 As shown in b, the user reduces the radius of face 3, and faces 18 and 19 are automatically reduced by the same radius value to maintain the radius difference between them.
[0072] 3-3. In the specific implementation of step 3-1 or 3-2, the present invention automatically detects whether the centering of each symmetrical layout face group on their respective common faces has been modified before and after the model is changed based on the face layout matrix. If there is a modified face group, first, if the common face has been rotated or translated, the above transformation of the common face is applied to each face in this group of faces. Secondly, if the shape of the common face itself has changed, causing the above situation to occur, the vector between the centers of the bounding boxes of the common face before and after the shape transformation is used as the translation vector, and is applied to each face in the group of faces; otherwise, the opposite vector of the vector between the centers of the bounding boxes of the group of faces before and after the change is used as the translation vector, and is applied to each face in the group of faces. Figure 5 As shown in c, when something like Figure 4 After the linear array shown in a is no longer centered on surface 30, the above method is used to automatically adjust the entire array surface with modified spacing back to the center position, that is, the rotation axis of surface 15 passes through the geometric center point of surface 30.
[0073] 3-4. In the specific implementation steps 3-1, 3-2 or 3-3, if the original topological structure of the model is not changed, the user is assumed to accept the current model modification result, such as Figure 1 As shown, the present invention automatically updates the local content of each unit in the surface layout matrix: relative position, relative orientation and symmetric transformation matrix.
[0074] 3-5. In the specific implementation of step 3-1 or 3-2 or 3-3, if the original topological structure of the model is changed, the user is asked whether to accept the modification. If the user chooses to accept, the current modification operation is completed and the surface layout matrix corresponding to the new model is recalculated (such as Figure 1 If the user refuses, all previous operations (the user's current operation and the operation automatically completed by the present invention caused by the operation) are rolled back, the surface layout matrix is not updated, and the user's new modification operation is waited for instead.
[0075] According to the above specific implementation steps 3-1, 3-2, 3-3, 3-4 and 3-5, the modification operation transmission of the user's each modification operation is automatically implemented to adaptively maintain the model design intent, thereby accelerating the modification of the CAD model. Figure 1 As shown, the modified CAD model is finally output according to the user's end instruction.
[0076] Although the present invention has been described through specific embodiments, those skilled in the art will appreciate that there are many modifications and variations of the present invention without departing from the spirit of the present invention. It is intended that the appended claims include these modifications and variations without departing from the spirit of the present invention.
Claims
1. A CAD model modification method with automatic perception of design intent, characterized in that: The specific steps include: Step (1) automatically extracting a two-level surface layout that reflects the design intent in the CAD model; Step (2) quantitatively describing the dual-level surface layout in the CAD model based on the surface layout matrix; Step (3) maintaining the design intent of the CAD model based on the surface layout matrix adaptability; Step (1) is specifically implemented as follows: 1-1. Automatically extract layout information without considering regularity between faces Each face is compared with the rest of the faces in the CAD model in parallel, and the layout information between faces without considering the rules is automatically extracted, including whether the faces are of the same type, whether the geometric equations are the same, whether they are coaxial, whether the boundaries can overlap, relative positions and relative orientations; 1-2. Automatically extract regular layout information between faces Regular layout information includes coplanar layout, coaxial layout, symmetrical layout and centering information; in the process of extracting the layout information at the first level, all coplanar face groups, coaxial face groups and face groups with overlapping boundaries are determined; for each group of faces with overlapping boundaries, the largest face group with symmetrical layout within the group of faces is determined based on the translation, rotation or mirror transformation between them, that is, the linear array layout face group, the annular array layout face group or the mirror layout face group; at the same time, for each group of faces with symmetrical layout, based on the OBB enclosing center position, it is determined whether it is centered on the face that has common edges with all the faces in the group; Step 1-1 is implemented as follows: 1-1-1. For the input boundary represented as a CAD model M, which contains n faces, each face F1 in the CAD model M is compared with the other n-1 faces in a parallel manner, with the aim of finding all faces in M that have the same type as the face F1, all faces whose boundaries can overlap, all faces with the same geometric equations, and all faces whose rotation axes overlap; 1-1-2. In the process of implementing step 1-1-1, in order to determine the relative position of F1 and any other surface F2, first uniformly sample k points in the surface F1, k ≥ 10; then if more than 50% of the sampling points, the vectors formed by connecting their respective vertical projection points on the geometric equation of the surface F2, respectively have an angle of > 90° with the surface normal of the corresponding projection point of the surface F2, then it means that these sampling points are located on the outside of the surface F2, and F1 is said to be on the outside of F2; if more than 50% of the points, the vectors formed by connecting their respective vertical projection points on the geometric equation of the surface F2, respectively have an angle of < 90° with the normal of the corresponding projection point, then it means that these sampling points are located on the inside of the surface F2, and F1 is said to be on the inside of F2; otherwise, F1 and F2 are said to have an overlapping area; 1-1-3. In the process of implementing step 1-1-1, in order to determine the relative orientation of F1 and any other face F2, it is necessary to extract the face orientation vectors of F1 and F2, and determine the relative orientation between F1 and F2 by calculating the angle ∈[0°,180°] between the orientation vectors; here, the orientation vector of a plane is its face normal, the orientation vector of a rotational surface is the axial vector of its rotation axis, and the orientation vector of a spherical surface and other types of surfaces is the face normal where its center point is located; During the implementation of step 1-1-1, in order to efficiently determine whether the boundaries of any two faces F1 and F2 can overlap, the following coarse-to-fine optimization method is used to determine: 1-1-4-1. Roughly judge whether the boundaries can overlap - whether the surface types are the same; if they are spheres, cones, cylinders and torus, whether the positive directions of the surface geometric equations all point to the inside or outside of the model, and whether the radius or half-angle is the same; whether the number of boundary rings is the same, where the number of boundary rings includes the number of inner rings and outer rings; have the same number of vertices and edges; if the rough judgment meets all the conditions, it means that the boundaries may overlap; 1-1-4-2. Based on the optimization algorithm, determine whether the boundary surfaces overlap, and make the centroids of F1 and F2 coincide. If F1 and F2 are planes, the surface normals are the same. If they are other quadratic surfaces, the axes coincide. Specifically: fix F1, rotate F2 counterclockwise, that is, the plane rotates around the normal where the centroid is located, and the remaining surfaces rotate around the axis. Use the particle swarm optimization algorithm to calculate the minimum rotation angle θ of formula (1); When minf(F1,F2) takes the value of 0, it means that the two faces can be overlapped through translation and rotation of the boundary. If this result is obtained after the F2 boundary is transformed, it means that the two faces can be overlapped through translation, mirror transformation, and rotation of the boundary. Herev i (F1) and e j (F1) represents the i-th vertex and j-th edge of F1; Ref(F2) represents the mirror transformation of any plane across the boundary of F2 passing through its centroid. This operation occurs randomly during the optimization calculation process; R θ (Ref(F2)) means that the opposite side F2 or the mirror image of F2 is rotated counterclockwise by θ; D(v i (F1)-v i (R θ (Ref(F2)))) represents the distance between the i-th vertex of F1 and the nearest vertex on F2 or its mirror image after rotating counterclockwise by θ; I(e i (F1)-e i (R θ (Ref(F2)))) represents the angle between the ith side of F1 and the side of F2 or its mirror image rotated counterclockwise by θ that is closest to its upper side center point; Steps 1-2 are implemented as follows: 1-2-1. After the first-level layout information is extracted, for each group of faces with the same face type and face geometry equation, a coplanar layout is established between the faces in the group; for each group of faces with the same face type and coincident rotation axis, a coaxial layout is established between the faces in the group; 1-2-2. According to the calculation results of formula (1), for each group of faces FG of the same type and whose boundaries can overlap, and the output of step 1-1-1, the following method is used to cluster FG into one or more groups of faces with symmetrical layouts: 1-2-2-1. In FG, starting from a certain face F1, the same translation transformation matrix is used to transform the faces with positive integer exponents, and all faces whose boundaries can overlap with F1 together constitute the linear array layout face under the translation transformation; the translation transformation matrix records the movement vector; the number of the linear array layout faces is not less than 3; 1-2-2-2. In FG, starting from a certain face F1, the same composite transformation matrix is used to transform the faces with positive integer exponents, and all faces whose boundaries can overlap, together with F1, form a circular array layout face under the composite transformation; the composite transformation matrix records the rotation axis and rotation angle; the number of the circular array layout faces is not less than 3; 1-2-2-3. In FG, starting from its face F1, a composite transformation matrix I is used, and the faces whose boundaries can coincide with it, together with F1, constitute the mirror layout face under the composite transformation; the composite transformation matrix I includes translation or rotation, and must have a mirror image; each group of the mirror layout faces consists of 2 faces; 1-2-3. For any face group with symmetrical layout, first find the face that has common edges with these faces, called the common face; then calculate the position relationship between the projection point P1' of the OBB bounding box center P1 of this group of faces on the common face and the OBB bounding box of the common face, and determine the layout position of the reorganized face on the common face: 1-2-3-1. If P1' falls on the line segment connecting the midpoints of the two short sides of the common surface bounding box, the group of faces is placed in the center of the common surface according to the short side; 1-2-3-2. If P1' falls near the line segment connecting the midpoints of the two long sides of the common surface bounding box, the group of faces is placed in the center of the common surface according to the long side; 1-2-3-3. If P1' satisfies the requirements of both steps 1-2-3-1 and 1-2-3-1, the group of faces is centered in the common face; Step (2) is specifically implemented as follows: A face layout matrix is used to describe the two-level face layout of the model - NxN dimension, where N represents the number of faces of the input CAD model, and any [i, j]∈NxN represents a two-level face layout from face i to face j, with structured content including: relative position, relative orientation, coplanarity, coaxiality, symmetric transformation matrix and centering on common faces; The matrix is uniformly mapped into a 21-dimensional row vector. The mapping steps are as follows: 2-1. The first dimension in the structured content corresponds to step 1-1-2 to calculate the relative position between the faces. If it is outside, it takes -1, if it is inside, it takes 1, and if there is overlap, it takes 0; 2-2. The second dimension in the structured content corresponds to the relative orientation between the faces obtained in step 1-1-3; 2-3. The third dimension in the structured content corresponds to the judgment of whether they are coplanar in step 1-2-1, and takes 1 if they are coplanar, otherwise takes 0; 2-4. The fourth dimension in the structured content corresponds to the judgment of whether they are coaxial in step 1-2-1. If they are coaxial, the value is 1, otherwise it is 0; 2-5. The 5th to 20th dimensions in the structured content correspond to the outputs of steps 1-1-4-1, 1-1-4-2 and 1-2-2, and determine the change matrices between the faces with symmetrical layouts - the linear array layout corresponds to the translation matrix, the circular array layout corresponds to the composite matrix, and the mirror layout corresponds to the composite matrix; if the two faces are not in a symmetrical layout, the corresponding change matrices are 0 matrices; 2-6. The 21st dimension in the structured content corresponds to the output of step 1-2-3, and determines the position of the face group FG with a symmetrical layout where face i is located on the common face j; if FG meets the requirements of step 1-2-3-1 relative to face j, the value of face i relative to face j in this dimension is 1; if FG meets the requirements of step 1-2-3-2 relative to face j, the value of face i relative to face j in this dimension is 2; if FG meets the requirements of step 1-2-3-3 relative to face j, the value of face i relative to face j in this dimension is 3; if FG does not meet the above conditions relative to face j, or face i does not belong to a symmetrically arranged face group, the value of i relative to j in this dimension is 0; Step (3) is specifically implemented as follows: 3-1. If the current modification operation is to move or rotate, for each currently selected face F1 to be operated, first read the row vector of F1 from the face layout matrix to find all faces FG that have a layout regularity with F1, and then perform the following operations according to different situations: 3-1-1. If FG is empty, only operate F1 to implement the current modification of the model; 3-1-2. If FG is not empty, perform automatic operations on all faces in FG according to the layout rule type; specifically: 3-1-2-1. For all faces in FG that are coaxial or coplanar with F1, they will automatically synchronize with F1 to accept the user's modification operations; 3-1-2-2. For all faces in FG that have a linear array layout with F1, when the user rotates F1, all faces in the array rotate synchronously with F1 along the same axis at the same time; when the user moves F1 along a certain direction L, it is stipulated that: if F1 is a face at both ends of the array, it means that the spacing between all faces in the array is modified along the L direction - if L is toward the outside of the array, the spacing becomes larger, otherwise it becomes smaller; if F1 is a face in the middle of the array, the default is to reduce the spacing between all faces in the array; 3-1-2-3. For all faces CFG in FG that have a ring array layout or a mirror layout with F1, the transformation matrix from F1 to other faces in CFG recorded in the face layout matrix is applied to the translation direction or rotation axis borne by F1, so as to obtain the translation direction or rotation axis corresponding to each face in CFG; so that when F1 is operated, the other faces in CGF are synchronously translated or rotated along their respective translation directions or rotation axes; 3-2. If the current modification operation is to change the radius of the selected cylindrical surface, for each currently selected surface F1 to be operated, first read the row vector of F1 from the surface layout matrix to find all surfaces FG that have a layout regularity with F1, and then perform the following operations according to different situations: 3-2-1. If FG is empty, directly modify the radius of F1 to implement the current modification of the model; 3-2-2. If FG is not empty, perform synchronization operations on all faces in FG according to the layout rule type, that is, make equal value modifications to the radius of all faces that are coplanar with F1 and all faces that are symmetrical with F1; for all faces with different radii that are coaxial with F1, make radius adjustments with equal radius differences; 3-3. When implementing the modification in step 3-1 or 3-2, automatically detect whether the centering of each symmetrical layout face group on their respective common faces is modified before and after the model is changed based on the face layout matrix; if there is a modified face group, first, if the common face has been rotated or translated, the above transformation of the common face is applied to each face in this group of faces; secondly, if the above situation occurs due to the change in the shape of the common face itself, the vector between the centers of the bounding boxes of the common face before and after the shape transformation is used as the translation vector, which is applied to each face in the group of faces; otherwise, the reverse vector of the vector between the centers of the bounding boxes of the group of faces before and after the change is used as the translation vector, which is applied to each face in the group of faces; 3-4. When implementing step 3-1, 3-2 or 3-3, if the original topological structure of the model is not changed, the user is assumed to accept the current model modification result, and the local content of each unit in the surface layout matrix is automatically updated: relative position, relative orientation and symmetric transformation matrix; 3-5. When implementing steps 3-1, 3-2 or 3-3, if the original topological structure of the model is changed, the user will be asked whether to accept the modification. If the user chooses to accept, the current modification operation is completed and the surface layout matrix corresponding to the new model is recalculated; if the user refuses, all previous operations are rolled back, the surface layout matrix is not updated, and the process waits for the user's new modification operation.
Citation Information
Patent Citations
Intersection processing feature identification and reuse method based on numerical control process analysis
CN109143980A
Three-dimensional CAD model similarity calculation method based on discrete bat algorithm
CN110334108A
Method for identifying surface corresponding relationship between CAD models based on particle swarm optimization algorithm
CN111079208A