Method, apparatus, and medium for topology element naming based on replicated class features

By generating matrix chain information using a multi-branch tree structure and a depth-first search algorithm, the topological elements of replication-type features are automatically named, solving the problem of complex naming of replication-type features and improving naming efficiency and management capabilities.

CN120930201BActive Publication Date: 2026-01-02SHENZHEN JIALICHUANG TECH DEV CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511462032.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-01-02
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

In existing technologies, the naming steps for topological elements of copy-type features are complex and inefficient, especially when dealing with multiple nesting and parameter copying, which are difficult to manage effectively.

Method used

The result container is initialized using a multi-branch tree structure. The matrix is ​​copied layer by layer through a depth-first search algorithm to generate matrix chain information. The topology elements are constructed using a geometric modeling engine and automatically named according to the matrix chain information and feature parameters.

Benefits of technology

It enables multiple nesting of copy-type features and efficient topology element naming when copying dependent parameters, supports the modeling design of mirror and array features, and improves naming efficiency and management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930201B_ABST
    Figure CN120930201B_ABST
Patent Text Reader

Abstract

The application provides a method, device and medium for naming topological elements based on copy type features, which comprises the following steps: initializing a result container based on a multi-ary tree structure of multiple reference features, wherein the reference features are copy type features or non-copy type features; traversing a copy matrix of each reference feature layer by layer based on the multi-ary tree structure to obtain matrix chain information, and saving the matrix chain information to the result container; traversing the result container layer by layer to remove the matrix chain information; traversing each matrix chain of the result container layer by layer, and constructing a modeling entity corresponding to the copy type feature according to the corresponding matrix chain information and feature parameters of the reference feature; and determining the element name of each topological element of the modeling entity according to the modeling process of the modeling entity. According to the technical scheme of the embodiment of the application, the multi-ary tree structure of multiple reference features is taken as the basis, the naming maintenance and management requirements of the topological elements are met, and the automatic naming of the topological elements can be realized, so that the naming efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of feature-based parametric modeling technology, and in particular to a method and device for naming topological elements based on copy features and a medium. BACKGROUND

[0002] Computer-aided design (CAD) technology is widely used in product design and management in many fields such as architecture, aerospace, shipbuilding, and automobile. History-based parametric feature modeling technology is a milestone in the development of CAD technology, and various enterprises have gradually developed feature modeling independently. Topological element naming is one of the key technologies in the research and design of domestic industrial software.

[0003] Mirror and array are two basic copy features. Mirror is used to create a copy of a geometric body with a specified plane as the axis of symmetry, while array is used to create multiple copies of a geometric body in a specified direction according to linear or circular arrangement. Mirror and array are mainly used to handle design tasks with model symmetry and structural repetition. In order to clearly refer to, all topological elements obtained based on copy features need to be named respectively. However, due to the multiple nested copying between copy features, and the need to consider the parameter copying between topological elements and the naming maintenance management of topological elements, the naming steps of topological elements are complex and inefficient. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a method and device for naming topological elements based on copy features, which is based on a multi-way tree structure of multiple reference features, supports multiple nesting of reference features and parametric copying of dependent features, meets the naming maintenance management needs of topological elements, and realizes automatic naming of topological elements to improve naming efficiency.

[0005] In a first aspect, the present application provides a method for naming topological elements based on copy features, comprising:

[0006] Initializing a result container based on a multi-way tree structure of multiple reference features, wherein the reference features are copy features or non-copy features;

[0007] Based on the multi-way tree structure, traversing the copy matrix of each reference feature layer by layer to obtain matrix chain information, and saving the matrix chain information to the result container, wherein the copy matrix of the non-copy feature is a matrix chain, and the copy matrix of the copy feature is a set of matrix chains calculated based on depth-first search recursion;

[0008] Traversing the result container layer by layer, and performing deduplication processing on the matrix chain information;

[0009] The model generator of the geometric modeling engine traverses each of the matrix chains of the result container layer by layer, and constructs a modeling entity corresponding to the copy-type feature according to the corresponding matrix chain information and the feature parameters of the reference feature, wherein the modeling entity comprises a topological element corresponding to the copy-type feature;

[0010] The element name of each of the topological elements is determined according to a modeling process of the modeling entity, wherein when the copy-type feature corresponding to the topological element is a base feature, the element name is determined according to a position of a final transformation matrix calculated according to the matrix chain when modeling is performed, or when the copy-type feature corresponding to the topological element is a decoration feature, the element name is generated after a reference name of a reference element corresponding to the copy-type feature is found and a decoration element is found according to the reference name when modeling is performed.

[0011] According to some embodiments of the present application, the method is applied to the copy-type features realized based on matrix transformation, such as mirroring, arraying and the like.

[0012] According to some embodiments of the present application, the naming format of the element name is {coordinate number + source element topological name + recursive layer number + feature type + feature number}, wherein the expression of the coordinate number is x&y, the coordinate number is used to record the matrix coordinate index position of the copy-type feature, the expression of the source element topological name is OrigNameRef, the expression of the recursive layer number is NLevel, the expression of the feature type is FeatType, and the expression of the feature number is FFeatID.

[0013] When the copy-type feature is a linear array, the linear array is composed of N*M matrix transformations, x∈[0, N-1], y∈[0, M-1].

[0014] According to some embodiments of the present application, the reference feature is a feature on which the copy-type feature depends;

[0015] The reference feature, geometric transformation information and calculation method are encapsulated by defining an abstract data structure class to obtain the matrix chain information, wherein the matrix chain information is geometric transformation information calculated based on the reference feature on which the copy-type feature depends, the geometric transformation information of the non-copy-type feature is the matrix chain, and the geometric transformation information of the copy-type feature is a matrix chain set.

[0016] The result container is an associated container for storing the matrix chain information, wherein retrieval of the result container is realized by key value, and instantiation of the result container retrieval is based on the abstract data structure class.

[0017] According to some embodiments of the present application, based on the multi-tree structure, the matrix chain information of each of the reference features is obtained by traversing the copy matrix of each of the reference features layer by layer, and the matrix chain information is saved to the result container, including:

[0018] Based on any of the copy class features, all of the reference features of the first level of the multi-tree structure of the reference features of the copy class features are extracted, and i=1 is initialized, wherein the multi-tree structure of the reference features of the copy class features includes LevelTotal1 levels, the number of the reference features of the first level of the multi-tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1;

[0019] j=1 is initialized, and the jth reference feature of the ith level of the multi-tree structure is extracted, when the reference feature is the non-copy class feature, the matrix chain information includes the reference feature and the matrix chain, and the expression of the matrix chain information is FeatureA+Matrix(FeatCur), or, when the reference feature is the copy class feature, the matrix chain set is recursively calculated by a depth-first search method, and the expression of the matrix chain set is FeatureM+Matrix(FeatCur), wherein j is a positive integer, j is less than or equal to FeatNum, FeatureA is the non-copy class feature, Matrix(FeatCur) is the transformation matrix of the copy class feature, FeatCur is the copy class feature, and FeatureM is the copy class feature;

[0020] j is incremented by 1, the matrix chain information is determined based on the reference feature until j=FeatNum, the matrix chain information of all the reference features of the ith level of the multi-tree structure is obtained, and all the matrix chain information is stored to the ith level of the result container;

[0021] i is incremented by 1, the matrix chain information of all the reference features of the ith level of the multi-tree structure is determined until i=LevelTotal1, the matrix chain information of all the reference features of the multi-tree structure is obtained, and all the matrix chain information is stored in the result container.

[0022] According to some embodiments of the present application, the result container is traversed layer by layer, and the matrix chain information is de-duplicated, including:

[0023] The result container is traversed layer by layer, the matrix chain information in any one layer of the result container is compared, the repeated matrix chain information is removed to realize local deduplication identification, the matrix chain information of any two layers of the result container is compared, and the repeated matrix chain information is removed to realize global deduplication identification.

[0024] Alternatively, the matrix chain information is obtained based on any one of the reference features, and uniqueness checking is performed layer by layer on the result container.

[0025] According to some embodiments of the present application, the geometric modeling engine is a geometric modeling library based on BRep boundary representation and having geometric class and topological class data structures, and the geometric modeling engine can provide an API for feature modeling.

[0026] According to some embodiments of the present application, the element name of each topological element is determined during the modeling process of the modeling entity, including:

[0027] Based on any one of the copy class features, the multi-ary tree structure of the copy class feature is determined, m=1 is set, the mth layer of the result container is extracted and the size of the mth layer of the result container is obtained, wherein the number of layers of the multi-ary tree structure is LevelTotal2.

[0028] n=1 is set, the nth matrix chain information of the mth layer of the result container is taken out, the feature information in the matrix chain information is analyzed to obtain the reference feature, wherein the reference feature is the original feature currently referenced and dependent on the analysis;

[0029] When the reference feature is a base feature, the position based on the final transformation matrix determined by the matrix chain calculation is transformed to, a modeling entity is obtained by using the feature parameters of the reference feature when performing modeling, the topological element naming of the modeling entity is performed, the Boolean operation of the modeling entity and the historical result entity is performed, and the topological element naming of the result body is performed.

[0030] Alternatively, when the reference feature is a modification feature, the naming information of the reference element of the reference feature is obtained, the target element matching the naming information in the historical result entity is determined, the reference of the target element is completed to obtain the modification modeling to obtain the modification element, and the topological naming of the modification element is performed.

[0031] n is incremented by 1, and all the matrix chain information of the mth level of the result container is traversed one by one to determine the element name of each of the topological elements until n = Length, where Length is the size of Map(m), and Map(m) is the mth level of the result container, to complete the modeling of all the reference features and the naming of the topological elements of the mth level of the result container.

[0032] m is incremented by 1, and the modeling of all the reference features and the naming of the topological elements of the result container are completed layer by layer until m = LevelTotal2.

[0033] In a second aspect, an embodiment of the present application provides a topological element naming device based on a copy class feature, comprising at least one control processor and a memory in communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the topological element naming method based on the copy class feature as described in the first aspect.

[0034] In a third aspect, an embodiment of the present application provides a computer readable storage medium storing computer executable instructions for executing the topological element naming method based on the copy class feature as described in the first aspect.

[0035] According to the method for naming topological elements based on copy type features provided in the embodiments of the present application, the following beneficial effects are achieved: a multi-ary tree structure initialization result container is based on a plurality of reference features, wherein the reference features are copy type features or non-copy type features; a matrix chain information is obtained by layer-by-layer traversing a copy matrix of each reference feature based on the multi-ary tree structure, and the matrix chain information is saved to the result container, wherein the copy matrix of the non-copy type features is a matrix chain, and the copy matrix of the copy type features is a matrix chain set calculated based on a depth-first search recursion; the matrix chain information is processed by layer-by-layer traversing the result container; a modeling entity corresponding to the copy type features is constructed according to the corresponding matrix chain information and feature parameters of the reference features by layer-by-layer traversing each matrix chain of the result container through a model generator of a geometry modeling engine, wherein the modeling entity includes topological elements corresponding to the copy type features; and element names of the topological elements are determined according to a modeling process of the modeling entity, wherein when the copy type features corresponding to the topological elements are base features, the element names are determined according to positions of a final transformation matrix calculated according to the matrix chain when the topological elements are modeled, or when the copy type features corresponding to the topological elements are decoration features, the element names are generated after a reference name of a reference element corresponding to the copy type features is found and a decoration element is found according to the reference name when the topological elements are modeled. According to the technical solution of the embodiments of the present application, the two types of copy type features, i.e., mirror and array, are applied, a multi-ary tree structure of a plurality of reference features is taken as a basis, a hierarchical storage of copy matrix information is realized through a depth-first search algorithm according to a copy logic and a modeling process of the reference features, and then detailed information of the reference features can be traced when modeling, which can effectively support the modeling design of multiple nesting and original parameter-dependent copying of the copy type features, support the modeling process implementation and topological element naming of the two types of copy type features, meet the needs of topological element naming maintenance and management, and realize automatic naming of the topological elements to improve the naming efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is a flowchart of a method for naming topological elements based on copy type features provided in an embodiment of the present application;

[0037] Figure 2 is a schematic diagram of a multi-ary tree structure of reference features of copy type features provided in another embodiment of the present application;

[0038] Figure 3 is a calculation schematic diagram of a matrix chain of a first layer of a recursion hierarchy provided in another embodiment of the present application;

[0039] Figure 4is a calculation diagram of the matrix chain of the recursive hierarchy second layer provided by another embodiment of the present application;

[0040] Figure 5 is a calculation diagram of the matrix chain of the recursive hierarchy third layer provided by another embodiment of the present application;

[0041] Figure 6 is a calculation result diagram of all the matrix chain information after deduplication provided by another embodiment of the present application;

[0042] Figure 7 is a modeling and naming process diagram based on the matrix chain information provided by another embodiment of the present application;

[0043] Figure 8 is a field information diagram of the element name of the topological element of the copy class feature of the mirror image provided by another embodiment of the present application;

[0044] Figure 9 is a structural diagram of the topological element naming device based on the copy class feature provided by another embodiment of the present application. DETAILED DESCRIPTION

[0045] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application.

[0046] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.

[0047] In the description of the present application, the meaning of several is one or more, and the meaning of multiple is more than two, greater than, less than, more than, etc. are understood as not including the number, and above, below, etc. are understood as including the number. If it is described as first, second, it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of indicated technical features.

[0048] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and the person skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.

[0049] According to the method for naming topological elements based on copy type features, the following beneficial effects are achieved: a multi-ary tree structure initialization result container is based on a plurality of reference features, wherein the reference features are copy type features or non-copy type features; a matrix chain information is obtained by layer-by-layer traversing a copy matrix of each reference feature based on the multi-ary tree structure, and the matrix chain information is saved to the result container, wherein the copy matrix of the non-copy type features is a matrix chain, and the copy matrix of the copy type features is a matrix chain set calculated based on a depth-first search recursion; the matrix chain information is processed by layer-by-layer traversing the result container; a modeling engine is used to layer-by-layer traverse each matrix chain of the result container, and a modeling entity corresponding to the copy type features is constructed according to corresponding matrix chain information and feature parameters of the reference features, wherein the modeling entity includes topological elements corresponding to the copy type features; and element names of the topological elements are determined according to a modeling process of the modeling entity, wherein when the copy type features corresponding to the topological elements are base features, the element names are determined according to positions of a final transformation matrix calculated according to the matrix chain when the topological elements are modeled, or when the copy type features corresponding to the topological elements are decoration features, the element names are generated after a reference name of a reference element corresponding to the copy type features is found and a decoration element is found according to the reference name when the topological elements are modeled. According to the technical solution of the embodiment of the present application, the method is applied to mirror and array copy type features, is based on a multi-ary tree structure of a plurality of reference features, and realizes hierarchical storage of copy matrix information according to copy logic and a modeling process of the reference features by using a depth-first search algorithm, so that detailed information of reference features can be traced when modeling, and the method can effectively support modeling design of multiple nesting and original parameter-dependent copying of copy type features, support modeling process implementation and topological element naming of mirror and array copy type features, meet the needs of topological element naming maintenance and management, and realize automatic naming of topological elements to improve naming efficiency.

[0050] The following drawings further illustrate the technical solution of the embodiment of the present application.

[0051] Referring to Figures 1 to 3 , Figure 1 A flowchart of a method for naming topological elements based on copy type features provided by the embodiment of the present application is shown in FIG. 1. Figure 2 A multi-ary tree structure diagram of reference features of copy type features provided by another embodiment of the present application is shown in FIG. 2. Figure 3 A calculation diagram of a matrix chain of a first recursion layer provided by another embodiment of the present application is shown in FIG. 3.

[0052] S10, initializing a result container based on the multi-ary tree structure of the plurality of reference features, wherein the reference features are copy class features or non-copy class features;

[0053] It should be noted that the multi-ary tree structure of the reference features is initialized based on the feature history tree of the copy class features. Figure 2 , Figure 2 The feature history tree and the multi-ary tree structure including the copy class feature M3, which is any copy class feature. The reference relationship of the copy class features is represented by the multi-ary tree structure. Since the reference features of the copy class features all exist in a tree structure, the parent nodes of the multi-ary tree structure are all copy class features, and the leaf nodes of the multi-ary tree structure are all non-copy class features. Since the copy class feature M3 operation involves nested selection of copy features, i.e., the copy class feature M3 selects the copy class feature M1 and the copy class feature M2, and the copy class feature M2 selects the copy class feature M1. In the multi-ary tree structure of the copy class feature M3, M1, M2 and M3 are copy class features, C1 is a non-copy class feature, E1, E2 and E3 are reference features, and the direction of the arrow in the multi-ary tree structure represents the reference relationship, i.e., the selection relationship, between the copy class features, the non-copy class feature and the reference features. Since M1 and M2 are both copy class features, the copy class feature M1 and the copy class feature M2 are respectively taken as parent nodes to construct sub-trees, and the child nodes of the same level of the multi-ary tree structure are strictly arranged from left to right in the order in the feature history tree of the copy class features.

[0054] It should be noted that the structure container is initialized based on the multi-ary tree structure. The number of result containers is equal to the number of levels of the multi-ary tree structure, and the result containers are used to store the matrix chain information of each level. The matrix chain information of each reference feature of the same level of the multi-ary tree structure is stored in the result container of the corresponding level.

[0055] S20, based on the multi-ary tree structure, traversing the copy matrix of each reference feature layer by layer to obtain matrix chain information, and saving the matrix chain information to the result container, wherein the copy matrix of the non-copy class feature is a matrix chain, and the copy matrix of the copy class feature is a matrix chain set calculated based on depth-first search recursion.

[0056] It should be noted that the matrix chain information refers to the path of the leaf node after traversal by depth-first search. Referring to Figure 3 , E1, C1, E2 and E3 are all leaf nodes. Taking the leaf node E1 as an example, one of the matrix chains of the leaf node E1 is E1+Matrix1+Matrix3, which represents the matrix chain information corresponding to the copy class features passed by the leaf node E1. E1+Matrix1 is a matrix chain set calculated based on depth-first search recursion for the copy matrix of the copy class feature M1. In Figures 2 to 6 , Matrix is abbreviated as Mtx.

[0057] S30, traverse the result container layer by layer, and perform deduplication processing on the matrix chain information.

[0058] It should be noted that all the matrix chain information in the result container is traversed and deduplicated, so that the non-redundant matrix chain information of each level is obtained, that is, the non-redundant modeling information of each level is obtained.

[0059] S40, the model generator of the geometric modeling engine traverses each matrix chain in the result container layer by layer, and constructs a modeling entity corresponding to the copy class feature according to the corresponding matrix chain information and the feature parameters of the reference feature, wherein the modeling entity includes a topological element corresponding to the copy class feature.

[0060] It should be noted that the matrix chain information in the result container is traversed to perform modeling and naming of the topological elements of the modeling entity. When the matrix chain information in the result container is traversed to perform modeling, different modeling logics are performed according to different original features, and the topological elements of the modeling entity obtained after the modeling are named.

[0061] It should be noted that the copy class features in each level of the result container are traversed layer by layer from the first level of the result container, the reference features in each level of the result container are modeled, and the modeling design is performed. Based on the matrix chain information and the feature parameters, various feature APIs are executed and Brep entities are constructed to obtain modeling entities, and the parameters of the modeling entities are the same as the feature parameters.

[0062] S50, determine the element name of each topological element in the modeling process of the modeling entity, wherein when the copy class feature corresponding to the topological element is a base feature, the element name is determined according to the position of the final transformation matrix calculated by the corresponding matrix chain when the topological element is modeled, or when the copy class feature corresponding to the topological element is a modification feature, the element name is generated after the reference name of the reference element of the corresponding copy class feature is found and the modification element is found according to the reference name when the topological element is modeled.

[0063] It should be noted that the base feature is a non-modification feature, and the base feature includes copy class features such as stretching, rotating and sweeping; the modification feature includes copy class features such as chamfering and filleting. The topological elements are named based on the type of the copy class feature corresponding to the topological elements.

[0064] It should be noted that based on the multi-way tree structure of the reference feature of the copy class feature, the topological elements are named in combination with the feature parameters used in the modeling process, and the name information of the element name of the topological element at least includes the following fields: copy feature coordinate number, name information of the corresponding element in the source feature body, nested level when nested, feature number, feature type and element type. For the base feature, the copy topological naming method of the base feature is determined by the feature parameters; for the modification feature, the copy topological naming method of the modification feature is determined by the naming information of the reference feature.

[0065] It should be noted that the result container is used to store the modeling information of the copy class feature corresponding to the reference feature, that is, the matrix chain information.

[0066] It should be noted that the present application is applied to mirror and array two types of copy class features, based on the multi-way tree structure of multiple reference features, according to the copy logic and modeling history of the reference feature, the hierarchical storage of the copy matrix information is realized through the depth-first search algorithm, and then the detailed information of the reference feature during modeling can be traced, which can effectively support the modeling design of multiple nesting and dependence on original parameters of the copy class feature, support the modeling history implementation and topological element naming of mirror and array two types of copy class features, and meet the needs of topological element naming maintenance and management.

[0067] It should be noted that the result container is initialized based on the multi-way tree structure of hierarchical storage, the multi-way tree structure is traversed layer by layer, the matrix chain information of all reference features in each level of the multi-way tree structure is calculated, and the matrix chain information is stored in the corresponding level of the result container. The matrix chain information in each level of the result container is traversed and de-duplicated, and the repeated matrix chains are merged; all the matrix chain information after de-duplication is traversed by using the geometric engine model generator, the matrix chain information and the feature parameters are combined, the modeling entity of the copy class feature is generated, and the topological elements of the modeling entity are named.

[0068] In addition, in an embodiment, the method is applied to copy class features based on matrix transformation, including mirror, array and the like.

[0069] It should be noted that in the parametric modeling system, the common copy class features include mirror, linear array, circumferential array, sketch driven array, etc. The mirror feature and the array feature are different in that the mirror feature is based on the reference element to make a symmetric copy operation, and for a single operation, the selected reference element is logically transformed only once; the array feature copies and arranges a geometric body in a certain direction or multiple directions according to a certain interval and number, forming a regular repeating arrangement, and multiple matrix transformations are used for the selected geometric body. The two types of operation logically similar features are classified as copy class features in the present application, and the topology element naming method based on the copy class feature of the present application is applied to the copy class features including mirror and array.

[0070] In addition, in an embodiment, the naming format of the element name is {coordinate number + source element topology name + recursive layer number + feature type + feature number}, wherein the expression of the coordinate number is x&y, the coordinate number is used to record the matrix coordinate index position of the copy class feature, the expression of the source element topology name is OrigNameRef, the expression of the recursive layer number is NLevel, the expression of the feature type is FeatType, and the expression of the feature number is FFeatID; wherein when the copy class feature is a linear array, the linear array is composed of N*M matrix transformations, x∈[0,N-1], y∈[0,M-1].

[0071] It should be noted that the topology element includes a point element, an edge element and a face element, and the element name is obtained by naming the topology element, and the element name at least includes the copy feature coordinate number, the name information of the corresponding element in the source feature body, the nesting level when nesting is selected, the feature number, the feature type and the element type.

[0072] In addition, in an embodiment, the reference feature is a feature relied on by the copy class feature; the matrix chain information is obtained by defining an abstract data structure class to encapsulate the reference feature, the geometric transformation information and the calculation method, wherein the matrix chain information is the geometric transformation information calculated by the copy class feature based on the reference feature, the geometric transformation information of the non-copy class feature is a matrix chain, and the geometric transformation information of the copy class feature is a matrix chain set; the result container is an associated container for storing the matrix chain information, wherein the retrieval of the result container is realized by key value, and the instantiation of the result container retrieval is based on the abstract data structure class.

[0073] It should be noted that the reference feature is a non-copy class feature or a copy class feature, so the reference feature relied on by the copy class feature is represented by a multi-way tree structure.

[0074] In addition, with reference to Figures 2 to 5 , Figure 4 the calculation diagram of the matrix chain of the second recursive layer provided by another embodiment of the present application, Figure 5The calculation schematic diagram of the matrix chain of the third layer of the recursive hierarchy provided for another embodiment of the present application, in an embodiment, in Figure 1 The step S20 shown also includes but is not limited to the following steps:

[0075] S21, based on any copy class feature, extracting all reference features of the first layer of the multi-ary tree structure of the reference features of the copy class feature, initializing i=1, wherein the multi-ary tree structure of the reference features of the copy class feature includes LevelTotal1 layers, the number of the reference features of the first layer of the multi-ary tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1;

[0076] S22, initializing j=1, extracting the jth reference feature of the ith layer of the multi-ary tree structure, when the reference feature is a non-copy class feature, the matrix chain information includes the reference feature and the matrix chain, the expression of the matrix chain information is FeatureA+Matrix(FeatCur), or, when the reference feature is a copy class feature, the matrix chain set is recursively calculated by the depth-first search method, the expression of the matrix chain set is FeatureM+Matrix(FeatCur), wherein j is a positive integer, j is less than or equal to FeatNum, FeatureA is a non-copy class feature, Matrix(FeatCur) is a transformation matrix of the copy class feature, FeatCur is a copy class feature, and FeatureM is a copy class feature;

[0077] S23, j is incremented by 1, the matrix chain information is determined based on the reference feature until j=FeatNum, the matrix chain information of all reference features of the ith layer of the multi-ary tree structure is obtained, and all the matrix chain information is stored to the ith layer of the result container;

[0078] S24, i is incremented by 1, the matrix chain information of all reference features of the ith layer of the multi-ary tree structure is determined until i=LevelTotal1, the matrix chain information of all reference features of the multi-ary tree structure is obtained, and all the matrix chain information is stored in the result container.

[0079] It is to be noted that, referring to Figure 3 From the lower layer of the root node of the multi-ary tree structure as the first layer, the nodes are traversed layer by layer, the nodes of the same layer are traversed from left to right, and the order of the nodes of the same layer from left to right, i.e., the order of traversing the reference features directly dependent on the copy class feature M3 according to the order of the feature history tree, the matrix chain information of all the reference features is calculated and stored in the result container.

[0080] It is to be noted that, referring to Figure 3In the calculation of the matrix chain information of a single reference feature, for the copy class feature, taking the copy class feature M1 as an example, the matrix chain information of the copy class feature M1 needs to be recursively obtained from the copy class feature M1 to the geometric transformation information on the path of the leaf node by the depth-first search method. The path from a leaf node to the copy class feature M3 is a matrix chain. The matrix chain set of the copy class feature M1 is obtained by adding the Mtx3 matrix to all the matrix chains, that is, {E1+Mtx1+Mtx3, C1+Mtx1+Mtx3} in Figure 3 . For the copy class feature M2, the calculation process of the matrix chain information is the same as that of the copy class feature M1, and {E1+Mtx1+Mtx2+Mtx3, C1+Mtx1+Mtx2+Mtx3, E2+Mtx2+Mtx3, E3+Mtx2+Mtx3} is obtained. The specific steps are not described here. Wherein, Mtx1 is the transformation matrix of the copy class feature M1, Mtx2 is the transformation matrix of the copy class feature M2, and Mtx3 is the transformation matrix of the copy class feature M3.

[0081] It should be noted that, referring to Figure 3 , in the calculation of the matrix chain information of a single reference feature, for the non-copy class feature, taking the non-copy class feature E3 as an example, a matrix chain is directly generated, as shown in Figure 3 E3+Mtx3.

[0082] It should be noted that the transformation of the copy class feature is converted into a series of transformations of the reference feature by the depth-first search method, so that the modeling process of the copy class feature is completely associated with the parameters of the reference feature. Once the reference feature is edited and modified and the feature is reconstructed, the copy class feature referring to the reference feature will be updated synchronously.

[0083] It should be noted that, referring to Figure 4 and Figure 5 , the second level and the third level of the multi-way tree structure are traversed by the same method and steps as the first level of the multi-way tree structure, and the matrix chain information of all the copy class features of the second level and the third level of the multi-way tree structure is obtained.

[0084] In addition, referring to Figure 6 , Figure 6 , the calculation result diagram of all the matrix chain information after deduplication provided by another embodiment of the present application is shown in an embodiment. In Figure 1 , the step S30 further includes but is not limited to the following steps:

[0085] S31, traversing the result container layer by layer, comparing the matrix chain information of any one level in the result container, removing the repeated matrix chain information to realize local deduplication identification, comparing the matrix chain information of any two levels of the result container, removing the repeated matrix chain information to realize global deduplication identification;

[0086] S32, or, based on any reference feature to obtain matrix chain information, traversing the result container layer by layer to perform uniqueness check.

[0087] It should be noted that the matrix chain information in the result container can be removed by first traversing the levels of the result container layer by layer to compare the matrix chain information within the level to complete local deduplication identification, and then comparing the matrix chain information of any two levels of the result container to complete global deduplication identification, to obtain the non-redundant modeling information of each level in the result container.

[0088] It should be noted that the levels are stored in a result container in ascending order of the sequence number, and after obtaining a new matrix chain information, the matrix chain information is compared with all the matrix chain information stored in the result container to perform uniqueness check, and when the matrix chain information to be added is the same as the matrix chain information stored in the result container, it is not added.

[0089] It should be noted that the matrix chain information in the result container is removed, so as to avoid repeated execution when traversing the matrix chain information subsequently. The deduplicated matrix chain information is as shown in Figure 6 .

[0090] In addition, in an embodiment, the geometric modeling engine is a geometric modeling library based on BRep boundary representation and having geometric class and topological class data structure, and the geometric modeling engine can provide API for feature modeling.

[0091] It should be noted that the geometric modeling library includes ACIS, ParaSolid, OpenCASCAD, etc. Boundary representation (BRep) is a boundary representation based on boundary representation.

[0092] In addition, referring to Figure 7 and Figure 8 , Figure 7 a modeling and naming process based on matrix chain information provided by another embodiment of the present application, Figure 8 a field information diagram for element name of topological element of mirror copied class feature provided by another embodiment of the present application, in an embodiment, in step S50 shown in Figure 1 , the following steps are further included but not limited to:

[0093] S51, determine the multi-ary tree structure of the copy class feature based on any one copy class feature, set m=1, extract the mth level of the result container and obtain the size of the mth level of the result container, wherein the number of levels of the multi-ary tree structure is LevelTotal2;

[0094] S52, set n=1, take out the nth matrix chain information of the mth level of the result container, parse the feature information in the matrix chain information to obtain the reference feature, wherein the reference feature is the original feature currently referenced and dependent on the parsing;

[0095] S53, when the reference feature is the base feature, transform to the position of the final transformation matrix determined based on the matrix chain calculation, perform modeling using the feature parameters of the reference feature to obtain a copy entity, perform topology element naming on the copy entity, perform Boolean operation on the copy entity and the historical result entity, and perform topology element naming on the result body;

[0096] S54, or, when the reference feature is the modification feature, obtain the naming information of the reference element of the reference feature, determine the target element matching the naming information in the historical result entity, perform reference on the target element to complete the modification modeling to obtain a modification element, and perform topology naming on the modification element;

[0097] S55, n is incremented by 1, and all matrix chain information of the mth level of the result container is traversed one by one to determine the element name of each topology element until n=Length, wherein Length is the size of Map(m), and Map(m) is the mth level of the result container;

[0098] S56, m is incremented by 1, and all reference features are modeled and topology elements are named layer by layer to complete the modeling and topology element naming of all reference features in the result container until m=LevelTotal2.

[0099] It should be noted that when the copy class feature is a base feature, the final transformation matrix is determined and transformed to the position based on the matrix chain information, the reference feature is used to perform modeling to obtain a copy entity, the copy entity is named by topology elements, and the copy entity is subjected to Boolean operation with the named historical result entity. The result body after Boolean operation is named by topology elements.

[0100] It should be noted that referring to Figure 7 and Figure 8 , the element naming of the copy class feature depends on the stable element during modeling, and the topology element f2 is obtained by mirroring the element f1. The semantic interpretation of the element name of the element f2 is as follows:

[0101]

[0102] Semantic explanation of element names in Table 1f2

[0103] The fields Position_I and Position_J together represent the position indices of the mirror and array matrices. For mirror transformations, there is only one matrix, while for array features, most parameterization systems have both direction 1 and direction 2. The RefOrig field represents the original naming information of the source topology element, i.e., the naming information of the referenced feature. Since the transformation of the feature in this invention involves multiple matrix transformations of the referenced feature, the field information of the element name corresponds to the information of the referenced feature.

[0104] like Figure 9 As shown, Figure 9 This is a structural diagram of a topology element naming device based on replication-class features according to an embodiment of the present invention. The present invention also provides a topology element naming device based on replication-class features, comprising:

[0105] The processor 601 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0106] The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601 to execute the topology element naming method based on replication characteristics of the embodiments of this application.

[0107] The input / output interface 603 is used to implement information input and output;

[0108] The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0109] Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604);

[0110] The processor 601, the memory 602, the input / output interface 603, and the communication interface 604 are communicatively connected with each other through the bus 605.

[0111] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, and stores a computer program. The computer program is executed by a processor to implement the method for naming topological elements based on copy class features.

[0112] The memory is a non-transitory computer readable storage medium, and can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The apparatus embodiment described above is merely illustrative, wherein the units described as separate components can or can not be physically separated, and are implemented in one place or can be distributed to multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment.

[0113] As will be appreciated by one of ordinary skill in the art, all or some of the steps, systems, etc. in the above-disclosed methods can be embodied in software, firmware, hardware, and / or suitable combinations thereof. Some or all of the physical components can be implemented with software executed by a processor, such as a central processing unit, a digital signal processor, or microprocessor, or can be implemented as hardware, or as an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). As is well known to those of ordinary skill in the art, computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as carrier waves or other transport mechanisms, and includes any information delivery media.

[0114] The above description is that of the preferred embodiments of the application. Various modifications and changes can be made thereto without departing from the spirit and scope of the application as set forth in the claims.

Claims

1. A method for naming topological elements based on replicated class features, characterized by, Comprise: a multi-trees structure initialization result container based on a plurality of reference features, wherein the reference features are copy class features or non-copy class features; based on the multi-trees structure, traversing each copy matrix of the reference features layer by layer to obtain matrix chain information, and saving the matrix chain information to the result container, wherein the copy matrix of the non-copy class feature is a matrix chain, and the copy matrix of the copy class feature is a matrix chain set calculated based on a depth-first search recursion; traversing the result container layer by layer to perform deduplication processing on the matrix chain information; traversing each matrix chain of the result container layer by layer through a model generator of a geometric modeling engine, and constructing a modeling entity corresponding to the copy class feature according to the corresponding matrix chain information and feature parameters of the reference feature, wherein the modeling entity comprises a topological element corresponding to the copy class feature; determining an element name of each topological element in the modeling process of the modeling entity, wherein when the copy class feature corresponding to the topological element is a base feature, the element name is determined when modeling is performed according to the position of a final transformation matrix calculated based on the corresponding matrix chain, or when the copy class feature corresponding to the topological element is a modification feature, the element name is generated after the reference name of the reference element corresponding to the copy class feature is found and the modification element is found according to the reference name.

2. The topological element naming method based on copy class features according to claim 1, characterized in that: the method is applied to the copy class features implemented based on matrix transformation, and the copy class features comprise mirror and array.

3. The topological element naming method based on copy class features according to claim 1, characterized in that: the naming format of the element name is {coordinate number + source element topological name + recursion level number + feature type + feature number}, wherein the expression of the coordinate number is x&y, the coordinate number is used to record the matrix coordinate index position of the copy class feature, the expression of the source element topological name is OrigNameRef, the expression of the recursion level number is NLevel, the expression of the feature type is FeatType, and the expression of the feature number is FFeatID; wherein when the copy class feature is a linear array, the linear array is composed of N×M matrix transformations, x∈[0,N-1], y∈[0,M-1].

4. The topological element naming method based on copy class features according to claim 1, characterized in that: the reference feature is a feature relied on by the copy class feature; the matrix chain information is obtained by defining an abstract data structure class to encapsulate the reference feature, geometric transformation information and calculation method, wherein the matrix chain information is geometric transformation information calculated based on the reference feature relied on by the copy class feature, the geometric transformation information of the non-copy class feature is the matrix chain, and the geometric transformation information of the copy class feature is the matrix chain set. The result container is an associated container for storing the matrix chain information, wherein the retrieval of the result container is achieved by key value, and the instantiation of the retrieval of the result container is based on the abstract data structure class.

5. The method of claim 1, wherein, Based on the multi-ary tree structure, the matrix chain information is obtained by layer-by-layer traversal of the copy matrix of each reference feature, and the matrix chain information is saved to the result container, including: Based on any copy class feature, all reference features of the first level of the multi-ary tree structure of the reference feature of the copy class feature are extracted, and i = 1 is initialized, wherein the multi-ary tree structure of the reference feature of the copy class feature includes LevelTotal1 levels, the number of reference features of the first level of the multi-ary tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1; j = 1 is initialized, and the jth reference feature of the ith level of the multi-ary tree structure is extracted, when the reference feature is the non-copy class feature, the matrix chain information includes the reference feature and the matrix chain, and the expression of the matrix chain information is FeatureA + Matrix (FeatCur), or when the reference feature is the copy class feature, the matrix chain set is recursively calculated by a depth-first search method, and the expression of the matrix chain set is FeatureM + Matrix (FeatCur), wherein j is a positive integer, j is less than or equal to FeatNum, FeatureA is the non-copy class feature, Matrix (FeatCur) is the transformation matrix of the copy class feature, FeatCur is the copy class feature, and FeatureM is the copy class feature; j is incremented by 1, and the matrix chain information is determined based on the reference feature until j = FeatNum, the matrix chain information of all reference features of the ith level of the multi-ary tree structure is obtained, and all the matrix chain information is stored to the ith level of the result container; i is incremented by 1, and the matrix chain information of all reference features of the ith level of the multi-ary tree structure is determined until i = LevelTotal1, the matrix chain information of all reference features of the multi-ary tree structure is obtained, and all the matrix chain information is stored in the result container.

6. The method of claim 1, wherein, The result container is an associated container for storing the matrix chain information, wherein the retrieval of the result container is achieved by key value, and the instantiation of the retrieval of the result container is based on the abstract data structure class. Based on the multi-ary tree structure, the matrix chain information is obtained by layer-by-layer traversal of the copy matrix of each reference feature, and the matrix chain information is saved to the result container, including: Based on any copy class feature, all reference features of the first level of the multi-ary tree structure of the reference feature of the copy class feature are extracted, and i = 1 is initialized, wherein the multi-ary tree structure of the reference feature of the copy class feature includes LevelTotal1 levels, the number of reference features of the first level of the multi-ary tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1; j = 1 is initialized, and the jth reference feature of the ith level of the multi-ary tree structure is extracted, when the reference feature is the non-copy class feature, the matrix chain information includes the reference feature and the matrix chain, and the expression of the matrix chain information is FeatureA + Matrix (FeatCur), or when the reference feature is the copy class feature, the matrix chain set is recursively calculated by a depth-first search method, and the expression of the matrix chain set is FeatureM + Matrix (FeatCur), wherein j is a positive integer, j is less than or equal to FeatNum, FeatureA is the non-copy class feature, Matrix (FeatCur) is the transformation matrix of the copy class feature, FeatCur is the copy class feature, and FeatureM is the copy class feature; j is incremented by 1, and the matrix chain information is determined based on the reference feature until j = FeatNum, the matrix chain information of all reference features of the ith level of the multi-ary tree structure is obtained, and all the matrix chain information is stored to the ith level of the result container; i is incremented by 1, and the matrix chain information of all reference features of the ith level of the multi-ary tree structure is determined until i = LevelTotal1, the matrix chain information of all reference features of the multi-ary tree structure is obtained, and all the matrix chain information is stored in the result container. The result container is an associated container for storing the matrix chain information, wherein the retrieval of the result container is achieved by key value, and the instantiation of the retrieval of the result container is based on the abstract data structure class. Based on the multi-ary tree structure, the matrix chain information is obtained by layer-by-layer traversal of the copy matrix of each reference feature, and the matrix chain information is saved to the result container, including: Based on any copy class feature, all reference features of the first level of the multi-ary tree structure of the reference feature of the copy class feature are extracted, and i = 1 is initialized, wherein the multi-ary tree structure of the reference feature of the copy class feature includes LevelTotal1 levels, the number of reference features of the first level of the multi-ary tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1; j = 1 is initialized, and the jth reference feature of the ith level of the multi-ary tree structure is extracted, when the reference feature is the non-copy class feature, the matrix chain information includes the reference feature and the matrix chain, and the expression of the matrix chain information is FeatureA + Matrix (FeatCur), or when the reference feature is the copy class feature, the matrix chain set is recursively calculated by a depth-first search method, and the expression of the matrix chain set is FeatureM + Matrix (FeatCur), wherein j is a positive integer, j is less than or equal to FeatNum, FeatureA is the non-copy class feature, Matrix (FeatCur) is the transformation matrix of the copy class feature, FeatCur is the copy class feature, and FeatureM is the copy class feature; j is incremented by 1, and the matrix chain information is determined based on the reference feature until j = FeatNum, the matrix chain information of all reference features of the ith level of the multi-ary tree structure is obtained, and all the matrix chain information is stored to the ith level of the result container; i is incremented by 1, and the matrix chain information of all reference features of the ith level of the multi-ary tree structure is determined until i = LevelTotal1, the matrix chain information of all reference features of the multi-ary tree structure is obtained, and all the matrix chain information is stored in the result container. The result container is an associated container for storing the matrix chain information, wherein the retrieval of the result container is achieved by key value, and the instantiation of the retrieval of the result container is based on the abstract data structure class. Based on the multi-ary tree structure, the matrix chain information is obtained by layer-by-layer traversal of the copy matrix of each reference feature, and the matrix chain information is saved to the result container, including: Based on any copy class feature, all reference features of the first level of the multi-ary tree structure of the reference feature of the copy class feature are extracted, and i = 1 is initialized, wherein the multi-ary tree structure of the reference feature of the copy class feature includes LevelTotal1 levels, the number of reference features of the first level of the multi-ary tree structure is FeatNum, i is a positive integer, and i is less than or equal to LevelTotal1; The geometry modeling engine is a geometry modeling library based on BRep boundary representation and having geometry class and topology class data structures, and the geometry modeling engine can provide an API for feature modeling.

8. The method of claim 1, wherein, Element names of the topology elements are determined in the modeling process of the modeling entity, including: Based on any one of the copy class features, determine the multi-way tree structure of the copy class features, set m = 1, extract the mth level of the result container and obtain the size of the mth level of the result container, wherein the number of levels of the multi-way tree structure is LevelTotal 2; Setting n=1, taking out the nth matrix chain information of the mth level of the result container, analyzing the feature information in the matrix chain information to obtain the reference feature, wherein the reference feature is the original feature currently referenced and dependent on; When the reference feature is a base feature, transforming to the position based on the final transformation matrix determined based on the matrix chain calculation, performing modeling using the feature parameters of the reference feature to obtain a copy entity, performing topology element naming on the copy entity, performing Boolean operation on the copy entity and the historical result entity, and performing topology element naming on the result body; Or, when the reference feature is a modification feature, obtaining the naming information of the reference element of the reference feature, determining a target element matching the naming information in the historical result entity, performing reference on the target element to complete modification modeling to obtain the modification element, and performing topology naming on the modification element; Incrementing n by 1, traversing all the matrix chain information of the mth level of the result container one by one, determining the element names of the topology elements until n=Length, completing the modeling of all the reference features and the naming of the topology elements of the mth level of the result container, wherein Length is the size of Map(m), and Map(m) is the mth level of the result container; Incrementing m by 1, layer by layer traversing the result container to complete the modeling of all the reference features and the naming of the topology elements until m=LevelTotal2.

9. A topological element naming device based on copy-type features, characterized in that, The memory is connected in communication with the at least one control processor, and stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the topology element naming method based on the copy class feature according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing a computer to perform the topology element naming method based on the copy class feature according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Concurrency control method for replicated collaborative CAD system

    CN104142813A

  • Facilitated editing of generative design geometry in computer aided design user interface

    US10467807B1