A method and system for creating text blocks in Allegro

By embedding software in Cadence Allegro, we can obtain and process text outline data and create identifiable text shape objects, which solves the problem of the system being unable to recognize non-English text, enables the input and output of multi-language text, and improves electronic circuit wiring design. flexibility and user experience.

CN113076715BActive Publication Date: 2024-10-11SUZHOU MOUSHI SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110359628.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-02
Publication Date
2024-10-11
Estimated Expiration
2041-04-02

AI Technical Summary

Technical Problem

The existing Cadence Allegro system cannot recognize and input non-English characters in electronic circuit wiring design, and the text fonts are limited and only support simple single-line fonts.

Method used

By embedding software in Allegro, a user interface is provided to receive the text type and content input by the user, obtain the outline data of the text, convert it into a closed path, and create the shape object of the text in Allegro. It supports Windows TrueType fonts and fill modes, and uses MFC and SKILL functions to generate recognizable graphical elements.

Benefits of technology

Users can input any text and fonts to generate graphic elements that can be used for later light painting and silk screen printing. The system is friendly, easy to operate, and supports the input and output of multi-language text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113076715B_ABST
    Figure CN113076715B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for creating a text block in Allegro, the method comprising the following steps: S1: receiving a text type selected by a user and text input by the user through an operation interface of Allegro; S2: acquiring contour data of the text input by the user, and converting it into a closed path composed of a plurality of continuous points; S3: creating a shape object of the stroke of the text in Allegro based on the closed path. Through the present invention, a user can input a text block of any font and any character on the current computer, and generate a graphic element that can support later photolithography and silk-screen printing, with a friendly user interface and simple operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electronic circuit printed circuit board wiring design, and in particular relates to a method and system for creating a text block in Allegro. Background Art

[0002] At present, Cadence Allegro is mainly used in the wiring design of medium and large PCB boards. Such boards have relatively more wiring elements and often need to print identification text on the board. However, since the later photolithography program only recognizes lines and shapes, but not text, there are only simple line fonts in the early design, and it does not support the input of non-English text. Figure 1 As shown, only keyboard characters (English) can be input in the electronic circuit wiring tool Cadence Allegro, and text in other languages ​​is not supported. At the same time, the text fonts are limited to a few simple single-line fonts. Summary of the invention

[0003] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a method and system for creating text blocks in Allegro. Using the method of the present invention, a user can input a text block of any font and any character on the current computer to generate graphic elements that can support later photolithography and silk-screen printing. The user interface is user-friendly and easy to operate.

[0004] According to one aspect of the present invention, the present invention provides a method for creating a text block in Allegro, the method comprising the following steps:

[0005] S1: receiving the text type selected by the user and the text input by the user through the Allegro operation interface;

[0006] S2: Obtaining the outline data of the text input by the user, and converting it into a closed path composed of multiple continuous points;

[0007] S3: Creating a shape object of the strokes of the text in Allegro based on the closed path.

[0008] Preferably, the text includes Windows TrueType fonts, and the created text has two stroke shape object modes: outline and fill.

[0009] Preferably, the step of obtaining the outline data of the text input by the user includes:

[0010] The application device description object CDC in the C++ Microsoft Foundation Class MFC is used, the TextOut function is used to output the text according to the font and text size selected by the user, and the outline data of the text is obtained through the GetPath function.

[0011] Preferably, the step of creating a shape object of the stroke of the text in Allegro based on the closed path includes:

[0012] After obtaining the outline data of the text through the MFC, it is returned to Allegro, and the Allegro path object is created in Allegro using the skill's axlPathStart, axlPathLine, and axlDBCreatePath functions, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

[0013] According to another aspect of the present invention, the present invention also provides a system for creating a text block in Allegro, the system comprising:

[0014] A receiving module, used for receiving the text type selected by the user and the text input by the user through the Allegro operation interface;

[0015] An acquisition module, used for acquiring the outline data of the text input by the user, and converting it into a closed path composed of a plurality of continuous points;

[0016] A creation module is used to create a shape object of the stroke of the text in Allegro based on the closed path.

[0017] Preferably, the text includes Windows TrueType fonts, and the created text has two stroke shape object modes: outline and fill.

[0018] Preferably, the step of obtaining the outline data of the text input by the user includes:

[0019] The application device description object CDC in the C++ Microsoft Foundation Class MFC is used, the TextOut function is used to output the text according to the font and text size selected by the user, and the outline data of the text is obtained through the GetPath function.

[0020] Preferably, the step of creating a shape object of the stroke of the text in Allegro based on the closed path includes:

[0021] After obtaining the outline data of the text through the MFC, it is returned to Allegro, and the Allegro path object is created in Allegro using the skill's axlPathStart, axlPathLine, and axlDBCreatePath functions, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

[0022] According to another aspect of the present invention, the present invention also provides a system for creating text blocks in Allegro, the system comprising: a processor, a memory, the memory storing computer executable instructions, and the computer executable instructions can implement the above method steps when executed by the processor.

[0023] According to another aspect of the present invention, the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions implement the above method steps when executed by a processor.

[0024] Beneficial effects: The present invention provides a user interface by embedding software in Allegro, so that users can input any text and any TrueType font, and provides two modes, outline and fill, to generate a full-fitting graphic of the text in Allegro, which can be output when the Gerber photolithography file is produced later, with a friendly user interface and simple operation.

[0025] The features and advantages of the present invention will become clear through reference to the following drawings and detailed description of specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of inputting English characters in Allgero in the prior art;

[0027] Figure 2 It is a schematic flow chart of a method for creating a text block in Allegro of the present invention;

[0028] Figure 3 is a schematic diagram of a user interface for text type selection and input in Allegro of the present invention;

[0029] Figure 4 It is a schematic diagram of the font outline in the window of the present invention;

[0030] Figure 5 It is a schematic diagram of generating a shape object through Allgero of the present invention;

[0031] Figure 6It is a schematic diagram of generating an outline-type text block in Allgero according to the present invention;

[0032] Figure 7 It is a schematic diagram of the system structure of creating a text block in Allegro of the present invention;

[0033] Figure 8 It is another schematic diagram of the system structure of creating a text block in Allegro according to the present invention. DETAILED DESCRIPTION

[0034] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0036] Example 1

[0037] Figure 2 1 is a flow chart of a method for creating a text block in Allegro according to the present invention. Figure 2 As shown, the present invention provides a method for creating a text block in Allegro, and the method comprises the following steps:

[0038] S1: receiving the text type selected by the user and the text input by the user through the Allegro operation interface;

[0039] like Figure 3 As shown, this embodiment embeds software in Allegro to provide a user interface for the user, through which the user can select the type of text to be input and the specific content of the text, and the user can input any text and any font.

[0040] S2: Obtaining the outline data of the text input by the user, and converting it into a closed path composed of multiple continuous points;

[0041] like Figure 4As shown, the text includes Windows TrueType fonts. The outlines of characters (or glyphs) in TrueType fonts are composed of straight lines and quadratic Bézier curve segments. These are mathematically easier to process than the cubic Bézier curves used in PostScript in the graphic design field (and also used by Type1 fonts).

[0042] The outline data is actually a series of closed boundary paths. For example, for the character "口", since the strokes have width, it includes two frame-shaped paths (Paths, one inside and one outside). Of course, the paths are different for different fonts. These paths are described by multiple consecutive point data, such as [(0,0)(20,0)(20,20)(0,20)(0,0)], which means starting from the coordinate (0,0), moving horizontally to (20,0), then to (20,20), then to (0,20), and finally back to (0,0), thus forming a closed frame-shaped path (Path).

[0043] S3: Create a shape object for the strokes of the text in the Allegro based on the closed path.

[0044] As Figure 5 shown, creating a shape object for the strokes of the text in the Allegro based on the closed path can be for English characters, or for fonts such as Chinese and Korean. The actual forms of these texts are shape objects and can be recognized by subsequent PCB programs and processes (photoetching and silk screening).

[0045] Preferably, the shape object for the strokes of the created text has two modes: outline and fill.

[0046] As Figure 6 shown, if the method of generating the shape object is the outline type, a hollowed-out text outline is generated.

[0047] Preferably, obtaining the outline data of the text input by the user includes:

[0048] Using the device context object CDC in the C++ Microsoft Foundation Classes MFC, and using the TextOut function to output the text according to the font and text size selected by the user, and obtaining the outline data of the text through the GetPath function.

[0049] Specifically, using the device description object CDC in C++MFC (Microsoft Foundation Classes), the path of any graphics drawing operation performed between the BeginPath and EndPath functions will be recorded, so between them, you only need to use the selected font and size to output text (through the TextOut function), and then get its outline data through the GetPath function. Among them, DC is a structure that contains the device: physical output device, such as a display, and device driver information. Under the Windows platform, all graphics operations are completed using DC. In C++, add the letter C before all classes, that is, CDC.

[0050] Preferably, the step of creating a shape object of the stroke of the text in Allegro based on the closed path includes:

[0051] After obtaining the outline data of the text through the MFC, it is returned to Allegro, and the Allegro path object is created in Allegro using the skill's axlPathStart, axlPathLine, and axlDBCreatePath functions, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

[0052] Specifically, SKILL is a secondary development language provided by Cadence Allegro. It is an interactive high-level programming language based on the general artificial intelligence language Lisp. Cadence provides Allegro with a wealth of skill graphics processing functions, including functions for creating Shapes based on given data. Enter skill in the command window of Allegro to run the skill script. In SKILL, you can load dll programs written in C++ through axlDllSym.

[0053] After obtaining the contour data through MFC, it is passed back to Allegro, and Allegro's path object is created in Allegro using the skill's axlPathStart, axlPathLine, axlDBCreatePath and other functions, and then the axlDBCreateShape function is used to create a Shape object with this Path as the boundary. These shapes can be recognized and processed by the silk screen program in subsequent processing.

[0054] This embodiment provides a user interface by embedding software in Allegro. Users can input any text and any TrueType font, and provide two modes: outline and fill. A fully fitted graphic of the text is generated in Allegro, which can be output when the Gerber photolithography file is produced later. The user interface is friendly and the operation is simple.

[0055] Example 2

[0056] Figure 7 Schematic diagram of the system structure of creating text blocks in Allegro according to the present invention. Figure 7 As shown, the present invention also provides a system for creating a text block in Allegro, the system comprising:

[0057] A receiving module, used for receiving the text type selected by the user and the text input by the user through the Allegro operation interface;

[0058] An acquisition module, used for acquiring the outline data of the text input by the user, and converting it into a closed path composed of a plurality of continuous points;

[0059] A creation module is used to create a shape object of the stroke of the text in Allegro based on the closed path.

[0060] Preferably, the text includes Windows TrueType fonts, and the created text has two stroke shape object modes: outline and fill.

[0061] Preferably, the step of obtaining the outline data of the text input by the user includes:

[0062] The application device description object CDC in the C++ Microsoft Foundation Class MFC is used, the TextOut function is used to output the text according to the font and text size selected by the user, and the outline data of the text is obtained through the GetPath function.

[0063] Preferably, the step of creating a shape object of the stroke of the text in Allegro based on the closed path includes:

[0064] After obtaining the outline data of the text through the MFC, it is returned to Allegro, and the Allegro path object is created in Allegro using the skill's axlPathStart, axlPathLine, and axlDBCreatePath functions, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

[0065] 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 will not be repeated here.

[0066] Example 3

[0067] Figure 8 1 is another schematic diagram of the system structure of creating a text block in Allegro according to the present invention. Figure 8 As shown, the present invention also provides another system for creating text blocks in Allegro, the system comprising: a processor, a memory, the memory storing computer executable instructions, the computer executable instructions implementing the method steps in Example 1 when executed by the processor, the specific implementation process can refer to the implementation process of the method steps in Example 1, which will not be repeated here.

[0068] Example 4

[0069] According to another aspect of the present invention, the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method steps in Example 1 are implemented. The specific implementation process can refer to the implementation process of the method steps in Example 1, and will not be repeated here.

[0070] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A method to create a text block in Allegro, It is characterized in that The method comprises the following steps: S1: receiving the text type selected by the user and the text input by the user through the Allegro operation interface; S2: Obtaining the outline data of the text input by the user, and converting it into a closed path composed of multiple continuous points; S3: creating a shape object of the strokes of the text in Allegro based on the closed path; The text includes Windows TrueType fonts, and the created text strokes have two shapes: outline and fill modes; and the obtaining of outline data of the text input by the user includes: Using the application device description object CDC in the C++ Microsoft Foundation Class MFC, using the TextOut function to output the text according to the font and text size selected by the user, and obtaining the outline data of the text through the GetPath function; creating the shape object of the stroke of the text in the Allegro based on the closed path, including: After obtaining the outline data of the text through the MFC, it is returned to Allegro, and the Allegro path object is created in Allegro using the skill's axlPathStart, axlPathLine, and axlDBCreatePath functions, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

2. A system for creating text blocks in Allegro, It is characterized in that The system comprises: A receiving module, used for receiving the text type selected by the user and the text input by the user through the Allegro operation interface; An acquisition module, used for acquiring the outline data of the text input by the user, and converting it into a closed path composed of a plurality of continuous points; A creation module is used to create a shape object of the stroke of the text in the Allegro based on the closed path; the text includes a Windows TrueType font, and the shape object of the stroke of the created text has two modes: outline and fill; the obtaining of the outline data of the text input by the user includes: Using the application device description object CDC in the C++ Microsoft Foundation Class MFC, the TextOut function is used to output the text according to the font and text size selected by the user, and the outline data of the text is obtained through the GetPath function; the shape object of the stroke of the text is created in the Allegro based on the closed path, including: after obtaining the outline data of the text through the MFC, it is transferred back to Allegro, and the axlPathStart, axlPathLine, and axlDBCreatePath functions of the skill are used to create an Allegro path object in Allegro, and the axlDBCreateShape function is used to create a Shape object with the Path object as the boundary.

3. A system for creating text blocks in Allegro, It is characterized in that The system comprises: a processor and a memory, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed by the processor, the method according to claim 1 is implemented.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method according to claim 1 is implemented.