CN113901256A - Similarity detection method and device for CAD model, terminal device and storage medium - Google Patents

Similarity detection method and device for CAD model, terminal device and storage medium Download PDF

Info

Publication number
CN113901256A
CN113901256A CN202111112408.4A CN202111112408A CN113901256A CN 113901256 A CN113901256 A CN 113901256A CN 202111112408 A CN202111112408 A CN 202111112408A CN 113901256 A CN113901256 A CN 113901256A
Authority
CN
China
Prior art keywords
cad
model
local
feature
local feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111112408.4A
Other languages
Chinese (zh)
Other versions
CN113901256B (en
Inventor
王攀
余志强
欧阳森山
李仁宏
谢敏
杨晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Aircraft Industrial Group Co Ltd
Original Assignee
Chengdu Aircraft Industrial Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Aircraft Industrial Group Co Ltd filed Critical Chengdu Aircraft Industrial Group Co Ltd
Priority to CN202111112408.4A priority Critical patent/CN113901256B/en
Publication of CN113901256A publication Critical patent/CN113901256A/en
Application granted granted Critical
Publication of CN113901256B publication Critical patent/CN113901256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for detecting the similarity of CAD models, which comprises the following steps: determining a surface element topological relation corresponding to each CAD entity model; constructing a point adjacency graph of each CAD solid model by using the surface element topological relation of each CAD solid model and the surface element of each CAD solid model; obtaining an information expression result of each CAD solid model based on the point adjacency graph of each CAD solid model; and determining similarity detection results of the plurality of CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model. The invention also discloses a device for detecting the similarity of the CAD model, terminal equipment and a computer readable storage medium. By adopting the method, the information expression result can accurately express the relationship among the characteristics in the CAD model, thereby improving the accuracy of the similarity detection result.

Description

Similarity detection method and device for CAD model, terminal device and storage medium
Technical Field
The invention relates to the technical field of CAD model processing, in particular to a method and a device for detecting similarity of CAD models, terminal equipment and a computer readable storage medium.
Background
In modern industrial enterprises, the application range of CAD models has expanded from upstream stages of product structural characterization to downstream stages of processing, manufacturing, assembly and repair. Long-term design activities have led enterprises to accumulate a large number of CAD models, and the empirical knowledge and design intelligence hidden behind these models has significant reuse value for new product development. In actual product design, different products evolve in the process of continuous reference and fusion to meet the changing functional requirements, so that the different products have rich design relevance on local structures. Therefore, the CAD model structure similarity analysis technique has become one of the research hotspots in recent years.
In the related technology, local and overall information of a three-dimensional model is represented through attribute adjacent label graphs, maps, space word bags and the like, so that hierarchical feature descriptors from fine to coarse in granularity are constructed; and then, searching in two layers by adopting a thickness combination method according to the two descriptors with different granularities to obtain a similarity detection result between the CAD models.
However, the accuracy of the similarity detection result of the CAD model is low by using the existing similarity detection method.
Disclosure of Invention
The invention mainly aims to provide a method and a device for detecting the similarity of a CAD model, a terminal device and a computer readable storage medium, and aims to solve the technical problem that the accuracy of the similarity detection result of the CAD model is low by adopting the existing similarity detection method in the prior art.
In order to achieve the above object, the present invention provides a method for detecting similarity of CAD models, which comprises the following steps:
when a plurality of CAD entity models are obtained, determining a surface element topological relation corresponding to each CAD entity model;
constructing a point adjacency graph of each CAD entity model by using the surface element topological relation of each CAD entity model and the surface elements of each CAD entity model;
obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model;
and determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
Optionally, the step of determining the surface element topological relation corresponding to each CAD entity model includes:
determining contact relations among the surface elements in each CAD model;
and determining the surface element topological relation corresponding to each CAD entity model by using the contact relation among the surface elements in each CAD model.
Optionally, the step of obtaining an information expression result of each CAD solid model based on the point adjacency graph of each CAD solid model includes:
obtaining a local feature set of each CAD solid model based on the point adjacency graph of each CAD solid model;
and obtaining an information expression result of each CAD entity model based on each local feature set.
Optionally, the step of obtaining a local feature set of each CAD solid model based on the point adjacency graph of each CAD solid model includes:
determining a very large group in the point adjacency graphs of each CAD solid model, wherein one CAD solid model corresponds to one point adjacency graph;
and determining a geometric region corresponding to each maximal blob in each point adjacency graph as a local feature so as to obtain a local feature set of each CAD solid model, wherein one point adjacency graph corresponds to one local feature set.
Optionally, the step of obtaining an information expression result of each CAD entity model based on each local feature set includes:
randomly sampling a plurality of points on the surface of each local feature in each local feature set to obtain a surface point set of each local feature in each local feature set;
calculating Euclidean distance of any two points in the surface point set of each local feature in each local feature set;
repeatedly executing the step of calculating the Euclidean distance of any two points in the surface point set of each local feature in each local feature set until reaching the preset times, and obtaining a distance group corresponding to each local feature in each local feature set;
constructing an equidistant histogram of each local feature in each local feature set by using the distance group corresponding to each local feature in each local feature set;
obtaining a feature vector corresponding to each local feature in each local feature set based on an equidistant histogram of each local feature in each local feature set;
combining the feature vectors corresponding to each local feature in each local feature set to obtain a feature vector set corresponding to each CAD solid model;
and obtaining an information expression result of each CAD entity model based on each characteristic vector set.
Optionally, the step of obtaining an information expression result of each CAD entity model based on each feature vector set includes:
merging each characteristic vector set to obtain a characteristic vector data set;
determining a clustering center in the feature vector data set;
coding the clustering center to obtain a center code;
determining a clustering point code corresponding to each feature vector in the feature vector data set in the center code by using the distance between each feature vector in the feature vector data set and the clustering center;
determining a characteristic topological relation between local characteristics corresponding to each CAD solid model based on the point adjacency graph of each CAD solid model;
and obtaining an information expression result of each CAD entity model based on the clustering point code corresponding to each CAD entity model, each local feature corresponding to each CAD entity model and the characteristic topological relation among the local features corresponding to each CAD entity model.
Optionally, the step of determining similarity detection results of a plurality of CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relationship between the local features in each CAD entity model includes:
determining similar elements of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model by using a maximum common subgraph algorithm;
and obtaining similarity detection results of a plurality of CAD entity models based on the similar elements.
In addition, to achieve the above object, the present invention further provides an apparatus for detecting similarity of CAD models, the apparatus comprising:
the obtaining module is used for determining the surface element topological relation corresponding to each CAD entity model when the plurality of CAD entity models are obtained;
the building module is used for building a point adjacency graph of each CAD solid model by using the surface element topological relation of each CAD solid model and the surface elements of each CAD solid model;
the information obtaining module is used for obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model;
and the result obtaining module is used for determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
In addition, to achieve the above object, the present invention further provides a terminal device, including: the computer-readable storage medium comprises a memory, a processor and a similarity detection program stored on the memory and running on the processor, wherein the similarity detection program of the CAD model realizes the steps of the similarity detection method of the CAD model according to any item when the similarity detection program of the CAD model is executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a similarity detection program for a CAD model is stored, which when executed by a processor implements the steps of the method for detecting the similarity of the CAD model according to any one of the above aspects.
The technical scheme of the invention provides a method for detecting the similarity of CAD models, which comprises the following steps: when a plurality of CAD entity models are obtained, determining a surface element topological relation corresponding to each CAD entity model; constructing a point adjacency graph of each CAD entity model by using the surface element topological relation of each CAD entity model and the surface elements of each CAD entity model; obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model; and determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
Because the existing method only utilizes the local features of the CAD model to express the CAD model, the information expression result of the CAD model cannot express the relationship among the features in the CAD model, so that the accuracy of the information expression result is lower, and the accuracy of the final similarity detection result is lower. By adopting the method, the obtained information expression result comprises the characteristics and the topological relation among the characteristics, the information expression result can accurately express the relation among the characteristics in the CAD model, and the accuracy of the information expression result is improved, so that the accuracy of the similarity detection result is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of a first embodiment of a method for similarity detection of CAD models according to the present invention;
FIG. 3 is a schematic representation of a CAD solid model of the present invention;
FIG. 4 is a diagram of a point adjacency corresponding to the CAD solid model of FIG. 3;
FIG. 5 is a schematic view of a maximum blob corresponding to the point adjacency of FIG. 4 in accordance with the present invention;
FIG. 6 is a schematic diagram of the corresponding feature vectors of the very large cliques in FIG. 5;
FIG. 7 is a diagram illustrating the information expression result of the present invention;
fig. 8 is a block diagram showing the structure of a first embodiment of the apparatus for detecting the similarity of CAD models according to the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal device in a hardware operating environment according to an embodiment of the present invention.
In general, a terminal device includes: at least one processor 301, a memory 302, and a CAD model similarity detection program stored on said memory and executable on said processor, said CAD model similarity detection program being configured to implement the steps of the CAD model similarity detection method as described above.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. The processor 301 may further include an AI (Artificial Intelligence) processor for processing similarity detection method operations with respect to the CAD model such that the similarity detection method model of the CAD model may be trained and learned autonomously, improving efficiency and accuracy.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer-readable storage medium in memory 302 is used to store at least one instruction for execution by processor 301 to implement a method for similarity detection of a CAD model provided by method embodiments herein.
In some embodiments, the terminal may further include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, on which a similarity detection program of a CAD model is stored, where the similarity detection program of the CAD model, when executed by a processor, implements the steps of the similarity detection method of the CAD model as described above. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. It is determined that the program instructions may be deployed to be executed on one terminal device, or on multiple terminal devices located at one site, or distributed across multiple sites and interconnected by a communication network, as examples.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The computer-readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Based on the hardware structure, the embodiment of the similarity detection method of the CAD model is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a method for detecting similarity of CAD models, the method being used for a terminal device, and the method including the following steps:
step S11: when a plurality of CAD entity models are obtained, the surface element topological relation corresponding to each CAD entity model is determined.
The execution subject of the present invention is a terminal device, the terminal device is installed with a similarity detection program for a CAD model, and the terminal device implements the steps of the method for detecting the similarity of the CAD model according to the present invention when executing the similarity detection program for the CAD model.
In specific application, the CAD entity model may be represented in a CAD three-dimensional graph, and when the CAD entity model is obtained, for each CAD entity model, a contact relationship between elements in the CAD entity model needs to be determined, and according to the contact relationship, a surface element topological relationship between the elements of the CAD entity model is determined. Wherein a surface element refers to a surface in the CAD solid model.
Specifically, the step of determining the surface element topological relation corresponding to each CAD entity model includes: determining contact relations among the surface elements in each CAD model; and determining the surface element topological relation corresponding to each CAD entity model by using the contact relation among the surface elements in each CAD model.
It is understood that the bin topological relation refers to a contact relation between each bin in the CAD solid model, wherein the contact relation may be: if there is a common vertex between the surface elements, the surface elements are in contact, otherwise the surface elements are not in contact. The bin topological relationship includes a contact relationship between all of the bin elements included in the CAD solid model.
In the embodiment, the surface element topological relation between the surface elements can be accurately determined through the contact relation between the surface elements, so that the accuracy of the surface element topological relation is improved, and the accuracy of the information expression result obtained later is ensured to be high.
Referring to fig. 3, fig. 3 is a schematic diagram of the CAD solid model of the present invention, in fig. 3, the CAD solid model is divided into 7 planes, i.e., there are 7 plane elements: A. b, C, D, E, F and G, the bin element topological relation refers to the contact relation between the respective bin elements in the CAD solid model, for example, in FIG. 3, A and B are in contact, and A and D are not in contact (no contact point exists), then A and B have the bin element topological relation, and A and D do not have the bin element topological relation; the contact relationship between the surface elements needs to be determined, so that the surface element topological relationship between the surface elements of the CAD solid model can be obtained.
Step S12: and constructing a point adjacency graph of each CAD entity model by using the surface element topological relation of each CAD entity model and the surface elements of each CAD entity model.
And when the surface element topological relation of each CAD entity model is obtained, constructing a point adjacency graph based on the surface element topological relation including the contact relation among all surface elements and all surface elements of the CAD entity model.
Specifically, the point-to-point adjacency graph of one CAD solid model is represented by VAG ═ (V, E), where V ═ V (V, E)1,v2,…,vn) Corresponding to all surface elements in the CAD physical model, E ═ tone<vi,vj>|h1(vi,vj) 1 is a representation of the bin topological relationship between all bins in the CAD solid model, h1(g) Is a surface element topological relation function for judging surface element, h1(vi,vj) 1 represents viAnd vjAt least one contact point, i.e. v, exists between two surface elementsiAnd vjHaving a surface element topological relation.
The surface elements may be used as vertices of the point adjacency graph, the contact relationship (surface element topological relationship) is used as an edge, two surface elements have a surface element topological relationship (contact, with a contact point), and then an edge is formed between the vertices corresponding to the two surface elements, and if two surface elements do not have a surface element topological relationship (non-contact, without a contact point), then no edge is formed between the vertices corresponding to the two surface elements.
Referring to fig. 4, fig. 4 is a point adjacency graph corresponding to the CAD solid model in fig. 3, and based on bin element topological relations corresponding to A, B, C, D, E, F and G in fig. 3, it is determined that a has a bin element topological relation between B and C, D has a bin element topological relation between F and E, G has a bin element topological relation between F and E, and E and F have a bin element topological relation, so as to obtain a point adjacency graph as shown in fig. 4, and it can be seen that two faces having a bin element topological structure have an edge therebetween.
Step S13: and obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model.
And analyzing the point adjacency graph of the obtained CAD solid model to obtain the information expression result of each CAD solid model. The information expression result is comprehensive, and the accuracy is high.
Specifically, the step of obtaining an information expression result of each CAD solid model based on the point adjacency graph of each CAD solid model includes: obtaining a local feature set of each CAD solid model based on the point adjacency graph of each CAD solid model; and obtaining an information expression result of each CAD entity model based on each local feature set.
Wherein the step of obtaining a local feature set of each CAD solid model based on the point adjacency graph of each CAD solid model includes: determining a very large group in the point adjacency graphs of each CAD solid model, wherein one CAD solid model corresponds to one point adjacency graph; and determining a geometric region corresponding to each maximal blob in each point adjacency graph as a local feature so as to obtain a local feature set of each CAD solid model, wherein one point adjacency graph corresponds to one local feature set.
In a specific application, for each point adjacency graph of the CAD solid model, a classical BK algorithm (Bron-Kerbosch algorithm) is used to search all existing maximal cliques, and a geometric region corresponding to each maximal clique is determined as a local feature, and a result of the local feature corresponding to the CAD solid model can be represented as formula one:
Figure BDA0003271880450000101
wherein, lfiCorresponding to the ith local feature, h, for the CAD solid model2(g) To determine whether a bin element is a function in a local feature, h2(vi) 1 represents viAt lfiIn, otherwise h2(vi)=0。
And combining all local features of each CAD entity model into a set, namely obtaining the local feature set of each CAD entity model, wherein LE is a local feature set.
Referring to fig. 5, fig. 5 is a schematic diagram of the maximal cliques corresponding to the point adjacency graph in fig. 4 according to the present invention, and 4 maximal cliques are obtained based on the corresponding point adjacency graph in fig. 4, that is, based on the CAD solid model in fig. 3, an upper portion in fig. 5 is a schematic diagram of the maximal cliques, a lower portion is local features corresponding to combinations of surface elements, each maximal clique corresponds to one local feature, each local feature includes a plurality of surface elements, and a surface element topological relation (contact points) exists between the surface elements of each local feature.
The local features are determined by utilizing the maximum cliques, and the problem that the effectiveness of the local features is poor due to insufficient local feature information caused by undersize structures corresponding to the local features is avoided. Meanwhile, the situations that the information quantity is too large, the local feature data is more, and the analysis efficiency is low due to the fact that the whole point-critical graph is used as the local feature are avoided.
Meanwhile, the step of obtaining an information expression result of each CAD entity model based on each local feature set includes: randomly sampling a plurality of points on the surface of each local feature in each local feature set to obtain a surface point set of each local feature in each local feature set; calculating Euclidean distance of any two points in the surface point set of each local feature in each local feature set; repeatedly executing the step of calculating the Euclidean distance of any two points in the surface point set of each local feature in each local feature set until reaching the preset times, and obtaining a distance group corresponding to each local feature in each local feature set; constructing an equidistant histogram of each local feature in each local feature set by using the distance group corresponding to each local feature in each local feature set; obtaining a feature vector corresponding to each local feature in each local feature set based on an equidistant histogram of each local feature in each local feature set; combining the feature vectors corresponding to each local feature in each local feature set to obtain a feature vector set corresponding to each CAD solid model; and obtaining an information expression result of each CAD entity model based on each characteristic vector set.
After obtaining the set of local features for each of the CAD solid models, for any one CAD solid model, randomly sampling a plurality of points (e.g., m) on the surface of each local feature in its corresponding set of local features1Point, m1A value set by a user based on requirements) to obtain a surface point set of each local feature in a local feature set corresponding to the CAD solid model, wherein the process of randomly sampling a plurality of points refers to a formula II, and the formula II is as follows:
Figure BDA0003271880450000111
wherein p isiCoordinate value, p 'representing sampling point on ith surface'iCoordinate values of sampling points, o, after scalingiDenotes the centroid point of the ith plane, SiThe area value of the ith surface is represented, and ω represents the scaling, wherein the points in the surface point set are the sampling points after scaling: and randomly sampling a plurality of points on the surface of each local feature in each local feature set by using a formula II to obtain a scaled sampling point corresponding to each local feature in each local feature set, and obtaining a surface point set of each local feature in each local feature set based on the scaled sampling point corresponding to each local feature in each local feature set.
Then, for each surface point set of each local feature in each local feature set, randomly taking two points to calculate Euclidean distance, and repeating m2Sub (m)2That is, the preset times can be set by the user based on the requirement, and the invention is not limited by the invention), and m is obtained2Euclidean distance, m2The Euclidean distance is used as a distance group, and then m in the distance group is used as the basis2The number of Euclidean distance construction groups is m (based on m)2Determining the number of distances corresponding to the Euclidean distance, e.g. m2The Euclidean distance comprises 10 kinds of distances, and m is 10) to represent the distribution of the sampling distance values. The value of each column in the equidistant histogram is calculated according to formula three, which is as follows:
Figure BDA0003271880450000121
wherein N isuRepresenting the frequency number, h, of all samples falling in the u-th group of Euclidean distancesuRepresenting the frequencies, m, in the Euclidean distance of all samples falling in the u-th group2I.e. the number of samples (the number of euclidean distances) mentioned above.
Then, based on obtaining an equidistant histogram corresponding to each local feature in each local feature set, determining all frequencies (frequencies obtained by formula three) corresponding to each local feature in each local feature set, continuously obtaining a feature vector (m-dimensional vector) corresponding to each local feature in each local feature set, then combining the feature vectors corresponding to each local feature in each local feature set to obtain a feature vector set corresponding to each local feature set, wherein one CAD entity model corresponds to one local feature set, and one local feature set corresponds to one feature vector set, that is, the feature vectors corresponding to all local features in one CAD entity model are collected into one set, and a feature vector set of the CAD entity model is obtained. Wherein one feature vector is represented as follows:
svi=[h1,h2,…,hm]
referring to fig. 6, fig. 6 is a schematic diagram of the feature vectors corresponding to the very big cliques in fig. 5. Fig. 4 includes 4 maximal cliques, which correspondingly generate 4 local features, and then the feature vector obtaining operation is performed on the 4 local features to obtain 4 feature vectors.
The characteristic vector corresponding to the local feature is determined by utilizing the Euclidean distance of the point set corresponding to the local feature, the characteristic vector can be ensured to include all the local features, meanwhile, the data volume of the local feature vector is reduced compared with the local feature, the data simplicity of the local feature vector is improved, and therefore the operation efficiency is improved.
Further, the step of obtaining an information expression result of each CAD entity model based on each feature vector set includes: merging each characteristic vector set to obtain a characteristic vector data set; determining a clustering center in the feature vector data set; coding the clustering center to obtain a center code; determining a clustering point code corresponding to each feature vector in the feature vector data set in the center code by using the distance between each feature vector in the feature vector data set and the clustering center; determining a characteristic topological relation between local characteristics corresponding to each CAD solid model based on the point adjacency graph of each CAD solid model; and obtaining an information expression result of each CAD entity model based on the clustering point code corresponding to each CAD entity model, each local feature corresponding to each CAD entity model and the characteristic topological relation among the local features corresponding to each CAD entity model.
Referring to the above, one CAD solid model corresponds to one feature vector set, all feature vector sets corresponding to a plurality of CAD solid models are combined into one data set, that is, the feature vector data set, and then K clustering centers, which are expressed as C ═ C (C ═ C), are determined in the feature vector data set by using an unsupervised learning algorithm1,c2,…,cK) And then coding is carried out according to a clustering center coding rule, wherein the rule is as follows:
CODE={id(c1),id(c2),…,id(cK)}
wherein id (c)i) And (d) a code representing the ith clustering center, wherein id (g) is a preset coding rule, and a user can set the coding rule based on requirements.
For any feature vector lf in the feature vector dataset, the code of the cluster center c closest to the feature vector sv is used as the code, and the cluster point code called the feature vector lf is expressed as: id (lf) ═ id (c). And determining all corresponding clustering point codes for all the feature vectors in the feature vector data set.
Then, determining a vector topological relation between the feature vectors corresponding to each CAD entity model by using the point adjacency graphs of each CAD model; and obtaining an information expression result of each CAD entity model by using the clustering point code corresponding to each CAD entity model, each local feature corresponding to each CAD entity model and the characteristic topological relation among the local features corresponding to each CAD entity model, wherein the information expression result is in the form of an information expression graph. The information expression result is expressed as formula five, and formula five is as follows:
GS-T=(LF,E′,A(LF))
wherein, LF ═ { LF ═ LF1,lf2,…,lfn′The vertex set in the information expression graph of the CAD solid model is used, and each vertex corresponds to a local feature in the CAD solid model; a (lf) { id (lf)1),id(lf2),…,id(lfn) The vertex attributes are a set of vertex attributes in an information expression graph of the CAD solid model, each vertex attribute corresponds to a cluster point code of a local feature in the CAD solid model, and E ═ great face<lfi,lfj>|od(lfi,lfj) 1 is a set of edges in the information expression graph of the CAD solid model, od (g) is a logic judgment function, od (lf)i,lfj) 1 denotes lf in the modeliAnd lfjAt least one coincident surface exists between the corresponding local features.
It can be understood that, for one CAD solid model, a point adjacency graph is obtained, a plurality of local features corresponding to a plurality of maximal cliques are determined based on the point adjacency graph, and a plurality of local feature corresponding to a plurality of maximal cliques (i.e., feature topological relationships) can be determined based on a topological relationship of each maximal clique in the point adjacency graph (e.g., a common point D in 5, or a common edge between B and C). When two huge clusters have topological relation, the local features corresponding to the two huge clusters also have characteristic topological relation, and at the moment, the od (g) function values of the local features are 1, otherwise, the od (g) function values are 0.
In the embodiment, the final information expression result is determined by using the codes of the cluster centers and the codes of the cluster points, the codes of the cluster centers and the codes of the cluster points can accurately reflect the information of the local features, the feature vectors are further simplified by using the codes of the cluster centers and the codes of the cluster points, the local features are replaced by simpler codes, the simplification degree of data is improved, and therefore when similarity judgment is carried out, whether similarity is determined only based on the codes, comparison of feature information is not needed, and the searching efficiency is improved.
Referring to fig. 7, fig. 7 is a schematic diagram of information expression results of the present invention, where fig. 7 includes two information expression results (in the form of information expression graphs) corresponding to two different CAD entity models, the information expression graphs are undirected graphs with labels, the local features correspond to vertices in the graphs, the vertex numbers are clustering point codes corresponding to one local feature, edges in the graphs express that the two local features have overlapping surfaces, and the two information expression results also have certain similarities, so that the corresponding CAD entity models have similar structures.
Step S14: and determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
And obtaining the information expression results of the plurality of CAD entity models, and determining the similarity detection result of any two CAD entity models based on the local features in the information expression results of the two CAD entity models and the feature topological relation between the local features.
Specifically, the step of determining similarity detection results of the plurality of CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relationship between the local features in each CAD entity model includes: determining similar elements of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model by using a maximum common subgraph algorithm; and obtaining similarity detection results of a plurality of CAD entity models based on the similar elements.
Searching similar elements with similar relations in the characteristic topological relation between the local features corresponding to each CAD entity model and each local feature in each CAD entity model by using a maximum common subgraph algorithm: and determining local features with similarity to the information expression results of any two CAD entity models, determining whether the feature topological relations between the similar local features are also similar, determining parts with similar feature topological relations between the similar local features as the similar elements, and obtaining a final similarity detection result based on all the determined similar elements, wherein the similarity detection result comprises all the similar elements between the CAD entity models.
The technical scheme of the invention provides a method for detecting the similarity of CAD models, which comprises the following steps: when a plurality of CAD entity models are obtained, determining a surface element topological relation corresponding to each CAD entity model; constructing a point adjacency graph of each CAD entity model by using the surface element topological relation of each CAD entity model and the surface elements of each CAD entity model; obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model; and determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
Because the existing method only utilizes the local features of the CAD model to express the CAD model, the information expression result of the CAD model cannot express the relationship among the features in the CAD model, so that the accuracy of the information expression result is lower, and the accuracy of the final similarity detection result is lower. By adopting the method, the obtained information expression result comprises the characteristics and the topological relation among the characteristics, the information expression result can accurately express the relation among the characteristics in the CAD model, and the accuracy of the information expression result is improved, so that the accuracy of the similarity detection result is improved.
Referring to fig. 8, fig. 8 is a block diagram of a first embodiment of the similarity detection apparatus for CAD models of the present invention, which is used for terminal devices, and which includes, based on the same inventive concept as the previous embodiments:
the obtaining module 10 is configured to determine a surface element topological relation corresponding to each CAD entity model when obtaining a plurality of CAD entity models;
a building module 20, configured to build a point adjacency graph of each CAD solid model by using the surface element topological relation of each CAD solid model and the surface element of each CAD solid model;
the information obtaining module 30 is configured to obtain an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, where the information expression result of each CAD entity model includes a local feature of each CAD entity model and a feature topological relation between local features in each CAD entity model;
and a result obtaining module 40, configured to determine similarity detection results of the multiple CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relations between the local features in each CAD entity model.
It should be noted that, since the steps executed by the apparatus of this embodiment are the same as the steps of the foregoing method embodiment, the specific implementation and the achievable technical effects thereof can refer to the foregoing embodiment, and are not described herein again.
The above description is only an alternative embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for detecting similarity of CAD models, characterized in that the method comprises the steps of:
when a plurality of CAD entity models are obtained, determining a surface element topological relation corresponding to each CAD entity model;
constructing a point adjacency graph of each CAD entity model by using the surface element topological relation of each CAD entity model and the surface elements of each CAD entity model;
obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model;
and determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
2. The method of claim 1, wherein the step of determining the bin topology relationship corresponding to each of the CAD entity models comprises:
determining contact relations among the surface elements in each CAD model;
and determining the surface element topological relation corresponding to each CAD entity model by using the contact relation among the surface elements in each CAD model.
3. The method of claim 2, wherein the step of obtaining the information representation result for each of the CAD solid models based on the point adjacency graph for each of the CAD solid models comprises:
obtaining a local feature set of each CAD solid model based on the point adjacency graph of each CAD solid model;
and obtaining an information expression result of each CAD entity model based on each local feature set.
4. The method of claim 3, wherein the step of obtaining the set of local features for each of the CAD solid models based on the point adjacency graph for each of the CAD solid models comprises:
determining a very large group in the point adjacency graphs of each CAD solid model, wherein one CAD solid model corresponds to one point adjacency graph;
and determining a geometric region corresponding to each maximal blob in each point adjacency graph as a local feature so as to obtain a local feature set of each CAD solid model, wherein one point adjacency graph corresponds to one local feature set.
5. The method of claim 4, wherein said step of obtaining information expression results for each of said CAD entity models based on each of said local feature sets comprises:
randomly sampling a plurality of points on the surface of each local feature in each local feature set to obtain a surface point set of each local feature in each local feature set;
calculating Euclidean distance of any two points in the surface point set of each local feature in each local feature set;
repeatedly executing the step of calculating the Euclidean distance of any two points in the surface point set of each local feature in each local feature set until reaching the preset times, and obtaining a distance group corresponding to each local feature in each local feature set;
constructing an equidistant histogram of each local feature in each local feature set by using the distance group corresponding to each local feature in each local feature set;
obtaining a feature vector corresponding to each local feature in each local feature set based on an equidistant histogram of each local feature in each local feature set;
combining the feature vectors corresponding to each local feature in each local feature set to obtain a feature vector set corresponding to each CAD solid model;
and obtaining an information expression result of each CAD entity model based on each characteristic vector set.
6. The method of claim 5, wherein the step of obtaining information expression results for each of the CAD entity models based on each set of feature vectors includes:
merging each characteristic vector set to obtain a characteristic vector data set;
determining a clustering center in the feature vector data set;
coding the clustering center to obtain a center code;
determining a clustering point code corresponding to each feature vector in the feature vector data set in the center code by using the distance between each feature vector in the feature vector data set and the clustering center;
determining a characteristic topological relation between local characteristics corresponding to each CAD solid model based on the point adjacency graph of each CAD solid model;
and obtaining an information expression result of each CAD entity model based on the clustering point code corresponding to each CAD entity model, each local feature corresponding to each CAD entity model and the characteristic topological relation among the local features corresponding to each CAD entity model.
7. The method of claim 6, wherein the step of determining similarity detection results for the plurality of CAD solid models based on the feature topology relationship between the corresponding local feature of each CAD solid model and the respective local features in each CAD solid model comprises:
determining similar elements of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model by using a maximum common subgraph algorithm;
and obtaining similarity detection results of a plurality of CAD entity models based on the similar elements.
8. An apparatus for similarity detection of CAD models, the apparatus comprising:
the obtaining module is used for determining the surface element topological relation corresponding to each CAD entity model when the plurality of CAD entity models are obtained;
the building module is used for building a point adjacency graph of each CAD solid model by using the surface element topological relation of each CAD solid model and the surface elements of each CAD solid model;
the information obtaining module is used for obtaining an information expression result of each CAD entity model based on the point adjacency graph of each CAD entity model, wherein the information expression result of each CAD entity model comprises local features of each CAD entity model and a feature topological relation between the local features in each CAD entity model;
and the result obtaining module is used for determining similarity detection results of the CAD entity models based on the local features corresponding to each CAD entity model and the feature topological relation between the local features in each CAD entity model.
9. A terminal device, characterized in that the terminal device comprises: memory, a processor and a similarity detection program stored on the memory and running on the processor of a CAD model, which when executed by the processor implements the steps of the method of similarity detection of a CAD model according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a similarity detection program for a CAD model, which when executed by a processor implements the steps of the similarity detection method for a CAD model according to any of claims 1 to 7.
CN202111112408.4A 2021-09-22 2021-09-22 Similarity detection method and device for CAD model, terminal equipment and storage medium Active CN113901256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111112408.4A CN113901256B (en) 2021-09-22 2021-09-22 Similarity detection method and device for CAD model, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111112408.4A CN113901256B (en) 2021-09-22 2021-09-22 Similarity detection method and device for CAD model, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113901256A true CN113901256A (en) 2022-01-07
CN113901256B CN113901256B (en) 2024-07-16

Family

ID=79028850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111112408.4A Active CN113901256B (en) 2021-09-22 2021-09-22 Similarity detection method and device for CAD model, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113901256B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030066949A1 (en) * 1996-10-25 2003-04-10 Mueller Frederick E. Method and apparatus for scanning three-dimensional objects
CN101488142A (en) * 2008-12-09 2009-07-22 南京大学 Three-dimensional solid model retrieval method based on face topological interconnection constraint
CN108491628A (en) * 2018-03-22 2018-09-04 西北工业大学 The three-dimensional CAD assembling model of product design requirement drive clusters and search method
CN110334108A (en) * 2019-06-18 2019-10-15 浙江工业大学 A kind of three-dimensional CAD model similarity calculation method based on discrete bat algorithm
CN110795797A (en) * 2019-09-26 2020-02-14 北京航空航天大学 MBD model processing feature recognition and information extraction method
CN110941732A (en) * 2019-11-28 2020-03-31 上海交通大学 Adaptive three-dimensional CAD model retrieval system for standard parts

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030066949A1 (en) * 1996-10-25 2003-04-10 Mueller Frederick E. Method and apparatus for scanning three-dimensional objects
CN101488142A (en) * 2008-12-09 2009-07-22 南京大学 Three-dimensional solid model retrieval method based on face topological interconnection constraint
CN108491628A (en) * 2018-03-22 2018-09-04 西北工业大学 The three-dimensional CAD assembling model of product design requirement drive clusters and search method
CN110334108A (en) * 2019-06-18 2019-10-15 浙江工业大学 A kind of three-dimensional CAD model similarity calculation method based on discrete bat algorithm
CN110795797A (en) * 2019-09-26 2020-02-14 北京航空航天大学 MBD model processing feature recognition and information extraction method
CN110941732A (en) * 2019-11-28 2020-03-31 上海交通大学 Adaptive three-dimensional CAD model retrieval system for standard parts

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SAMIH AI RAWASHDEH BALQIES SADOUN 等: "CAD file conversion to GIS layers:Issues and solutions", 《2012 INTERNATIONAL CONFERENCE ON COMPUTER,INFORMATION AND TELECOMMUNICATION SYSTEMS》, 21 June 2012 (2012-06-21), pages 1 - 2 *
王永 等: "基于属性邻接图的加工特征识别研究", 《机械》, vol. 37, no. 2, 25 February 2010 (2010-02-25), pages 49 - 52 *

Also Published As

Publication number Publication date
CN113901256B (en) 2024-07-16

Similar Documents

Publication Publication Date Title
Wang et al. CE3: A three-way clustering method based on mathematical morphology
US11176217B2 (en) Taxonomy-based system for discovering and annotating geofences from geo-referenced data
CN111652329B (en) Image classification method and device, storage medium and electronic equipment
Qiao et al. Learning on 3D meshes with Laplacian encoding and pooling
US10733710B2 (en) System and method for drawing beautification
CN112818686A (en) Domain phrase mining method and device and electronic equipment
CN112861717A (en) Video similarity detection method and device, terminal equipment and storage medium
Wei et al. Linear building pattern recognition in topographical maps combining convex polygon decomposition
Muraleedharan et al. Autoencoder-based part clustering for part-in-whole retrieval of CAD models
CN107958266A (en) It is a kind of based on MPI and be about to connection attribute carry out discretization method
Luqman et al. Subgraph spotting through explicit graph embedding: An application to content spotting in graphic document images
CN115359308A (en) Model training method, apparatus, device, storage medium, and program for identifying difficult cases
Xiao et al. Saliency detection via multi-view graph based saliency optimization
CN116127319B (en) Multi-mode negative sample construction and model pre-training method, device, equipment and medium
CN113901256A (en) Similarity detection method and device for CAD model, terminal device and storage medium
CN115657968B (en) Storage method, device, equipment and medium of boundary representation model
CN114663710A (en) Track recognition method, device, equipment and storage medium
Takaishi et al. Free-form feature classification for finite element meshing based on shape descriptors and machine learning
Qiao et al. LaplacianNet: Learning on 3D meshes with Laplacian encoding and pooling
CN114547430A (en) Information object label labeling method, device, equipment and storage medium
CN113202461A (en) Method and device for identifying lithology based on neural network
CN112561412A (en) Method and device for determining target object identifier, server and storage medium
CN114818808B (en) Frequency signal classification method and device based on transfer analysis
CN117197383B (en) Terrain extension method, equipment and medium based on characteristic dimension of complex terrain
CN117911974B (en) Data processing method, device, equipment and storage medium

Legal Events

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