CN113076715A - Method and system for creating character block in Allegro - Google Patents

Method and system for creating character block in Allegro Download PDF

Info

Publication number
CN113076715A
CN113076715A CN202110359628.0A CN202110359628A CN113076715A CN 113076715 A CN113076715 A CN 113076715A CN 202110359628 A CN202110359628 A CN 202110359628A CN 113076715 A CN113076715 A CN 113076715A
Authority
CN
China
Prior art keywords
allegro
user
outline data
creating
text
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.)
Pending
Application number
CN202110359628.0A
Other languages
Chinese (zh)
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.)
Suzhou Mou Shi Software Technology Co ltd
Original Assignee
Suzhou Mou Shi Software 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 Suzhou Mou Shi Software Technology Co ltd filed Critical Suzhou Mou Shi Software Technology Co ltd
Priority to CN202110359628.0A priority Critical patent/CN113076715A/en
Publication of CN113076715A publication Critical patent/CN113076715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Abstract

The invention relates to a method and a system for creating character blocks in Allegro, wherein the method comprises the following steps: s1, receiving the character type selected by the user and the characters input by the user through an Allegro operation interface; s2, acquiring outline data of the characters input by the user, and converting the outline data into a closed path consisting of a plurality of continuous points; s3, creating a shape object of the stroke of the character in the Al egro based on the closed path. By the invention, a user can input any font and any character block on the current computer to generate the graphic elements capable of supporting the later period photoplotting and silk-screen printing, and the method has the advantages of friendly user interface and simple operation.

Description

Method and system for creating character block in Allegro
Technical Field
The invention belongs to the field of wiring design of electronic circuit printed circuit boards, and particularly relates to a method and a system for creating character blocks in Allegro.
Background
At present, Cadence Allegro is mainly applied to the wiring design of medium and large-sized PCB boards, and the wiring elements of the boards are relatively more, so that identification characters are often required to be printed on the board surface. However, since the later photoplotting program only recognizes the Line (Line) and the graphic block (Shape) and does not recognize the characters, the later photoplotting program only has simple Line type fonts during the previous design and does not support the input of non-English characters. As shown in fig. 1, in the Cadence Allegro, only keyboard characters (english) can be input, and characters in other languages are not supported, and the characters and fonts only have a few simple single lines.
Disclosure of Invention
The invention mainly aims to overcome the defects of the prior art and provide a method and a system for creating character blocks in Allegro.
According to one aspect of the invention, there is provided a method of creating a block of text in Allegro, the method comprising the steps of:
s1, receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
s2, acquiring outline data of the characters input by the user, and converting the outline data into a closed path consisting of a plurality of continuous points;
s3, creating a shape object of the stroke of the character in the Allegro based on the closed path.
Preferably, the text comprises a Windows TrueType font, and the shape object outline and the filling mode of the strokes of the created text.
Preferably, the acquiring outline data of the user-input text includes:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
Preferably, the creating a shape object of the stroke of the text in the Allegro based on the closed path includes:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
According to another aspect of the present invention, there is also provided a system for creating a text block in Allegro, the system comprising:
the receiving module is used for receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
the acquisition module is used for acquiring outline data of the characters input by the user and converting the outline data into a closed path consisting of a plurality of continuous points;
and the creating module is used for creating a shape object of the stroke of the character in the Allegro based on the closed path.
Preferably, the text comprises a Windows TrueType font, and the shape object outline and the filling mode of the strokes of the created text.
Preferably, the acquiring outline data of the user-input text includes:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
Preferably, the creating a shape object of the stroke of the text in the Allegro based on the closed path includes:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
According to another aspect of the present invention, there is also provided a system for creating a text block in an Allegro, the system comprising: a processor, a memory, said memory storing computer executable instructions which, when executed by the processor, implement the above-mentioned method steps.
According to another aspect of the present invention, there is also provided a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions which, when executed by a processor, implement the above-mentioned method steps.
Has the advantages that: according to the invention, the software is embedded in the Allegro to provide the user interface, so that a user can input any character and any TrueType font, two modes of outline and filling are provided, a full-fitting graph of the character is generated in the Allegro, the character can be output when a Gerber photoplotting file is manufactured at the later stage, the user interface is friendly, and the operation is simple.
The features and advantages of the present invention will become apparent by reference to the following drawings and detailed description of specific embodiments of the invention.
Drawings
FIG. 1 is a diagram illustrating the input of English characters in Allgio in the prior art;
FIG. 2 is a flow chart illustrating a method of creating a text block in Allegro according to the present invention;
FIG. 3 is a schematic diagram of a user interface for text type selection and input in Allegro of the present invention;
FIG. 4 is a schematic diagram of the outline of the font in the window of the present invention;
FIG. 5 is a schematic diagram of the generation of shape objects by Allgerano according to the present invention;
FIG. 6 is a schematic diagram of the text blocks of the present invention that generate the outline in Allgio;
FIG. 7 is a schematic diagram of the system for creating text blocks in Allegro according to the present invention;
FIG. 8 is a schematic diagram of another system for creating text blocks in Allegro according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example 1
FIG. 2 is a flow chart of the method for creating the text block in Allegro according to the present invention. As shown in fig. 2, the present invention provides a method of creating a text block in Allegro, the method comprising the steps of:
s1, receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
as shown in fig. 3, in this embodiment, software is embedded in Allegro to provide a user interface for a user, and the user can select a type of characters to be input and specific content of the characters through the interface, and can input any characters and any font.
S2, acquiring outline data of the characters input by the user, and converting the outline data into a closed path consisting of a plurality of continuous points;
as shown in FIG. 4, the text includes a Windows TrueType font, and the outline of the character (or the font) in the TrueType font is composed of straight lines and quadratic Bezier curve (bezier) segments. These constructs are mathematically easier to process than the cubic Bezier curve used by the planform design community PostScript (which is also used by the Type1 font).
The outline data is actually a closed boundary Path, such as a "mouth" word, which includes two box-shaped paths (Path, inside and outside, respectively) because the stroke is wide. Different fonts will of course have different paths. These paths are described by a number of successive point data, such as [ (0,0) (20,0) (20,20) (0,20) (0,0) ], indicating a closed frame Path (Path) starting at coordinate (0,0), moving laterally to (20,0), moving further to (20,20), moving to (0,20), and finally returning to (0, 0).
S3, creating a shape object of the stroke of the character in the Allegro based on the closed path.
As shown in fig. 5, the shape object of the strokes of the characters created in the Allegro based on the closed path may be an english character, or may be a chinese character, a korean character, or the like, and the actual form of the characters is the shape object and can be recognized by a later PCB program and process (photo-drawing and silk-screen).
Preferably, the shape object outline and the filling mode of the strokes of the created characters are two modes.
As shown in FIG. 6, if the way in which the shape object is generated is an outline type, then a hollowed out outline of the text is generated.
Preferably, the acquiring outline data of the user-input text includes:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
Specifically, using the application device description object CDC in the C + + MFC (Microsoft Foundation Classes), any graphic drawing operation performed between the BeginPath and EndPath functions will have its path recorded, so that only the selected font and size need be used to perform the output of text (via the TextOut function) among them, and then the contour data thereof can be acquired via the GetPath function. The DC is a structural body containing equipment, physical output equipment such as a display and equipment driver information, and all graphic operations are completed by the DC under a Windows platform. The letter C, CDC, is added before all classes in C + +.
Preferably, the creating a shape object of the stroke of the text in the Allegro based on the closed path includes:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
Specifically, SKILL is a secondary development language provided by cadenceallogoro, which is an interactive high-level programming language based on Lisp, and cadence provides abundant sketch graphic processing functions for allogoro, including a function for creating Shape according to given data. And (4) inputting a kill in a command window of the Allegro to run a kill script. Dll programs written in C + + can be loaded in the SKILL via axlDllSym.
After the outline data is obtained by the MFC, the outline data is returned to the Allegro, a Path object of the Allegro is created in the Allegro by using functions of the sketch, such as axlPathStart, axlPathLine, and axlDBCreatePath, and a Shape object with the Path as a boundary is created by using an axlDBCreateShape function. These maps can be identified and processed by the screen printing program in subsequent processing.
According to the method, the user interface is provided by embedding software in the Allegro, a user can input any character and any TrueType font, two modes of outline and filling are provided, a full-fitting graph of the character is generated in the Allegro, the full-fitting graph can be output when a Gerber optical drawing file is manufactured at the later stage, the user interface is friendly, and the operation is simple.
Example 2
FIG. 7 is a schematic diagram of the system structure for creating text blocks in Allegro according to the present invention. As shown in fig. 7, the present invention also provides a system for creating a text block in Allegro, the system comprising:
the receiving module is used for receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
the acquisition module is used for acquiring outline data of the characters input by the user and converting the outline data into a closed path consisting of a plurality of continuous points;
and the creating module is used for creating a shape object of the stroke of the character in the Allegro based on the closed path.
Preferably, the text comprises a Windows TrueType font, and the shape object outline and the filling mode of the strokes of the created text.
Preferably, the acquiring outline data of the user-input text includes:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
Preferably, the creating a shape object of the stroke of the text in the Allegro based on the closed path includes:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
The specific implementation process of the method steps executed by each module in this embodiment 2 is the same as the implementation process of each step in embodiment 1, and is not described herein again.
Example 3
FIG. 8 is a schematic diagram of another system for creating text blocks in Allegro according to the present invention. As shown in fig. 8, the present invention also provides another system for creating a text block in an Allegro, the system comprising: the processor and the memory, where the memory stores computer-executable instructions, and the computer-executable instructions are executed by the processor to implement the method steps in embodiment 1, and a specific implementation process may refer to an implementation process of the method steps in embodiment 1, which is not described herein again.
Example 4
According to another aspect of the present invention, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the method steps in embodiment 1, and for a specific implementation process, reference may be made to an implementation process of the method steps in embodiment 1, which is not described herein again.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of creating a block of text in Allegro, the method comprising the steps of:
s1, receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
s2, acquiring outline data of the characters input by the user, and converting the outline data into a closed path consisting of a plurality of continuous points;
s3, creating a shape object of the stroke of the character in the Allegro based on the closed path.
2. The method of claim 1, wherein the text comprises a Windows TrueType font, and wherein the created strokes of the text have both shape object outlines and fill patterns.
3. The method of claim 1, wherein the obtaining outline data of the user-entered text comprises:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
4. The method of claim 3, wherein creating the shape object of the stroke of the text in the Allegro based on the closed path comprises:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
5. A system for creating a block of text in Allegro, the system comprising:
the receiving module is used for receiving the character type selected by the user and the characters input by the user through an Allegro operation interface;
the acquisition module is used for acquiring outline data of the characters input by the user and converting the outline data into a closed path consisting of a plurality of continuous points;
and the creating module is used for creating a shape object of the stroke of the character in the Allegro based on the closed path.
6. The system of claim 5, wherein the text comprises a Windows TrueType font, and wherein the created strokes of the text have both shape object outlines and fill patterns.
7. The system of claim 5, wherein the obtaining of the outline data of the user-entered text comprises:
and (3) using an application equipment description object CDC in the C + + Microsoft base MFC, outputting the characters according to the fonts and the character sizes selected by the user by using a TextOut function, and acquiring the outline data of the characters by using a GetPath function.
8. The system of claim 7, wherein the creating a shape object of the stroke of the text in the Allegro based on the closed path comprises:
and after the outline data of the characters are obtained through the MFC, the outline data are transmitted back to the Allegro, a Path object of the Allegro is created in the Allegro by using the axlPathStart, the axlPathLine and the axlDBCreatePath function of the sketch, and a Shape object with the Path object as a boundary is created by using the axlDBCreateShape function.
9. A system for creating a block of text in Allegro, the system comprising: a processor, a memory storing computer-executable instructions that, when executed by the processor, implement the method of any one of claims 1-4.
10. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-4.
CN202110359628.0A 2021-04-02 2021-04-02 Method and system for creating character block in Allegro Pending CN113076715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110359628.0A CN113076715A (en) 2021-04-02 2021-04-02 Method and system for creating character block in Allegro

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110359628.0A CN113076715A (en) 2021-04-02 2021-04-02 Method and system for creating character block in Allegro

Publications (1)

Publication Number Publication Date
CN113076715A true CN113076715A (en) 2021-07-06

Family

ID=76614851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110359628.0A Pending CN113076715A (en) 2021-04-02 2021-04-02 Method and system for creating character block in Allegro

Country Status (1)

Country Link
CN (1) CN113076715A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056182A1 (en) * 2001-09-14 2003-03-20 Alan Rosenbaum PCB/complex electronic subsystem model
CN103823882A (en) * 2014-03-03 2014-05-28 深圳市百能信息技术有限公司 Method and system for automatically auditing PCB project files
CN106126800A (en) * 2016-06-21 2016-11-16 浪潮集团有限公司 A kind of Allegro software replicates the attribute copper method to other aspects automatically
CN107729009A (en) * 2017-10-23 2018-02-23 郑州云海信息技术有限公司 A kind of method of rotary device word in PCB design
CN108388427A (en) * 2018-01-02 2018-08-10 郑州云海信息技术有限公司 A kind of method that word is imported and exported in PCB design
CA3062700A1 (en) * 2017-05-25 2018-11-29 J. W. Pepper & Son, Inc. Sheet music search and discovery system
CN109656491A (en) * 2018-11-28 2019-04-19 武汉精立电子技术有限公司 A kind of setting method, device and the electronic design system of PCB whole plate silk-screen word font
CN109857453A (en) * 2018-11-30 2019-06-07 济南浪潮高新科技投资发展有限公司 A kind of method for the text that automatically resets in Allegro software
CN110083925A (en) * 2019-04-24 2019-08-02 苏州浪潮智能科技有限公司 It is a kind of based on allegro skill package pins silk-screen mark automatically create method and system
CN111144395A (en) * 2019-12-27 2020-05-12 苏州浪潮智能科技有限公司 Method and device for rapidly inversely labeling characters and graphs based on Cadence skip

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056182A1 (en) * 2001-09-14 2003-03-20 Alan Rosenbaum PCB/complex electronic subsystem model
CN103823882A (en) * 2014-03-03 2014-05-28 深圳市百能信息技术有限公司 Method and system for automatically auditing PCB project files
CN106126800A (en) * 2016-06-21 2016-11-16 浪潮集团有限公司 A kind of Allegro software replicates the attribute copper method to other aspects automatically
CA3062700A1 (en) * 2017-05-25 2018-11-29 J. W. Pepper & Son, Inc. Sheet music search and discovery system
CN107729009A (en) * 2017-10-23 2018-02-23 郑州云海信息技术有限公司 A kind of method of rotary device word in PCB design
CN108388427A (en) * 2018-01-02 2018-08-10 郑州云海信息技术有限公司 A kind of method that word is imported and exported in PCB design
CN109656491A (en) * 2018-11-28 2019-04-19 武汉精立电子技术有限公司 A kind of setting method, device and the electronic design system of PCB whole plate silk-screen word font
CN109857453A (en) * 2018-11-30 2019-06-07 济南浪潮高新科技投资发展有限公司 A kind of method for the text that automatically resets in Allegro software
CN110083925A (en) * 2019-04-24 2019-08-02 苏州浪潮智能科技有限公司 It is a kind of based on allegro skill package pins silk-screen mark automatically create method and system
CN111144395A (en) * 2019-12-27 2020-05-12 苏州浪潮智能科技有限公司 Method and device for rapidly inversely labeling characters and graphs based on Cadence skip

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
小小吴: "[ Allegro教程]Allegro快速添加中文字符", pages 1, Retrieved from the Internet <URL:https://bbs.16rd.com/thread-447594-1-1.html#pid641393> *
這侽孓譙悴丶: "教你如何在Allegro中轻松制作反白(镂空)的丝印", pages 1 - 2, Retrieved from the Internet <URL:https://www.eda365.com/thread-440269-1-1.html> *

Similar Documents

Publication Publication Date Title
EP0597379A2 (en) Pen input processing apparatus
US4990903A (en) Method for storing Chinese character description information in a character generating apparatus
JPH05233630A (en) Method for describing japanese and chinese
CN107562480B (en) Method and system for realizing multilingual of POS machine
US7609268B2 (en) Arrangement for the scaling of fonts
KR930002344B1 (en) Outline character forming method and apparatus
CN113076715A (en) Method and system for creating character block in Allegro
JP4905899B2 (en) Information processing system, information processing program, and readable recording medium
CN111782158B (en) Method for generating dot matrix font of code spraying equipment and printing equipment
JPH02270019A (en) Generation system for high quality character pattern
JP3146771B2 (en) Font rasterizing apparatus and method
CN113223117A (en) Image processing method and related device
CN112926419B (en) Character judgment result processing method and device and electronic equipment
Dürst Prolog for structured character description and font design
CN115237515A (en) High-performance font loading and rendering method for low-cost vehicle-mounted instrument platform
JP2002208017A (en) Plotting processor
KR910002799B1 (en) Character generation method and apparatus for computer system
JP2021144078A (en) Character generator, information processing program and character generation system
JP3320566B2 (en) Character symbol conversion device and printer
CN113641357A (en) Performance optimization method for avionics cockpit display software
CN117313653A (en) Text box adaptation method and device and electronic equipment
KR20220041789A (en) Method and appartuas for processing speech recognition result, electronic device, and computer medium
CN113778281A (en) Auxiliary information generation method and device, electronic equipment and storage medium
CN116451645A (en) Text processing method, text processing device, electronic equipment and computer readable storage medium
CN115758997A (en) Method and device for constructing natural language model and electronic equipment

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