A DXF data import modeling method, system and medium

By building a mapping relationship table between the entity database and the rendered database, the problem of complex DXF data import operations is solved, intuitive 3D preview and simplified operations of DXF data are realized, and user experience is improved.

CN117272421BActive Publication Date: 2025-08-29XPEEDIC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311391540.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-08-29
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

The existing DXF data import and modeling operations are complicated and cannot visually display 3D rendering effects, layer information is lost, Elevation, Thickness and other information cannot be configured, and user operation efficiency is low.

Method used

Build a mapping relationship table between entity database, rendering database, and LayerID and EntityID, monitor changes in layer configuration information table, synchronously update rendered data to achieve 3D preview display, and simplify user operations.

Benefits of technology

It realizes 3D preview display of DXF data in the import stage, simplifies user operations, improves operation efficiency, supports the import and export of batch operations and configuration information, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117272421B_ABST
    Figure CN117272421B_ABST
Patent Text Reader

Abstract

The present invention discloses a DXF data import modeling method, system and medium, which belong to the field of EDA model simulation. In view of the problem that the existing DXF data import operation is complicated and the modeling effect cannot be intuitively displayed, the present invention provides a DXF data import modeling method. It includes reading DXF data, building an entity database; building a rendering database; creating layers; building a mapping relationship table between LayerID and EntityID; building a layer configuration information table; monitoring the configuration information in the layer configuration information table, and synchronously updating the rendering data accordingly; after the configuration information is completed, the import modeling process ends. When the configuration information is changed, the present invention synchronously updates the rendering effect according to the entity database, rendering database and mapping relationship table, so that the user can intuitively see the modeling effect after import; it is convenient for users to use the loading modeling simulation of DXF data; it simplifies user operations, what you see is what you get, and improves user operation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of EDA model simulation, and more specifically, relates to a DXF data import modeling method, system and medium. Background Art

[0002] DXF (Drawing Exchange Format) is a highly compatible CAD file exchange format, compatible with a variety of file design types and CAD software. Widely used across the industry, DXF-imported data is crucial for simulation. Because DXF data is a 2D vector data type, different simulation software handles it differently. Some simulation software imports all DXF data, then deletes unused data and applies stretching and translation to the useful data. Other software allows data selection during the import phase but doesn't display the 3D model data. For example, HFSS displays DXF data as a layer table, allowing users to select whether to import. After import, all data types default to Sheet or Line, and 3D extrusion operations are then performed. This makes the entire process redundant and unintuitive. In short, existing DXF data import and modeling methods either lack an import phase or only allow users to select whether to import layers. The resulting layer information table is incomplete, unable to display 3D rendering effects, and unable to configure information such as elevation and thickness. After the user imports the DXF data, all entities become separate sheets or lines, the layer information is lost, and the user cannot configure accurately according to the layer.

[0003] For example, Chinese patent application number CN202210126881.6, published on March 11, 2022, discloses a method for generating a simulation circuit based on a construction drawing of a distribution box, which includes: parsing a DXF file to obtain a CAD primitive group; establishing a device primitive database to store the mapping relationship between devices and primitives; matching all devices in the device primitive database with the CAD primitive group to obtain a final result set; identifying the device group in the final result set to generate a device topology relationship result set; and generating a simulation circuit based on the device topology relationship result set. The shortcomings of this patent are that although it realizes the automation and graphics of the traditional complex configuration process and reduces costs, it cannot accurately model and has poor accuracy. Summary of the Invention

[0004] 1. Problems to be solved

[0005] To address the complexities of existing DXF data import operations and the inability to intuitively display modeling results, the present invention provides a DXF data import and modeling method, system, and medium. When configuration information is modified, the present invention synchronously updates the rendering effect based on the entity database, rendering database, and mapping relationship table, allowing users to intuitively see the modeling results after import. This facilitates user modeling simulation using loaded DXF data, simplifies user operations, and improves user efficiency by ensuring that what you see is what you get.

[0006] 2. Technical solution

[0007] To solve the above problems, the present invention adopts the following technical solutions.

[0008] A DXF data import modeling method includes the following steps:

[0009] Read DXF data and build an entity database; each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID;

[0010] Render the entity data and build a rendering database; each rendering data corresponding to the entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID;

[0011] Create layers, each layer corresponds to a unique identifier, that is, each layer corresponds to a unique LayerID;

[0012] Construct a mapping table between LayerID and EntityID;

[0013] Construct layer configuration information table;

[0014] Monitor whether the configuration information in the layer configuration information table has been changed. If changed, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table.

[0015] After the configuration information is completed, the entire import modeling process is completed.

[0016] Furthermore, the entity data in the entity database includes straight line segments, circles, arcs, polyline segments and polygons.

[0017] Furthermore, the entity data in a straight line segment includes the start and end points of the straight line segment; the entity data in a circle includes the center point and radius of the circle; the entity data in an arc includes the center point, radius, start angle and end angle of the arc; the entity data in a multi-line segment includes the start and end point of each line segment; and the entity data in a polygon includes all vertices on the polygon.

[0018] Furthermore, the layer configuration information table includes the layer name, layer color, layer height, layer thickness, layer material, and whether the layer is imported.

[0019] Furthermore, when the configuration information in the layer configuration information table is detected to have changed, the operation of synchronously updating the rendering data is as follows:

[0020] If the layer color changes, the entity data is found through the mapping table, and then the rendering data corresponding to the entity data is found through the rendering database, so as to obtain the rendering data corresponding to the layer and update the color of the rendering data;

[0021] If the layer height changes, the entity data is found through the mapping table, and then the original DXF data corresponding to the layer is found through the entity database. The data is then translated to the layer height, and finally the data rendering effect is updated according to the layer color.

[0022] If the layer thickness changes, the entity data is found through the mapping table, and then the original DXF data corresponding to the layer is found through the entity database. The layer data is first stretched, then the data is translated to the layer height, and finally the data rendering effect is updated according to the layer color.

[0023] If the layer material changes, the layer configuration information table is updated directly without updating the data rendering.

[0024] Furthermore, after the configuration information is completed, the data that does not need to be imported is deleted from the layer configuration information table, and the deletion includes deleting the data modeling data; the data is deleted from the rendered 3D scene.

[0025] A system using any one of the above-mentioned DXF data import modeling methods, comprising:

[0026] Entity database construction module: used to read DXF data and build an entity database; each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID;

[0027] Rendering database construction module: used to render entity data and build a rendering database; each rendering data corresponding to each entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID;

[0028] Layer creation module: used to create layers, each layer corresponds to a unique identifier;

[0029] Mapping relationship table construction module: used to construct the mapping relationship table between LayerID and EntityID;

[0030] Build layer configuration information table module: used to build layer configuration information table;

[0031] Synchronous update rendering data module: used to monitor whether the configuration information in the layer configuration information table has been changed. After the change, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table.

[0032] Display module: used to display the configuration information after it is completed.

[0033] A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned DXF data import modeling methods.

[0034] 3. Beneficial effects

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

[0036] (1) The present invention constructs an entity database, a rendering database, and a mapping relationship table between LayerID and EntityID, and displays the 2D vector DXF data in 3D preview by layer during the import phase. At the same time, the corresponding layer configuration information table is configured by layer. When the configuration information is changed, the rendering effect is synchronously updated according to the entity database, the rendering database, and the mapping relationship table, so that the user can intuitively see the modeling effect after import; it greatly facilitates the user to use the loading modeling simulation of DXF data; simplifies user operations, what you see is what you get, supports batch operations, supports the import and export of configuration information, and improves user operation efficiency;

[0037] (2) When constructing an entity database, the present invention includes data of various types, such as straight line segments, circles, arcs, multi-line segments, and polygons, to ensure the comprehensiveness of the entity database construction. At the same time, the entity data records for different types of data are also different, ensuring the accuracy of the data establishment for different types of data, thereby improving the accuracy of the entire entity database construction, so that the corresponding entity data in the entity database can be accurately and quickly found during subsequent rendering operations;

[0038] (3) The system modules of the present invention are simple in composition. By configuring the relevant database and mapping table during the DXF data import stage, the 3D preview effect can be displayed synchronously, and the 2D model can be directly translated and stretched into 3D data. This avoids the low efficiency problem caused by the modeling effect that previously required multiple steps to achieve, and greatly improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the overall process of the present invention;

[0040] Figure 2Update the flow chart for rendering data synchronization. DETAILED DESCRIPTION

[0041] The present invention is further described below with reference to specific embodiments and accompanying drawings.

[0042] Example 1

[0043] See also Figure 1 and Figure 2 , Figure 1 This is a schematic diagram of the overall process of this application; Figure 2 Schematic diagram of the process of synchronously updating rendering data.

[0044] Specifically, in this embodiment, Figure 1 and Figure 2 As shown, a DXF data import modeling method includes the following steps:

[0045] S1: Read DXF data and build an entity database (Table01). Each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID. In the entity database, there is a one-to-one mapping between each entity data and the unique EntityID corresponding to each entity data. Knowing the EntityID can obtain the entity data, and knowing the entity data can obtain the EntityID.

[0046] Specifically, in this step, the entity data in the entity database includes line segments, circles, arcs, multi-line segments, and polygons, ensuring the comprehensiveness of the entity database construction. Furthermore, for each type of entity data, the entity data records for each type are different. Specifically, the entity data for a line segment includes the starting and ending points of the line segment; the entity data for a circle includes the center point and radius of the circle; the entity data for an arc includes the center point, radius, starting angle, and ending angle of the arc; the entity data for a multi-line segment includes the starting and ending points of each line segment; and the entity data for a polygon includes all vertices on the polygon. Different data recording methods are used for different types of data, ensuring the uniqueness and accuracy of each data record, thereby improving the accuracy of the entire entity database construction and enabling accurate and rapid retrieval of the corresponding entity data in the entity database during subsequent rendering operations.

[0047] S2: Render the entity data and build a rendering database (Table02); each rendering data corresponding to each entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID; in the rendering database, each entity data corresponds to a rendering data, and each rendering data corresponds to a unique RenderID; that is, each entity data corresponds to a RenderID, and there is a one-to-one mapping between them. Knowing the entity data can know the RenderID, and knowing the RenderID;

[0048] S3: Create layers. Each layer corresponds to a unique identifier, that is, each layer corresponds to a unique LayerID. Then, a mapping table between LayerID and EntityID is constructed (Table03).

[0049] In this step, each layer will correspond to a group of EntityIDs, which makes it easier to set the same group of EntityIDs in a unified way later.

[0050] S4: Constructing a layer configuration information table (DataConfigTable); specifically, the layer configuration information table includes information such as layer name, layer color, layer height, layer thickness, layer material, and whether the layer is imported;

[0051] S5: Monitor whether the configuration information in the layer configuration information table has been changed. If the configuration information in the layer configuration information table has been changed, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table. Specifically, when the configuration information in the layer configuration information table is changed, the operation of synchronously updating the rendering data is as follows:

[0052] If the layer color (Layer Color) changes, the entity data is found through the mapping table (Table03), and the rendering data corresponding to the entity data is found through the rendering database (Table02), thereby obtaining the rendering data corresponding to the layer and updating the color of the rendering data;

[0053] If the layer height (Z-Axis Height) changes, the entity data is found through the mapping table (Table03), and the original DXF data corresponding to the layer is found through the entity database (Table01). The data is then translated to the layer height, and finally the data rendering effect is updated according to the layer color.

[0054] If the layer thickness (Thickness) changes, the entity data is found through the mapping table (Table03), and then the original DXF data corresponding to the layer is found through the entity database (Table01). The layer data is first stretched, then the data is translated to the layer height, and finally the data rendering effect is updated according to the layer color;

[0055] If the layer material changes, the layer configuration information table is updated directly without updating the data rendering.

[0056] S6: After the configuration information is completed, the entire import modeling process ends; in this step, when the configuration information is completed, the data that does not need to be imported in the layer configuration information table is deleted, and the deletion includes deleting the data modeling data and deleting the data from the rendered 3D scene.

[0057] The present invention constructs an entity database, a rendering database, and a mapping relationship table between LayerID and EntityID, and displays a 3D preview of the two-dimensional vector DXF data by layer during the import stage. At the same time, the corresponding layer configuration information table is configured by layer. When the configuration information is changed, the rendering effect is synchronously updated according to the entity database, the rendering database, and the mapping relationship table, so that the user can intuitively see the modeling effect after import; it greatly facilitates the user to use the loading modeling simulation of DXF data; simplifies user operations, what you see is what you get, supports batch operations, supports the import and export of configuration information, and improves user operation efficiency.

[0058] Example 2

[0059] A system using the above-mentioned DXF data import modeling method comprises:

[0060] Entity database construction module: used to read DXF data and build an entity database; each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID;

[0061] Rendering database construction module: used to render entity data and build a rendering database; each rendering data corresponding to each entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID;

[0062] Layer creation module: used to create layers, each layer corresponds to a unique identifier;

[0063] Mapping relationship table construction module: used to construct the mapping relationship table between LayerID and EntityID;

[0064] Build layer configuration information table module: used to build layer configuration information table;

[0065] Synchronous update rendering data module: used to monitor whether the configuration information in the layer configuration information table has been changed. After the change, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table.

[0066] Display module: used to display the configuration information after it is completed.

[0067] The system modules of the present invention are simple in composition. By configuring the relevant database and mapping table during the DXF data import stage, it is possible to synchronously display the 3D preview effect and directly translate and stretch the 2D model into 3D data. This avoids the low efficiency problem caused by the modeling effect that previously required multiple steps to achieve, while greatly improving the user experience.

[0068] Example 3

[0069] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-mentioned DXF data import modeling method. It is worth noting that, for those skilled in the art, in addition to implementing the system and each module provided by the present application in a purely computer-readable program code manner, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, editable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system provided by the present application and its various modules can be considered as a hardware component, and the modules included therein for implementing various programs can also be regarded as structures within the hardware component, and the modules for implementing various functions can also be regarded as both software programs for implementing the method and structures within the hardware component.

[0070] The examples described in the present invention are merely descriptions of the preferred embodiments of the present invention and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made to the technical solutions of the present invention by engineers and technicians in this field should fall within the scope of protection of the present invention.

Claims

1. A DXF data import modeling method, characterized by: The steps include: Read DXF data and build an entity database; each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID; Render the entity data and build a rendering database; each rendering data corresponding to the entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID; Create layers, each layer corresponds to a unique identifier, that is, each layer corresponds to a unique LayerID; Construct a mapping table between LayerID and EntityID; Construct layer configuration information table; Monitor whether the configuration information in the layer configuration information table has been changed. If changed, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table. After the configuration information is completed, the entire import modeling process is completed.

2. A DXF data import modeling method according to claim 1, characterized in that: The entity data in the entity database includes straight line segments, circles, arcs, multi-line segments and polygons.

3. A DXF data import modeling method according to claim 2, characterized in that: The entity data of a straight line segment includes the start and end points of the straight line segment; the entity data of a circle includes the center point and radius of the circle; the entity data of an arc includes the center point, radius, start angle, and end angle of the arc; the entity data of a multi-line segment includes the start and end points of each line segment; and the entity data of a polygon includes all vertices on the polygon.

4. The DXF data import modeling method according to claim 1, characterized in that: The layer configuration information table includes the layer name, layer color, layer height, layer thickness, layer material, and whether the layer is imported.

5. A DXF data import modeling method according to claim 4, characterized in that: When changes are detected in the configuration information table of the layer configuration information, the operations for synchronously updating the rendering data are as follows: If the layer color changes, the entity data is found through the mapping table, and then the rendering data corresponding to the entity data is found through the rendering database, so as to obtain the rendering data corresponding to the layer and update the color of the rendering data; If the layer height changes, the entity data is found through the mapping table, and then the original DXF data corresponding to the layer is found through the entity database. The data is then translated to the layer height, and finally the data rendering effect is updated according to the layer color. If the layer thickness changes, the entity data is found through the mapping table, and then the original DXF data corresponding to the layer is found through the entity database. The layer data is first stretched, then the data is translated to the layer height, and finally the data rendering effect is updated according to the layer color. If the layer material changes, the layer configuration information table is updated directly without updating the data rendering.

6. The DXF data import modeling method according to claim 1, characterized in that: After the configuration information is completed, the data that does not need to be imported in the layer configuration information table is deleted, and the deletion includes deleting the data modeling data; Data is deleted from the rendered 3D scene.

7. A system using the DXF data import modeling method according to any one of claims 1 to 6, characterized in that: include: Entity database construction module: used to read DXF data and build entity database; Each entity data in the entity database corresponds to a unique identifier, that is, each entity data corresponds to a unique EntityID; Rendering database construction module: used to render entity data and build a rendering database; each rendering data corresponding to each entity data has a unique identifier, that is, each rendering data corresponds to a unique RenderID; Layer creation module: used to create layers. Each layer corresponds to a unique identifier, that is, each layer corresponds to a unique LayerID; Mapping relationship table construction module: used to construct the mapping relationship table between LayerID and EntityID; Build layer configuration information table module: used to build layer configuration information table; Synchronous update rendering data module: used to monitor whether the configuration information in the layer configuration information table has been changed. After the change, the rendering data will be updated synchronously according to the entity database, rendering database, and mapping relationship table. Display module: used to display the configuration information after it is completed.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the DXF data import modeling method described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • A method for generating simulation circuits based on distribution box construction drawings

    CN114169288B

  • Building three-dimensional image display platform and application system thereof

    CN104318513A

  • DXF format-based house type image information extraction and vectorization method and device

    CN114092952A