Method, system and device for converting FBX file into APDL file and medium

The method of converting FBX files to APDL files solves the problem that FBX files cannot be directly imported into Ansys, simplifies the model reconstruction and analysis process, and improves the efficiency and accuracy of engineers' work.

CN121349960APending Publication Date: 2026-01-16XIJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311377374.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Ansys software does not support the direct import of FBX files, which forces engineers to remodel in Ansys, increasing workload and complexity, and making it impossible to classify structural components.

Method used

A method is provided to convert FBX files into APDL files. By parsing the geometric properties of the FBX file, triangulation of structural components and depth detection are performed to generate APDL files, simplifying the model reconstruction process.

Benefits of technology

It enables the conversion of FBX files to APDL files, reducing the workload of manual modeling, improving the efficiency and accuracy of model reconstruction in Ansys, and simplifying the structural analysis process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0004508430750000011
    Figure HDA0004508430750000011
  • Figure HDA0004508430750000012
    Figure HDA0004508430750000012
  • Figure HDA0004508430750000021
    Figure HDA0004508430750000021
Patent Text Reader

Abstract

A method, system, device and medium for converting an FBX file into an APDL file, the method comprising: analyzing the FBX file to obtain the name, number and surface relationship attribute of each structural member, performing inspection according to the name, number and surface relationship attribute, performing triangularization processing on the inspected non-triangular surface, and converting the triangularized surface into an APDL file; performing depth detection on the triangularized surface relation attributes to obtain a depth layer number, performing classified storage on the surface relation attributes under the same depth to obtain a structural component data set, and finally converting the structural component data set into an APDL file; the system, the equipment and the medium are used for realizing the method for converting the FBX file into the APDL file. According to the method, the modeling process of finite element analysis on the three-dimensional model is simplified through conversion from the FBX file to the APDL file, the structural body of the model component is automatically recognized through classified storage, and the method has the advantages that the working efficiency is improved, and the operation steps are simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geometric model conversion technology, specifically to a method, system, device, and medium for converting FBX files into APDL files. Background Technology

[0002] Autodesk FBX file format is a 3D data exchange format. In BIM systems, after the 3D modeling of a structure is completed, finite element analysis is often required. Ansys, as a commonly used finite element analysis software, has its own modeling sequence and requirements.

[0003] FBX (Filmbox) is a 3D scene exchange file format developed by Autodesk for exchanging data between different 3D software programs. FBX is an open standard with good compatibility with most 3D software, such as 3ds Max, Maya, Cinema 4D, and Blender. It is commonly used to transfer 3D projects between different software programs. FBX files have the .fbx extension, are small in size, and are widely used in 3D project distribution. Its biggest advantage is its support for multi-software interaction, facilitating team collaboration.

[0004] Currently, Ansys models are mainly imported from CAD models and do not support direct import of FBX files. Furthermore, it cannot classify structural components. Structural models need to be rebuilt in Ansys using its own modeling engineering, which greatly increases the workload and complexity for engineers and designers. Summary of the Invention

[0005] To overcome the shortcomings of the existing technology, the purpose of this method is to provide a method, system, device, and medium for converting FBX files into APDL files. The method involves parsing the geometric attributes of the FBX file, triangulating the structural components based on their names, numbers, and surface relationship attributes, performing depth detection on the triangulated structural components to obtain the number of depth layers, classifying and storing the layered structural components to obtain a structural component data set, and constructing an APDL file based on this data set. This forms an Ansys-readable APDL modeling command stream, enabling rapid reconstruction of the 3D model in Ansys and completing the conversion process. This invention reduces manual modeling workload through file conversion and can directly convert FBX files into APDL files readable by Ansys, facilitating subsequent finite element analysis.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for converting FBX files to APDL files includes the following steps:

[0008] Step 1: Use 3D modeling software to generate a 3D model and export it as an FBX file;

[0009] Step 2: Parse the FBX file exported in Step 1 to obtain the name, number, and surface relationship attributes of each structural component in the 3D model;

[0010] Step 3: Based on the names, numbers, and surface relationship attributes of the structural components obtained in Step 2, check whether the faces of each structural component are composed of triangles. If not, triangulate the non-triangular faces to make all faces triangular.

[0011] Step 4: Perform depth detection on the surface relationship attributes of the structural components after triangulation in Step 3 to obtain the number of parent-child node layers of the surface relationship attributes, i.e., the depth layer number n.

[0012] Step 5: After layering in Step 4, classify and store the surface relationship attributes of structural components at the same depth according to the names obtained in Step 3, and use the numbers as notes for structural construction to form a data set of structural components with the same type of names and numbers as notes.

[0013] Step 6: Based on the structural component dataset categorized and stored in Step 5, construct the APDL file.

[0014] The parsing method in step 2 specifically includes the following steps:

[0015] Step 2.1: Initialize a data structure or dataset, including name, number, and face relation attributes;

[0016] Step 2.2: Open the FBX file;

[0017] Step 2.3: Read the header information of the FBX file opened in Step 2.2 to determine the file version and structure;

[0018] Step 2.4: After determining the document version and structure as an FBX file in Step 2.3, identify and extract the starting marker of a structural component;

[0019] Step 2.5: Read the name and number information of the structural components extracted in Step 2.4, and at the same time identify and extract the surface relationship attributes, including the Vertex dataset, Normal dataset, and UV dataset;

[0020] Step 2.6: Store the names, numbers, and surface relationship attributes of the structural components read in Step 2.5 into the data structure or dataset initialized in Step 2.1;

[0021] Step 2.7: Repeat steps 2.2 to 2.6 until all FBX files have been parsed.

[0022] The triangulation process in step 3 specifically includes the following steps:

[0023] Step 3.1: Check the composition of the faces contained in each structural component and determine whether each face is composed of triangles. If the number of vertices of the checked face is not equal to 3, or if the topological relationship of the checked face has more than 3 adjacent vertices, it means that it is not a triangle.

[0024] Step 3.2: If step 3.1 determines that a face is not a triangle, mark that face;

[0025] Step 3.3: Decompose the face marked in Step 3.2 into multiple triangles;

[0026] Step 3.4: Update the data structure with the triangles decomposed in Step 3.3;

[0027] Step 3.5: Repeat steps 3.1 to 3.4 until all structural member surfaces have been inspected.

[0028] The depth detection in step 4 specifically includes the following steps:

[0029] Step 4.1: Initialize the depth number n to 0;

[0030] Step 4.2: After the initialization in Step 4.1 is completed, select a face relationship attribute and check the parent node of the current face relationship attribute level by level upwards. When a parent node exists, let the depth level n = n + 1, and switch the node corresponding to the current face relationship attribute to the parent node. At the same time, continue to check the parent node upwards until the root node is reached or there are no more parent nodes.

[0031] Step 4.3: Record the depth number n obtained in Step 4.2, as the depth number of the face relationship attribute selected in Step 4.2;

[0032] Step 4.4: Perform depth detection of the next face relationship attribute. Repeat steps 4.1 to 4.3 until all face relationship attributes have been detected.

[0033] The categorized storage in step 5 specifically includes the following steps:

[0034] Step 5.1: Initialize a dataset;

[0035] Step 5.2: Select the surface attribute data of a structural member;

[0036] Step 5.3: Identify the name of the structural component to which the face attribute data selected in Step 5.2 belongs, use the number as a note, add this face attribute data to the structural component data set with the corresponding name, and store it in the data set initialized in Step 5.1. The face attribute data in the structural component data set includes: Vertex dataset, Normal dataset, and UV dataset. The Vertex dataset contains vertex coordinate information of face attributes, the Normal dataset contains normals of each vertex, and the UV dataset contains coordinate information of texture maps.

[0037] Step 5.4: Repeat steps 5.2 to 5.3 until all structural component data has been categorized and stored.

[0038] Step 6, which involves constructing the APDL file, specifically includes the following steps:

[0039] Step 6.1: Initialize a text file;

[0040] Step 6.2: Select a structural component dataset and use APDL commands to create the geometry of the structural component dataset in Ansys, including defining points, faces, and volumes;

[0041] Following the rules of ANSYS APDL command flow modeling, the read list of points, surfaces, and volumes is transformed into the following form:

[0042] Point coordinate information is described by the K command. A node is defined using the "K" command, with the basic format: K,KNUM,X,Y,Z, where "KNUM" is the node number. If left blank or set to 0, ANSYS will automatically assign a node number. "X", "Y", and "Z" are the node's coordinates in 3D space. The point coordinate information contained in the Vertex dataset within the structure can be converted into an APDL command stream using the "K" command: for multiple points (x1,y1,z1), (x2,y2,z2), (x3,y3,z3)...(x... n ,y n ,z n The APDL command stream is as follows:

[0043] K,1,x1,y1,z1;

[0044] K,2,x2,y2,z2;

[0045] K,3,x3,y3,z3;

[0046] ...

[0047] K,n,x n ,y n ,z n ;

[0048] The surface relationship attribute is expressed by the "A" command. The "A" command defines a region, i.e., a surface, and its basic format is: A, K1, K2, ..., K n Where: K1, K2, ..., K n These are the key point numbers that define the region. For a face, at least three key points are required for definition. The face relationship attributes in the structure are formed by combining the key point numbers.

[0049] A, K1, K2, K3;

[0050] A, K4, K5, K6;

[0051] A, K7, K8, K9;

[0052] ...

[0053] A, K n-2 ,K n-1 ,K n ;

[0054] Use the ASEL command to select multiple faces of the structure, based on the face names of the beam, slab, and column structural members read from the database. Then use the CM command to group the selected faces. The following command shows the selection of six faces grouped together and named AREA:

[0055] ASEL,S,,,A1,A6;

[0056] CM,,AREA;

[0057] Use the VA command to form a solid from the combined surfaces:

[0058] VA, AREA;

[0059] This completes the process of converting the structural component dataset into an APDL command stream.

[0060] Step 6.3: Repeat step 6.2 until all structural component datasets have been processed;

[0061] Step 6.4: After all the data sets of all structural components have been processed in Step 6.3, the generated APDL command stream is written line by line into the text file initialized in Step 6.1 to generate a complete APDL file.

[0062] A system for converting FBX files to APDL files, comprising:

[0063] Parsing module: Parses the exported FBX file;

[0064] Triangulation module: Triangulates the faces of non-triangular structural components;

[0065] Depth Detection Module: Performs depth detection on the surface relationship attributes of the triangulated structural components to obtain the number of depth layers;

[0066] Categorization and storage module: Categorizes and stores the layered surface relationship attributes to form a structural component data set;

[0067] Data conversion module: Constructs APDL files based on the structural component dataset.

[0068] A device for converting FBX files to APDL files, comprising:

[0069] Memory: Used to store a computer program that implements the method for converting an FBX file to an APDL file;

[0070] Processor: Used to implement the method for converting FBX files to APDL files when executing the computer program.

[0071] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a method for converting an FBX file to an APDL file.

[0072] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0073] 1. This invention provides a method for converting FBX files into APDL files, which can easily parse and extract geometric data from FBX files and convert this data into APDL files required by ANSYS, making it easier to reconstruct a complete geometric model in ANSYS, greatly simplifying the structural analysis process and providing engineers with a more efficient tool.

[0074] 2. This invention, through the categorization and storage of structural components, can automatically identify and export the structural forms of each component in the model. This automatic identification function helps structural engineers quickly understand the components of the model, providing strong support for further structural analysis. Engineers can more easily analyze and design specific structural parts, improving work efficiency.

[0075] In summary, the beneficial effects of this invention include improved convenience and efficiency for engineers performing structural analysis in ANSYS. Furthermore, by automatically identifying structural sets, it simplifies the analysis of specific structural components, allowing structural engineers to focus more on design and analysis tasks, thus improving work efficiency and accuracy. These advantages make this invention have significant application potential in the field of structural engineering. Attached Figure Description

[0076] Figure 1 The BIMBase model used in the embodiments of the present invention.

[0077] Figure 2 This diagram illustrates the system reading of FBX files to convert them into APDL files, as shown in the embodiment of the present invention.

[0078] Figure 3 The system for converting FBX files to APDL files, as an embodiment of the present invention, is shown in the diagram.

[0079] Figure 4 This is an ANSYS reconstruction diagram of an embodiment of the present invention.

[0080] Figure 5 This is a diagram of the board after reconstruction using ANSYS, as shown in an embodiment of the present invention.

[0081] Figure 6 This is a bar chart reconstructed using ANSYS in an embodiment of the present invention.

[0082] Figure 7 This is a beam diagram reconstructed using ANSYS, representing an embodiment of the present invention. Detailed Implementation

[0083] The present invention will now be described in detail with reference to the accompanying drawings.

[0084] A method for converting FBX files to APDL files includes the following steps:

[0085] Step 1: As Figure 1 As shown, the BIMBase system is used to generate a 3D model and export it as an FBX file;

[0086] Step 2: Parse the FBX file exported in Step 1 to obtain the name, number, and surface relationship attributes of each structural component in the 3D model;

[0087] Step 3: Based on the names, numbers, and surface relationship attributes of the structural components obtained in Step 2, check whether the faces of each structural component are composed of triangles. If not, triangulate the non-triangular faces to make all faces triangular.

[0088] Step 4: Perform depth detection on the surface relationship attributes of the structural components after triangulation in Step 3 to obtain the number of parent-child node layers of the surface relationship attributes, i.e., the depth layer number n.

[0089] Step 5: After layering in Step 4, classify and store the surface relationship attributes of structural components at the same depth according to the names obtained in Step 3, and use the numbers as notes for structural construction to form a data set of structural components with the same type of names and numbers as notes.

[0090] Step 6: Based on the structural component data set classified and stored in Step 5, construct the APDL file.

[0091] The parsing method in step 2 specifically includes the following steps:

[0092] Step 2.1: Initialize a dataset to store information about the structural components to be read, including name, number, and surface relationship attributes.

[0093] Step 2.2: Open the FBX file to prepare for parsing;

[0094] Step 2.3: As Figure 2 As shown, the program reads the header information of the FBX file opened in step 2.2 to determine the file's version and structure;

[0095] Step 2.4: After determining the document version and structure as an FBX file in Step 2.3, identify and extract the starting marker of a structural component;

[0096] Step 2.5: Read the name and number information of the structural components extracted in Step 2.4, and at the same time identify and extract the surface relationship attributes, including the Vertex dataset, Normal dataset, and UV dataset;

[0097] Step 2.6: Store the names, numbers, and surface relationship attributes of the structural components read in Step 2.5 into the data structure or dataset initialized in Step 2.1;

[0098] Step 2.7: Repeat steps 2.2 to 2.6 until all FBX files have been parsed.

[0099] The triangulation process in step 3 specifically includes the following steps:

[0100] Step 3.1: Check the composition of the faces contained in each structural component and determine whether each face is composed of triangles. If the number of vertices of the checked face is not equal to 3, or if the topological relationship of the checked face has more than 3 adjacent vertices, it means that it is not a triangle.

[0101] Step 3.2: If step 3.1 determines that a face is not a triangle, mark that face;

[0102] Step 3.3: Decompose the face marked in Step 3.2 into multiple triangles, ensuring that each triangle has 3 vertices;

[0103] Step 3.4: Update the data structure with the triangles decomposed in Step 3.3 to reflect the new triangle faces;

[0104] Step 3.5: Repeat steps 3.1 to 3.4 until all structural member surfaces have been inspected.

[0105] The depth detection in step 4 specifically includes the following steps:

[0106] Step 4.1: Initialize the depth level n to 0, which is used to track the depth relationship between parent and child nodes;

[0107] Step 4.2: After initialization in Step 4.1, select a face relationship attribute and start depth detection. Detect the parent node of the current face relationship attribute by checking the relationship between faces. When a parent node exists, set the depth level n = n + 1 and switch the node corresponding to the current face relationship attribute to the parent node. Continue to detect parent nodes upwards until the root node is reached or there are no more parent nodes.

[0108] Step 4.3: Record the depth number n obtained in Step 4.2, as the depth number of the face relationship attribute selected in Step 4.2;

[0109] Step 4.4: Perform depth detection of the next face relationship attribute. Repeat steps 4.1 to 4.3 until all face relationship attributes have been detected.

[0110] These steps will calculate the depth level n for each face relationship attribute, which is its depth in the parent-child node relationship.

[0111] The categorized storage in step 5 specifically includes the following steps:

[0112] Step 5.1: Initialize a dataset;

[0113] Step 5.2: Select the surface attribute data of a structural member;

[0114] Step 5.3: Identify the name of the structural component to which the face attribute data selected in Step 5.2 belongs, use the number as a note, add this face attribute data to the structural component data set with the corresponding name, and store it in the data set initialized in Step 5.1. The face attribute data in the structural component data set includes: Vertex dataset, Normal dataset, and UV dataset. The Vertex dataset contains vertex coordinate information of face attributes, the Normal dataset contains normals of each vertex, and the UV dataset contains coordinate information of texture maps.

[0115] Step 5.4: Repeat steps 5.2 to 5.3 until all structural component data has been categorized and stored.

[0116] Step 6, which involves constructing the APDL file, specifically includes the following steps:

[0117] Step 6.1: Initialize a text file to store the APDL command stream;

[0118] Step 6.2: Select a structural component dataset and use APDL commands to create the geometry of the structural component dataset in Ansys, including defining points, faces, and volumes;

[0119] Following the rules of ANSYS APDL command flow modeling, the read list of points, surfaces, and volumes is transformed into the following form:

[0120] Point coordinate information is described by the K command. A node (also called a keypoint) is defined using the "K" command, and its basic format is: K, KNUM, X, Y, Z, where "KNUM" is the node number. If left blank or set to 0, ANSYS will automatically assign a node number. "X", "Y", and "Z" are the node's coordinates in 3D space. The point coordinate information contained in the Vertex dataset within the structure can be converted into an APDL command stream using the "K" command: for multiple points (x1, y1, z1), (x2, y2, z2), (x3, y3, z3)...(x... n ,y n ,z n The APDL command stream is as follows:

[0121] K,1,x1,y1,z1;

[0122] K,2,x2,y2,z2;

[0123] K,3,x3,y3,z3;

[0124] ...

[0125] K,n,x n ,y n ,z n ;

[0126] The surface relationship attribute is expressed by the "A" command. The "A" command defines a region, i.e., a surface, and its basic format is: A, K1, K2, ..., K n Where: K1, K2, ..., K n These are the key point numbers that define the region. For a face, at least three key points are required for definition. For example, for a triangular face, the face relationship attributes in the structure are combined using the numbers of these points.

[0127] A, K1, K2, K3;

[0128] A, K4, K5, K6;

[0129] A, K7, K8, K9;

[0130] ...

[0131] A, K n-2 ,K n-1 ,K n ;

[0132] Use the ASEL command to select multiple faces of the structure, based on the face names of the beam, slab, and column structural members read from the database. Then use the CM command to group the selected faces. The following command shows the selection of six faces grouped together and named AREA:

[0133] ASEL,S,,,A1,A6;

[0134] CM,,AREA;

[0135] Use the VA command to form a solid from the combined surfaces:

[0136] VA, AREA;

[0137] This completes the process of converting the structural component dataset into an APDL command stream.

[0138] Step 6.3: Repeat step 6.2 to continue processing the next structural component dataset until all structural component datasets have been processed;

[0139] Step 6.4: As Figure 3 As shown, after step 6.3 has processed all the datasets of the structural components, the generated APDL command stream is written line by line into the text file initialized in step 6.1 to generate a complete APDL file.

[0140] See Figures 4-7 The APDL file generated by FBX conversion can be directly imported into ANSYS for reconstruction and finite element analysis, simplifying the steps of remodeling in ANSYS.

[0141] A system for converting FBX files to APDL files, comprising:

[0142] Parsing module: Parses the exported FBX file to implement steps 1 and 2 of a method for converting FBX files to APDL files;

[0143] Triangulation module: Triangulates the faces of non-triangular structural components to implement step 3 of a method for converting FBX files to APDL files;

[0144] Depth Detection Module: Performs depth detection on the surface relationship attributes of the triangulated structural components to obtain the depth layer number, which is used to implement step 4 of a method for converting FBX files to APDL files;

[0145] Classification and storage module: Classifies and stores the layered surface relationship attributes to form a structural component data set, which is used to implement step 5 of a method for converting FBX files to APDL files;

[0146] Data conversion module: Constructs an APDL file based on the structural component dataset, which is used to implement step 6 of a method for converting FBX files into APDL files.

[0147] A device for converting FBX files to APDL files, comprising:

[0148] Memory: Used to store a computer program that implements the method for converting an FBX file to an APDL file;

[0149] Processor: Used to implement the method for converting FBX files to APDL files when executing the computer program.

[0150] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of the device for converting FBX files to APDL files, connecting various parts of the device via various interfaces and lines.

[0151] When the processor executes the computer program, it implements the steps of the method for converting FBX files to APDL files, as described above. For example: Step 1: Generate a 3D model using 3D modeling software and export it as an FBX file; Step 2: Parse the FBX file exported in Step 1 to obtain the name, number, and face relationship attributes of each structural component in the 3D model; Step 3: Based on the name, number, and face relationship attributes of the structural components obtained in Step 2, check whether the faces of each structural component are composed of triangles. If not, triangulate the non-triangular faces to make all faces triangular; Step 4: Perform depth detection on the face relationship attributes of the structural components after triangulation in Step 3 to obtain the parent-child node layer number of the face relationship attributes, i.e., the depth layer number n; Step 5: After layering in Step 4, classify and store the face relationship attributes of structural components at the same depth according to the names obtained in Step 3, and use the numbers as notes for structural construction to form a data set of structural components with the same type of name and number as notes; Step 6: Construct an APDL file based on the structural component dataset classified and stored in Step 5. This implements the method for converting FBX files to APDL files.

[0152] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above system, such as: a parsing module: parsing the exported FBX file; a triangulation module: triangulating the faces of non-triangular structural components; a depth detection module: performing depth detection on the face relationship attributes of the triangulated structural components to obtain the number of depth layers; a classification and storage module: classifying and storing the layered face relationship attributes to form a structural component data set; and a data conversion module: constructing an APDL file based on the structural component dataset. The output is the result of the method for converting an FBX file to an APDL file.

[0153] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing preset functions, the instruction segments describing the execution process of the computer program in the device of the method for converting FBX files to APDL files. For example, the computer program can be divided into a parsing module; a triangulation module; a depth detection module; a classification and storage module; and a data conversion module. The specific functions of each module are as follows: Parsing module: parses the exported FBX file; Triangulation module: triangulates the faces of non-triangular structural components; Depth detection module: performs depth detection on the face relationship attributes of the triangulated structural components to obtain the number of depth layers; Classification and storage module: classifies and stores the layered face relationship attributes to form a structural component data set; Data conversion module: constructs an APDL file based on the structural component dataset. The output is the result of the method for converting FBX files to APDL files.

[0154] The device for converting FBX files to APDL files can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above is an example of a device for converting FBX files to APDL files and does not constitute a limitation on such a device. It may include more components than described above, or combine certain components, or use different components. For example, the device for converting FBX files to APDL files may also include input / output devices, network access devices, buses, etc.

[0155] The memory can be used to store the computer program and / or modules, and the processor implements various functions of the device for converting FBX files to APDL files by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory.

[0156] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback or image playback). The data storage area may store data created based on the use of the phone (such as audio data or a phonebook). Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMediaCards (SMC), Secure Digital (SD) cards, flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0157] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for converting an FBX file to an APDL file.

[0158] If the system integration module / unit that converts FBX files to APDL files is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0159] This invention implements all or part of the processes in the method for converting FBX files to APDL files described above. It can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program implements the steps of the method for converting FBX files to APDL files. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or preset intermediate forms, etc.

[0160] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0161] It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0162] It should be noted that embodiments of the present invention can be implemented using hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated hardware.

[0163] Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry of semiconductors such as very large-scale integrated circuits or gate arrays, logic chips, transistors, etc., or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0164] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method of converting an FBX file to an APDL file, characterized by, The method comprises the following steps: Step 1: generating a three-dimensional model by using a three-dimensional modeling software and exporting the three-dimensional model as an FBX file; Step 2: obtaining the name, number and surface relationship attribute of each structural component in the three-dimensional model by parsing the FBX file exported in step 1; Step 3: checking whether the surface of each structural component is triangular, and if not, performing a triangulation treatment on the non-triangular surface to make all the surfaces triangular; Step 4: performing a depth detection on the surface relationship attribute of the structural component after the triangulation treatment in step 3 to obtain the parent-child node layer number of the surface relationship attribute, i.e. the depth layer number n; Step 5: classifying and storing the surface relationship attribute of the structural component at the same depth after the layering in step 4 according to the name obtained in step 3, and taking the number as a note of the structural construction to form a structural component data set with the same type of name and number as the note; Step 6: constructing an APDL file according to the structural component data set classified and stored in step 5.

2. The method of claim 1, wherein, The parsing method in step 2 specifically comprises the following steps: Step 2.1: initializing a data structure or data set, including name, number and surface relationship attribute; Step 2.2: opening the FBX file; Step 2.3: reading the header information of the FBX file opened in step 2.2 to determine the version and structure of the file; Step 2.4: after determining that the version and structure of the FBX file are FBX files in step 2.3, identifying and extracting the starting mark of a structural component; Step 2.5: reading the name and number information of the structural component extracted in step 2.4, and identifying and extracting the surface relationship attribute, including the Vertex data set, the Normal data set and the UV data set; Step 2.6: storing the name, number and surface relationship attribute of the structural component read in step 2.5 in the data structure or data set initialized in step 2.1; Step 2.7: cyclically executing steps 2.2 to 2.6 until the parsing of all FBX files is completed.

3. The method of claim 1, wherein, The triangulation treatment in step 3 specifically comprises the following steps: Step 3.1: checking the composition of each surface of each structural component to determine whether each surface is triangular, and if not, marking the surface; Step 3.2: when it is determined in step 3.1 that a surface is not triangular, decomposing the surface into multiple triangles; Step 3.3: updating the triangles decomposed in step 3.2 to the data structure; Step 3.4: cyclically executing steps 3.1 to 3.3 until all surfaces of the structural component are checked. The depth detection in step 4 specifically comprises the following steps:

4. The method of claim 1, wherein, Step 4.1: initializing the depth layer number n as 0; ​ Step 4.2: After the initialization of step 4.1 is completed, select a face relationship attribute, and detect the parent node of the current face relationship attribute level by level upwards. When there is a parent node, set the depth level n = n + 1, and switch the node corresponding to the current face relationship attribute to the parent node, and continue to detect the parent node upwards until the root node is reached or there is no more parent node; Step 4.3: Record the depth level n obtained in step 4.2 as the depth level of the face relationship attribute selected in step 4.2; Step 4.4: Perform depth detection of the next face relationship attribute, and repeat steps 4.1 to 4.3 until all face relationship attributes are detected.

5. The method of claim 1, wherein the FBX file is converted into the APDL file. The classification storage in step 5 specifically includes the following steps: Step 5.1: Initialize a data set; Step 5.2: Select a face attribute data of a structural component; Step 5.3: Identify the name of the structural component to which the face attribute data selected in step 5.2 belongs, use the number as a note, and add this face attribute data to the structural component data set corresponding to the name, and store it in the data set initialized in step 5.

1. The face attribute data in the structural component data set includes: Vertex data set, Normal data set, UV data set, wherein the Vertex data set contains the vertex coordinate information of the face attribute, the Normal data set contains the normal of each vertex, and the UV data set contains the coordinate information of the texture map; Step 5.4: Loop steps 5.2 to 5.3 until all structural component data is classified and stored.

6. The method of claim 1, wherein, The APDL file construction in step 6 specifically includes the following steps: Step 6.1: Initialize a text file; Step 6.2: Select a structural component data set, and use APDL commands to create a geometry of the structural component data set in Ansys, including defining points, faces, and bodies; According to the rules of ANSYS APDL command flow modeling, the read point, face, and body list are converted into the following form in turn: The point coordinate information is described by K command. A node is defined by K command, and its basic format is: K,KNUM,X,Y,Z, where "KNUM" is the node number. If left blank or set to 0, ANSYS will automatically assign a node number, and "X", "Y", "Z" are the coordinates of the node in three-dimensional space. The point coordinate information contained in the Vertex dataset in the structure body can be converted into APDL command stream by K command: for multiple points (x1, y1, z1), (x2, y2, z2), (x3, y3, z3) … (x n ,y n ,z n ) APDL command stream is: K,1,x1,y1,z1; K,2,x2,y2,z2; K,3,x3,y3,z3; …… K, n, x n y n z n ; The face relation attribute is expressed by A command, and a region, i.e. a face, is defined by A command, and the basic format is: A, K1, K2,..., K n , wherein: K1, K2,..., K n are the numbers of the key points defining the region, and at least three key points are needed to define a face, and the face relation attribute in the structure is combined by the numbers of the points: A, K1, K2, K3; A, K4, K5, K6; A, K7, K8, K9; …… A, K n-2 ,K n-1 ,K n ; Use the ASEL command to select multiple faces of the structure, and the selection basis is according to the face name of the beam-slab-column structural component read, and then use the CM command to combine the selected faces, as shown in the following command to select six face combinations and name it AREA: ASEL,S,,,A1,A6; CM,,AREA; Form a body using the combined faces with the VA command: VA,AREA; Thus, the operation process of converting the structural component data set into APDL command flow is completed; Step 6.3: Repeat step 6.2 until all structural component data sets are processed; Step 6.4: When all structural component data sets are processed in step 6.3, write the generated APDL command flow line by line into the text file initialized in step 6.1 to generate a complete APDL file.

7. A system for converting an FBX file to an APDL file, the system comprising: It includes: Parsing module: parse the exported FBX file; triangulation processing module: triangulation processing is performed on the surface of the non-triangular structural member; depth detection module: the surface relationship attribute of the structural member after triangulation processing is detected in depth to obtain the depth layer number; classification storage module: the layered surface relationship attribute is classified and stored to form a structural member data set; data conversion module: an APDL file is constructed according to the structural member data set.

8. An apparatus for converting an FBX file into an APDL file, characterized by, It comprises: a memory for storing a computer program for implementing the method for converting an FBX file into an APDL file according to any one of claims 1-6; a processor for implementing the method for converting an FBX file into an APDL file according to any one of claims 1-6 when the computer program is executed.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the method for converting an FBX file into an APDL file.