Pattern file processing method and printed circuit board data printing method

By using graphic file processing methods and printed circuit board data printing methods, the problems of operational errors and low efficiency in traditional PCB manufacturing processes have been solved, achieving efficient and flexible data processing and printing.

CN122311084APending Publication Date: 2026-06-30HANS CNC SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANS CNC SCI & TECH
Filing Date
2024-12-27
Publication Date
2026-06-30

Smart Images

  • Figure CN122311084A_ABST
    Figure CN122311084A_ABST
Patent Text Reader

Abstract

This application relates to a method for processing graphic files and a method for printing printed circuit board data. The graphic file processing method includes: acquiring multiple graphic files to be processed for a printed circuit board, the graphic files describing the layer content of the printed circuit board; drawing graphic elements in each graphic file; adding each drawn graphic element to different layers of a display interface for user preview; receiving a data export command, the data export command carrying data export parameters and layer identifiers; and, based on the data export parameters, exporting the graphic elements to be exported from the layers corresponding to the layer identifiers as target files matching the data export parameters. Using the above graphic file processing method, user-selected graphic elements can be exported quickly and accurately, effectively improving data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of graphic processing and printed circuit board processing technology, and in particular to a graphic file processing method, a printed circuit board data printing method, a printing control device, and a printed circuit board data printing system. Background Technology

[0002] With the rapid development of the electronics manufacturing industry, the design and production of printed circuit boards (PCBs) have become increasingly complex. Especially in multilayer PCBs and high-density interconnect (HDI) boards, it is necessary to accurately print various graphic elements such as characters, labels, and QR codes into designated locations.

[0003] Traditional PCB manufacturing processes often rely on Gerber files to describe the circuit layout of the entire PCB. This leads to certain limitations in computer devices when processing information containing various types of information (such as characters, labels, QR codes, etc.), which can easily cause operational errors and affect data processing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide an efficient graphic file processing method, a printed circuit board data printing method, a printing control device, and a printed circuit board data printing system to address the aforementioned technical problems.

[0005] In a first aspect, this application provides a method for processing graphic files, including:

[0006] Obtain multiple graphic files to be processed for a printed circuit board, the graphic files being used to describe the layer content of the printed circuit board;

[0007] Draw the graphic elements in each of the aforementioned graphic files;

[0008] Each of the drawn graphic elements is added to a different layer of the display interface for the user to preview, with one graphic element added to each layer.

[0009] Receive a data export instruction, which carries data export parameters and layer identifiers;

[0010] Based on the data export parameters, the graphic elements to be exported on the layer corresponding to the layer identifier are exported as target files that match the data export parameters.

[0011] The above-described graphic file processing method involves acquiring multiple graphic files, drawing the graphic elements within them, and then adding these elements to different layers of the display interface for user preview. When data export is required, the user can freely select the layer containing the graphic elements to be exported and set relevant export parameters. The computer device can then directly export the graphic elements on the corresponding layer as a target file matching the export parameters. This allows for quick and accurate export of the user-selected graphic elements, reducing the inefficiency caused by processing an entire layer of content on a single printed circuit board layer. Furthermore, the user only needs to select the layer of the graphic element to be exported and set the parameters; there is no need to edit or delete unwanted graphic elements, making the operation more convenient and flexible and reducing the possibility of errors.

[0012] Secondly, this application also provides a method for printing data on a printed circuit board, the method comprising:

[0013] Obtain the target file of the printed circuit board, which is obtained by processing the above-described graphic file processing method;

[0014] The target file is parsed to identify the content to be printed and its location.

[0015] Based on the content to be printed and its position, the printer is controlled to print the content onto the printed circuit board.

[0016] Thirdly, this application also provides a printing control device, the device comprising:

[0017] The data acquisition module is used to acquire the target file of the printed circuit board, which is obtained by processing the above-mentioned graphic file processing method;

[0018] The data parsing module is used to parse the target file and identify the content to be printed and its location.

[0019] The data printing module is used to control the printer to print the content to be printed onto the printed circuit board based on the content to be printed and the position of the content to be printed.

[0020] Fourthly, this application also provides a printed circuit board data printing system, the system including: a user terminal that communicates with each other, a printing control device, and a printer;

[0021] The user terminal is used to execute the above-mentioned graphic file processing method to obtain the target file of the printed circuit board, and upload the target file to the printing control device;

[0022] The printing control device is used to execute the above-described printed circuit board data printing method and control the printer to print the content to be printed on the printed circuit board.

[0023] The aforementioned printed circuit board data printing method, printing control device, and printed circuit board data printing system allow users to quickly and accurately print the selected graphic elements onto the printed circuit board by simply selecting the layer of the graphic element to be printed on the user interface and setting the relevant parameters when they need to print graphic elements from a graphic file. This reduces the low printing efficiency caused by printing an entire layer of content on a single layer each time the printed circuit board is on one layer, thus improving printing efficiency. Furthermore, users only need to select the graphic elements to be exported and set the parameters; there is no need to edit the graphic elements or delete graphic elements that do not need to be printed, making the operation more convenient and flexible. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating a graphical file processing method in one embodiment;

[0026] Figure 2 This is a schematic diagram illustrating a user selecting a graphical element for preview on a user interface in one embodiment.

[0027] Figure 3 This is a flowchart illustrating a graphical file processing method in another embodiment;

[0028] Figure 4 This is a flowchart illustrating the graphic file processing method in yet another embodiment;

[0029] Figure 5 This is an application environment diagram of a graphical file processing method in one embodiment;

[0030] Figure 6 This is a flowchart illustrating a printed circuit board data printing method in one embodiment;

[0031] Figure 7 This is a flowchart illustrating a printed circuit board data printing method in another embodiment;

[0032] Figure 8This is a schematic diagram of the printing control device in another embodiment;

[0033] Figure 9 This is a schematic diagram of the structure of a graphics file processing device in one embodiment;

[0034] Figure 10 This is a schematic diagram of the structure of a graphics file processing device in another embodiment;

[0035] Figure 11 This is an internal structural diagram of a printed circuit board data printing system in one embodiment.

[0036] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0038] In one exemplary embodiment, such as Figure 1 As shown, a method for processing graphic files is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes steps 100 (hereinafter referred to as steps S) to 500:

[0039] S100: Obtain multiple graphic files to be processed for the printed circuit board, which are used to describe the layer content of the printed circuit board.

[0040] Graphical files are used to describe the contents of each layer of a PCB, such as the top copper foil, bottom copper foil, and silkscreen layer. Common graphical file formats include Gerber files and ODB++ files. ODB++ files are not single files, but rather a collection of files containing various types of information. Specifically, they consist of multiple files that store various attribute and graphical information about the PCB design, such as specific parameters of components, pads, and holes, as well as image information about the top and bottom copper foil distribution, silkscreen, and solder mask layers. Each Gerber file represents the contents of a specific layer, such as image information for the top copper, bottom copper, solder mask, and silkscreen layers.

[0041] In practice, the terminal may have graphics processing software installed. The user selects the "Import Files" option through the user interface, and the system pops up a file selection dialog box, allowing the user to select and import multiple Gerber files. The user interface is a graphical interface provided by the terminal for users to perform file import, export, and other operations. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices.

[0042] Taking the example of a user importing multiple Gerber files, these files include descriptions of PCB labels, QR codes, cycles, serial numbers, and silkscreen lines, with each Gerber file describing a single graphic element. The terminal reads all the files selected for import by the user, uses a corresponding parser (such as a Gerber parser) to read the file content, and obtains basic file information (such as filename and header information). Furthermore, it can check if the files conform to the expected format (such as Gerber format). If the file format is incorrect or the file is corrupted, it prompts the user and records the error message.

[0043] S200, draws the graphic elements in each graphic file.

[0044] Graphical elements refer to elements used to describe the content of a PCB, and can also be understood as PCB identification elements, including but not limited to characters, labels, QR codes, periods, serial numbers, and silkscreen lines. Characters typically refer to text on the PCB used to identify the location, function, or other information of components, such as component names, values, pin numbers, etc. Labels are text or symbols used to identify specific areas or components. Periods are identifiers used to indicate production batches, testing cycles, or other time-related information. Serial numbers are unique identifiers for each PCB board or product. Silkscreen lines are lines printed on the PCB surface used to identify component locations, pin arrangements, and text. Layers refer to different levels in the PCB design, such as the top copper foil, bottom copper foil, and silkscreen layer.

[0045] After obtaining multiple graphic files in the terminal, you can use Gerber or other file parsers to parse the file content line by line for each graphic file, identify the graphic elements in the file, and record the attributes of each graphic element, such as position, size, and color. Then, you can iterate through each graphic element, call the corresponding drawing function, and draw the graphic elements in each graphic file.

[0046] S300 adds the drawn graphic elements to different layers of the display interface for users to preview, with one graphic element added to each layer.

[0047] After the terminal draws the graphic elements in each graphic file, it can create multiple layers. Based on the information in the graphic file, it categorizes and stores each graphic element into different layers, and then adds each graphic element sequentially to different layers in the display interface (i.e., the user interface) for the user to preview. For example... Figure 2 As shown, users can click on a layer to preview the graphic elements added to that layer in the preview area. Furthermore, different layers can be identified with different colors for easy differentiation. In addition to viewing the content of each layer on the interface and switching between different layers, users can also select specific layers using checkboxes or multi-select lists. Furthermore, users can zoom and pan the view using the mouse wheel or by dragging to examine specific areas in more detail. When a layer is selected, its content is highlighted on the interface.

[0048] The S400 receives data export commands, which carry data export parameters and layer identifiers.

[0049] Data export parameters include user-defined export format, resolution, color mode, and other parameters. Layer identifiers are unique identifiers used to identify layers, such as layer numbers.

[0050] After selecting the content and layers to be exported, users can set corresponding export parameters such as file format, resolution, and color mode. Then, they can click the "Export" button or a similar action to trigger the export process. At this point, the terminal collects the user's input, generating a data export instruction containing layer identifiers and export parameters. The received data export instruction is then broken down into specific layer identifiers and export parameters, preparing for the next step of processing.

[0051] S500, based on data export parameters, exports the graphic elements to be exported on the layer corresponding to the layer identifier as a target file that matches the data export parameters.

[0052] The target file refers to the final file generated based on the data export parameters set by the user, such as files in formats like BMP, PNG, and SVG.

[0053] Following the previous step, after the terminal determines the data export parameters and the layer identifiers of the user-selected graphic elements, the corresponding graphic elements of the layers can be retrieved from the layer data structure based on the layer identifiers. Then, according to the user-defined export format, an initial target file is created, converting the graphic objects in the selected layers into data in the target file format. Next, based on user-set parameters such as resolution and color mode, the output effect of the graphic objects is adjusted. Finally, the converted graphic elements are written into the target file, and the target file is exported. Furthermore, after exporting the target file, the generated file can be validated to ensure that the file content is correct and the format meets expectations. If errors are found, the user is prompted and repair suggestions are provided.

[0054] The above-described graphic file processing method involves acquiring multiple graphic files, drawing the graphic elements within them, and then adding these elements to different layers of the display interface for user preview. When data export is required, the user can freely select the layer containing the graphic elements to be exported and set relevant data export parameters. The computer device can then directly export the graphic elements on the layer corresponding to the layer identifier as a target file matching the data export parameters. This allows for quick and accurate export of the user-selected graphic elements, reducing the inefficiency caused by processing an entire layer of content on a single layer of the printed circuit board, thus improving data processing efficiency. Furthermore, the user only needs to select the layer of the graphic element to be exported and set the parameters; there is no need to edit or delete graphic elements that do not need to be exported, making the operation more convenient and flexible and reducing the possibility of operational errors.

[0055] like Figure 3 As shown, in an exemplary embodiment, S200 includes: S220, for each graphic file, reading the graphic instructions in the graphic file, parsing the graphic instructions, determining the instruction type and graphic parameters of the graphic instructions, and drawing the graphic elements in the graphic file based on the instruction type and graphic parameters.

[0056] Graphics commands refer to various drawing commands defined in a graphics file, used to describe geometric figures such as lines, circles, and arcs.

[0057] In practice, the terminal can read the file content line by line for each graphics file, extracting the file header information and specific graphics instructions. Then, a pre-defined graphics instruction parser (such as a Gerber parser) is used to parse each line of graphics instructions. The parser identifies the type of each instruction (e.g., drawing a line segment, drawing a circle, drawing an arc), and extracts relevant graphics parameters (e.g., start coordinates, end coordinates, radius, etc.). Based on the parsed instruction type and graphics parameters, the corresponding graphics element is generated. For example, if the graphics instruction is to draw a line segment, a line segment object is drawn, and its start and end coordinates are set; if the graphics instruction is to draw a circle, a circle object is drawn, and its center coordinates and radius are set.

[0058] In other embodiments, third-party libraries and tools, such as Ucamco's GerbTool, can be used to parse and draw the graphic elements in the graphic file.

[0059] In this embodiment, by reading and parsing the graphics instructions in the graphics file, high-quality graphics elements can be drawn efficiently and flexibly, which not only improves the efficiency of graphics processing, but also provides rich functionality and good cross-platform compatibility.

[0060] like Figure 3 As shown, in some embodiments, S300 includes: S320, creating multiple layers according to the number of graphic elements, the number of layers being equal to the number of graphic elements, and adding each drawn graphic element to a different layer of the display interface according to the file information of the graphic file where each graphic element is located.

[0061] In practical applications, after drawing the graphic elements, the number of layers can be created in equal numbers according to the number of graphic elements. That is, one independent layer is created for each graphic element. Then, the header information of the graphic file containing the graphic element is parsed to obtain the basic information of the file, such as the file name. Based on the specific identifier in the file name (such as "GTL" for top copper foil and "GBL" for bottom copper foil), for example, top copper foil indicates that its layer is the top layer, the graphic element in the graphic file is then added to the first layer, so that the user can view the graphic element in the first layer of the user interface.

[0062] In other embodiments, a layer mapping table can be created to store different layer objects. Based on the header information of each graphic file, the parsed graphic elements are added to the corresponding layer objects. Subsequently, attributes such as visibility, transparency, and color are set for each layer object, and attributes such as line width and fill color are set for each graphic element. The drawn layers are then displayed on the user interface in the order of layer stacking.

[0063] In this embodiment, graphic elements are added to different layers of the user interface for users to preview using the file information of the graphic file, which makes it convenient for users to perform independent operations on different layers.

[0064] To optimize the display effect of graphic elements, in some embodiments, the drawn graphic elements are added to different layers of the display interface, including: processing the drawn graphic elements according to preset graphic processing rules to obtain the processed graphic elements.

[0065] After drawing the graphic elements, to optimize the display effect, the graphic elements can be processed according to preset graphic processing rules, and the processed graphic elements can be displayed on different layers of the user interface. For example, operations such as filling, merging and splitting, scaling, rotating, translating, and color adjustment can be performed on the graphic elements as needed, and then the processed graphic elements can be displayed on different layers of the user interface.

[0066] In this embodiment, by processing graphic elements according to graphic processing rules, the terminal can accurately display the processed graphic elements on different layers of the user interface, thereby improving the user experience.

[0067] In some embodiments, the graphic elements are processed according to preset graphic processing rules, including:

[0068] Identify lines in graphic elements and adjust the line width according to preset line width parameters.

[0069] In practice, the terminal can traverse graphic elements, identify lines within the graphic elements, adjust the line width according to preset line width parameters, update the attributes of the graphic elements, ensure that the line width is set correctly, and display the adjusted lines on different layers of the user interface.

[0070] In other embodiments, processing graphic elements according to preset graphic processing rules further includes: identifying positive and negative graphics in the graphic elements and eliminating overlapping areas between the positive and negative graphics.

[0071] Positive and negative graphics include positive graphics (i.e., solid graphics) and negative graphics (i.e., hollow graphics). In addition to adjusting the line processing method in the above embodiments, the parsed graphic elements can be traversed to identify the positive graphics (solid graphics) and negative graphics (hollow graphics). Geometric algorithms (such as Boolean operations) are used to calculate the overlapping area of ​​the positive and negative graphics. The overlapping area is subtracted from the positive graphic to obtain the final positive graphic. Subsequently, the attributes of the graphic elements are updated to ensure that the overlapping area is correctly eliminated. The processed graphic elements are then displayed in different layers of the user interface using a graphics library.

[0072] In other embodiments, processing graphic elements according to preset graphic processing rules further includes filling the internal area of ​​the graphic element when the graphic element is a closed graphic.

[0073] In this embodiment, in addition to the line adjustment and positive / negative graphic processing methods mentioned in the above embodiments, the parsed graphic elements can be traversed to identify closed shapes (such as polygons and circles). Then, according to preset fill parameters (such as color and pattern), the internal area of ​​the closed shape is filled. Finally, the attributes of the graphic element are updated to ensure that the internal area is correctly filled. The filled graphic element is then displayed in different layers of the user interface using a graphics library. It is understood that in other embodiments, besides performing the above graphic processing on the graphic elements, other graphic processing methods can be performed, depending on the actual situation, and are not limited here.

[0074] In the above embodiments, by adjusting the line width, eliminating overlapping areas in positive and negative graphics, and filling the internal area of ​​closed graphics, the aesthetics, accuracy, and readability of graphic objects can be improved.

[0075] Due to differences in data types, the exported file format will also differ. For example... Figure 4 As shown, in some embodiments, S500 includes:

[0076] S520, when the graphic element to be exported is a character, exports the graphic element to be exported as an image file based on the data export parameters.

[0077] S540, when the graphic element to be exported is a printed circuit board identifier object, exports the graphic element to be exported as a text file.

[0078] The printed circuit board identification objects include QR codes, serial numbers, cycles, or silkscreen lines.

[0079] In practical applications, the types of graphic elements included in graphic files vary, resulting in different exported file formats. To match the data import format of the host computer, character graphics need to be exported as BMP format. Identifier elements such as QR codes, serial numbers, periods, or silkscreen lines need to have their coordinates, dimensions, angles, and corresponding IDs uniformly exported and written into an XML (Extensible Markup Language) format text file.

[0080] For example, the user selects to export characters as BMP (Bitmap Image File) image format on the user interface, and selects to export identification elements such as QR codes, serial numbers, periods, or silkscreen lines as XML format text files. The terminal reads the image file, and if it recognizes the graphic elements in the image file as characters, it extracts the graphic element information of the characters, identifies the specific content and attributes of the characters, such as position, size, and color, configures them according to the data export parameters (such as resolution, color mode, background color, etc.), creates an empty BMP image using a graphics library (such as Cairo, PIL / Pillow, etc.), sets the image size and resolution according to the data export parameters set by the user, draws the parsed character graphic elements onto the BMP image, saves the drawn image as a BMP format file, and finally outputs the BMP format file to the save path specified by the user. If the graphic elements in the graphic file are identified as QR codes, serial numbers, cycles, or silkscreen lines, the information of the identified objects, such as QR codes, serial numbers, cycles, and silkscreen lines, is extracted. The specific content and attributes of each identified object, such as coordinates, width and height, angle, and corresponding ID, are identified. The specific content and attributes of the identified objects are then uniformly filled into an XML document. Furthermore, the data of the QR codes and serial numbers (such as coordinates, width and height, and angle) can be modified in the configuration parameter file of the image processing software, such as rotation, generally clockwise or counterclockwise rotation of 90 degrees, 180 degrees, or 270 degrees. Finally, the XML document is output to the user-specified save path.

[0081] In this embodiment, exporting character graphic elements as image files maintains high definition and good compatibility, while exporting printed circuit board identification objects as XML files provides a structured, scalable, and easy-to-process data format, meeting the needs of different scenarios and improving data availability and flexibility.

[0082] To provide a clearer explanation of the graphic file processing method provided in this application, a specific embodiment is described below, which includes the following steps:

[0083] S1, Obtain multiple graphic files to be processed for the printed circuit board. The graphic files are used to describe the layer content of the printed circuit board.

[0084] S2, for each graphics file, reads the graphics instructions in the graphics file, parses the graphics instructions, determines the instruction type and graphics parameters of the graphics instructions, and draws the graphics elements in the graphics file based on the instruction type and graphics parameters.

[0085] S3: Create multiple layers based on the number of graphic elements. The number of layers is equal to the number of graphic elements. Based on the file information of the graphic file where each graphic element is located, add the drawn graphic elements to different layers of the display interface.

[0086] S4 receives a data export command, which carries data export parameters and layer identifiers.

[0087] S5, if the graphic element to be exported on the layer corresponding to the layer identifier is a character, the graphic element to be exported is exported as an image file based on the data export parameters.

[0088] S6. If the graphic element to be exported on the layer corresponding to the layer identifier is a printed circuit board identifier object, export the graphic element to be exported as a text file.

[0089] Based on the same inventive concept, this application also provides a method for printing data on a printed circuit board, which can be applied to, for example... Figure 5 In the application environment shown, the user terminal 102 communicates with the printing system controller 104 (hereinafter referred to as controller 104) via a network, and the controller 104 communicates with the printer 106 via a network.

[0090] Specifically, the operator can upload the exported target file of the printed circuit board to the controller 104 through the user terminal 102. The target file is obtained by the user terminal 102 through the steps in any of the above-mentioned graphic file processing method embodiments. The controller 104 parses the target file, identifies the content to be printed and its position, and controls the printer 106 to print the content to be printed on the printed circuit board based on the content to be printed and its position.

[0091] The user terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. The controller 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The printer 106 can be an inkjet printer or a laser printer, etc.

[0092] In one exemplary embodiment, such as Figure 6 As shown, a method for printing data on a printed circuit board is provided, which can be applied to... Figure 5 The following steps are used as an example to illustrate the process, taking controller 104 as an example. The steps include S600 to S800. Wherein:

[0093] S600, obtain the target file for the printed circuit board.

[0094] In this embodiment, the target file is obtained by the user terminal in response to the user's import and export operations of graphic files. Specifically, it is obtained through the processing described in any of the above-mentioned graphic file processing method embodiments. For the specific processing procedure, please refer to the detailed description in the above-mentioned graphic file processing method embodiments, which will not be repeated here.

[0095] The S700 parses the target file and identifies the content to be printed and its location.

[0096] After receiving the target file, the controller can convert it into an operable graphic file, read the file header information to obtain basic file information, and then parse the graphic instructions line by line to extract information about each graphic element. It can identify the type (e.g., line segment, polygon, arc) and attributes (e.g., position, size, color) of each graphic element. Based on the parsed information, it constructs a graphic data structure, such as a list or tree structure, to store the information of each graphic element. It then traverses the graphic data structure to identify the graphic elements to be printed and their positions. For example, it can filter out all QR codes, serial numbers, and silkscreen text to be printed and record their coordinate positions.

[0097] The S800 controls the printer to print content onto the printed circuit board based on the content to be printed and its position.

[0098] After identifying the content to be printed and its location, the controller can send an initialization command to put the printer into a ready state. Then, based on the content to be printed and its location, it generates print instructions that the printer can understand. These print instructions carry the content to be printed and its location. The generated print instructions are then sent to the printer one by one, controlling the printer to accurately print this content to the corresponding positions on the printed circuit board. In some embodiments, after receiving the target file, the controller can first calibrate and position the printer to ensure that the printer can accurately print according to the coordinate positions on the graphic file. This process also involves precise position correction of the PCB board. Methods for PCB board position correction can be found in existing calibration and positioning techniques, and will not be elaborated here.

[0099] The above-described printed circuit board data printing method allows users to quickly and accurately print selected graphic elements onto the printed circuit board by simply selecting the layer of the graphic element to be printed on the user interface and setting relevant parameters when they need to print graphic elements from a graphic file. This reduces the low printing efficiency caused by printing an entire layer of content on a single layer each time the printed circuit board is on one layer, thus improving printing efficiency. Furthermore, users only need to select the graphic elements to be exported and set the parameters, without needing to edit or delete graphic elements that do not need to be printed, making the operation more convenient and flexible.

[0100] like Figure 7 As shown, in an exemplary embodiment, S700 includes:

[0101] S720 parses the file extension format of the target file and identifies the type of the target file.

[0102] S740 performs character recognition on the target file when the target file is an image file, identifying the content to be printed and its location.

[0103] When the target file is a text file, the S760 identifies the content to be printed and its location based on the identifier data in the target file.

[0104] In practical applications, after receiving the target file, the controller can determine whether the file type is a text file or an image file by parsing its file extension. If the target file is an XML text file, the controller directly reads the ID information of the character graphic elements in the XML file to obtain their relevant attributes (such as coordinates, size, rotation angle, etc.). If the target file is an image file, optical character recognition (OCR) can be used to identify the content to be printed and its position. After determining the graphic elements to be printed and their coordinate positions, a print command carrying the content to be printed and its position is sent to the printer. Based on the provided content to be printed and coordinate information, the printer creates a corresponding print path, assigning each graphic element to a specific physical position on the PCB board. Then, the graphic elements to be printed are printed on the PCB board at their corresponding positions according to the print path.

[0105] In this embodiment, the file type can be quickly determined by parsing the file extension format of the target file, and the content to be printed and its position in the image file can be quickly identified by character recognition.

[0106] Based on the same inventive concept, this application also provides a printing control device 700, such as... Figure 8 As shown, the printing control device includes a data acquisition module 710, a data parsing module 720, and a data printing module 730, wherein:

[0107] The data acquisition module 710 is used to acquire the target file of the printed circuit board sent by the user terminal.

[0108] The target file is obtained by processing it using any of the above-mentioned graphic file processing methods.

[0109] The data parsing module 720 is used to parse the target file and identify the content to be printed and its location.

[0110] The data printing module 730 is used to control the printer to print the content to be printed onto the printed circuit board based on the content to be printed and its position.

[0111] The aforementioned data printing equipment, by parsing and recognizing the target file, can determine the graphic elements selected by the user for printing, and quickly and accurately print the selected graphic elements onto the printed circuit board. This reduces the problem of low printing efficiency caused by the fact that all the contents of the printed circuit board are on one layer, and each processing requires printing an entire layer of content, thus improving printing efficiency and meeting the user's personalized printing needs.

[0112] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the solution of this application, and does not constitute a limitation on the printing control device applied thereto. Specific printing control devices may include, but are not limited to, the following: Figure 8 The diagram shows more or fewer components, or combinations of certain components, or different component arrangements.

[0113] Based on the same inventive concept, this application also provides a graphics file processing apparatus for implementing the graphics file processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations of one or more graphics file processing apparatus embodiments provided below can be found in the limitations of the graphics file processing method described above, and will not be repeated here.

[0114] In one exemplary embodiment, such as Figure 9 As shown, a graphics file processing device 800 is provided, including: a data acquisition module 810, a data drawing module 820, a data display module 830, an instruction receiving module 840, and a data export module 850, wherein:

[0115] The data reading module 810 is used to acquire multiple graphic files to be processed for the printed circuit board, which are used to describe the layer content of the printed circuit board.

[0116] The data plotting module 820 is used to plot the graphic elements in each graphic file.

[0117] The data display module 830 is used to add the drawn graphic elements to different layers of the display interface for users to preview. Each layer has one graphic element added to it.

[0118] The instruction receiving module 840 responds to receiving a data export instruction, which carries data export parameters and layer identifiers.

[0119] The data export module 850 is used to export the graphic elements to be exported on the layer corresponding to the layer identifier into a target file that matches the data export parameters, based on the data export parameters.

[0120] In some embodiments, the data drawing module 820 is further configured to, for each drawing file, read the drawing instructions in the drawing file, parse the drawing instructions, determine the instruction type and drawing parameters of the drawing instructions, and draw the drawing elements in the drawing file based on the instruction type and drawing parameters.

[0121] In some embodiments, the data display module 830 is further configured to create multiple layers based on the number of graphic elements, wherein the number of layers is equal to the number of graphic elements, and to add each drawn graphic element to a different layer of the display interface based on the file information of the graphic file in which each graphic element is located.

[0122] like Figure 10 As shown, in some embodiments, the device further includes: a data processing module 822, used to process each drawn graphic element according to a preset graphic processing rule to obtain each processed graphic element; and a data display module 830, used to add each processed graphic element to different layers of the display interface.

[0123] In some embodiments, the data processing module 822 is further configured to perform at least one of the following operations:

[0124] The first step is to identify the lines in each graphic element and adjust the line width according to the preset line width parameters.

[0125] The second step is to identify the positive and negative graphics in each graphic element and eliminate the overlapping areas between the positive and negative graphics.

[0126] The third item is to fill the internal area of ​​a graphic element when the graphic element is a closed graphic.

[0127] In some embodiments, the data export module 850 is configured to export the graphic element to be exported as an image file based on data export parameters when the graphic element to be exported is a character, and to export the graphic element to be exported as a text file when the graphic element to be exported is a printed circuit board identification object.

[0128] Each module in the aforementioned graphics file processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0129] Based on the same inventive concept, such as Figure 11 As shown, this application embodiment also provides a printed circuit board data printing system 900, which includes: a user terminal 920 that communicates with each other, a printing control device 940, and a printer 960, wherein;

[0130] User terminal 920 is used to execute the steps in any of the above-described embodiments of the graphic file processing method to obtain the target file of the printed circuit board and upload the target file to the printing control device 940.

[0131] The printing control device 940 is used to execute any of the above-described printed circuit board data printing method embodiments, and to control the printer 960 to print the content to be printed on the printed circuit board.

[0132] The aforementioned printed circuit board data printing system allows users to quickly and accurately print selected graphic elements onto the printed circuit board when they need to print graphic elements from a graphic file. This reduces the low printing efficiency caused by printing an entire layer of content on a single layer each time, thus improving printing efficiency. Furthermore, users only need to select the graphic elements to be exported and set the parameters; there is no need to edit or delete graphic elements that do not need to be printed, making the operation more convenient and flexible.

[0133] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the printed circuit board data printing applied thereto. Specific printed circuit board data printing may include... Figure 10 The diagram shows more or fewer components, or combinations of certain components, or different component arrangements.

[0134] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a graphical file processing method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0135] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0136] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above embodiments of the printed circuit board data printing method.

[0137] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in any of the above embodiments of the printed circuit board data printing method.

[0138] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the printed circuit board data printing method.

[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis such as graphic files, stored data, and displayed data such as graphic elements, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations.

[0140] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0141] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0142] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method of processing a graphics file, characterized by, The method includes: Obtain multiple graphic files to be processed for a printed circuit board, the graphic files being used to describe the layer content of the printed circuit board; Draw the graphic elements in each of the aforementioned graphic files; Each of the drawn graphic elements is added to a different layer of the display interface for the user to preview, with one graphic element added to each layer. Receive a data export instruction, which carries data export parameters and layer identifiers; Based on the data export parameters, the graphic elements to be exported on the layer corresponding to the layer identifier are exported as target files that match the data export parameters.

2. The method of claim 1, wherein, The step of drawing the graphic elements in each of the graphic files includes: For each graphic file, read the graphic instructions from the graphic file; Parse the graphic instructions to determine the instruction type and graphic parameters of the graphic instructions; Based on the instruction type and the graphics parameters, the graphic elements in the graphics file are drawn.

3. The method of claim 1, wherein, Adding the drawn graphic elements to different layers of the display interface includes: Based on the number of graphic elements, create multiple layers, the number of layers being equal to the number of graphic elements; Based on the file information of the graphic file where each graphic element is located, the drawn graphic elements are added to different layers of the display interface.

4. The method of claim 1, wherein, Before adding the drawn graphic elements to different layers of the display interface, the method further includes: According to the preset graphic processing rules, each of the drawn graphic elements is processed to obtain the processed graphic elements. Each of the drawn graphic elements is added to a different layer of the display interface, including: The processed graphic elements are then added to different layers of the display interface.

5. The method of claim 4, wherein, The step of processing each drawn graphic element according to preset graphic processing rules includes at least one of the following methods: The first step is to identify the lines in each of the graphic elements and adjust the width of the lines according to preset line width parameters. The second step is to identify the positive and negative graphics in each of the graphic elements and eliminate the overlapping areas in the positive and negative graphics. The third item is to fill the internal area of ​​the graphic element when the graphic element is a closed graphic.

6. The method according to any one of claims 1 to 5, characterized in that, The step of exporting the graphic elements to be exported on the layer corresponding to the layer identifier into a target file that matches the data export parameters, based on the data export parameters, includes: If the graphic element to be exported is a character, the graphic element to be exported is converted into an image file based on the data export parameters; If the graphic element to be exported is a printed circuit board identifier object, the graphic element to be exported is exported as a text file, and the target file includes an image file or a text file.

7. A method of printing data on a printed circuit board, characterized by, The method includes: Obtain the target file of the printed circuit board, wherein the target file is obtained by processing the graphic file processing method as described in any one of claims 1 to 6; The target file is parsed to identify the content to be printed and its location. Based on the content to be printed and its position, the printer is controlled to print the content onto the printed circuit board.

8. The printed circuit board data printing method of claim 7, wherein, The process of parsing the target file and identifying the content to be printed and its location includes: Parse the file extension format of the target file to identify its type; If the target file is an image file, character recognition is performed on the target file to identify the content to be printed and its position. When the target file is a text file, the content to be printed and its location are identified based on the identification data in the target file.

9. A print control device characterized by comprising: The device includes: A data acquisition module is used to acquire a target file of a printed circuit board, wherein the target file is obtained by processing the graphic file processing method as described in any one of claims 1 to 6; The data parsing module is used to parse the target file and identify the content to be printed and its location. The data printing module is used to control the printer to print the content to be printed onto the printed circuit board based on the content to be printed and the position of the content to be printed.

10. A printed circuit board data printing system, characterized by The system includes: user terminals that communicate with each other, a printing control device, and a printer; The user terminal is used to execute the graphic file processing method as described in any one of claims 1 to 6 to process the target file of the printed circuit board and upload the target file to the printing control device; The printing control device is used to execute the printed circuit board data printing method as described in any one of claims 7 to 8, and to control the printer to print the content to be printed on the printed circuit board.