A 2D cross-section specification book generation method and device, electronic equipment and storage medium
By automating the generation of 2D cross-sectional drawings, the problem of low efficiency in manual operation in existing technologies is solved, and efficient and accurate cross-sectional drawing generation and drawing production are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIHUA LAB
- Filing Date
- 2025-12-29
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, generating 2D cross-section specifications requires a large amount of manual operation, resulting in low work efficiency, a large amount of repetitive work, and a high risk of omissions.
The method for automatically generating 2D cross-section specifications includes obtaining the overall 3D model of the target product, selecting the part model, determining the cross-section, obtaining the cross-sectional view, generating the 2D cross-section specifications based on the cross-sectional view, and filling and formatting the information using a preset drawing template and part attribute file.
It enables automated generation of 2D cross-section specifications, improving work efficiency, reducing repetitive work, avoiding omissions, and ensuring the integrity and accuracy of the output files.
Smart Images

Figure CN121414570B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of welding and assembly synchronous engineering design technology, and more specifically, to a method, apparatus, electronic device, and storage medium for generating 2D cross-sectional specifications. Background Technology
[0002] In existing technologies, generating 2D cross-sectional specifications typically requires a series of tedious manual steps. Specifically, this includes manually creating the 2D specification, extracting cross-sectional views showing the positional relationship between the part and the vehicle body, pasting the cross-sectional views into the 2D cross-sectional specification, and manually filling in the part information.
[0003] However, a welding MCP (Master Control Point) often contains dozens of parts that require the generation of sectional views. This means that manual labor is needed to repeatedly perform the above steps to complete the generation of all 2D sectional specifications. This traditional method has significant drawbacks and shortcomings, mainly in the following aspects: First, it is inefficient, as the large amount of repetitive manual operation results in a long generation process; second, the workload is enormous, as operators need to repeatedly perform the same tasks for a large number of parts, increasing their workload; finally, it is prone to omissions, as manual operation is prone to oversights during repetitive and tedious operations, resulting in some parts' sectional views or information not being generated or filled in correctly, thus affecting the completeness and accuracy of the final specifications. Therefore, how to effectively improve the efficiency of sectional view generation, reduce repetitive workload, and avoid omissions is a technical problem that urgently needs to be solved.
[0004] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention
[0005] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for generating 2D cross-section specifications, aiming to solve the problems existing in generating 2D cross-section specifications manually, and to automatically generate 2D cross-section specifications, thereby improving work efficiency, reducing repetitive work, and avoiding omissions.
[0006] In a first aspect, the present invention provides a method for generating a 2D cross-sectional specification document, comprising the following steps:
[0007] S1. Obtain the overall 3D model of the target product; the overall 3D model includes multiple part models, each of which is accompanied by corresponding part information, including the name of the part, as well as a preset origin and reference coordinate system;
[0008] S2. Select a part model from the overall three-dimensional model as the target part, determine the type of the target part according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system;
[0009] S3. Based on the determined cross-section, obtain a cross-sectional view of the target part;
[0010] S4. Generate the corresponding 2D cross-sectional specification based on the cross-sectional view.
[0011] The 2D cross-section specification generation method provided by this invention can automatically generate 2D cross-section specification documents, improve work efficiency, reduce repetitive work, and avoid omissions.
[0012] Furthermore, the specific steps in step S4 include:
[0013] S41. Obtain the dimensional parameters of the target part from the cross-sectional view;
[0014] S42. Obtain the preset drawing frame template;
[0015] S43. Adjust the size of the drawing frame template according to the size parameters of the target part, place the cross-sectional view in the adjusted drawing frame template, and generate the corresponding 2D cross-sectional specification.
[0016] Furthermore, step S43, the step of generating the corresponding 2D cross-sectional specification, includes:
[0017] S431. Generate the part attribute file of the target part, and fill the relevant information contained in the part attribute file into the drawing frame template containing the cross-sectional view to obtain the supplemented drawing frame template.
[0018] S432. Generate the 2D cross-section specification based on the supplemented drawing frame template.
[0019] Furthermore, the specific steps for generating the part attribute file of the target part include:
[0020] A1. Obtain the preset file template;
[0021] A2. Write the name and type of the target part into the file template;
[0022] A3. Obtain the coordinate information of the origin of the target part through the world coordinate system of the overall 3D model, and write the coordinate information into the file template;
[0023] A4. Based on the name of the target part, determine from the overall 3D model whether there is a support assembly or clamping assembly that matches the target part, and if there is a support assembly or clamping assembly that matches the target part, write the name of the support assembly or clamping assembly that matches the target part into the file template;
[0024] A5. Based on the reference coordinate system of the target part and the world coordinate system of the overall three-dimensional model, determine the relative orientation information of the target part, determine the relative orientation of the cross-section based on the relative orientation information, and write the relative orientation into the file template;
[0025] A6. Output the completed file template as the part attribute file.
[0026] Furthermore, the specific steps in step A4 include:
[0027] A41. Extract suffix information from the name of the target part;
[0028] A42. Using the suffix information, retrieve the names of all other part models in the overall three-dimensional model except for the target part, and designate other part models with the same suffix information as support assemblies or clamping assemblies that match the target part;
[0029] A43. Write the name of the support assembly or clamping assembly that matches the target part into the file template.
[0030] Furthermore, the relevant information includes the name, type, and coordinate information of the origin of the target part, as well as the name of the support assembly or clamping assembly that matches the target part, and the relative orientation of the cross-section.
[0031] Furthermore, the specific steps in step S432 include:
[0032] If there are multiple supplemented drawing frame templates, the arrangement of two adjacent supplemented drawing frame templates is determined according to their relative positions, and the 2D cross-section specification is generated. Specifically, if the relative positions of two adjacent supplemented drawing frame templates are different, the two adjacent supplemented drawing frame templates are placed in two different cells in the 2D cross-section specification; otherwise, they are placed in the same cell.
[0033] Secondly, the present invention provides a 2D cross-sectional specification document generation apparatus, comprising:
[0034] The first acquisition module is used to acquire the overall three-dimensional model of the target product; the overall three-dimensional model includes multiple part models, each of which is accompanied by corresponding part information, including the name of the part, as well as a preset origin and reference coordinate system;
[0035] The determination module is used to select a part model as the target part from the overall 3D model, determine the type of the target part according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system;
[0036] The second acquisition module is used to acquire a cross-sectional view of the target part based on a determined cross-section.
[0037] The generation module is used to generate a corresponding 2D cross-sectional specification based on the cross-sectional view.
[0038] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps of the 2D cross-section specification generation method provided in the first aspect above.
[0039] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the 2D cross-section specification generation method provided in the first aspect above.
[0040] As can be seen from the above, the 2D cross-section specification generation method provided by the present invention generates 2D cross-section specification documents through automated steps, which has the advantages of automatically generating 2D cross-section specification documents, improving work efficiency, reducing repetitive work, and avoiding omissions.
[0041] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0042] Figure 1 This is a flowchart of a method for generating 2D cross-section templates provided in an embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of a 2D cross-section specification generating device provided in an embodiment of the present invention.
[0044] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0045] Label Explanation:
[0046] 100. First acquisition module; 200. Determination module; 300. Second acquisition module; 400. Generation module; 13. Electronic device; 1301. Processor; 1302. Memory; 1303. Communication bus. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0048] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0049] Reference Appendix Figure 1 This invention provides a method for generating 2D cross-sectional specifications, comprising the following steps:
[0050] S1. Obtain the overall 3D model of the target product; the overall 3D model includes multiple part models, each part model is accompanied by corresponding part information, including the name of the part, as well as the preset origin and reference coordinate system;
[0051] S2. Select a part model from the overall 3D model as the target part, determine the type of the target part (including support type, clamping type and other types) according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system;
[0052] S3. Based on the determined cross-section, obtain the cross-sectional view of the target part;
[0053] S4. Generate the corresponding 2D cross-section specification based on the cross-section diagram.
[0054] The execution subject of this method can be an electronic device loaded with a specific computer program, such as an engineering workstation. This computer program can run as standalone software, or more commonly, as a plug-in or macro script of existing mainstream 3D computer-aided design software, such as CATIA, SolidWorks, or NX.
[0055] At the beginning of the entire process, it is necessary to obtain a complete 3D model of the target product. This overall 3D model is a digital virtual assembly, such as a complete automotive body-in-white welding fixture assembly. This model is not a simple accumulation of geometric shapes, but rather a combination of multiple independent part models with precise assembly relationships. Crucially, each part model is pre-embedded with structured part information. This information forms the data foundation for subsequent automated processes. Specifically, the part information includes at least the following aspects: First, the part name, which typically follows a pre-defined naming convention and serves not only as an identifier to distinguish different parts but also carries metadata about the part's functional classification. Second, a pre-defined origin for each part model, with definite coordinates in 3D space, serving as the reference point for all subsequent geometric calculations and positioning. Finally, a pre-defined reference coordinate system for each part model, defining the part's local coordinate directions—the X, Y, and Z axes—used to determine the part's orientation and the directional reference for subsequent section cutting. This part information is usually set by design engineers during the part modeling phase according to design standards and specifications and stored in the 3D model's file structure.
[0056] After acquiring a comprehensive 3D model containing rich information, the process moves to the core step of selecting target parts and determining cross-sectional views. Operators can manually select one or more parts as target parts in the 3D model view via a graphical user interface, or initiate a batch processing mode where the program automatically traverses the entire model structure tree and selects all parts for which cross-sectional views need to be generated based on preset filtering rules, such as prefixes to part names or specific attribute labels.
[0057] Once a part model is identified as the target part, the program begins a series of intelligent judgments. The first step is determining the type of the target part. This is achieved by parsing the target part's name. For example, in the naming system of a welding fixture, the name of a clamping block might be defined as `clamp_tc_01`. The program uses a string matching algorithm to identify the prefix `clamp` in the name and maps it to the clamping class according to the built-in rule base. Similarly, the name of a support block might be `template_tc_01`, and the program identifies the prefix `template` and classifies it as a support. Besides these two common parts, all other parts that do not conform to specific prefix rules, such as locating pins, suction cups, and guide blocks, are uniformly classified into other classes. This automatic classification mechanism based on naming conventions avoids the need for manual judgment and lays the foundation for applying different processing rules according to different types.
[0058] After determining the part type, the next step is to determine the cross-sections used to generate the sectional views. Different types of parts have different functions and geometries, so the cross-sections that most effectively show their positional relationship with the surrounding environment, especially with the body sheet metal, will also differ. This method pre-defines cross-section extraction rules corresponding to the part type, and these rules can be configured and modified by experienced design engineers according to actual needs.
[0059] To illustrate this process more clearly, we will use several specific implementation scenarios as examples below.
[0060] Scenario 1: When the target part is identified as a support or clamping type. The main function of these parts is to provide support or apply pressure, and their key geometric features and working interfaces are typically distributed on a specific plane. Therefore, for these parts, the section cutting rule is set to directly use the XOZ plane of its own reference coordinate system as the cutting surface. During execution, the program reads the preset reference coordinate system data of the target part, which includes the origin position and the direction vectors of three orthogonal axes. The program then constructs a plane in three-dimensional space, typically 200*200mm in size. If the target part size exceeds this range, the software automatically adjusts the plane size to completely encompass the target part, and this plane is defined by the X-axis and Z-axis direction vectors. This precisely defined XOZ plane is the final cutting surface used to cut the model.
[0061] Scenario 2: When the target part is classified as another type, such as a locating pin. The core function of a locating pin is to precisely limit the position of the workpiece, and its mating relationship with the locating holes on the workpiece is crucial to the design. To clearly demonstrate this mating relationship, the cross-section needs to meet several conditions. In this case, the program uses a more complex set of rules to determine the cross-section. First, the program obtains the preset origin coordinates of the locating pin part. Second, the program identifies a preset reference plane, which is usually the mounting base of the fixture, referred to as the base plate in the model. Then, the program constructs a plane passing through the origin of the locating pin and perpendicular to the plane of the base plate. The orientation of this perpendicular plane is not yet fully determined and requires a final constraint. This condition is that the plane must be able to divide the geometric entity of the locating pin into two completely symmetrical parts in volume. The program uses a geometric algorithm to rotate this perpendicular plane around the normal passing through the origin until an angle is found that makes the volume of the part on both sides of the plane equal. This finalized plane reflects the perpendicular relationship between the component and the substrate, and also showcases the component's symmetrical structure and core functional areas, making it the best cross-section for expressing its design intent.
[0062] Scenario 3: When the target part is classified as another type, such as a suction cup. Suction cups typically exhibit rotational symmetry, and their working cross-section is any section along their central axis. In this case, the cross-section selection rule is set as follows: First, the rotational central axis of the suction cup model is identified using a geometric analysis algorithm. Then, a plane containing this central axis is constructed as the cross-section. The specific rotation angle of this plane can be arbitrarily set, or it can be chosen by default to be parallel to a principal plane of the global coordinate system, such as the XZ plane or the YZ plane.
[0063] By automatically determining the cross-section based on part type and preset rules, the generated cross-sectional diagrams are guaranteed to have high consistency and effectiveness, accurately reflecting the design intent, and completely replacing the tedious work of manually finding the best cutting angle.
[0064] After the section plane is precisely determined, the program uses this section plane to obtain the cross-sectional view of the target part. This process is achieved by calling the low-level application programming interface (API) of the 3D design software. The program sends a sectioning command to the software kernel, which includes the identifier of the target part and the geometric definition of the section plane just calculated, namely a point on the plane and the normal vector. The software kernel performs the sectioning operation, virtually cutting the target part and other related parts within the sectioning range, such as body sheet metal parts. After cutting, the program switches the view to a direction perpendicular to the section plane, thus obtaining a two-dimensional view that only contains the cutting boundary lines and projected contour lines. This is the cross-sectional view of the target part. This cross-sectional view accurately shows the internal structure of the part at a specified location, as well as the key positional relationships between the part and the body, such as gaps and contacts.
[0065] The final step is to generate the corresponding two-dimensional cross-sectional specification document based on the acquired cross-sectional diagram. This is a process of integrating the previously generated graphic information and various attribute information into a standardized document. At this point, a complete and automated process for generating cross-sectional diagrams and initially constructing specification documents is finished.
[0066] Through the steps described above, the method proposed in this application transforms a process that originally required a large amount of repetitive manual work into a highly automated process. Designers only need to perform one-time rule configuration and simple part selection to quickly and accurately generate all the necessary cross-sectional views, laying the foundation for the final specification document generation. This not only greatly improves the efficiency of design work and reduces fatigue and errors caused by repetitive labor, but also ensures the consistency and standardization of output documents, avoiding the risk of omissions.
[0067] In some embodiments, the specific steps in step S4 include:
[0068] S41. Obtain the dimensional parameters of the target part from the cross-sectional view;
[0069] S42. Obtain the preset drawing frame template;
[0070] S43. Adjust the size of the drawing frame template according to the dimensional parameters of the target part, place the cross-sectional view in the adjusted drawing frame template, and generate the corresponding 2D cross-sectional specification.
[0071] This series of steps refines and specifically implements the aforementioned final generation steps. After obtaining the two-dimensional cross-sectional view, a series of layout operations are required to place it properly on the specification page. First, the program performs geometric analysis on the newly generated cross-sectional view, calculating its outer contour bounding box, thereby obtaining the overall width and height of the cross-sectional view, which are the dimensional parameters of the target part. These parameters reflect the size of the space occupied by the cross-sectional view on the two-dimensional plane.
[0072] At the same time, the program accesses a preset drawing frame template library. This library stores various standardized drawing frame templates, such as A4 and A3 size drawing templates that conform to specific company or industry standards. Each template includes standard drawing borders, title blocks, attribute information areas, and other elements. The program will then select a suitable drawing frame template as a base, based on preset rules or the user's choice.
[0073] The next step is the most intelligent step in the entire layout process. The program dynamically adjusts the size of the selected frame template based on the previously obtained cross-sectional view dimensions. This adjustment doesn't simply scale the entire frame; rather, it adapts the area within the frame used to place the graphics. For example, if the cross-sectional view is large in width and height, the program might automatically select a horizontal frame layout and adjust the view scale to ensure the cross-sectional view is fully and clearly contained within the drawing area of the frame, while maintaining appropriate margins. Conversely, if the cross-sectional view is elongated, the program might choose a vertical layout. This adaptive adjustment mechanism ensures that regardless of the part size, the generated cross-sectional view presents optimally in the specification book, avoiding problems such as graphics exceeding the frame boundaries or being too small to be easily discernible. After the frame size adjustment is complete, the program precisely places the cross-sectional view as a view object within the specified position inside the frame. At this point, a well-laid-out specification book page framework containing the cross-sectional view is complete.
[0074] In some embodiments, step S43, the step of generating the corresponding 2D cross-sectional specification, includes:
[0075] S431. Generate the part attribute file of the target part, and fill the relevant information contained in the part attribute file into the drawing frame template containing the cross-sectional view to obtain the supplemented drawing frame template.
[0076] S432. Generate a 2D section specification based on the supplemented drawing frame template.
[0077] To ensure the specifications contain complete information, graphics alone are insufficient; substantial textual attribute information is also required. Therefore, this method introduces the concept of a part attribute file. Simultaneously with or before generating the sectional views, the program generates a corresponding part attribute file for each target part. This file is typically a structured text file, such as TXT, XML, or JSON format, storing various key attributes about the part.
[0078] Once the drawing frame template with the cross-sectional view is ready, the program reads the part attribute file. Then, it automatically fills in the corresponding areas of the drawing frame template one by one with the relevant information recorded in the file. For example, it fills in the name field of the title block with the part name, the location data table with the part coordinate information, and the category field with the part type. Because the information fields in the drawing frame template and the data items in the attribute file are associated through a preset mapping relationship, the entire filling process can be fully automated. After filling is complete, the original drawing frame template becomes a complete and supplemented drawing frame template.
[0079] Finally, based on this supplemented drawing template, the program outputs the final two-dimensional cross-sectional specification. The output format can be the native two-dimensional drawing file format of the 3D design software, or a common document format such as PDF or DWG, to facilitate subsequent review, archiving, and distribution. This step solidifies the graphic and textual information, forming the final deliverable.
[0080] In some embodiments, the specific steps for generating the part attribute file of the target part include:
[0081] A1. Obtain the preset file template;
[0082] A2. Write the name and type of the target part into the file template;
[0083] A3. Obtain the coordinate information of the origin of the target part through the world coordinate system of the overall 3D model, and write the coordinate information into the file template;
[0084] A4. Based on the name of the target part, determine from the overall 3D model whether there is a support assembly or clamping assembly that matches the target part, and if there is a support assembly or clamping assembly that matches the target part, write the name of the support assembly or clamping assembly that matches the target part into the file template;
[0085] A5. Based on the reference coordinate system of the target part and the world coordinate system of the overall 3D model, determine the relative orientation information of the target part, determine the relative orientation of the cross-section based on the relative orientation information, and write the relative orientation into the file template.
[0086] A6. Output the completed file template as a part attribute file.
[0087] This series of steps details how the aforementioned part attribute files are automatically created and populated. This process is a key step in achieving information automation.
[0088] The process begins by obtaining a pre-defined file template. This is a blank text file, but its internal data structures are already defined, including placeholders containing multiple key-value pairs such as part_number, part_type, and coordinates. Using a template ensures that all generated attribute files have a consistent and standardized format.
[0089] Next, the program begins to populate this template. First, the program reads the name of the target part, such as clamp_tc_01, and writes it completely after the part_number field. At the same time, the program parses this name, extracts the prefix "clamp," and determines its type as a clamping type based on the rule base, then writes this type information to the part_type field.
[0090] Next, the program needs to obtain the precise spatial position of the part. By querying the internal data structure of the overall 3D model, the program can obtain the 3D coordinates of the target part's preset origin in the world coordinate system of the entire assembly, for example, X=1250.5, Y=345.8, Z=870.0. This coordinate information is formatted and written to the `coordinates` field. In some complex assembly scenarios, if there exists a reference coordinate system that has been rotated or translated relative to the world coordinate system, the program will also perform necessary coordinate transformation calculations to ensure the accuracy of the coordinate information.
[0091] In welding fixtures, support and clamping parts often appear in pairs, forming a clamping unit. To reflect this relationship in the specifications, the program will then perform an intelligent matching operation. Based on the name of the target part, the program searches for a matching assembly in the overall 3D model. For example, when the target part is a clamping part named `clamp_tc_01`, the program will determine that a matching support assembly may exist. The matching is based on the suffix in the part name. The program extracts the suffix `tc_01` from `clamp_tc_01` and then searches all part names in the entire 3D model for another support part whose name also contains the same suffix `tc_01`. If a part named `template_tc_01` is found, where `template` represents a support part, the program determines that the two parts are a match. At this point, the program will write two lines of information to the file template: `with_template=yes`, indicating the existence of a matching part; and `template_name=template_tc_01`, recording the specific name of the matching part. If no matching part is found after the search is completed, it will write with_template=no.
[0092] Next, the program needs to determine the mounting orientation of the part and the orientation of the cross-section. By comparing the directional relationship between the local reference coordinate system of the target part and the world coordinate system of the overall 3D model, a relative orientation information can be calculated. This information describes how the part is mounted in the assembly, for example, rotated 90 degrees relative to the world coordinate system along the Z-axis. Based on this part's orientation information, and the previously determined cross-section rules, such as the XOZ plane, the program can further calculate the orientation of this cross-section itself relative to the world coordinate system. This orientation information is crucial for understanding the perspective of the cross-section view; for example, a +XZ orientation label might indicate that the cross-section is parallel to the XZ plane of the world coordinate system, and the view direction is from the positive X and negative Z directions. This calculated relative orientation information is written into the corresponding field of the file template.
[0093] Once all the necessary information has been acquired and written into the file template, the filled file template is saved and output, officially becoming the part attribute file for the target part. This file records all the key attributes of the part in a machine-readable format, providing a data source for the subsequent automatic filling of the specification sheet.
[0094] In some embodiments, the specific steps in step A4 include:
[0095] A41. Extract suffix information from the name of the target part;
[0096] A42. Using suffix information, retrieve the names of all other part models in the overall 3D model except the target part, and identify other part models with the same suffix information as support or clamping assemblies that match the target part.
[0097] A43. Enter the names of the support or clamping assemblies that match the target part into the file template.
[0098] This process is a further refinement of the aforementioned matching logic.
[0099] The first step is information extraction. The program processes the name string of the target part, and according to predefined naming rules, such as the last two segments separated by underscores, it accurately extracts the suffix information that serves as a unique identifier. For example, it extracts tc_01 from clamp_tc_01.
[0100] The second step is a global search. The program constructs a loop that iterates through all other part models in the overall 3D model except for the target part itself. In each loop, the program retrieves the name of the current part and checks if it contains the extracted suffix information. If a part's name, such as template_tc_01, also contains the suffix tc_01, and its type is identified as matching the target part (e.g., the target part is a clamping type, and the current part is a support type), then this part model is marked as a matching part.
[0101] The third step is information recording. Once the retrieval cycle ends, the names of all part models marked as matching parts are collected and written to designated fields in the file template. Through this automated retrieval mechanism based on naming conventions and suffix matching, the functional relationships between parts can be accurately established without the need for manual memorization and searching.
[0102] In some embodiments, the relevant information includes the name, type, and coordinates of the origin of the target part, as well as the name of the support or clamping assembly that matches the target part, and the relative orientation of the cross-section.
[0103] In some embodiments, the specific steps in step S432 include:
[0104] If there are multiple supplemented drawing frame templates, the arrangement of two adjacent supplemented drawing frame templates is determined according to their relative positions, and a 2D cross-section specification is generated. Specifically, if the relative positions of two adjacent supplemented drawing frame templates are different, the two adjacent supplemented drawing frame templates are placed in two different cells in the 2D cross-section specification; otherwise, they are placed in the same cell.
[0105] This step addresses the issue of intelligent layout in the final specification document when generating sectional views for multiple parts at once. Specification document pages are typically divided into a grid, for example, each page contains four large cells to accommodate different sectional views and their associated information.
[0106] After the program processes all the target parts within a fixture unit, it will obtain multiple drawing frame templates that have been filled with information and cross-sectional views. At this point, the program will make layout decisions based on the relative orientation information of the cross-sections recorded in the part attribute file corresponding to each drawing frame template.
[0107] Specifically, the program processes these drawing frame templates one by one. For the first drawing frame template, the program places it in the first available cell on the specification page. Then, for the second drawing frame template, the program reads its relative orientation information and compares it with the relative orientation information of the first drawing frame template. If the relative orientations are different, for example, one is +XZ and the other is +YZ, this means that the two cross-sectional views were taken from completely different directions. To avoid confusion, the program places the second drawing frame template in a new, independent cell.
[0108] Conversely, if the relative orientation of the second frame template is the same as the first, both being +XZ, this indicates that the two cross-sectional views were taken from the same direction and are highly correlated. In this case, the program will place the second frame template in the same cell as the first frame template. When multiple frame templates are placed in a cell, the program will also automatically adjust the size and position of each frame template to ensure that they can be displayed side-by-side or stacked without obstructing each other. In some implementations, if the relative orientations of all cross-sectional views in a fixture unit are exactly the same, the program can even automatically remove the dividing lines between cells, using the entire page as a large drawing area, thus achieving a more flexible and aesthetically pleasing layout.
[0109] Through this automatic grouping and layout strategy based on relative orientation information, the final generated two-dimensional cross-section specification is not only complete in information, but also has clear layout and strong logic, which greatly improves the readability of the drawings.
[0110] Please refer to Figure 2 , Figure 2 This is a 2D cross-section specification generating device according to some embodiments of the present invention. The 2D cross-section specification generating device is integrated into a back-end control device in the form of a computer program, and includes:
[0111] The first acquisition module 100 is used to acquire the overall three-dimensional model of the target product. The overall three-dimensional model includes multiple part models, each of which is accompanied by corresponding part information, including the name of the part, as well as the preset origin and reference coordinate system.
[0112] The determination module 200 is used to select a part model as the target part from the overall 3D model, determine the type of the target part according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system;
[0113] The second acquisition module 300 is used to acquire a cross-sectional view of the target part based on a determined cross-section.
[0114] The generation module 400 is used to generate a corresponding 2D cross-sectional specification based on the cross-sectional drawing.
[0115] In some embodiments, the generation module 400 is executed when generating a corresponding 2D cross-sectional specification based on the cross-sectional view:
[0116] S41. Obtain the dimensional parameters of the target part from the cross-sectional view;
[0117] S42. Obtain the preset drawing frame template;
[0118] S43. Adjust the size of the drawing frame template according to the dimensional parameters of the target part, place the cross-sectional view in the adjusted drawing frame template, and generate the corresponding 2D cross-sectional specification.
[0119] In some embodiments, the generation module 400 is executed when adjusting the size of the drawing frame template according to the dimensional parameters of the target part, placing the cross-sectional view in the adjusted drawing frame template, and generating the corresponding 2D cross-sectional specification.
[0120] S431. Generate the part attribute file of the target part, and fill the relevant information contained in the part attribute file into the drawing frame template containing the cross-sectional view to obtain the supplemented drawing frame template.
[0121] S432. Generate a 2D section specification based on the supplemented drawing frame template.
[0122] In some embodiments, the generation module 400 is executed when generating a 2D cross-sectional specification based on the supplemented drawing frame template:
[0123] If there are multiple supplemented drawing frame templates, the arrangement of two adjacent supplemented drawing frame templates is determined according to their relative positions, and a 2D cross-section specification is generated. Specifically, if the relative positions of two adjacent supplemented drawing frame templates are different, the two adjacent supplemented drawing frame templates are placed in two different cells in the 2D cross-section specification; otherwise, they are placed in the same cell.
[0124] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The present invention provides an electronic device 13, including: a processor 1301 and a memory 1302. The processor 1301 and the memory 1302 are interconnected and communicate with each other through a communication bus 1303 and / or other forms of connection mechanism (not shown). The memory 1302 stores computer-readable instructions executable by the processor 1301. When the electronic device is running, the processor 1301 executes the computer-readable instructions to execute the 2D cross-section specification generation method in any optional implementation of the above embodiments, so as to achieve the following functions: obtaining an overall three-dimensional model of the target product; the overall three-dimensional model includes multiple part models, each part model is accompanied by corresponding part information, the part information includes the name of the part, and a preset origin and reference coordinate system; after selecting a part model as the target part from the overall three-dimensional model, the type of the target part is determined according to the name of the target part, and a cross-section is determined from the corresponding reference coordinate system; based on the determined cross-section, a cross-sectional view of the target part is obtained; and based on the cross-sectional view, a corresponding 2D cross-section specification is generated.
[0125] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it executes the 2D cross-section specification generation method in any optional implementation of the above embodiments to achieve the following functions: obtaining an overall three-dimensional model of a target product; the overall three-dimensional model includes multiple part models, each part model is accompanied by corresponding part information, including the name of the part, and a preset origin and reference coordinate system; after selecting a part model from the overall three-dimensional model as the target part, determining the type of the target part according to the name of the target part, and determining the cross-section from the corresponding reference coordinate system; based on the determined cross-section, obtaining a cross-sectional view of the target part; and generating a corresponding 2D cross-section specification based on the cross-sectional view.
[0126] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0127] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0128] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0129] Furthermore, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0130] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0131] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating 2D cross-sectional design specifications, characterized in that, Includes the following steps: S1. Obtain the overall 3D model of the target product; the overall 3D model includes multiple part models, each of which is accompanied by corresponding part information, including the name of the part, as well as a preset origin and reference coordinate system; S2. Select a part model from the overall three-dimensional model as the target part, determine the type of the target part according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system; S3. Based on the determined cross-section, obtain a cross-sectional view of the target part; S4. Generate the corresponding 2D cross-sectional specification based on the cross-sectional view; The specific steps in step S4 include: S41. Obtain the dimensional parameters of the target part from the cross-sectional view; S42. Obtain the preset drawing frame template; S43. Adjust the size of the drawing frame template according to the size parameters of the target part, place the cross-sectional view in the adjusted drawing frame template, and generate the corresponding 2D cross-sectional specification. The specific steps in step S43 include: S431. Generate the part attribute file of the target part, and fill the relevant information contained in the part attribute file into the drawing frame template containing the cross-sectional view to obtain the supplemented drawing frame template. S432. Generate the 2D section specification document based on the supplemented drawing frame template; In step S431, the specific steps for generating the part attribute file of the target part include: A1. Obtain the preset file template; A2. Write the name and type of the target part into the file template; A3. Obtain the coordinate information of the origin of the target part through the world coordinate system of the overall 3D model, and write the coordinate information into the file template; A4. Based on the name of the target part, determine from the overall 3D model whether there is a support assembly or clamping assembly that matches the target part, and if there is a support assembly or clamping assembly that matches the target part, write the name of the support assembly or clamping assembly that matches the target part into the file template; A5. Based on the reference coordinate system of the target part and the world coordinate system of the overall three-dimensional model, determine the relative orientation information of the target part, determine the relative orientation of the cross-section based on the relative orientation information, and write the relative orientation into the file template; A6. Output the completed file template as the part attribute file.
2. The method for generating 2D cross-sectional design documents according to claim 1, characterized in that, The relevant information includes the name, type, and coordinates of the origin of the target part, the name of the support assembly or clamping assembly that matches the target part, and the relative orientation of the cross-section.
3. The method for generating 2D cross-sectional design documents according to claim 1, characterized in that, The specific steps in step S432 include: If there are multiple supplemented drawing frame templates, the arrangement of two adjacent supplemented drawing frame templates is determined according to their relative positions, and the 2D cross-section specification is generated. Specifically, if the relative positions of two adjacent supplemented drawing frame templates are different, the two adjacent supplemented drawing frame templates are placed in two different cells in the 2D cross-section specification; otherwise, they are placed in the same cell.
4. The method for generating 2D cross-sectional design documents according to claim 1, characterized in that, The specific steps in step A4 include: A41. Extract suffix information from the name of the target part; A42. Using the suffix information, retrieve the names of all other part models in the overall three-dimensional model except for the target part, and designate other part models with the same suffix information as support assemblies or clamping assemblies that match the target part; A43. Write the name of the support assembly or clamping assembly that matches the target part into the file template.
5. A 2D cross-section specification generating apparatus employing the 2D cross-section specification generating method as described in any one of claims 1-4, characterized in that, include: The first acquisition module is used to acquire the overall three-dimensional model of the target product; the overall three-dimensional model includes multiple part models, each of which is accompanied by corresponding part information, including the name of the part, as well as a preset origin and reference coordinate system; The determination module is used to select a part model as the target part from the overall 3D model, determine the type of the target part according to the name of the target part, and determine the cross-section from the corresponding reference coordinate system; The second acquisition module is used to acquire a cross-sectional view of the target part based on a determined cross-section. The generation module is used to generate a corresponding 2D cross-sectional specification based on the cross-sectional view.
6. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps in the 2D cross-section specification generation method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it performs the steps in the 2D cross-section specification generation method as described in any one of claims 1-4.