STEP neutral file parsing instantiation method and system based on parallel processing data structure

By processing data structures in parallel, the problems of slow STEP file parsing and poor data compatibility are solved, fast file parsing and instantiation of geometric topology information are achieved, and data consistency and manufacturing efficiency between CAD engines are improved.

CN114462360BActive Publication Date: 2025-09-16XI AN JIAOTONG UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111679290.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-09-16
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing STEP application protocol has a slow parsing speed and poor data compatibility between various CAD engines, resulting in information redundancy and errors, affecting design and manufacturing efficiency.

Method used

Using a method based on parallel processing data structure, a two-dimensional array is designed to store STEP neutral file information, parallel processing data structure parsing and instantiation are carried out, parallel instantiation of data is realized through multi-threading, and a data storage and conversion module is established to achieve standardized data processing and mapping.

Benefits of technology

It improves the speed of file parsing and instantiation, enhances data compatibility between CAD engines, reduces information redundancy and errors, and improves design and manufacturing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462360B_ABST
    Figure CN114462360B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for parsing and instantiating a STEP neutral file based on a parallel processing data structure. Based on the STEP standard, the parallel processing data structure is used to parse the STEP neutral file, obtain the data information required for the instantiation process, instantiate the acquired data information, and obtain geometric and topological objects in the underlying structure of the CAD geometry engine. The geometric and topological information in the STEP neutral file is processed in a standardized manner. Finally, an auxiliary data structure is created to support parallel instantiation, thereby improving the instantiation speed. The present invention implements parallel instantiation using a two-dimensional array that stores the geometric and topological information in the STEP neutral file, realizing nine data exchange functions: point, line, circle, ellipse, plane, cylinder, cone, sphere, and torus. The system can correctly and accurately read STEP files for both basic models and those for more complex models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This method belongs to the reading and instantiation of STEP neutral files, involving the design, mapping and parallel instantiation of entity classes, and specifically involves a STEP neutral file parsing and instantiation method and system based on parallel processing data structure. Background Art

[0002] The geometry engine is the core part of 3D CAD software and is also the basic component of industrial software such as computer-aided engineering (CAE) and computer-aided manufacturing (CAM).

[0003] In design and manufacturing, numerous systems are used to process technical product data. Each system has its own data format, so the same information must be stored multiple times across multiple systems, leading to redundancy and errors. This problem isn't unique to the manufacturing industry, but it's more pronounced there because complex and three-dimensional data can lead to misunderstandings and amplified errors.

[0004] During the design and manufacturing process, for a long time in the past, due to the lack of a standard data structure representation method, the data formats of many systems were different, which caused information redundancy and errors, resulting in huge economic losses.

[0005] To address data incompatibility, STEP (standard for the exchange of product model data) was developed. Today, nearly every major CAD / CAM system includes a data reading and writing module defined by STEP application protocols (APs). However, the STEP application protocol currently suffers from slow parsing speeds and poor data compatibility across various CAD engines. Summary of the Invention

[0006] The purpose of the present invention is to provide a STEP neutral file parsing and instantiation method and system based on parallel processing data structure to overcome the shortcomings of the existing technology. The present invention can quickly realize the parsing of files and the instantiation of geometric and topological information, thereby improving the data compatibility between various CAD engines.

[0007] A method for parsing and instantiating a STEP neutral file based on a parallel processing data structure comprises the following steps:

[0008] S1, uses parallel processing data structure to parse the STEP neutral file and obtain the data information required for the instantiation process;

[0009] S2, instantiate the acquired data to obtain the geometric and topological objects in the underlying structure of the CAD geometry engine.

[0010] Furthermore, S1 specifically includes the following steps:

[0011] S1.1: Parallel processing data structure design: Design a two-dimensional array for parallel instantiation, which stores the data after preliminary processing.

[0012] S1.2: Design file parsing process: Parse and store STEP file information, which is used to assign attributes during the instantiation process. This process includes standardizing the read data and classifying and storing each information into a parallel processing data structure.

[0013] Furthermore, the design process of the parallel processing data structure is to store data in layers according to the hierarchical relationship between each entity. The data mainly includes three fields: data type, attribute value and identifier of each entity, which are used to support parallel processing during the instantiation process.

[0014] Furthermore, the processing flow of the STEP neutral file is as follows: reading the STEP neutral file line by line, performing data segment judgment, performing standardization processing on the data fields, and classifying and storing the data fields in a parallel processing data structure.

[0015] Furthermore, the standardization process of the data field is to verify the integrity of the data, parse out the identifier of the data, the name of the data type to which the data belongs, and the attribute values ​​of the attributes of the data type.

[0016] According to the hierarchical relationship between each entity, the data in the read STEP neutral file is stored in the corresponding layer.

[0017] Furthermore, step S2 specifically includes the following steps:

[0018] S2.1: Design of data storage structure: that is, the data structure for storing instantiated objects.

[0019] S2.2: Data instantiation: Instantiate the data parsed from the STEP neutral file into corresponding geometric and topological objects in the CAD geometry engine.

[0020] Furthermore, the data storage structure is a one-dimensional array, which is used to store the final instantiated object, that is, to store the geometric and topological objects after the entity is instantiated.

[0021] Furthermore, parallel instantiation of data is achieved by implementing instantiation operations based on parallel auxiliary data structures, thereby increasing instantiation speed and avoiding conflicts. Data instantiation allows data to be converted from STEP neutral files into corresponding geometric and topological objects in the CAD geometry engine.

[0022] The STEP neutral file parsing instantiation system based on parallel processing data structure includes:

[0023] STEP file input module: used to load STEP neutral files;

[0024] Data processing module: used to process each line of data. After reading the STEP neutral file into the memory, it reads the data in the file line by line and performs preliminary processing on the data line. Only the three fields of data identifier, data type and attribute value are retained for each line of data, and the processed data is stored in the data storage module.

[0025] Data storage module: A two-dimensional array is used to store processed data. The hierarchical relationship between the data requires that the hierarchical relationship must be followed when creating instantiated objects later, which will lead to inefficient instantiation process. In order to be able to instantiate data in parallel later, a two-dimensional array is introduced here. Since there is a reference relationship between entities, the referenced object must be instantiated first, otherwise a conflict will occur. However, if there is no reference relationship between the two, they can be instantiated at the same time. Therefore, a parallel auxiliary array is created based on the reference relationship between each entity. The data in each layer of the array has no reference relationship. Therefore, data on the same layer can be created at the same time. This data structure is used to instantiate geometry and topology, speeding up the instantiation process while avoiding conflicts.

[0026] Data conversion module: used to convert the data in the data storage module into the data structure built into the CAD geometry engine. The STEP standard document stipulates a set of geometric and topological data expression specifications, and the CAD geometry engine also has a set of customized data expression specifications. This module mainly establishes the mapping relationship between the STEP standard data expression specifications and the expression specifications in the CAD geometry engine, finds the correspondence between classes and between attributes, and realizes data conversion. In this step, the storage data structure in the first step is required. First, since the data of each layer in the data structure in the data storage can be created at the same time, we create several threads according to the amount of data in each layer to perform parallel instantiation operations on the data at the same level. When the instantiation of one layer of data is completed, the next layer is created until the instantiation process is completed.

[0027] Output module: obtains the converted model data, specifically, obtains a pointer to the converted model address.

[0028] Compared with the prior art, the present invention has the following beneficial technical effects:

[0029] The present invention is based on a STEP neutral file parsing and instantiation method of a parallel processing data structure. Based on the STEP standard, the parallel processing data structure is used to parse the STEP neutral file, obtain the data information required for the instantiation process, instantiate the obtained data information, and obtain the geometry and topology objects in the underlying structure of the CAD geometry engine. The geometry and topology information in the STEP neutral file are processed in a standardized manner. Finally, an auxiliary data structure is created to support parallel instantiation, thereby improving the instantiation speed.

[0030] Furthermore, the present invention implements parallel instantiation using a two-dimensional array that stores geometric and topological information from neutral STEP files, enabling nine data exchange functions: point, line, circle, ellipse, plane, cylinder, cone, sphere, and torus. This allows for accurate reading of STEP files for both basic and more complex models.

[0031] Furthermore, the present invention adopts a parallel processing method to accelerate the reading speed of files, adds a parallel processing function in the reading process, and realizes multi-threaded reading of files and instantiation of model data.

[0032] The present invention is based on a STEP neutral file parsing and instantiation system with a parallel processing data structure. The STEP neutral file reading and parallel instantiation process has a simple flow and high accuracy. It can quickly realize file parsing and instantiation of geometric and topological information, and improve data compatibility between various CAD engines. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of STEP neutral file reading in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] like Figure 1 As shown, a STEP neutral file parsing instantiation method based on a parallel processing data structure includes the following steps:

[0037] S1, parse the STEP neutral file to obtain the data information required in the instantiation process;

[0038] Specifically, S1.1: Parallel Processing Data Structure: A two-dimensional array is used to implement parallel instantiation. This two-dimensional array stores the geometric and topological information from the STEP neutral file. Each piece of information contains three fields: an identifier that uniquely identifies the data, a data type, and an attribute value.

[0039] Data is categorized and stored in a two-dimensional array based on the hierarchical relationships between geometric and topological entities. The process for obtaining the hierarchical relationships of entities is as follows: first, entity information is obtained through the mapping relationship between the EXPRESS model and the STEP neutral file. A parallel processing data structure is designed based on the hierarchical relationships between each entity, so that entities at each level can be instantiated simultaneously without conflicts.

[0040] S1.2: File parsing process: parse and store STEP file information, which is used to assign attributes during the instantiation process. The file parsing process is as follows: Figure 1 First, the STEP neutral file is read line by line. When the Data field is read, it indicates that the data field to be stored has been entered. The data standardization process begins. The standardized data is parsed and classified and stored in the parallel processing data structure.

[0041] The data is standardized as follows, and each row of data is processed as follows:

[0042] Step 1: Determine whether the read data information is complete (a complete line of data should start with "#" and end with ";"). If it is complete, proceed to step 3; if it is incomplete, proceed to step 2.

[0043] Step 2: Continue to read data. If the data in the current row does not end with a ";", concatenate the data in that row with the previous data and repeat step 2 until the last byte of the data in the current row is a ";".

[0044] Step 3: Process the current data: For each row of data, retain only the contents of three fields: an identifier that uniquely identifies the data, the name of the data type, and the attribute values ​​of the data type. Create a class (named StepFileDataItem) and set three properties to store the values ​​of these three fields. Process each row of data into an object of this class.

[0045] Step 4: Determine the location where the row of data should be stored in the two-dimensional array based on the object type, and link it to the corresponding array location.

[0046] Step 5: Finally, a two-dimensional array is obtained, which stores the processed data, that is, the StepFileDataItem class object.

[0047] Specifically, the classified storage of files is to store the data in the read STEP neutral file in the corresponding layer according to the hierarchical relationship of each entity.

[0048] S2, by instantiating the acquired data, obtains the geometry and topology objects in the underlying structure of the CAD geometry engine.

[0049] S2.1: Establish data storage structure: that is, the data structure for storing instantiated objects.

[0050] S2.2: Data instantiation: Instantiate the data parsed from the STEP neutral file into corresponding geometric and topological objects. This instantiation process converts the entities in the STEP neutral file into geometric and topological objects in the CAD geometry engine.

[0051] Specifically, the final data storage structure is a one-dimensional array, which is used to store the final instantiated object, that is, the geometric and topological objects after the entity is instantiated.

[0052] Specifically, the parallel instantiation of data is to implement the instantiation operation based on the parallel auxiliary data structure, thereby increasing the instantiation speed and avoiding conflicts.

[0053] The instantiation process is as follows:

[0054] Step 1: Traverse the two-dimensional array and repeat step 2 for each dimension of data.

[0055] Step 2: Create multiple threads to process the data in the array in parallel. The processing content is as follows:

[0056] First, the data type field in the object data is obtained. Based on the mapping relationship between the CAD geometry engine and the geometry and topology in the STEP standard, the data type corresponding to the current object type in the CAD geometry engine is obtained. The mapped class object is directly constructed based on the properties contained in the StepFileDataItem class object.

[0057] Next, the address of the instantiated object is stored in a one-dimensional array. The instantiated object has the same identifier as the object before mapping. The address of the object is stored in the corresponding position in the one-dimensional array according to the object's identifier.

[0058] Step 3: Finally, a one-dimensional array is obtained, and the pointer in the array points to the instantiated data.

[0059] Based on the STEP standard, this invention parses and standardizes the geometric and topological information in STEP neutral files. It also leverages auxiliary data structures to enable parallel data instantiation, speeding up instantiation. The invention has established a framework for reading STEP neutral files, implementing nine data exchange functions: points, lines, circles, ellipses, planes, cylinders, cones, spheres, and tori. STEP files for both basic models and more complex models can be correctly and accurately read. The invention adds parallel processing capabilities to accelerate file reading. Parallel processing is incorporated into the reading process to enable multi-threaded file reading and model data instantiation. The invention has established a model testing library. Currently, the library contains 100 examples, including basic models such as cuboids, cylinders, cones, truncated cones, and tori, as well as complex models composed of geometric elements from these basic models, such as mechanical parts, simple furniture, and daily necessities. The STEP neutral file reading and parallel instantiation method of the present invention has a simple process and high reliability, can quickly implement file parsing and instantiation of geometric and topological information, and improve data compatibility between various CAD engines.

Claims

1. A STEP neutral file parsing instantiation method based on a parallel processing data structure, characterized in that: The following steps are involved: S1, uses parallel processing data structure to parse the STEP neutral file and obtain the data information required for the instantiation process; A two-dimensional array is used to implement parallel instantiation, which stores the geometric and topological information in the STEP neutral file; Data is classified and stored in a two-dimensional array according to the hierarchical relationship between geometric and topological entities; STEP neutral files are read row by row, and when the Data field is read, it indicates that the data field to be stored has been entered, and data standardization processing begins. The standardized data is then parsed and classified and stored; Parse each row of data and process it into a class of objects based on the identifier of the data, the name of the data type to which the data belongs, and the attribute values ​​of the attributes of the data type. Determine the location where the row of data should be stored in the two-dimensional array based on the object type, and link it to the corresponding array location to obtain a two-dimensional array. S2, instantiate the acquired data information to obtain the geometry and topology objects in the underlying structure of the CAD geometry engine.

2. The STEP neutral file parsing instantiation method based on parallel processing data structure according to claim 1 is characterized in that: According to the hierarchical relationship of each entity, the data in the read STEP neutral file is stored in the corresponding layer.

3. The STEP neutral file parsing instantiation method based on parallel processing data structure according to claim 1 is characterized in that: Establish a data structure to store instantiated objects and instantiate the data parsed from the STEP neutral file into corresponding geometric and topological objects.

4. The STEP neutral file parsing instantiation method based on parallel processing data structure according to claim 3 is characterized in that: Use a one-dimensional array to store the last instantiated object.

5. The STEP neutral file parsing instantiation method based on parallel processing data structure according to claim 1 is characterized in that: Obtain the data type field in the object data, and obtain the data type corresponding to the type of the current object in the CAD geometry engine based on the mapping relationship between geometry and topology in the CAD geometry engine and the STEP standard; Store the address of the instantiated object into a one-dimensional array.

6. A STEP neutral file parsing instantiation system based on parallel processing data structure, characterized in that: include: Data processing module: uses parallel processing data structure to parse STEP neutral files and obtain the data information required for the instantiation process; A two-dimensional array is used to implement parallel instantiation, which stores the geometric and topological information in the STEP neutral file; Data is classified and stored in a two-dimensional array according to the hierarchical relationship between geometric and topological entities; STEP neutral files are read row by row, and when the Data field is read, it indicates that the data field to be stored has been entered, and data standardization processing begins. The standardized data is then parsed and classified and stored; Process each line of data. After reading the STEP neutral file into memory, read the data in the file line by line and perform a preliminary processing on the data line. Only the three fields of data identifier, data type and attribute value are retained for each line of data. The processed data is then stored in the data storage module. When storing the processed data in the data storage module, each row of data is parsed at the same time. Each row of data is processed into a type of object according to the identifier of the data, the name of the data type to which the data belongs, and the attribute value of the attribute of the data type. The position where the row of data should be stored in the two-dimensional array is determined according to the object type, and the data is linked to the corresponding array position to obtain a two-dimensional array. Data storage module: uses a two-dimensional array to store processed data; Data conversion module: used to convert the data in the data storage module into the data structure built into the CAD geometry engine; Output module: obtains the converted model data.

Citation Information

Patent Citations

  • method of converting three-dimensional models using parallel processing of information

    RU2015109852A