CN109656492B - Print data processing method, system, device and storage medium - Google Patents

Print data processing method, system, device and storage medium Download PDF

Info

Publication number
CN109656492B
CN109656492B CN201811554184.0A CN201811554184A CN109656492B CN 109656492 B CN109656492 B CN 109656492B CN 201811554184 A CN201811554184 A CN 201811554184A CN 109656492 B CN109656492 B CN 109656492B
Authority
CN
China
Prior art keywords
primitive
gerber file
data
coordinate data
memory space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811554184.0A
Other languages
Chinese (zh)
Other versions
CN109656492A (en
Inventor
黄振金
左国云
陈艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Senda Shenzhen Technology Co Ltd
Original Assignee
Senda Shenzhen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Senda Shenzhen Technology Co Ltd filed Critical Senda Shenzhen Technology Co Ltd
Priority to CN201811554184.0A priority Critical patent/CN109656492B/en
Publication of CN109656492A publication Critical patent/CN109656492A/en
Application granted granted Critical
Publication of CN109656492B publication Critical patent/CN109656492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a print data processing method, a print data processing system, print data processing equipment and a storage medium. The method comprises the following steps: converting the first coordinate data of the Gerber file to obtain second coordinate data; presetting a primitive sharpening threshold and primitive sharpening parameters; obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter; and storing the target bitmap in a designated memory and then outputting the target bitmap for printing. In the method, the graphic elements with the graphic element size value smaller than the preset graphic element definition threshold value are screened out in the process of converting the Gerber file into the bitmap file, and the line width is adjusted when the target bitmap is drawn, so that the problem of unclear graphic elements caused by accumulation of ink during printing output of a printer is avoided, the purpose of graphic element definition is achieved, and the printing effect of a printed character or a layer of a PCB (printed Circuit Board) is improved.

Description

Print data processing method, system, device and storage medium
Technical Field
The present invention relates to the field of PCB character printing technologies, and in particular, to a print data processing method, system, device, and storage medium.
Background
In the technical field of PCB character printers, the Gerber file is a two-dimensional vector image file format, which is a standard format used in printed wiring board industry software to describe printed wiring board images, for example: a circuit layer, a solder mask layer, a character layer, a drilling layer and the like. The first step of the digital printer to realize the Gerber file of the printing vector is to analyze and convert the file format of the vector diagram into the bitmap file format of the dot matrix.
The Gerber file is an ASCII code file, and the parsed data can be classified into a specified plurality of primitive types: points, lines, rectangles, circles, arcs, arbitrary polygons, arbitrary contours, etc. In the process of converting the Gerber file of the vector into a bitmap, the sizes of some primitives are smaller, so that the primitives with smaller sizes become blurred due to accumulation of ink quantity when the printer performs output printing, and the printing effect is affected. Therefore, how to effectively solve the problem of primitive definition in the conversion of Gerber files is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides a print data processing method, a system, equipment and a storage medium, which are used for solving the problems that in the prior art, in the process of converting a Gerber file of a vector into a bitmap, the size of a certain graphic primitive is smaller, so that the graphic primitive with smaller size becomes blurred due to accumulation of ink quantity when a printer performs output printing, and the printing effect is affected.
In a first aspect, an embodiment of the present invention provides a print data processing method, including: converting the first coordinate data of the Gerber file to obtain second coordinate data;
presetting a primitive sharpening threshold and primitive sharpening parameters;
obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter;
and storing the target bitmap in a designated memory and then outputting the target bitmap for printing.
Preferably, the converting the first coordinate data of the Gerber file to obtain second coordinate data includes:
reading a Gerber file, and analyzing the Gerber file instruction data according to the Gerber file grammar rule;
calculating parameter information according to the Gerber file instruction data and classifying the parameter information into different primitive types;
establishing a conversion factor according to a preset conversion precision;
and converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data.
Preferably, the obtaining the target bitmap according to the second coordinate data, the primitive-sharpening threshold, and the primitive-sharpening parameter includes:
sequentially reading second coordinate data of different primitive types;
judging whether the size values of different primitive types in the second coordinate data are lower than the preset primitive definition threshold;
and when the size numerical value of different primitive types in the second coordinate data is lower than the preset primitive definition threshold, adjusting the line width information of the primitive types lower than the primitive definition threshold.
Preferably, presetting the primitive-sharpening threshold and the primitive-sharpening parameter according to the printing requirement includes:
and setting the graphic element definition threshold and the graphic element definition parameters through a human-computer interaction interface according to the printing requirements.
Preferably, parsing according to the Gerber file grammar rule includes:
extracting effective data information in the Gerber file, and storing the effective data information in a memory according to a preset data structure;
analyzing the Gerber file to obtain information of the Gerber file, wherein the information of the Gerber file comprises the following steps: gerber file function code information, gerber file AD code information, gerber file AM code information, and Gerber file coordinate information.
Preferably, the parameter information includes data structure information.
Preferably, classifying the parameter information into different primitive types includes:
establishing corresponding first primitive memory spaces according to different primitive types and distributing specified primitive data structures;
judging the data structure type of the Gerber file instruction data;
establishing a mapping relation of a corresponding first primitive memory space according to the data structure type of the Gerber file instruction data;
and classifying the Gerber file instruction data into a corresponding first primitive memory space according to the mapping relation.
In a second aspect, an embodiment of the present invention provides a print data processing system, including:
the parameter reading module is used for reading the Gerber file instruction data;
the judging module is used for judging the data instruction format of the Gerber file instruction data;
the memory allocation module is used for allocating the Gerber file instruction data to corresponding memory spaces according to the primitive instruction format data of different primitives;
the conversion module is used for converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data;
the setting module is used for presetting a graphic element definition threshold and graphic element definition parameters according to printing requirements;
and the target bitmap module is used for acquiring a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter.
In a third aspect, an embodiment of the present invention provides a print data processing apparatus including:
at least one processor, at least one memory and computer program instructions stored in the memory, which when executed by the processor, implement the method as in the first aspect of the embodiments described above.
In a fourth aspect, embodiments of the present invention provide a storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method as in the first aspect of the embodiments described above.
In summary, the print data processing method, system, device and storage medium provided by the embodiments of the present invention, the method obtains second coordinate data by converting the first coordinate data of the Gerber file; presetting a primitive sharpening threshold and primitive sharpening parameters; obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter; and storing the target bitmap in a designated memory and then outputting the target bitmap for printing. In the method, the graphic elements with the graphic element size value smaller than the preset graphic element definition threshold value are screened out in the process of converting the Gerber file into the bitmap file, and the line width is adjusted when the target bitmap is acquired, so that the problem of unclear graphic elements caused by accumulation of ink during printing output of the printer is avoided, the purpose of graphic element definition is achieved, and the printing effect of the PCB character printer is improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings that are needed to be used in the embodiments of the present invention will be briefly described, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a print data processing method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a print data processing method according to an embodiment of the present invention, where the first coordinate data of the Gerber file is converted to obtain the second coordinate data.
Fig. 3 is a flowchart of the method for processing print data according to the embodiment of the present invention for classifying the parameter information into different primitive types.
Fig. 4 is a flowchart of a print data processing method according to an embodiment of the present invention, where the first coordinate data of the primitive is converted to obtain the second coordinate data according to the conversion factor.
Fig. 5a is a schematic diagram before adjustment of primitive types below the primitive sharpness threshold in the print data processing method according to an embodiment of the present invention.
Fig. 5b is a schematic diagram of a primitive type below the primitive sharpness threshold according to a first primitive sharpness parameter adjustment in accordance with the print data processing method according to an embodiment of the present invention.
Fig. 5c is a schematic diagram of a method for processing print data according to an embodiment of the present invention, wherein the primitive types below the primitive sharpness threshold are adjusted according to a second primitive sharpness parameter.
Fig. 5d is a schematic diagram of a method for processing print data according to an embodiment of the present invention, wherein the primitive types below the primitive sharpness threshold are adjusted according to a third primitive sharpness parameter.
FIG. 6 is a block diagram of a print data processing system according to an embodiment of the present invention.
Fig. 7 is a block diagram of a print data processing apparatus according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely configured to illustrate the invention and are not configured to limit the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the invention by showing examples of the invention.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
Referring to fig. 1, an embodiment of the present invention provides a print data processing method, which screens out primitives with primitive size values smaller than a preset primitive sharpening threshold in the process of converting a Gerber file into a bitmap file, and performs line width adjustment when drawing a target bitmap, so as to avoid the problem of unclear primitives caused by accumulation of ink during printing output of a printer, achieve the purpose of primitive sharpening, and improve the printing effect of a PCB character printer. The method specifically comprises the following steps:
s1, converting the first coordinate data of the Gerber file to obtain second coordinate data;
s2, presetting a graphic element definition threshold and graphic element definition parameters;
s3, obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameters;
s4, storing the target bitmap in a designated memory, and then outputting and printing.
Preferably, referring to fig. 2, the converting the first coordinate data of the Gerber file to obtain the second coordinate data includes:
s11, reading a Gerber file, and analyzing the Gerber file instruction data according to the Gerber file grammar rule;
s12, calculating parameter information according to the Gerber file instruction data and classifying the parameter information into different primitive types;
s13, establishing a conversion factor according to a preset conversion precision;
s14, converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data.
Preferably, parsing according to the Gerber file grammar rule includes:
s111, extracting effective data information in the Gerber file, and storing the effective data information in a memory according to a preset data structure;
s112, analyzing the Gerber file to obtain information of the Gerber file, wherein the information of the Gerber file comprises the following steps: gerber file function code information, gerber file AD code information, gerber file AM code information, and Gerber file coordinate information.
In a preferred embodiment, the parameter information comprises data structure information of different primitives. Specifically, in the present embodiment. The data structure information comprises X-axis coordinates, Y-axis coordinates, diameters, inner diameters and outer diameters, whether region filling is performed or not and the like.
Referring to fig. 3, classifying the parameter information into different primitive types includes:
s121, establishing corresponding first primitive memory spaces according to different primitive types and distributing specified primitive data structures;
s122, judging the data structure type of the Gerber file instruction data;
s123, establishing a mapping relation of a corresponding first primitive memory space according to the data structure type of the Gerber file instruction data;
s124, classifying the Gerber file instruction data into a corresponding first primitive memory space according to the mapping relation.
Specifically, in this embodiment, the primitive types include any polygon such as a point, a straight line, a rectangle, a circle, an arc, a rounded rectangle, an ellipse, and a graph of any contour. Each primitive type has a specified primitive data structure and is stored in a respective memory space. It may be appreciated that, in this embodiment, the first memory space is a memory space storing primitive data structures of different primitive types, where the primitive data structures include information such as the first coordinate data.
Specifically, the primitive data structure of the point is determined by the coordinates of a point; the primitive data structure of the straight line is determined by coordinates of two points; the primitive data structure of the rectangle is determined by coordinates of points at the upper left corner and coordinates of points at the lower right corner of the rectangle; the primitive data structure of the circle is determined by circle center coordinates and the radius of the circle, wherein the radius of the circle is converted according to the specified precision, and the circle center coordinates are converted according to conversion factors; the primitive data structure of the circular arc is determined by a central angle, a radius and a central position; the primitive data structure of the arbitrary polygon is determined by each vertex coordinate of the arbitrary polygon; the primitive data structure of the arbitrary contour is determined by a path function. In particular, the path function refers to a path that is one or more graphs that may be filled, contours acquired, or both. The introduction of the path can conveniently establish a complex area, draw and fill irregular patterns. The irregular pattern referred to herein means a pattern composed of straight lines and bezier curves (regular pattern such as a polygon, ellipse, etc. with respect to a rectangle).
In a preferred embodiment, determining the data structure type of the Gerber file instruction data includes:
s1221, sequentially reading data structure information according to the arrangement sequence of the Gerber file instruction data;
s1222, comparing the data structure information with the primitive data structures of different primitive types in sequence.
Specifically, in this embodiment, the data structure information is sequentially compared with the primitive data structures of different primitive types according to the own sequence, and is placed in the memory space of the corresponding primitive type. In another preferred embodiment, the order of the data structure information can be changed according to the need, and the method is not particularly limited herein.
Preferably, the conversion factor is:
(X,Y)=(A/25.4*X1,B/25.4*Y1)
wherein X is the X-axis coordinate of the second coordinate data, Y is the Y-axis coordinate of the second coordinate data, A is the X-axis conversion accuracy, B is the Y-axis conversion accuracy, X1 is the X-axis coordinate of the first coordinate data, and Y1 is the Y-axis coordinate of the first coordinate data. It is to be understood that the X-axis conversion accuracy a and the Y-axis conversion accuracy B may be defined by themselves according to printing requirements, and are not particularly limited herein.
Referring to fig. 4, in a preferred embodiment, the converting the first coordinate data of the primitive according to the conversion factor to obtain the second coordinate data includes:
s141, establishing a second primitive memory space according to different primitive types;
s142, establishing a mapping relation between the second memory space and the first primitive memory space;
s143, the second coordinate data obtained through conversion are distributed to the second primitive memory space according to the mapping relation.
Specifically, in this embodiment, the second memory space is a memory space storing the second coordinate data.
Preferably, the obtaining the target bitmap according to the second coordinate data and the primitive-sharpening threshold, and the primitive-sharpening parameter includes:
s31, sequentially reading second coordinate data of different primitive types;
s32, judging whether the size values of different primitive types in the second coordinate data are lower than the preset primitive definition threshold;
and S33, adjusting the line width information of the primitive types lower than the primitive definition threshold according to the preset primitive definition parameters.
Preferably, presetting the primitive-sharpening threshold and the primitive-sharpening parameter according to the printing requirement includes: setting a graphic primitive definition threshold through a human-computer interaction interface; and setting the graphic primitive definition parameters through a human-computer interaction interface. By setting the graphic element definition parameters and graphic element definition threshold values, graphic elements with graphic element size values smaller than the preset graphic element definition threshold values are screened out, and line width adjustment is carried out when a target bitmap is drawn, so that the problem that graphic elements are blurred due to accumulation of ink during printing output of a printer is avoided, the purpose of graphic element definition is achieved, and the printing effect of a PCB character printer is improved. In another preferred embodiment, the primitive-sharpening threshold and the primitive-sharpening parameter may be adjusted according to the printing requirements of the PCB board, and are not particularly limited herein.
Specifically, referring to fig. 5, fig. 5a is a graphic primitive type lower than the graphic primitive sharpness threshold in the second coordinate data, fig. 5b is an effect diagram of graphic primitive type for adjusting line width information according to the first graphic primitive sharpness parameter, fig. 5c is an effect diagram of graphic primitive type for adjusting line width information according to the second graphic primitive sharpness parameter, and fig. 5d is an effect diagram of graphic primitive type for adjusting line width information according to the third graphic primitive sharpness parameter.
In this embodiment, the drawing library MFC (Microsoft Foundation Classes, abbreviated as MFC, is a class library provided by microsoft corporation, and includes an application framework to reduce workload of application developers, where the drawing functional block includes a large number of Windows handle encapsulation classes and a large number of Windows encapsulation classes of built-in controls and components, calls a first address of a primitive type matching with the interface in the second memory space according to interfaces of different primitive types of the drawing functional block, obtains a target bitmap according to coordinates in the second memory space, and stores the target bitmap in the second memory space, so as to obtain a bitmap file with formulated precision. It will be appreciated that in another preferred embodiment, the gallery RRDtool (RoundRobin Database Tool for short) may be used instead, the gallery not being specifically limited herein.
Referring to fig. 6, an embodiment of the present invention further provides a print data processing system, including:
the parameter reading module 1 is used for reading the Gerber file instruction data;
the judging module 2 is used for judging the data instruction format of the Gerber file instruction data;
the memory allocation module 3 is used for allocating the Gerber file instruction data to corresponding memory spaces according to the primitive instruction format data of different primitives;
the conversion module 4 is used for converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data;
the setting module 5 is used for presetting a graphic element definition threshold and graphic element definition parameters according to printing requirements;
and the target bitmap acquisition module 6 is used for acquiring a target bitmap according to the second coordinate data, the primitive-sharpening threshold and the primitive-sharpening parameter.
Preferably, the present invention also discloses a print data processing apparatus comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method described in this embodiment.
In particular, the processor 401 described above may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present invention.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. Memory 402 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid state memory. In a particular embodiment, the memory 402 includes Read Only Memory (ROM). The ROM may be mask programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these, where appropriate.
The processor 401 realizes the print data processing method in the above-described embodiment by reading and executing the computer program instructions stored in the memory 402.
In one example, the print data processing device can also include a communication interface 403 and a bus 410. As shown in fig. 7, the processor 401, the memory 402, and the communication interface 403 are connected to each other by a bus 410 and perform communication with each other.
The communication interface 403 is mainly used to implement communication between each module, device, unit and/or apparatus in the embodiment of the present invention.
Bus 410 includes hardware, software, or both, coupling components of the print data processing device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 410 may include one or more buses, where appropriate. Although embodiments of the invention have been described and illustrated with respect to a particular bus, the invention contemplates any suitable bus or interconnect.
In addition, in connection with the print data processing method in the above-described embodiments, the embodiments of the present invention may be implemented by providing a computer-readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the print data processing methods of the above embodiments.
In summary, the print data processing method, system, device and storage medium provided by the embodiments of the present invention, the method obtains second coordinate data by converting the first coordinate data of the Gerber file; presetting a primitive sharpening threshold and primitive sharpening parameters; obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter; and storing the target bitmap in a designated memory and then outputting the target bitmap for printing. In the method, the graphic elements with the graphic element size value smaller than the preset graphic element definition threshold value are screened out in the process of converting the Gerber file into the bitmap file, and the line width is adjusted when the target bitmap is drawn, so that the problem of unclear graphic elements caused by accumulation of ink during printing output of the printer is avoided, the purpose of graphic element definition is achieved, and the printing effect of the PCB character printer is improved.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
In the foregoing, only the specific embodiments of the present invention are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present invention is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and they should be included in the scope of the present invention.

Claims (8)

1. A print data processing method, characterized in that the method comprises:
converting the first coordinate data of the Gerber file to obtain second coordinate data;
presetting a primitive sharpening threshold and primitive sharpening parameters;
obtaining a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter;
storing the target bitmap in a specified memory and then outputting and printing;
the step of converting the first coordinate data of the Gerber file to obtain second coordinate data includes:
reading a Gerber file, and analyzing the Gerber file instruction data according to the Gerber file grammar rule;
calculating parameter information according to the Gerber file instruction data and classifying the parameter information into different primitive types;
establishing a conversion factor according to a preset conversion precision;
converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data;
further, the obtaining the target bitmap according to the second coordinate data, the primitive-sharpening threshold, and the primitive-sharpening parameter includes:
sequentially reading second coordinate data of different primitive types;
judging whether the size values of different primitive types in the second coordinate data are lower than the preset primitive definition threshold;
when the size value of different primitive types in the second coordinate data is lower than the preset primitive definition threshold value, the line width information of the primitive types lower than the primitive definition threshold value is adjusted,
converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data comprises the following steps:
s141, establishing a second primitive memory space according to different primitive types;
s142, establishing a mapping relation between the second primitive memory space and the first primitive memory space;
s143, converting the second coordinate data according to the mapping relation and distributing the second coordinate data to the second primitive memory space; and calling a first address of a primitive type matched with the interface in the second primitive memory space by using a drawing library according to interfaces of different primitive types of a drawing functional block, acquiring a target bitmap according to coordinates in the second primitive memory space, and storing the target bitmap in the second primitive memory space.
2. The print data processing method according to claim 1, wherein presetting the primitive-sharpening threshold and the primitive-sharpening parameters according to the print requirement comprises:
and setting the graphic element definition threshold and the graphic element definition parameters through a human-computer interaction interface according to the printing requirements.
3. The print data processing method according to claim 1, wherein parsing according to the Gerber file syntax rules comprises:
extracting effective data information in the Gerber file, and storing the effective data information in a memory according to a preset data structure;
analyzing the Gerber file to obtain information of the Gerber file, wherein the information of the Gerber file comprises the following steps: gerber file function code information, gerber file AD code information, gerber file AM code information, and Gerber file coordinate information.
4. A print data processing method according to claim 3, wherein the parameter information includes data structure information.
5. The print data processing method according to claim 4, wherein classifying the parameter information into different primitive types includes:
establishing corresponding first primitive memory spaces according to different primitive types and distributing specified primitive data structures;
judging the data structure type of the Gerber file instruction data;
establishing a mapping relation of a corresponding first primitive memory space according to the data structure type of the Gerber file instruction data;
and classifying the Gerber file instruction data into a corresponding first primitive memory space according to the mapping relation.
6. A print data processing system, comprising:
the parameter reading module is used for reading Gerber file instruction data;
the judging module is used for judging the data instruction format of the Gerber file instruction data;
the memory allocation module is used for allocating the Gerber file instruction data to corresponding memory spaces according to the primitive instruction format data of different primitives;
the conversion module is used for converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data;
the setting module is used for presetting a graphic element definition threshold and graphic element definition parameters according to printing requirements;
the target bitmap acquisition module is used for acquiring a target bitmap according to the second coordinate data, the primitive definition threshold and the primitive definition parameter;
wherein the conversion module is further to:
reading a Gerber file, and analyzing the Gerber file instruction data according to the Gerber file grammar rule;
calculating parameter information according to the Gerber file instruction data and classifying the parameter information into different primitive types;
establishing a conversion factor according to a preset conversion precision;
converting the first coordinate data of the primitive according to the conversion factor to obtain second coordinate data;
further, the target bitmap acquisition module is further configured to:
sequentially reading second coordinate data of different primitive types;
judging whether the size values of different primitive types in the second coordinate data are lower than the preset primitive definition threshold;
when the size value of different primitive types in the second coordinate data is lower than the preset primitive definition threshold value, the line width information of the primitive types lower than the primitive definition threshold value is adjusted,
the conversion module is also for:
establishing a second primitive memory space according to different primitive types;
establishing a mapping relation between the second primitive memory space and the first primitive memory space;
distributing the second coordinate data obtained by conversion to the second primitive memory space according to the mapping relation; and calling a first address of a primitive type matched with the interface in the second primitive memory space by using a drawing library according to interfaces of different primitive types of a drawing functional block, acquiring a target bitmap according to coordinates in the second primitive memory space, and storing the target bitmap in the second primitive memory space.
7. A print data processing apparatus, characterized by comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of any one of claims 1-5.
8. A storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1-5.
CN201811554184.0A 2018-12-19 2018-12-19 Print data processing method, system, device and storage medium Active CN109656492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811554184.0A CN109656492B (en) 2018-12-19 2018-12-19 Print data processing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811554184.0A CN109656492B (en) 2018-12-19 2018-12-19 Print data processing method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN109656492A CN109656492A (en) 2019-04-19
CN109656492B true CN109656492B (en) 2023-04-28

Family

ID=66114876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811554184.0A Active CN109656492B (en) 2018-12-19 2018-12-19 Print data processing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN109656492B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333832B (en) * 2019-07-04 2023-04-28 森大(深圳)技术有限公司 Typesetting spacing adjustment method, device and equipment for multiple printed images and storage medium
CN110605917B (en) * 2019-08-29 2021-03-16 深圳市汉森软件有限公司 Printing control method, device and equipment for PCB characters and storage medium
CN113242652B (en) * 2021-05-20 2022-04-01 上海望友信息科技有限公司 Spraying graph generation method and system, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468309A (en) * 2014-09-11 2016-04-06 日本冲信息株式会社 Information processing apparatus and image forming apparatus
CN105631080A (en) * 2014-11-27 2016-06-01 国网内蒙古东部电力有限公司 Automatic generation device and method of vector power grid wiring diagram

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IL156080A0 (en) * 2000-11-25 2003-12-23 Silverbrook Res Pty Ltd Interactive printer
JP2006330184A (en) * 2005-05-24 2006-12-07 Fujifilm Holdings Corp Image processing apparatus
TWI287828B (en) * 2005-12-30 2007-10-01 Ind Tech Res Inst Method for printing a pattern and data processing method thereof
CN103559344B (en) * 2013-10-30 2016-08-17 苏州微影光电科技有限公司 A kind of domain preprocess method for laser direct imaging
EP3164905A4 (en) * 2014-07-01 2018-01-03 Mc10, Inc. Conformal electronic devices
CN108875855B (en) * 2018-07-11 2021-09-17 森大(深圳)技术有限公司 Method, device, equipment and storage medium for printing vector diagram

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468309A (en) * 2014-09-11 2016-04-06 日本冲信息株式会社 Information processing apparatus and image forming apparatus
CN105631080A (en) * 2014-11-27 2016-06-01 国网内蒙古东部电力有限公司 Automatic generation device and method of vector power grid wiring diagram

Also Published As

Publication number Publication date
CN109656492A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN109656492B (en) Print data processing method, system, device and storage medium
CN109977949B (en) Frame fine adjustment text positioning method and device, computer equipment and storage medium
KR101337881B1 (en) Method for inspecting and generating job data of pcb inspection system
CN109683833B (en) Method, system, device and storage medium for enhancing image to be printed
CN109710264B (en) Gerber file conversion method, system, device and storage medium
US8615129B2 (en) Pattern separating extraction device, and pattern separating extraction method
CN109697414B (en) Text positioning method and device
KR102065197B1 (en) Electron beam drawing device, electron beam drawing method, and recrding media
CN113379651B (en) Image processing method and system in laser imaging process and related equipment
CN112613344B (en) Vehicle track occupation detection method, device, computer equipment and readable storage medium
CN112017232A (en) Method, device and equipment for positioning circular pattern in image
CN110490204B (en) Image processing method, image processing device and terminal
CN109683834B (en) Gerber file conversion precision processing method, system, equipment and storage medium
CN112770503A (en) Circuit board component positioning method and device
CN111724396A (en) Image segmentation method and device, computer-readable storage medium and electronic device
JP3661635B2 (en) Image processing method and apparatus
CN114332237A (en) Method for calculating conversion relation between camera coordinate system and laser coordinate system
CN110605917B (en) Printing control method, device and equipment for PCB characters and storage medium
CN110333832B (en) Typesetting spacing adjustment method, device and equipment for multiple printed images and storage medium
CN112258501A (en) Printing plate mesh point detection method, printing plate measuring instrument and readable storage medium
CN113610801B (en) Defect classification method, device, equipment and storage medium based on minimum unit
CN115719326A (en) PCB defect detection method and device
CN111368492B (en) Method and system for setting identification information in integrated circuit layout
CN111160334B (en) Labeling attribution confirmation method, device and equipment
CN112598616A (en) Electronic equipment exposure parameter determining method and imaging method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant