Method for converting an odb++ file into a three-dimensional geometric model
By constructing a 3D geometric model based on ODB++ files, the problems of low PCB layout visualization and insufficient electromagnetic simulation in existing technologies are solved. Electromagnetic simulation of cross-layer networks and arbitrary target areas is realized, improving the efficiency of 3D geometric modeling.
Patent Information
- Application Number
- CN202211007827.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-08-22
AI Technical Summary
In existing technologies, ODB++ files, when converted into PCB layouts, suffer from low visualization, fail to intuitively reflect the cross-layer network structure of the PCB, and cannot meet the electromagnetic simulation requirements of cross-layer networks and arbitrary target areas.
The system uses ODB++ files to construct 3D geometric models and employs planar geometric discretization algorithms and custom clipping techniques to build 3D layout models, including planar discretization and rendering. It is capable of performing electromagnetic simulations on cross-layer networks and arbitrary target regions.
It improves the visualization and simulation accuracy of PCB layout models, meets the electromagnetic simulation requirements of cross-layer networks and arbitrary target areas in actual engineering, and improves the efficiency of three-dimensional geometric modeling for different PCB data formats.
Smart Images

Figure CN115345107B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer technology, and further relates to a method for converting an open database (ODB++) file into a three-dimensional geometric model in the field of computer-aided design (CAD). BACKGROUND
[0002] With increasingly higher bandwidth and faster signal edge rates, discontinuities caused by fine structures of circuit boards and packages in integrated circuits significantly affect the quality of signal transmission. Signal and power integrity problems caused thereby are increasingly serious, so potential electromagnetic problems in electromagnetic simulation of a PCB (Printed Circuit Board) layout need to be found and corrected in time before the layout is made. Currently, electromagnetic simulation analysis of a layout is mainly performed on a two-dimensional layout, but the two-dimensional layout has the problem of low visualizability, and the simulation analysis result has low precision. In addition, PCB data formats of different EDA (Electronics Design Automation) systems are not unified, so different modeling methods need to be researched for different PCB data formats.
[0003] A method for converting ODB++ file into editable PCB layout is disclosed in the patent document "A method for converting ODB++ file into editable PCB layout" (application date: December 5, 2014, application number: 201410734543.6, application publication number: CN104346502A) applied by the 54th Research Institute of China Electronics Technology Group. The specific steps of the method are as follows: first, create a software platform PLV supporting PCB layout design; second, design a menu interface as the input port of ODB++ file; third, write code in C++ high-level language to read ODB++ file from EDA software; fourth, filter out the frame information of PCB layout according to the standard symbols defined in ODB++ file and store them into the internal data structure of software platform PLV; fifth, filter out the packaging information, device information, network information and text information of silk screen layer of PCB layout according to the standard symbols defined in ODB++ file; sixth, uniformly store the obtained frame information, packaging information, device information, network information and text information of silk screen layer into the internal data structure of PLV platform, then call display function to display the selectable and editable PCB layout. The method has two shortcomings: first, the planar two-dimensional layout cannot intuitively reflect the details and the whole of PCB board, and has the limitation that one or more cross-layer networks cannot be displayed, resulting in very low visualization; second, the planar two-dimensional layout cannot perform electromagnetic simulation on cross-layer network and arbitrary target area, and can only simulate fixed transmission lines, which cannot meet the actual engineering needs. SUMMARY
[0004] The present application aims at the above-mentioned technical deficiencies, and provides a method for converting ODB++ file into three-dimensional geometric model, which is used to solve the problem that different PCB file formats cannot be modeled in one modeling method, the problem that planar two-dimensional layout cannot intuitively reflect PCB cross-layer network structure or the whole PCB layout model, and the problem that planar two-dimensional layout cannot meet the electromagnetic simulation needs of cross-layer network and arbitrary target area.
[0005] The technical idea for achieving the object of the present application is that the present application adopts ODB++ file to construct three-dimensional geometric model. ODB++ can provide intelligent and single data structure, and meanwhile supports mutual conversion with the current mainstream PCB data formats such as Gerber and IPC-2581. Therefore, based on the data format of ODB++, the problem that different PCB file formats cannot be modeled by one modeling method to construct three-dimensional geometric model can be solved. The present application adopts planar geometric discrete algorithm, and through discrete of the PCB two-dimensional geometric model in the horizontal direction, the discrete data in the vertical direction are calculated and processed to realize construction of three-dimensional layout model, and the problem of low visualization of the planar two-dimensional layout model in the prior art is overcome. The present application adopts self-defined clipping technology, and through clipping of the target region on the PCB three-dimensional layout model and extraction of the target network, the planar two-dimensional geometric model is subjected to Boolean operation, planar discrete and rendering to generate three-dimensional geometric model, and the problem that the prior art cannot meet the electromagnetic simulation demand of the network across layers and the arbitrary target region of the PCB is solved. Compared with the prior art which can only perform electromagnetic simulation on fixed planar two-dimensional transmission line, the three-dimensional geometric model constructed by the present application can better meet the demand of actual engineering.
[0006] The technical scheme adopted by the present application comprises the following steps:
[0007] Step 1: an import interface of ODB++ compressed file and a three-dimensional display interface of PCB model are respectively built;
[0008] Step 2: modeling information required for constructing PCB two-dimensional geometric model is screened:
[0009] Step 2.1: the file path where the ODB++ compressed file is stored is selected from the created file import interface, the ODB++ compressed file is decompressed to obtain ODB++ file in the form of directory tree, the data structure for storing layer stacking sequence information and layer attribute information is designed, the storage path of the matrix folder in the ODB++ file is selected, the matrix file under the decompressed matrix folder is selected to screen out the definition of PCB layer stacking sequence information and the attribute information of each layer, and the layer stacking sequence information and the attribute information are stored in the designed data structure;
[0010] Step 2.2: the data structure for storing and analyzing non-device layer information is designed, the storage path of the layers folder in the ODB++ file is selected, the features file and the attrlist file under the decompressed layers folder are selected to screen out the graphic information and the attribute information for constructing layers, and the graphic information and the attribute information for constructing layers are classified and stored in the designed data structure;
[0011] Step 2.3, design a data structure to store the parsed device layer information; select the file path in the ODB++ file to store components, and filter out the device information of the top layer and the bottom layer of the PCB from the components file under the decompressed layers folder, respectively, and store the device information of the top layer and the bottom layer into the designed data structure;
[0012] Step 2.4, design a data structure to store the parsed network information and packaging information; select the storage path of the steps folder in the ODB++ file, and filter out the network information and packaging information from the data file under the decompressed steps folder, respectively, and store the network information and packaging information into the designed data structure;
[0013] Step 3, construct the three-dimensional layout model of the PCB:
[0014] Step 3.1, find the layer stacking order and layer attribute information in the data structure storing the PCB layer stacking order and layer attribute information, classify the layers through the layer attribute information; determine the starting layer and the ending layer of the via in the classified via layer, and assign the via information to the metal layers it crosses; according to the different basic graphic types of feature data, write different function interfaces to create basic graphics for constructing layers, and store all the basic graphics in the form of pointers in the constructed list; according to the mapping relationship between the layer name and the basic graphic pointer list that can be bidirectionally searched, the PCB two-dimensional geometric model is constructed by layer;
[0015] Step 3.2, find the network information contained in the data structure storing the PCB network information, according to the layer name contained in the network information, according to the mapping relationship between the layer name and the basic graphic pointer list on the layer, find the basic graphic pointer list corresponding to the layer name, find the corresponding basic graphic pointer in the found basic graphic pointer list, and store the found basic graphic pointer in the list; according to the mapping relationship between the network name and the basic graphic pointer list that can be bidirectionally searched, the PCB two-dimensional geometric model is constructed by network;
[0016] Step 3.3, design a data structure to store discrete information, and use a plane grid discretization algorithm to discretize the plane two-dimensional geometric model created by layer in horizontal and vertical directions, respectively, to obtain the discrete data of the three-dimensional layout model, and store the layer name and the discrete data on the layer into the designed data structure;
[0017] Step 3.4, find the layer discrete data information in the layer name and layer discrete data data structure, convert the discrete data into renderable graphic data according to different discrete data types, only render the line grid by calling the rendering function interface, realize rendering the discrete three-dimensional model data into a three-dimensional map model, and display in the three-dimensional map model display interface;
[0018] Step 4, build a three-dimensional geometric model of the PCB:
[0019] Step 4.1, build a custom cutting setting interface of the three-dimensional map model of the PCB;
[0020] Step 4.2, realize extraction of one or more target networks by selecting the target network name in the menu bar on the three-dimensional map display interface; realize extraction of the target area of the PCB by setting the custom cutting parameters on the custom cutting setting interface and performing Boolean operation on the target area and the entire PCB;
[0021] Step 4.3, according to the mapping relationship between the network name and the basic graphic pointer list, find the corresponding graphic pointer through the network name; after cutting the target area, obtain the graphic pointer of the target area, write a function interface to stretch and perform Boolean operation on the two-dimensional plane geometric model pointed by the graphic pointer, realize conversion of the three-dimensional map model of the target network into a three-dimensional geometric entity model;
[0022] Step 4.4, discretize the three-dimensional geometric entity model, convert the discrete data into renderable graphic data, render the graphic data and display it on the three-dimensional geometric model display interface.
[0023] Compared with the prior art, the present application has the following advantages:
[0024] First, the present application converts ODB++ data format into three-dimensional parametric geometric model, converts mainstream PCB data formats such as Gerber, IPC-2581 into ODB++ data format, solves the problem of developing different three-dimensional geometric modeling methods for different PCB data formats, and improves the efficiency of three-dimensional geometric modeling of different PCB data formats.
[0025] Second, the present application adopts a plane grid discretization algorithm, which discretizes the PCB two-dimensional geometric model in the horizontal direction, calculates the discrete data in the vertical direction according to the discrete data in the horizontal direction and processes it, realizes the construction of the three-dimensional map model, and improves the visualization of the PCB map model.
[0026] Thirdly, the application adopts self-defined clipping technology, carries out Boolean operation, plane discretization and rendering on the planar two-dimensional geometric model to generate a three-dimensional geometric model through clipping of a target region on a PCB three-dimensional layout model and extraction of a target network. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 Flow chart for implementation of the application;
[0028] Figure 2 Schematic diagram of a multi-layer PCB three-dimensional layout model generated in the application.
[0029] Figure 3 Local enlarged schematic diagram of a multi-layer PCB three-dimensional layout model generated in the application.
[0030] Figure 4 Schematic diagram of a multi-layer PCB three-dimensional geometric model generated in the application. DETAILED DESCRIPTION
[0031] The application will be described in further detail below in combination with the drawings and examples.
[0032] Reference Figure 1 and examples, the implementation steps of the application will be described in further detail.
[0033] The application adopts an ACIS geometric modeling engine and a visual tool function library VTK to convert an ODB++ file into a three-dimensional geometric model.
[0034] Step 1, build an import interface of an ODB++ compressed file and a three-dimensional display interface of a model respectively.
[0035] Step 1.1, the embodiment of the application adopts a cross-platform C++ graphical user interface application development framework Qt to build an interface supporting import of an ODB++ compressed file by using a high-level programming language C++.
[0036] Step 1.2, build two display interfaces of a PCB three-dimensional layout model and a PCB three-dimensional geometric model respectively, the three-dimensional layout model and the three-dimensional geometric model display interfaces both include a menu bar and an attribute bar. The embodiment of the application adopts an ODB++ file generated by a Cadence software, and since the ODB++ file is an international standard file, the ODB++ file formats exported by various EDA software are all the same.
[0037] Step 2, screen modeling information required for construction of a PCB two-dimensional geometric model.
[0038] Step 2.1, select the file path of the ODB++ compressed file from the created file import interface, decompress the ODB++ compressed file, and obtain the ODB++ file in the form of a directory tree. The decompressed compressed file is read into the specified folder.
[0039] Step 2.2, screen the matrix information related to the PCB layout layer stacking order.
[0040] The application stores the PCB layer stacking order information and the attribute information of each layer into the designed data structure by reading the matrix file under the matrix folder after decompression, designing a data structure for storing the parsed matrix file information, and obtaining the PCB layer stacking order information and the attribute information of each layer. The matrix file is a form of product model representation, where the row is the layer table of the product model, and the column is the step multi-layer entity of the product model.
[0041] In the embodiment of the application, since the matrix file is a structured text file, a syntax analyzer generator Bison is used to parse the matrix file under the <product_model_name> / matrix / matrix path to obtain the layer name and the attribute information of the layer. The layer name is taken as the key value, and the layer attribute information is taken as the value, and stored in the associative container map under the designed data structure.
[0042] Step 2.3, screen the layer information and device information related to the PCB two-dimensional geometric model.
[0043] The application obtains the graphic information constituting the layer and the attribute information of the layer by reading the features file and the attrlist file under the layers folder after decompression. The features file mainly includes a symbol table, an attribute name text table and a feature data list. The feature data list contains all the graphic data constituting the layer. The feature data is described by the graphic type, which is specifically constructed by the basic symbols in the symbol table, such as rectangle rect, circle r, oval, or user-defined symbols described by each features file under the symbols file. The attrlist file mainly contains the attribute information of the layer, which is divided into system attributes and user-defined attributes. The data structure is designed according to the graphic type, and the layer feature information obtained after parsing is classified and stored according to the layer. The graphic type includes straight line L, arc A, irregular polygon S, pad type P and text type T.
[0044] In the embodiment of the present application, since the features file is a line record text file, the layer stacking order obtained by referring to the matrix file in step 2.2 is adopted. Therefore, the features file under the path <product_name> / steps / <step_name> / layers / <layer_name> / features and the features file under the path <product_name> / symbols / <symbol_name> / features are parsed respectively by using the line-by-line reading mode. The Layer class is created to manage the parsed layer information, the Symbol class is created to manage the information of standard symbols and user-defined symbols, and the Shape class is created to manage the feature data information. The format UNITS= "mm" is adopted for the coordinate system of the features file, and the format UNITS= "mm" is adopted for the coordinate system of the symbol file. <mm inch> <m i>The data value in the format obtains the number, size and shape of the standard symbol for the line record reference, and the size and shape of the standard symbol are stored in the Symbol class. The obtained number is taken as the key value, and the structure object pointer list storing the size and shape of the standard symbol is taken as the value value, and is stored in the C++ associative container map. The n and test_string in the format of the text line after reading the #Feature attribute names text line can obtain the attribute number and text string for the line record reference, and the number n is taken as the key value, and the test_string string is taken as the value value, and is stored in the C++ associative container map. Finally, the feature data line is read line by line after reading the #Layer features text line, and the corresponding data information is taken from the map container storing the symbol and the map container storing the attribute according to the index of the feature data line. The obtained data information is reorganized and stored in the member variable under the Shape class. The obtained feature data information is classified according to the first character, and the Shape class object pointer list is stored in the member variable under the Layer class.
[0045] The application obtains the device information of the PCB two-dimensional geometric model by reading the components file under the top device layer and the bottom device layer folder after decompression. The data structure for storing the device information is designed, and the obtained top device information and the bottom device information are stored in the defined data structure.
[0046] In the embodiment of the application, since the components file is a line record text file, the components file under the path <product_model_name> / steps / <step_name> / layers / <layer_name> / components is parsed in a row-by-row reading mode. The Component class is created to manage the information of the device layer, and the number, attribute, position and package number information of each device in the parsed top device layer and bottom device layer are stored in the member variable of the Component class.
[0047] Step 2.4, screen and build the network information and package information related to the PCB two-dimensional geometric model.
[0048] The application obtains network information and package information of a PCB two-dimensional geometric model by reading a data file under a steps folder after decompression. A data structure is designed to store the network information and package information obtained after analysis. The data file contains information directly read from an EDA system, covering CAD library and user-defined device package, outline and attribute of the device package, and information of network interconnection. According to the network structure characteristics and package structure characteristics obtained after analysis, the information obtained after layer-by-layer analysis is reorganized, and the reorganized information is stored in the designed data structure.
[0049] In the embodiment of the application, since the data file is a line structure text file, the data file under the path of <product_model_name> / steps / <step_name> / eda / data is parsed by using a line-by-line reading mode. A Net class is designed to manage the network information obtained after parsing, a Subnet class is designed to manage the subnet information under the network, and a Fid class is designed to manage the feature data information under the subnet. The LYR format is used to store the network information, the Subnet format is used to store the subnet information, and the Fid format is used to store the feature data information. <name1> … <namen>The data line of the FID is parsed to obtain the layer name and layer order referenced by the FID in the sub-network. The layer order is stored in the C++ associative container map as the key value, and the layer name is stored as the value value. The format is as follows: <m>The data line of <text_string> is parsed to obtain the attribute number and attribute text of the network reference, and the attribute number m is stored in the C++ associative container map as the key value and test_string as the value. The format is #&m= test_string. <n>The data line of the attribute name is parsed to obtain the attribute name number and the attribute name. The attribute name number is taken as the key value, and the attribute name is taken as the value, and is stored in the C++ associative container map. The format is #NET <x>The data line analysis obtains the number of the current network, and the format is NET<net_name>; <attributes>; ID = <id>The data line of the Net class is parsed to obtain the name, attribute and unique identifier of the current network, and the obtained information is stored in the member variables of the Net class. The data line starting with SNT under the current network is traversed to obtain the type and number of the current subnet, and the obtained subnet type and number information is stored in the member variables of the Subnet class. The FID data line under the current subnet is traversed to obtain the FID of the current subnet, and the obtained FID information is stored in the member variables of the Subnet class. <type><lyr_num><f_num>The data lines are parsed to obtain the type of feature data, the feature data itself, and the corresponding layer name and feature data number, which are stored in the member variables of the Fid class. The pointer to the Fid class object is stored in the member variable of the current Subnet class until the current subnet traversal is complete. The pointer to the current Subnet class object is stored in the member variable of the current Net class until the current network traversal is complete. In this embodiment of the invention, a Package class is designed to manage the device package information obtained from the data file parsing. Since the device package number information referenced by the device is obtained from parsing the components file in step 2.3, the data segments starting with PKG are parsed to obtain the graphic shape describing the device on the PCB. The data segments starting with PIN are parsed to obtain the pin information in the current device package, which includes the pin name, type, location, and shape. The device package information and the pin information together constitute the PCB package information. Each PKG and PIN data line is followed by one or more contour records, which describe the shape of the device and pin. The obtained pin information is stored in the member variable of the Package class, with the device package number as the key and the Package class object pointer as the value, and stored in the C++ associative container map.
[0050] Step 3: Construct a 3D layout model of the PCB.
[0051] Reference Figure 2 Further description of the constructed PCB 3D layout model.
[0052] This invention, based on step 2, filters and constructs information for building a PCB 2D geometric model, building the PCB 2D geometric model by both layer and network partitioning methods. By discretizing the constructed PCB 2D geometric model, discrete data for a 3D geometric model is generated, and this discrete data is converted into renderable graphical data. To improve rendering efficiency, the rendering function interface is used to display only the discretized line mesh, thus rendering the discretized 3D geometric model data into a 3D layout model, which is then displayed in the constructed 3D layout model display interface. Figure 3 Yes Figure 2 The image shows a magnified view of the lower left corner of the multilayer PCB 3D geometric layout model generated in the image.
[0053] Step 3.1: Create a two-dimensional geometric model layer by layer.
[0054] According to the layer order defined by the matrix file, the layers are classified by layer attributes, such as metal layer, dielectric layer, drilling layer and device layer. After the start layer and the end layer of the via are determined, the via information, such as the via size, the via shape and the point information of the via center, is distributed to the metal layer crossed by the via according to the type of the via, such as via, buried via and blind via. The layer stacking order and the layer attribute information in the data structure for storing the PCB layer stacking order and the layer attribute information are searched, different function interfaces are written according to the different basic graphic types of the feature data, the basic graphics for constructing the layer are created, and all the basic graphics are stored in the constructed list in the form of pointers. According to the layer name and the basic graphic pointer list on the layer, a mapping relationship capable of bidirectional searching of the layer name and the basic graphic pointer list is formed, and a PCB two-dimensional geometric model constructed by layers is obtained.
[0055] In the embodiment of the application, the layer information and the symbol information in the data structure for storing the layer information, the basic symbols and the user-defined symbols are searched. Different function interfaces are written according to the different basic graphic types, such as straight line L, arc A, pad P and polygon S, to realize the creation of the basic graphics. The basic graphics are determined by the symbol shape and the point information, different ACIS geometric modeling application program interfaces are called by C++, and function interfaces for creating symbols and basic graphics are written to operate the created symbols and basic graphics, such as sweeping, Boolean AND operation and Boolean subtraction operation, to realize the conversion of the feature data into a two-dimensional geometric model. The polygon S is not composed of basic symbols and user-defined symbols, but composed of straight lines and arcs without width connected end to end, and the polygon has the characteristics of being closed and not self-intersecting. Therefore, the polygon needs to be specially processed, a plurality of closed lines are created by calling api_mk_ed_line and api_curve_arc_3pt, and api_make_ewire and api_cover_wires functions are called to connect the closed lines end to end and fill them into a two-dimensional plane. The member variables under the Component class for storing device information are traversed to obtain the name, attribute, type and device package number information of the device. According to the package information parsed in step 2.4, the device package number is taken as a retrieval condition to obtain the shape information of the device. Since the information describing the device is the same as the data structure of the polygon face, the shape information of the device is parsed in the manner of parsing the polygon. The name of the device is taken as a key value, the graphic pointer of the obtained device shape is taken as a value, and the key-value pair is stored in the associative container map of C++.
[0056] Step 3.2, creating a two-dimensional geometric model according to the network.
[0057] According to the network information obtained by analyzing the data file, the network is divided into two types of power / ground network and non-power / ground network according to the different attribute of the characteristic data information contained in the network.
[0058] According to the mapping relationship between the layer name and the list of basic graphic pointers on the layer in step 3.1, the PCB two-dimensional geometric model constructed according to the network is obtained according to the characteristic data information contained in each network.
[0059] In the embodiment of the present application, the member variable under the Net class is obtained, the layer name is found in the map container storing the reference layer information according to the reference layer number contained in the FID data row and the corresponding characteristic data number in the reference layer. The corresponding basic graphic pointer list is found in the associated container map in step 3.1 according to the layer name as the search condition. The basic graphic pointer corresponding to the characteristic data is found according to the number of the characteristic data as the search condition. The network name is stored as the key value and all the basic graphic pointer lists under one network are stored as the value in the C++ associated container map. According to the network name and the basic graphic pointer list, the mapping relationship that the network name and the basic graphic pointer list can be bidirectionally searched is formed, and the PCB two-dimensional geometric model constructed according to the network is obtained.
[0060] Step 3.3, data discretization is performed on the two-dimensional geometric model created according to the layer.
[0061] The plane discrete grid algorithm is adopted to discretize the plane two-dimensional geometric model created according to the layer in step 3.1. The plane two-dimensional geometric model is discretized in the horizontal direction, and unnecessary data is simplified and compressed. Since the surface data in the vertical direction of the PCB three-dimensional layout model is the same, the surface data in the vertical direction can be directly calculated by stretching the discrete data in the horizontal direction.
[0062] In the embodiment of the present application, the DisplayMesh class is written to manage the discrete data. The map container storing the layer and the list of graphic pointers in step 3.1 is traversed, and the vector of graphic pointers corresponding to each layer is traversed. The function interface MeshEntity of the discrete planar two-dimensional geometric model is written in C++, the graphic pointer is taken as the function input parameter, and the DisplayMesh class object pointer is taken as the function output parameter. According to the type of the graphic pointed by the graphic pointer, the two function interfaces ACIS application program interface api_get_faces and api_get_edges are called respectively, the Face or Edge of the pointed graphic is obtained, and the obtained Face and Edge are stored in the list container of C++. The function interface get_triangles_from_faceted_face written in C++ takes the list container storing all the Face data of the graphic as the function input parameter, and takes the DisplayMesh class object pointer as the function output parameter, and can obtain the vertex coordinates of the discrete Face, the triangular mesh of the discrete Face and the normal coordinates of the discrete Face. The list container storing all the edges of the graphic is taken as the function input parameter, the DisplayMesh class object pointer is taken as the function output parameter, and the Delaunay discrete algorithm can obtain the line mesh of the line segment after discretization and the vertex coordinates of the edge. After obtaining the horizontal discrete data, the GetVerticalMeshData function interface is written, the layer thickness obtained in step 2.3 and the DisplayMesh class object pointer are taken as the function input parameters, and the triangular mesh data and the line segment discrete data in the vertical direction are obtained. According to the symmetry, the discrete data of the discrete Face opposite surface is calculated, so that the planar two-dimensional layout model data is expanded to three-dimensional layout model discrete data, and the obtained three-dimensional layout model data is used to replace the planar two-dimensional layout model data under the DisplayMesh class member variable. The layer name is taken as the key value, the DisplayMesh class object is stored in the sequential container vector, and the vector is taken as the value, which is stored in the C++ associative container map in the key-value mode.
[0063] In step 3.4, the generated three-dimensional layout model is rendered and displayed.
[0064] The map container storing the three-dimensional layout model discrete data is traversed, the discrete data is converted into graphic data for constructing the three-dimensional layout according to different data types. The function interface of the rendering graphic data is called to render the generated planar two-dimensional geometric model, so as to realize the conversion of the planar two-dimensional geometric model into the three-dimensional layout model, and display the three-dimensional layout model in the interface.
[0065] In the embodiment of the application, the function interface of the visualization tool function library VTK is used to convert and render the discrete data. The map container storing the three-dimensional discrete data in step 3.3 is traversed, and the discrete data is converted into a vtkPolyData data structure. A vtkPolyDataMapper object is defined to receive the vtkPolyData data, so as to realize the conversion from the graphic data to the rendering primitive. A vtkActor object is created to describe the rendering primitive in the scene. A Render object is created, and the vtkActor object is transmitted as a function input parameter into the AddActor function, so as to realize the rendering of the discrete three-dimensional map model. The final rendering graphic Render object is stored in a C++ sequential container vector in sequence. The vector container storing the Render object is taken as a value, and the vector container is stored in a C++ associative container map in the form of key-value pairs, so as to realize the one-to-one mapping between the layer name and the rendered model. The map container storing the network information in step 3.2 is traversed, and the map container storing the network information is remapped according to the one-to-one correspondence between the basic graphic pointer list and the vector container storing the Render object, so as to realize that the basic graphic pointer list and the list storing the rendering object can be found from the network name respectively. The map container storing the layer name and the rendering model object list is traversed, and the object of the three-dimensional map model display interface built in step 1 is called, so as to realize the rendering and display of the entire PCB three-dimensional map model.
[0066] Step 4, constructing a three-dimensional geometric model of the PCB.
[0067] Extracting a target network or cropping a target area, creating a three-dimensional geometric model of the extracted target network or target area.
[0068] Reference Figure 4 Further describing the constructed three-dimensional geometric model of the PCB.
[0069] The application realizes the free cropping of the target area of the PCB by building a custom cropping setting interface and setting the custom cropping parameters. After extracting the three-dimensional map model of the target network or target area, the two-dimensional plane geometric model corresponding to the three-dimensional map model is found through the mapping relationship between the network name and the basic graphic pointer. The two-dimensional plane geometric model is stretched and subjected to Boolean operation, so as to realize the conversion of the two-dimensional plane geometric model into a three-dimensional geometric entity model. The three-dimensional geometric entity model is subjected to surface discretization, the discrete data is converted into renderable graphic data, the rendering function interface is called to render the graphic data, and the three-dimensional geometric model display interface is displayed.
[0070] Step 4.1, build a cutting setting interface.
[0071] The application realizes free cutting of a PCB three-dimensional layout model by using a self-cutting technology. A three-dimensional layout model cutting setting interface is built, and by setting self-defined cutting parameters, free cutting of a target region on the PCB is realized.
[0072] In the embodiment of the application, a three-dimensional layout model cutting setting interface is built by using a cross-platform C++ graphical user interface application development framework Qt and C++ language. The network names to be retained in the self-defined region are checked, and by setting self-defined cutting parameters such as extension distance and corner shape, the size and shape of the cutting target region can be determined according to the size and shape of the signal network retained in the region signal.
[0073] Step 4.2, extract the target network or target region and perform three-dimensional geometric modeling.
[0074] In the embodiment of the application, a data structure for storing a generated three-dimensional geometric entity model is created. By selecting the network name on the three-dimensional layout model display interface, the target network can be extracted. By using the mapping relationship between the layer name and the basic graphic pointer list and the mapping relationship between the network name and the basic graphic pointer list, the graphic pointer corresponding to the three-dimensional layout model of the target network can be found. The ExportToGeometry function is written in C++, the found basic graphic pointer list is used as the function input parameter, and by calling the application function interface in the ACIS geometric modeling engine, the stretching and Boolean operation of the planar geometric model are realized. The planar two-dimensional model is converted into a three-dimensional geometric entity model by stretching and Boolean operation, and the generated three-dimensional entity model pointer is stored in the designed data structure. The application function interface of the Boolean operation, such as api_unite, realizes the Boolean operation, and the function interface of the model stretching is api_sweep_eith_options.
[0075] Step 4.3, discretize and render the three-dimensional geometric entity model.
[0076] In the embodiment of the application, in step 3.3, only the discretization of the planar two-dimensional geometric model is performed, and the vertical direction discretization data is calculated by stretching. The created three-dimensional geometric entity model needs to be discretized, and not only the upper and lower parallel planes need to be discretized, but also the planes in the vertical direction need to be discretized. The more irregular the model is, the larger the discretization data is, and therefore, if the three-dimensional geometric entity model is subjected to Boolean operation, there will be a large number of fine structures, and the discretization efficiency will be greatly reduced. By calling the surface discretization interface written in step 3.3, the generated three-dimensional geometric entity model is subjected to surface discretization, and a DisplayMesh class object is created to manage the discretized mesh data. The generated discretization data is converted into renderable graphics data, and by calling the rendering interface written in step 3.4, the generated PCB three-dimensional model is displayed in the display interface of the three-dimensional geometric model.< / type> < / id> < / attributes> < / x> < / n> < / m> < / namen> < / name1> < / m> < / mm>
Claims
1. A method for converting an ODB++ file into a three-dimensional geometric model, characterized in that, According to the standard reading of the ODB++ file, the information related to the PCB modeling is processed, and the three-dimensional layout model of the PCB is constructed. Through the extraction of the target area and the target network of the three-dimensional layout model of the PCB, the three-dimensional geometric model of the PCB is constructed. The steps of the conversion method include the following: Step 1, respectively build the import interface of the ODB++ compressed file and the three-dimensional display interface of the PCB model; Step 2, screen the modeling information required for constructing the PCB two-dimensional geometric model: Step 2.1, select the file path where the ODB++ compressed file is stored from the created file import interface, decompress the ODB++ compressed file, and obtain the ODB++ file in the form of a directory tree; Design the data structure for storing the layer stacking order information and layer attribute information; select the storage path of the matrix folder in the ODB++ file, and screen out the layer stacking order information and the attribute information of each layer from the matrix file under the decompressed matrix folder, respectively; store the layer stacking order information and the attribute information in the designed data structure; Step 2.2, design the data structure for storing the parsed non-device layer information; select the storage path of the layers folder in the ODB++ file, and screen out the graphic information and attribute information for constructing the layer from the features file and the attrlist file under the decompressed layers folder, respectively; store the graphic information and attribute information for constructing the layer in the designed data structure; Step 2.3, design the data structure for storing the parsed device layer information; select the file path where the components are stored in the ODB++ file, and screen out the device information of the top layer and the bottom layer of the PCB from the components file under the decompressed layers folder, respectively; store the device information of the top layer and the bottom layer in the designed data structure; Step 2.4, design the data structure for storing the parsed network information and packaging information; select the storage path of the steps folder in the ODB++ file, and screen out the network information and packaging information from the data file under the decompressed steps folder, respectively; store the network information and packaging information in the designed data structure; Step 3, construct the three-dimensional layout model of the PCB: Step 3.1, find the layer stacking order and layer attribute information in the data structure for storing the PCB layer stacking order and layer attribute information, and classify the layers through the layer attribute information; Determine the starting layer and the ending layer of the via in the classified via layer, and assign the via information to the metal layers it crosses, respectively; According to the different basic graphic types of the feature data, different function interfaces are written to create the basic graphics for constructing the layer, and all the basic graphics are stored in the constructed list in the form of a pointer; According to the layer name and the basic graphic pointer list on the layer, a mapping relationship that can be bidirectionally searched by the layer name and the basic graphic pointer list is formed, and the PCB two-dimensional geometric model constructed by layers is obtained; Step 3.2, find the network information contained in the PCB network information data structure, according to the layer name contained in the network information, find the basic graphics pointer list corresponding to the layer name according to the mapping relationship between the layer name and the basic graphics pointer list on the layer, find the corresponding basic graphics pointer in the found basic graphics pointer list, and store the found basic graphics pointer in the list; According to the network name and the basic graphics pointer list, the mapping relationship between the network name and the basic graphics pointer list is formed, and the PCB two-dimensional geometric model is constructed according to the network; Step 3.3, design a data structure for storing discrete information, use a plane grid discrete algorithm to discretize the two-dimensional geometric model created by layer in horizontal and vertical directions to obtain discrete data of three-dimensional layout model, and store the layer name and discrete data on the layer into the designed data structure; Step 3.4, find the layer discrete data information in the data structure storing the layer name and the discrete data on the layer, convert the discrete data into renderable graphics data according to the different types of discrete data, and only render the line grid by calling the rendering function interface to realize rendering the discrete three-dimensional model data into three-dimensional layout model, and display it in the three-dimensional layout model display interface; Step 4, construct the three-dimensional geometric model of PCB: Step 4.1, build a custom clipping setting interface of PCB three-dimensional layout model; Step 4.2, extract one or more target networks by selecting the target network name in the menu bar of the three-dimensional layout display interface; perform Boolean operation on the target area and the entire PCB by setting custom clipping parameters in the custom clipping setting interface to extract the target area of the PCB; Step 4.3, find the corresponding graphics pointer through the network name according to the mapping relationship between the network name and the basic graphics pointer list; After clipping the target area, the graphics pointer of the target area is obtained, and the function interface is written to stretch and perform Boolean operation on the two-dimensional plane geometric model pointed by the graphics pointer, so as to realize the conversion of the three-dimensional layout model of the target network into a three-dimensional geometric entity model; Step 4.4, discretize the three-dimensional geometric entity model, convert the discrete data into renderable graphics data, render the graphics data and display it on the three-dimensional geometric model display interface.
2. The method for converting an ODB++ file into a three-dimensional geometric model as claimed in claim 1, wherein, The data structure for storing layer stacking order information and layer attribute information designed in step 2.1 includes: designing MatrixData class to store matrix information, designing LayerRecord structure to store layer attribute information, and layer stacking order and LayerRecord structure pointer as member variables of MatrixData class.
3. The method for converting ODB++ file into 3D geometric model as claimed in claim 1 wherein, The data structure for storing the non-device layer information is designed in Step 2.2, which includes: designing LayerDataStore class to store the layer information and layer attribute information of the device and non-device layer, designing FeaturesParser class to parse the non-device layer information, designing FeaturesDataStore class to store the non-device layer information, and designing AttrlistParser class to store the attrlist file information; the object pointer of FeaturesParser class is used as a member variable of FeaturesDataStore class, and the object pointer of FeaturesDataStore class and the object pointer of AttrlistParser class are used as member variables of LayerDataStore class.
4. The method for converting ODB++ file into 3D geometric model as claimed in claim 1 wherein, The data structure for storing the device layer information is designed in Step 2.3, which includes: designing ComponentsParser class to parse the device layer information, designing ComponentsDataStore class to store the device layer information, and using the object pointer of ComponentsParser class as a member variable of ComponentsDataStore class, and using the object pointer of ComponentsDataStore class as a member variable of LayerDataStore class.
5. The method for converting ODB++ file into 3D geometric model as claimed in claim 1 wherein, The data structure for storing the network information and package information is designed in Step 2.4, which includes: designing StepEdaDataStore class to store the data file information, designing Net class to store the network information, designing SubNet class to store the sub-network information, and designing Fid class to store the feature data information under the network; the object pointer of Fid class is used as a member variable of SubNet class, and the object pointer of SubNet class is used as a member variable of Net class; designing Package class to store the package information, designing Pin class to store the information of pin, designing OutlineRecord structure to store the information of pin or device outline, and using the pointer of OutlineRecord structure as a member variable of Pin and Package classes respectively, and using Pin class as a member variable of Package class.
6. The method for converting ODB++ file into 3D geometric model as claimed in claim 1 wherein, The data structure for storing the discrete information is designed in Step 3.3, which includes: designing DisPlayMesh class to store the discrete data information, designing FaceMesh structure to store the mesh discrete data of face, designing EdgeMesh structure to store the mesh discrete data of edge, and designing DisplayData structure to store the discrete vertex information; the object pointer of FaceMesh structure and the object pointer of EdgeMesh structure are used as member variables of DisPlayMesh class.
Citation Information
Patent Citations
Method for transforming open database ++ (ODB++) file into editable printed circuit board (PCB) layout
CN104346502A
Transfer method from three-dimensional solid to standard technical layout in microelectromechanical system
CN1881221A