A method for deriving maximum part dimensions based on three-dimensional boundary envelopes

CN122947192APending Publication Date: 2026-10-20CHANGCHUN HUACHUANG TIMES TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424427.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于三维边界包络的零件最大外形尺寸导出方法,用于解决现有技术中三维包围方向容易受到零件局部几何变化影响、近似对称零件不同版本之间外形尺寸方向容易发生切换、基于离散点获得的外形极值精度不足以及模型局部修改后需要重复进行整体几何计算的技术问题

Benefits of technology

1、本发明通过从三维CAD实体模型的有效外边界几何面及其边界中提取方向特征,并根据几何面的面积或者直线边长度进行加权聚类,能够降低局部小面、小倒角、短边等局部几何特征对整体包络方向的干扰,使候选包络坐标系更能反映零件主体外形方向;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope, belonging to the field of computer-aided design and three-dimensional geometric model processing technology. The method reads the three-dimensional CAD solid model of the part, determines the set of effective outer boundary geometric surfaces, extracts and clusters the directional features of the geometric surfaces and boundaries, generates candidate envelope coordinate systems, and determines the target envelope coordinate system by combining space occupancy, directional stability, and consistency of supporting geometric surfaces. Based on the original B-Rep geometric surface and the actual trimmed boundary, the method calculates the true geometric support values ​​in six directions, deriving the maximum external dimensions and their correlations. After model modification, only the directions of failed supports are incrementally updated. This method can improve dimensional directional stability, support value accuracy, and update efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design and three-dimensional geometric model processing technology, specifically to a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope. Background Technology

[0002] In the 3D CAD design, process planning, blank selection, and part data management of mechanical parts, it is usually necessary to obtain the maximum external dimensions of the part from the 3D model in order to form basic geometric data such as length, width, and height. Existing methods generally calculate the external dimensions of the part based on the original CAD coordinate system, triangulated mesh, discrete sampling points, or conventional 3D bounding boxes.

[0003] However, in actual mechanical part models, parts often contain a variety of geometric structures such as planes, cylindrical surfaces, conical surfaces, fillet surfaces, and parametric freeform surfaces. If the bounding dimensions are determined solely based on the original CAD coordinate system or discrete point set, they are easily affected by local geometric features such as small faces, small chamfers, short sides, and small bosses, causing changes in the bounding direction. Especially for approximately symmetrical parts, different versions of the model may switch between length, width, or height directions due to adjustments in local features, resulting in the derived external dimensions lacking a stable geometric meaning.

[0004] Furthermore, for complex surfaces such as rounded corners, cylindrical surfaces, and freeform surfaces, using only triangulated vertices or a finite number of sampling points to obtain the extreme values ​​of the shape may not accurately reflect the true boundary positions of the part, leading to errors in the maximum external dimensions. When the part model undergoes local modifications, the existing method usually requires re-traversing and recalculating all geometric boundaries, making it difficult to fully utilize the envelope direction, support positions, and support geometry information already determined before the modification, thus requiring improvement in computational efficiency.

[0005] Therefore, it is necessary to provide a method for deriving the maximum external dimensions of parts based on three-dimensional boundary envelopes, so as to improve the stability of external dimensions, the calculation accuracy of boundary support values ​​of complex curved surfaces, and the efficiency of dimension updates after local model modifications. Summary of the Invention

[0006] The purpose of this invention is to provide a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope, which solves the technical problems in the prior art where the three-dimensional enclosing direction is easily affected by local geometric changes of the part, the external dimension direction of different versions of approximately symmetrical parts is easily switched, the accuracy of the external extreme values ​​obtained based on discrete points is insufficient, and the overall geometric calculation needs to be repeated after local modifications of the model.

[0007] To achieve the above objectives, the present invention provides a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope, comprising the following steps: Read the 3D CAD solid model of the part to be processed, and determine the set of effective outer boundary geometric surfaces that can participate in the outer spatial envelope of the part based on the solid, shell, topological surface and adjacency relationship of the 3D CAD solid model. The directional features are extracted from the geometric surfaces and their boundaries in the set of effective outer boundary geometric surfaces. The directional features are then weighted according to the area of ​​the geometric surface or the length of the straight edge and clustered to obtain the main directional clusters. Candidate envelope coordinate systems are generated based on the main orientation clusters. The approximate support value and space occupancy value of each candidate envelope coordinate system are calculated. Candidate envelope coordinate systems whose space occupancy value is within the space occupancy margin of the minimum space occupancy value are formed into a set of candidates, and the target envelope coordinate system is determined. Candidate geometric surfaces for extreme values ​​are selected in the six support directions of the target envelope coordinate system. The true geometric support value is calculated based on the original B-Rep geometric surface of the candidate geometric surfaces and the actual trimmed boundary. Based on six real geometric support values, determine three maximum external dimensions, save and export the relationship between the maximum external dimensions and the envelope direction, support geometry, and support position; When the 3D CAD solid model is modified, the maximum external dimension is updated according to the changes in the main direction cluster and the associated relationship. While maintaining the target envelope coordinate system, the direction of failure support is determined according to the associated relationship and the changed geometric surface. Only the direction of failure support is recalculated for the actual geometric support value and the maximum external dimension is re-derived.

[0008] Furthermore, determining the set of effective outer boundary geometric surfaces includes: obtaining the solid, shell, topological surfaces and adjacency relationships of the 3D CAD solid model; determining the outer shell based on the oriented volume of the shell or whether the point is inside or outside the shell; and determining the effective outer boundary geometric surfaces as the topological surfaces whose external normal offset points are located outside the solid and do not belong to the completely closed inner cavity shell.

[0009] Furthermore, the directional features include the unit normal of a plane, the axial direction of a cylindrical surface, a conical surface, or a geometric surface with a defined axis of rotation, and the direction of a straight edge with a length not less than a preset proportion of the maximum external dimension of the part in the original CAD coordinate system; the surface direction features are weighted according to the area of ​​the corresponding effective outer boundary geometric surface, and the edge direction features are weighted according to the length of the corresponding straight edge; straight edges with a length less than the preset proportion do not participate in directional clustering.

[0010] Furthermore, the directional clustering includes: treating directional features with opposite directions but consistent axial direction as the same axial direction; dividing directional features into directional clusters based on the undirected included angle between them; updating the representative direction of the directional cluster according to the weight of the directional features within the cluster; selecting two representative directions from the main directional clusters that satisfy the approximate orthogonality condition to generate a candidate envelope coordinate system; and generating a candidate envelope coordinate system using the original CAD coordinate system of the part when there are insufficient effective directions.

[0011] Furthermore, when determining the target envelope coordinate system, positive and negative small-angle directional perturbations are applied to the candidate envelope coordinate systems in the selection set. The directional stability is determined based on the relative changes of the three envelope dimensions before and after the perturbation. The consistency of the support geometry is determined based on the number of changes of the main support geometry corresponding to the six support directions before and after the perturbation. The target envelope coordinate system is selected in order of smaller directional stability and fewer changes.

[0012] Furthermore, when calculating the true geometric support value, for any support direction, extreme candidate geometric surfaces are selected from the set of effective outer boundary geometric surfaces based on the approximate support value and safety margin; within the effective trimming parameter domain of the extreme candidate geometric surfaces, the effective extreme position inside the surface, the effective extreme position of the trimmed boundary, and the projection of the boundary endpoints are compared; for periodic surfaces, candidate extreme points with overlapping geometric positions are treated as the same support position.

[0013] Furthermore, when the difference between the true projection value and the maximum true projection value of multiple extreme candidate geometric surfaces does not exceed the tolerance of the support value calculation, the multiple extreme candidate geometric surfaces are taken as the set of support geometric surfaces in the corresponding support direction; the maximum external dimension of the axis is determined based on the difference between the positive and negative true geometric support values ​​in the same axis.

[0014] Furthermore, the association includes the support direction, the actual geometric support value, the support plane, the topological identifier or topological-geometric feature identifier of the support geometry, and the three-dimensional coordinates or parameter position of the support location; when the topological identifier changes, a topological-geometric feature identifier is formed based on the geometry type, area, geometric center, bottom surface parameters and the topological relationship of adjacent geometry.

[0015] Furthermore, determining the direction of failure includes: matching the effective outer boundary geometry before and after modification based on the updated information output by the CAD modeling environment, or based on the topology identifier or topology-geometric feature identifier; when the original support geometry is deleted, the matching fails, the geometric position changes beyond the preset tolerance, or the newly added or changed geometry breaks through the corresponding support plane, the corresponding support direction is determined to be failure; the support geometry, support position, and actual geometric support value of the non-failed support directions remain unchanged.

[0016] Furthermore, when the 3D CAD solid model is modified, and the effective outer boundary geometric surface of the main direction cluster is deleted, the representative direction of the main direction cluster changes by more than a preset angle, or the newly added effective outer boundary geometric surface or straight edge direction feature forms a new main direction cluster, it is determined that the main direction cluster has changed significantly, and the candidate envelope coordinate system is regenerated, the target envelope coordinate system is determined, and six real geometric support values ​​are calculated.

[0017] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention extracts directional features from the effective outer boundary geometric surfaces and their boundaries of a 3D CAD solid model, and performs weighted clustering based on the area of ​​the geometric surfaces or the length of the straight side. This reduces the interference of local geometric features such as small faces, small chamfers, and short sides on the overall envelope direction, making the candidate envelope coordinate system more reflective of the shape direction of the main body of the part. 2. This invention further compares the directional stability of candidate envelope coordinate systems and the consistency of supporting geometry within the allowable space occupancy margin, avoiding the selection of envelope directions sensitive to local geometric changes due to minor volume differences; for approximately symmetrical parts or different versions of part models, it can reduce the situation of meaningless switching in the length, width, or height directions, which is beneficial to improving the stability of the derived external dimensions. 3. This invention improves the accuracy of extreme value calculation for complex geometric structures such as cylindrical surfaces, rounded surfaces, and freeform surfaces by screening extreme candidate geometric surfaces in the target envelope coordinate system and obtaining the real geometric support values ​​in six directions based on the original B-Rep geometric surface and its actual trimmed boundary, instead of directly relying on triangulated vertices or finite sampling points. This makes the derived maximum external dimensions closer to the real three-dimensional boundary of the part. 4. By preserving the relationship between the maximum external dimension and the envelope direction, support geometry, and support position, and recalculating the true geometric support value only for the failed support direction after a local modification of the part model, this invention avoids repeatedly performing all geometric extreme value calculations after each modification. This is beneficial to improving the update efficiency of the maximum external dimension in the scenario of model version update, and facilitates subsequent CAD design, process planning, blank selection, or part data management processes. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope, according to the present invention. Figure 2 This is a schematic diagram illustrating the effective outer boundary geometric direction feature clustering and candidate envelope coordinate system generation of the present invention; Figure 3 This is a schematic diagram illustrating the determination of directional perturbation and directional stability of the candidate envelope coordinate system in this invention. Figure 4 This is a schematic diagram showing how six supporting planes form a three-dimensional boundary envelope in the target envelope coordinate system of this invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] The data processed by this invention is industrial 3D CAD model data of mechanical parts and their boundary representation data. The data comes from part model files in the CAD modeling, model import or design process.

[0021] In this invention, B-Rep, or Boundary Representation, refers to a data representation method in a 3D CAD solid model that describes the topological structure of the entity boundary using entities, shells, topological surfaces, topological edges, topological vertices, and their adjacency relationships, and describes the actual geometric boundary using underlying geometric surfaces such as planes, cylindrical surfaces, conical surfaces, spherical surfaces, tori, or parametric freeform surfaces, as well as trimmed boundaries. The original B-Rep geometric surface in this invention refers to the undiscrete underlying geometric surface corresponding to the topological surface in the CAD solid model; the actual trimmed boundary refers to the trimmed parameter domain boundary that limits the effective participation of the topological surface in the entity boundary.

[0022] This embodiment uses a 3D CAD solid model of a mechanical part with boundary representation data as the processing object; the boundary representation data includes the topological surfaces, topological edges, topological vertices and their corresponding adjacency relationships of the part, and also saves the underlying geometric information such as planes, cylindrical surfaces, conical surfaces, spherical surfaces, toroidal surfaces or parametric freeform surfaces corresponding to each topological surface.

[0023] Example 1: like Figure 1 As shown, this embodiment provides a method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope. For the part to be processed, the maximum external dimensions are obtained and exported according to the following steps: S1. Determine the effective outer boundary geometry of the part. First, the 3D CAD solid model of the part to be processed is read, and the corresponding solid, shell, topological surface, and the adjacency relationship between the topological surfaces are obtained.

[0024] When a part model includes an outer shell and one or more enclosed cavity shells that are completely located inside the part, calculate the oriented volume of each shell, or call the point-in-body-outside-body judgment interface of the CAD geometry kernel to determine the containment relationship between shells; if a shell surrounds other shells and the topological surface normal of the shell is oriented towards the outside of the entity as a whole, then the shell is determined as the outer shell; if multiple non-containing shells correspond to multiple entities in the same part, then the outer shell of each entity is determined separately and their outer boundary surfaces are merged.

[0025] For candidate topological surfaces in the outer shell Select the center point within its effective trimming parameter domain and at least four boundary neighborhood sampling points, and offset them along the out-of-plane normal distance at the corresponding sampling points. The bias point is obtained; where, Pick , The maximum external dimension of the part in the original CAD coordinate system; if the offset point is determined to be located outside the solid, and the topological surface does not belong to a completely closed inner cavity shell, then the topological surface is determined as an effective outer boundary geometric surface that can participate in the outer spatial envelope of the part, and added to the set of effective outer boundary geometric surfaces. .

[0026] For geometric surfaces within a closed inner cavity shell completely surrounded by an outer shell, or geometric surfaces whose external normal offset points cannot reach the external space of the solid, these geometric surfaces are not added to the effective outer boundary geometric surface set because they do not form the overall external envelope support position of the part. It also does not utilize this type of geometry to generate the overall envelope direction of the part.

[0027] At the same time, read the geometric modeling tolerances corresponding to the 3D CAD model. This is used to subsequently determine whether the directions are approximately consistent, whether the geometric positions coincide, and whether the support values ​​have changed effectively.

[0028] In this embodiment, the part includes multiple planes, multiple cylindrical surfaces, and several rounded curved surfaces. After outer boundary identification, a set of effective outer boundary geometric surfaces is obtained. .

[0029] S2. Generate candidate envelope coordinate systems based on the geometric orientation of the outer boundary. like Figure 2 As shown, directional features that reflect the overall geometric direction of the part are extracted from the effective outer boundary geometric surface and its boundary.

[0030] For a plane, the unit normal of the plane is read as the corresponding directional feature; for a cylindrical surface, conical surface, or other geometric surface with a defined axis of rotation, its axial direction is read as the corresponding directional feature; for surfaces with a length not less than For the straight edge, the direction of the straight edge is read as an auxiliary direction feature; where... This represents the maximum external dimension of the part in the original CAD coordinate system. Take a value between 0.01 and 0.03.

[0031] To reduce the interference of local small faces, small chamfers, and short sides on the overall envelope direction, weights are assigned to directional features based on the area of ​​the corresponding geometric face or the length of the corresponding geometric side.

[0032] Among them, the surface orientation characteristics formed by planes, cylindrical surfaces, conical surfaces, or geometric surfaces with a defined axis of rotation are denoted as... Its weight Based on the area of ​​the corresponding effective outer boundary geometry Determine; the direction characteristic of the straight edge is formed, denoted as Its weight According to the length of the corresponding straight side Sure.

[0033] Preferably, , ,in This represents the weighting coefficient of the edge direction relative to the face direction. Take a value of 0.2 to 0.5; The number of face orientation features participating in directional clustering; The number of directional features of straight edges participating in directional clustering; length less than Straight edges do not participate in directional clustering.

[0034] Let the two unit direction characteristics be respectively and Due to direction With direction Since they belong to the same axis during the generation of the envelope coordinate system, the following approach is adopted: Determine the undirected angle between the two.

[0035] when Smaller than the preset clustering angle At that time, the two directional features are classified into the same directional cluster.

[0036] For example, in this embodiment, Set to 2°; when a direction feature is added to a direction cluster, if the direction feature matches the direction represented by the current direction cluster... If the dot product is less than 0, then first invert the directional feature to keep the directions within the same directional cluster aligned with the same axis; then proceed according to... Update the representative direction of the direction cluster, where Directional features The weight.

[0037] Cluster weight of each directional cluster The sum of the feature weights of all directions within the cluster in that direction; the cluster weights Not less than the preset weight threshold The direction clusters are determined as the primary direction clusters; the preset number of primary direction clusters. Take values ​​from 3 to 8; when the cluster weight Not less than the preset weight threshold When the number of directional clusters is less than 3, the cluster weight is used as the basis for determining the order of directional clusters. From large to small, make up to One, of which This represents the total number of directional clusters.

[0038] Select two representative directions from the main direction cluster. and ,when When the two satisfy the approximate orthogonality condition, they are used to establish a candidate envelope coordinate system; where This is the orthogonal allowable deviation angle.

[0039] Let the two selected representative directions be respectively and ,by The unit direction is used as the first direction of the candidate coordinate system. ,Will Perpendicular to The in-plane projection and normalization yield the following: ;when Less than the preset value When this condition is met, the direction of the combination is determined to be degenerate and the combination is discarded; among them, Pick Then determine according to the right-hand coordinate system relationship. This yields a candidate envelope coordinate system. .

[0040] Different main orientation clusters are combined, and duplicate candidate envelope coordinate systems are removed from the generated candidate envelope coordinate systems to obtain a set of candidate envelope coordinate systems. During deduplication, the three axes of the two candidate envelope coordinate systems are first matched according to the principle of minimizing the axial angle. Then, it is determined whether the maximum undirected angle of the three matched axes is less than the deduplication angle. If the conditions are met, it is determined that the two candidate envelope coordinate systems have the same direction, and only the candidate envelope coordinate system generated by the combination of larger cluster weights is retained.

[0041] When there are insufficient effective directions that can be extracted from a part, the original CAD coordinate system of the part is used as a candidate envelope coordinate system to ensure that subsequent calculations can continue.

[0042] When only one primary direction cluster can be obtained, the representative direction of the primary direction cluster is taken as the first direction, and an auxiliary direction is generated by selecting a coordinate axis that is not parallel to the first direction from the original CAD coordinate system of the part; when no effective primary direction cluster can be obtained, the original CAD coordinate system of the part is directly added to the candidate envelope coordinate system set.

[0043] In the above manner, the candidate envelope coordinate system is formed by the effective outer boundary geometry of the main direction cluster and a length not less than [missing information]. The straight edges are determined together, and the influence of small chamfers, small rounded corners, short sides and local small faces is reduced by area weight, length threshold and direction clustering. Therefore, when local small features change, it is not easy to directly change the main direction of the candidate envelope, thereby improving the stability of the direction derived from the maximum outer size.

[0044] S3. Determine the target envelope coordinate system based on the degree of space occupancy and directional stability. For the set of candidate envelope coordinate systems For each candidate envelope coordinate system, initial support calculations are performed first.

[0045] With candidate envelope coordinate system For example, the effective outer boundary geometry is in , and Projection is performed in three directions respectively.

[0046] In the initial calculation phase, it is not necessary to immediately perform high-precision extremum solving on all parametric surfaces. Instead, six approximate support values ​​can be quickly determined using the surface enclosing data or triangulated data of the outer boundary surfaces provided by the CAD geometry kernel. , , , , and .

[0047] This yields three initial envelope dimensions corresponding to the candidate envelope coordinate system: ; ; .

[0048] Further obtain the space occupancy value corresponding to the candidate envelope: .

[0049] Calculate the space occupancy values ​​corresponding to all candidate envelope coordinate systems, and obtain the minimum space occupancy value from them. .

[0050] To avoid selecting an envelope direction that is highly sensitive to geometric changes based solely on minute volume differences, this embodiment does not directly... Instead of determining the smallest candidate envelope coordinate system as the final result, we first select the one that satisfies the following: The candidate envelope coordinate systems form a set of candidates; among them, This indicates the allowable margin in space usage; in one specific embodiment, Take a value of 0.01 to 0.03.

[0051] The candidate envelope coordinate systems that satisfy the above space occupancy conditions are denoted as the candidate set. : ;in, Indicates the candidate envelope coordinate system. Represents the candidate envelope coordinate system The corresponding space usage value.

[0052] like Figure 3 As shown, for each candidate envelope coordinate system in the candidate set, a predetermined small-angle perturbation is applied to its direction; let the perturbation angle be... The angle is 0.2° to 1°, preferably 0.5°; the perturbation method includes respectively surrounding... , and Axis execution and The rotation; let the dimension corresponding to the undisturbed state be , , , No. The size after the secondary perturbation is , , Then, the candidate envelope coordinate system is determined based on the relative changes in size before and after the perturbation. Directional stability index : ;in, Pick This is used to avoid the denominator being zero; The smaller the value, the smaller the change in the external dimensions of the candidate envelope coordinate system after a slight angular perturbation, and the more stable the candidate envelope direction.

[0053] Preset stability parallel threshold , Pick When two candidate envelope coordinate systems and satisfy When the two are found to have similar directional stability, their supporting geometric surfaces are further compared.

[0054] From the candidate envelope coordinate systems that meet the space occupancy requirements, priority is given to those with directional stability. The smaller candidate envelope coordinate system is used as the target envelope coordinate system. .

[0055] The target envelope coordinate system is determined in the following order: First, in the candidate set... Select directional stability index The smallest candidate envelope coordinate system; when the difference in the orientation stability index of multiple candidate envelope coordinate systems does not exceed When selecting a support geometry consistency index Smaller candidate envelope coordinate system; when the consistency index of the supporting geometry is still the same, if there is a target envelope coordinate system before modification, then select the candidate envelope coordinate system with a smaller axial angle with the target envelope coordinate system before modification; if it is the first calculation, then select the candidate envelope coordinate system with a smaller axial angle with the original CAD coordinate system of the part.

[0056] Specifically, when the difference in space occupancy values ​​between two candidate envelope coordinate systems is within the allowable space occupancy margin, this embodiment does not use the slight difference in space occupancy values ​​as the sole selection criterion, but instead prioritizes directional stability. A candidate envelope coordinate system that is smaller and whose six main supporting geometric surfaces remain consistent before and after the disturbance; the main supporting geometric surfaces remaining consistent means that the main geometric surfaces that form the same approximate extreme value in the same supporting direction are identified the same before and after the disturbance, or the geometric surfaces with the highest area proportion in the corresponding set of supporting geometric surfaces remain the same.

[0057] For approximately symmetrical parts, when multiple candidate envelope coordinate systems simultaneously satisfy the space occupancy condition and directional stability... When approaching, further calculate the consistency index of the supporting geometry.

[0058] Let the set of six support directions be: For candidate envelope coordinate systems ,set up Support direction under undisturbed state The corresponding main supporting geometry, For the first Support direction after secondary disturbance The corresponding primary support geometry. The primary support geometry is the effective outer boundary geometry that forms the approximate support value in the support direction, or the difference between it and the approximate support value does not exceed the support comparison tolerance. The geometric surface with the largest area among the geometric surfaces; among them, Pick , To compensate for the trigonometric chord height error, This represents the error in the data bounded by the surface.

[0059] like and The geometric surface markings are different, or the first The difference in support values ​​before and after the disturbance is greater than Then let Otherwise, Then the candidate envelope coordinate system The consistency index of the supporting geometry is: ;in, The smaller the value, the more stable the supporting geometry of the candidate envelope coordinate system is under small-angle perturbation.

[0060] For example, a near-square mechanical base has very similar dimensions in two lateral directions. If a small chamfer is modified, simply following the minimum enclosing volume might cause the two lateral axes to be interchanged. According to this embodiment, by comparing the dimensional changes after directional perturbation and whether the supporting geometry remains consistent, the original envelope direction formed by the large-area main geometry can be maintained, thereby reducing meaningless exchanges of lateral dimensions.

[0061] S4. Obtain the true geometric support values ​​in the six directions under the target envelope coordinate system. Target envelope coordinate system Once determined, its three unit directions are denoted as follows: , and .

[0062] Specifically for , , , , and The support positions of the actual outer boundary of the part are determined by six directions.

[0063] To reduce the need for high-precision extremum calculations on all external boundary parameter surfaces, the approximate support values ​​obtained in step S3 are first used to screen candidate geometric surfaces for extremum.

[0064] by Taking direction as an example, for the effective outer boundary geometry Read or calculate its upper bound of projection in direction .

[0065] Let step S3 obtain The approximate support value in the direction is Then it will satisfy: Effective outer boundary geometry as Candidate geometric surfaces for extrema in the direction; where, This is a safety margin greater than the geometric calculation error; the safety margin Not less than the trigonometric chord height error Area encirclement data error and geometric modeling tolerances The combination error is used to avoid the actual support geometry being excluded due to the initial approximate support calculation error.

[0066] In this way, only those close to A small number of geometric surfaces at the external support locations are used for subsequent calculations of the true geometric extrema.

[0067] For a parametric surface The extreme candidate geometric surface is represented, and the function is obtained within its effective trimming parameter domain: The maximum value.

[0068] Specifically, first, the parameter domain and trimmed boundary loop of the candidate extremum geometry are read; for planes, cylindrical surfaces, conical surfaces, and spherical surfaces that can be analytically solved, the directional projection extrema are obtained analytically; for parametric freeform surfaces, the effective trimmed parameter domain is divided into several parameter blocks, and the surface enclosing range of the parameter blocks is used to exclude parameter blocks that cannot exceed the current optimal projection value, and the remaining parameter blocks are solved: ; When the difference between the projection values ​​obtained from two consecutive iterations is less than Or the parameter increment is less than When the iteration stops, the iteration continues; where, Tolerances are calculated for the support values. The parameter convergence tolerance.

[0069] For the extreme values ​​located on the surface trimming boundary, the parametric curves constituting the trimming boundary... Seeking The extreme values ​​are checked, and the endpoints of the boundary curves are examined.

[0070] The effective extremum locations inside the surface, the effective extremum locations of the trimmed boundary, and the boundary endpoints are located at... By comparing the projections in the direction, the geometric surface is obtained in... The true maximum projection in the direction.

[0071] For geometric surfaces such as planes, cylinders, cones, and spheres that can be directly calculated analytically, the extreme values ​​of directional projections can also be obtained using corresponding analytical geometry methods.

[0072] In all The largest true projection is selected from the candidate geometric surfaces for directional extrema as the final positive support value. The negative support value was obtained using the same method. Further, the following were obtained: , , and The six support values ​​correspond to the six support planes.

[0073] like Figure 4 As shown, when the trimming boundary is a two-dimensional parametric curve When representing this, substitute it into the parametric surface to obtain the three-dimensional boundary curve: ; and seek The extreme values ​​are checked, and the endpoints of each trimmed boundary curve are examined. For periodic surfaces, candidate extreme points located on both sides of the periodic boundary and whose geometric positions coincide are treated as having the same support position.

[0074] When determining the final support value, if the difference between the true projected value of multiple extreme candidate geometric surfaces and the maximum true projected value does not exceed the support value calculation tolerance... If so, all of these multiple extreme candidate geometric surfaces are used as supporting geometric surfaces in the corresponding directions and saved to the corresponding supporting geometric surface set.

[0075] For example, The directional support plane is represented as: ; The side corresponding support plane is represented as follows: The other two directions are determined in the same way.

[0076] The six supporting planes together form a three-dimensional boundary envelope that can encompass the effective outer boundary of the current three-dimensional part.

[0077] Since the final support value is obtained from the original B-Rep geometric surface and its actual trimmed boundary, rather than directly using triangulated vertices or finite sampling points, it is possible to obtain support positions that are closer to the actual three-dimensional boundary of the part for complex geometric structures such as rounded surfaces, cylindrical surfaces and freeform surfaces.

[0078] S5. Determine the maximum external dimensions and establish support geometric relationships. Based on the six actual geometric support values ​​obtained in step S4, determine the maximum external dimensions in the three directions of the target envelope coordinate system: ; ; .in, , and First, compare them with the target envelope coordinate system. axis, shaft and The axis remains fixed.

[0079] For situations where "length, width, and height" fields need to be provided to external business systems, the data should be processed according to preset rules. , and Further name mapping is performed.

[0080] For example, the maximum value of the three dimensions is mapped to the length L, and the other two dimensions are mapped to the width W and height H, respectively.

[0081] However, when saving or exporting data, save simultaneously , , and , , The original axial relationship between them is established to avoid two dimensions with similar values ​​losing their original geometric directional meaning due to changes in size order.

[0082] When determining each actual support value, the geometry that actually forms that support value is also saved.

[0083] for Direction, forming positive support value The geometric surfaces form a set of positively supporting geometric surfaces. ; forming negative support value The geometric surfaces form a set of negative supporting geometric surfaces. ; correspondingly formed , , and .

[0084] For each supporting geometry, save the topology identifier that can identify the geometry in the current CAD model; when the CAD geometry kernel can provide a persistent topology identifier, save the persistent topology identifier directly.

[0085] When the topology number cannot be guaranteed to remain unchanged after the CAD model is converted, the topology-geometric feature identifier of the corresponding geometric surface is formed according to the geometric surface type, area, geometric center, bottom surface parameters, and topological relationship of adjacent geometric surfaces.

[0086] Simultaneously, the three-dimensional coordinates of the supporting extreme points or the parameter positions on the corresponding parametric surface are saved.

[0087] Therefore, the maximum external dimensions are achieved. and and Establish a correspondence, so that and and Establish a correspondence, so that and and Establish corresponding relationships.

[0088] For example, when When a part is jointly defined by a plane on its left side and the outer surface of a cylinder on its right side, in the calculation... Simultaneously, the geometric identifiers of the planar and cylindrical surfaces are saved separately; subsequently, it will be possible to obtain... The numerical value can also reveal the specific part boundary that forms that size.

[0089] S6. Incremental update and dimension export after model changes When the 3D CAD solid model of the same part is modified, first determine the geometric surfaces that have changed before and after the modification.

[0090] When the CAD modeling environment can directly output update information for added, deleted, and modified faces, the set of changed geometric faces can be obtained directly from the update information. .

[0091] When update information cannot be obtained directly, the effective outer boundary geometric surfaces before and after modification can be matched based on the aforementioned topological identifier or topological-geometric feature identifier to obtain the newly added, deleted, and geometrically changed geometric surfaces.

[0092] First, determine whether the main orientation clusters used to generate the target envelope coordinate system have changed significantly.

[0093] If the effective outer boundary geometry of the main direction cluster is deleted, the representative direction of the main direction cluster changes by more than a preset angle, or the newly added effective outer boundary geometry or straight edge direction feature forms a new main direction cluster, then steps S2 to S4 are executed again to redetermine the target envelope coordinate system and the six support values.

[0094] If the main directional structure of the part has not changed significantly, then keep the original target envelope coordinate system unchanged, and judge separately. , and Has the directional support value failed?

[0095] by Taking direction as an example, when When the supporting geometric surface is deleted or its geometric position changes beyond the preset tolerance, the following judgment is made. Failure; when When the supporting geometric surface is deleted or its geometric position changes beyond the preset tolerance, the following judgment is made. Invalid.

[0096] For newly added or changed geometric surfaces, calculate their position. The projection range in the direction.

[0097] If its upper bound of projection is greater than the original The sum of the tolerances compared with the preset tolerances is then used to determine the result. Invalid.

[0098] If its projection lower bound is smaller than the original The difference between the tolerance and the preset tolerance is used to determine the result. Invalid.

[0099] for direction and The direction is determined using the same method.

[0100] For the support direction that is determined to be ineffective, the extreme candidate geometric surfaces in that direction are screened again according to step S4 and the true geometric support value is calculated. During the recalculation, the support geometric surface identifier, support position and true geometric support value corresponding to the unineffective support direction remain unchanged. Only the true geometric extreme value calculation is performed on the support direction corresponding to the geometric surface that has been deleted, modified or may break through the original support plane.

[0101] Let the set of support directions be: For any support direction If the original direction of the support was different from that of the previous one. The corresponding support geometry is deleted, or the support geometry is along the support direction. The projection change is greater than the tolerance calculated for the support value. If so, the support direction is deemed invalid.

[0102] For newly added or modified geometric surfaces, calculate their position in the support direction. The upper bound of the projection; if the upper bound of the projection is greater than the support direction before modification. True geometric support value Tolerance calculated with support value The sum of these values ​​determines the direction of the support. Invalid.

[0103] For unfailed support directions, maintain their original support geometry identification, support location, and actual geometric support value; for failed support directions, re-select extreme candidate geometry surfaces in that direction and recalculate the actual geometric support value in that direction.

[0104] For support directions that have not been determined to be in failure, the original support values ​​are used directly without re-performing all geometric extreme value calculations for the corresponding direction.

[0105] For example, all six support values ​​of the original part have been determined, and the designer only needs to consider the part itself. Add a boss to the outer surface of the direction, and the new boss is in direction and The projections of the directions did not exceed the original supporting plane.

[0106] At this time, only directional support value It was determined to be invalid, and a new one was recalculated. .

[0107] Original , , , and It remains unchanged.

[0108] According to the new Recalculate: ; and Use the original result directly.

[0109] Therefore, it is not necessary to recalculate the true geometric extrema in all six directions due to the addition of a local boss.

[0110] After completing the initial calculation or incremental update, export the three maximum external dimensions of the part.

[0111] Preferably, the target envelope coordinate system is derived simultaneously in three directions. , , It also shows the relationship between the three maximum external dimensions and their corresponding envelope directions; depending on the actual application needs, it can also export the geometric surface identifiers, support positions and calculated tolerance information that form the six support values, for use in subsequent CAD design, process planning, blank selection or part data management processes.

[0112] Exported data can be written to part model attributes or preset structured data files, or it can be passed to subsequent applications connected to the CAD design process through preset data interfaces; the subsequent applications are limited to geometric dimension calls in CAD design, process planning, blank selection or part data management, and do not include recommendations, evaluations, rankings or automated decisions based on natural person attributes, user profiles, business preferences or identity information.

[0113] In this embodiment, the specific storage format of the exported file does not constitute a necessary limitation of the present invention.

[0114] Example 2: This embodiment uses a mechanical mounting base with an approximate cuboid structure as an example for illustration; the mounting base includes several large-area side planes, a mounting boss on the upper surface, cylindrical holes, rounded transition surfaces, and local chamfers; the three-dimensional CAD solid model is represented by B-Rep and saves the topological surfaces, topological edges, topological vertices, and their adjacency relationships.

[0115] After reading the 3D CAD solid model of the mounting base, the geometric surfaces in the inner cylindrical hole wall that do not participate in the outer space envelope are first excluded based on the shell relationship and the judgment results of the points inside and outside the body. The side plane, upper surface, bottom surface, outer surface of the boss and outer fillet surface that can form the outer envelope of the part are determined as the effective outer boundary geometric surface set.

[0116] Subsequently, directional features are extracted from the effective outer boundary geometry and its boundaries. Among them, the unit normal of the large-area side plane is used as the main surface directional feature, the axial direction of the outer cylindrical surface is used as the auxiliary directional feature, and the direction of the long straight edge whose length meets the preset ratio requirement is used as the edge directional feature. Small chamfered edges, short edges, and local transition surfaces with small areas do not determine the envelope direction of the part independently because they have low weights or do not participate in directional clustering.

[0117] After directional clustering, multiple candidate envelope coordinate systems are generated based on the main directional clusters, and the space occupancy value under each candidate envelope coordinate system is calculated. When the difference in space occupancy value between two candidate envelope coordinate systems is within the allowable space occupancy margin, the candidate envelope coordinate system with lower directional stability and consistent main support geometry of the six support directions before and after the disturbance is selected as the target envelope coordinate system, thereby avoiding meaningless switching between the length and width directions due to changes in local chamfers or small protrusions.

[0118] After determining the target envelope coordinate system, candidate geometric surfaces for extreme values ​​are screened in the six support directions. For the side plane and bottom surface, the corresponding support value is determined directly based on the position of the geometric surface. For the rounded corner surface, cylindrical surface, or outer surface of the boss, the effective extreme value position inside the surface, the effective extreme value position of the trimmed boundary, and the projection of the boundary endpoints are compared within the original B-Rep geometric surface and the actual trimmed boundary to obtain the true geometric support value in the corresponding direction. Based on the six true geometric support values, the maximum external dimensions of the mounting base in the three directions of the target envelope coordinate system are determined, and the correlation between the maximum external dimensions and the envelope direction, support geometry, and support position is saved.

[0119] When designers add a local boss to the upper surface of the mounting base, the direction of failure support is determined based on the projection range of the new boss in each support direction. If the new boss only breaks through the original support plane in the positive height direction in the target envelope coordinate system, but does not break through the original support plane in the length and width directions, then only the true geometric support value in the positive height support direction is recalculated, while the support geometry, support position, and true geometric support value in the other non-failed support directions remain unchanged. Thus, while maintaining dimensional stability, the repetitive geometric extreme value calculations after local model modifications can be reduced.

[0120] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope, characterized in that, Includes the following steps: Read the 3D CAD solid model of the part to be processed, and determine the set of effective outer boundary geometric surfaces that can participate in the outer spatial envelope of the part based on the solid, shell, topological surface and adjacency relationship of the 3D CAD solid model. The directional features are extracted from the geometric surfaces and their boundaries in the set of effective outer boundary geometric surfaces. The directional features are then weighted according to the area of ​​the geometric surface or the length of the straight edge and clustered to obtain the main directional clusters. Candidate envelope coordinate systems are generated based on the main orientation clusters. The approximate support value and space occupancy value of each candidate envelope coordinate system are calculated. Candidate envelope coordinate systems whose space occupancy value is within the space occupancy margin of the minimum space occupancy value are formed into a set of candidates, and the target envelope coordinate system is determined. Candidate geometric surfaces for extreme values ​​are selected in the six support directions of the target envelope coordinate system. The true geometric support value is calculated based on the original B-Rep geometric surface of the candidate geometric surfaces and the actual trimmed boundary. Based on six real geometric support values, determine three maximum external dimensions, save and export the relationship between the maximum external dimensions and the envelope direction, support geometry, and support position; When the 3D CAD solid model is modified, the maximum external dimension is updated according to the changes in the main direction cluster and the associated relationship. While maintaining the target envelope coordinate system, the direction of failure support is determined according to the associated relationship and the changed geometric surface. Only the direction of failure support is recalculated for the actual geometric support value and the maximum external dimension is re-derived.

2. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, Determining the set of effective outer boundary geometric surfaces includes: obtaining the solid, shell, topological surfaces and adjacency relationships of the 3D CAD solid model; determining the outer shell based on the oriented volume of the shell or whether the points are inside or outside the shell; and determining the effective outer boundary geometric surfaces as the topological surfaces whose external normal offset points are located outside the solid and do not belong to the completely closed inner cavity shell.

3. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, The directional features include the unit normal of a plane, the axial direction of a cylindrical surface, a conical surface, or a geometric surface with a defined axis of rotation, and the direction of a straight edge whose length is not less than a preset proportion of the maximum external dimension of the part in the original CAD coordinate system. The surface directional features are weighted according to the area of ​​the corresponding effective outer boundary geometric surface, and the edge directional features are weighted according to the length of the corresponding straight edge. Straight edges whose length is less than the preset proportion do not participate in directional clustering.

4. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, The directional clustering includes: treating directional features with opposite directions but consistent axial direction as the same axial direction; dividing directional features into directional clusters based on the undirected included angle between them; updating the representative direction of the directional cluster according to the weight of the directional features within the cluster; selecting two representative directions from the main directional clusters that satisfy the approximate orthogonality condition to generate a candidate envelope coordinate system; and generating a candidate envelope coordinate system using the original CAD coordinate system of the part when there are insufficient effective directions.

5. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, When determining the target envelope coordinate system, positive and negative small-angle directional perturbations are applied to the candidate envelope coordinate systems in the selection set. The directional stability is determined based on the relative changes of the three envelope dimensions before and after the perturbation. The consistency of the support geometry is determined based on the number of changes of the main support geometry corresponding to the six support directions before and after the perturbation. The target envelope coordinate system is selected in order of smaller directional stability and fewer changes.

6. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, When calculating the true geometric support value, for any support direction, extreme candidate geometric surfaces are selected from the set of effective outer boundary geometric surfaces based on the approximate support value and safety margin. Within the effective trimming parameter domain of the extreme candidate geometric surfaces, the effective extreme position inside the surface, the effective extreme position of the trimmed boundary, and the projection of the boundary endpoints are compared. For periodic surfaces, candidate extreme points with overlapping geometric positions are treated as having the same support position.

7. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 6, characterized in that, When the difference between the true projection value and the maximum true projection value of multiple extreme candidate geometric surfaces does not exceed the tolerance of the support value calculation, the multiple extreme candidate geometric surfaces are taken as the set of support geometric surfaces in the corresponding support direction; The maximum external dimension of the same axial direction is determined by the difference between the positive and negative true geometric support values.

8. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, The association includes the support direction, the actual geometric support value, the support plane, the topological identifier or topological-geometric feature identifier of the support geometry, and the three-dimensional coordinates or parameter position of the support location; when the topological identifier changes, a topological-geometric feature identifier is formed based on the geometry type, area, geometric center, bottom surface parameters and the topological relationship of adjacent geometry.

9. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, Determining the failure of a support direction includes: matching the effective outer boundary geometry before and after modification based on the updated information output by the CAD modeling environment, or based on the topology identifier or topology-geometric feature identifier; when the original support geometry is deleted, the matching fails, the geometric position changes beyond the preset tolerance, or the newly added or changed geometry breaks through the corresponding support plane, the corresponding support direction is determined to be failure; the support geometry, support position, and actual geometric support value of the non-failed support directions remain unchanged.

10. The method for deriving the maximum external dimensions of a part based on a three-dimensional boundary envelope according to claim 1, characterized in that, When the 3D CAD solid model is modified, and the effective outer boundary geometric surface of the main direction cluster is deleted, the representative direction of the main direction cluster changes by more than the preset angle, or the newly added effective outer boundary geometric surface or straight edge direction feature forms a new main direction cluster, it is determined that the main direction cluster has changed significantly, and the candidate envelope coordinate system is regenerated, the target envelope coordinate system is determined, and six real geometric support values ​​are calculated.