Discutendo di altro, =E8 venuto fuori che sarebbe interessante realizzare un'esportazione degli schemini FidoCad in script Eagle. Riprendo il discorso qui, perch=E9 sia pi=F9 semplice da seguire. La cosa non dovrebbe essere troppo difficile da un mero punto di vista grafico, ma diventa pi=F9 ardua se si vuole lavorare a livello di componenti, perch=E9 il formato FidoCad =E8 un formato pi=F9 che altro grafico e non contiene informazioni relative ad una netlist. Ora, io sono all'ascolto di eventuali suggerimenti, prima di tutto su dove reperire informazioni sul formato usato da Eagle per i suoi script, di modo che possa rendermi conto se la cosa =E8 fattibile, oppure no.
Che ne pensate di questa possibilit=E0? Si potrebbe implementare un mero export grafico (e questo =E8 facile), per poi in seguito discutere del discorso netlist, interessante anche per quelli che utilizzano Spice.
Per l'esportazione della grafica e basta non penso sia tremendo fare un file di tipo .ulp che parsi il formato fidocad (oppure una funzione in fidocadj che generi il file .scr). L'unica cosa - da utente Eagle - e' che a me farebbe piu' comodo il contrario, cioe' da eagle a fidocad, in modo da potere postare sul newsgroup "pezzi" di circuiti senza doverli ridisegnare tutte le volte. Se trovo dei ritagli di tempo provo a vedere cosa si riesce a combinare.
FidoCadJ =E8 fatto in modo che le esportazioni in formati vettoriali sono molto semplici e lineari da implementare (basta in sostanza implementare un'interfaccia). Mi basta avere una descrizione dettagliata del formato da utilizzare e posso farlo in breve tempo. Ho Eagle installato, ma non lo uso spesso. Dove le trovo le descrizioni del formato di file da adottare?
Credo interessi a molte persone e avrebbe senso fare uno script di Eagle, se =E8 possibile.
In effetti ero stato troppo ottimista: è vero che basta richiamare un componente di una libreria apposita, ma poi da fidocad (io lo uso solo per gli schemi) non arriva il pakage. Però, visti i pochi componenti delle librerie FidoCad, forse si possono mettere tutti i package possibili (le bobine mi preoccupano un po') in quella Eagle, donde selezionarli in seguito.
Il problema delle netlist sono cavoli tuoi. Intanto puoi obbligare ad usare la grid. Per gli angoli è un problema gestibile, le connessioni a metà linea, beh, preferisco non pensarci.
L'esempio che ti ho mandato direi sia tutto ciò di cui hai bisogno.
Sarebbe già utile anche a me che, avendo due megaschermi, posso permettermi di avere visibili sia Eagle che FidoCad. Per gli altri, poter ricalcare un'immagine sarebbe ancor più utile.
Sinceramente, dopo tutto ciò che hai già fatto, pensandoci meglio, non mi sento di chiederti anche questo. :-)
Griglia o non griglia, non =E8 un gran problema riconoscere che due linee si incrociano con una connessione elettrica. Al limite, neppure il fare in modo che una linea in pi=F9 pezzi venga vista come un'unica connessione. Quello che mi preoccupa =E8 che non ci sono sufficienti informazioni nelle macro presenti in libreria (per adesso, sono solo un simbolo grafico). Bisognerebbe introdurre alcune cose: una primitiva "pin elettrico" per sapere dove si trovano gli ingressi e le uscite di ogni macro, delle informazioni sul modello di simulazione da utilizzare ed eventualmente la possibilit=E0 di legare un simbolo elettrico ad un footprint. Questa per=F2 =E8 una possibilit=E0 di evoluzione a lungo termin= e e non =E8 un lavoro trascurabile.
Quello che mi serve =E8 un comando o una tecnica che mi permetta di inserire:
- un segmento fra due punti di spessore e layer specificato
- un ovale pieno o vuoto
- un rettangolo pieno o vuoto
- un poligono pieno o vuoto
- una stringa di testo, in Courier
- una piazzola elettrica
- un tracciato di B=E9zier
- definire il sistema di coordinate
Quando ho le informazioni, =E8 uno scherzo fare un'esportazione.
Visto che gli script di Eagle non sono altro che un batch di comandi interattivi e che i pin dei componenti di libreria si appiccicano da soli ai wire, basta definire dei componenti con le stesse dimensioni ed i pin posizionati negli stessi punti in entrambe le librerie ed il gioco è fatto. Con l'accortezza, nella generazione del file, di posizionare i componenti
*prima* di "tirare" i fili, come nell'esempio. Anche le connessioni vengono tracciate automaticamente, usando come riferimento il nome della net.
Da notare che mi pare che i componenti di Fidocad siano sempre "centrati" su di un'estremità. La libreria di Eagle dovrà essere fatta nello stesso modo: in Eagle il "centro" è selezionabile a piacere, e generalmente viene messo... al centro, ma questo non è affatto obbligatorio.
sarà una stringa fissa (meglio se parametrizzabile tra le opzioni di FidoCadJ) che indicherà la libreria di Eagle per FidoCad.
Come desumibile dall'esempio, net [()()]; oppure, per linee varie, tipo cornici wire [()()];
La net o il wire verranno tracciati nel layer attualmente selezionato tramite il comando Layer ;
A cosa ti servono?
Le stringhe di testo che indicano valore del componente (il difficile è associarle al componente giusto) si definiscono con il comando Value ; Il nome del componente è quello definito dal comando add.
Sì, scusa, mi ero fatto prendere la mano. Forse è meglio rimanere sul grafico, anche se il riuscire a fare uno script di netlist sarebbe un importante primo passo per il collegamento con spice.
WIRE Function Adds wires (tracks) to a drawing. Syntax WIRE ['signal_name'] [width] ? ?.. WIRE ['signal_name'] [width] [ROUND | FLAT] ? [curve | @radius] ?.. Mouse keys Center selects the layer. Right changes the wire bend style (see SET Wire_Bend). Shift+Right reverses the direction of switching bend styles. Ctrl+Left when starting a wire snaps it to the next existing wire end point. Ctrl+Right toggles between corresponding bend styles. Ctrl+Left when placing a wire end point defines arc radius. See also MITER, SIGNAL, ROUTE, CHANGE, NET, BUS, DELETE, RIPUP, ARC The WIRE command is used to add wires (tracks) to a drawing. The wire begins at the first point specified and runs to the second. Additional points draw additional wire segments. Two mouse clicks at the same position finish the wire and a new one can be started at the position of the next mouse click. Depending on the currently active wire bend, one or two wire segments will be drawn between every two points. The wire bend defines the angle between the segments and can be changed with the right mouse button (holding the Shift key down while clicking the right mouse button reverses the direction in which the bend styles are gone through, and the Ctrl key makes it toggle between corresponding bend styles). Pressing the center mouse button brings up a popup menu from which you may select the layer into which the wire will be drawn. The special keywords ROUND and FLAT, as well as the curve parameter, can be used to draw an arc (see below). Starting a WIRE with the Ctrl key pressed snaps the starting point of the new wire to the coordinates of the closest existing wire. This is especially useful if the existing wire is off grid. It also adjusts the current width, layer and style to those of the existing wire. If the current bend style is 7 ("Freehand"), the new wire will form a smooth continuation of the existing wire. Signal name The signal_name parameter is intended mainly to be used in script files that read in generated data. If a signal_name is given, all subsequent wires will be added to that signal and no automatic checks will be performed. This feature should be used with great care because it could result in short circuits, if a wire is placed in a way that it would connect different signals. Please run a Design Rule Check after using the WIRE command with the signal_name parameter! Wire Width Entering a number after activating the WIRE command changes the width of the wire (in the present unit) which can be up to 0.51602 inch (13.1 mm). The wire width can be changed with the command CHANGE WIDTH width ? at any time. Wire Style Wires can have one of the following styles: Continuous LongDash ShortDash DashDot The wire style can be changed with the CHANGE command. Note that the DRC and Autorouter will always treat wires as "Continuous", even if their style is different. Wire styles are mainly for electrical and mechanical drawings and should not be used on signal layers. It is an explicit DRC error to use a non-continuous wire as part of a signal that is connected to any pad. Signals in Top, Bottom, and Route Layers Wires (tracks) in the layers Top, Bottom, and ROUTE2...15 are treated as signals. If you draw a wire in either of these layers starting from an existing signal, then all of the segments of this wire belong to that signal (only if the center of the wire is placed exactly onto the center of the existing wire or pad). If you finish this drawing operation with a wire segment connected to a different signal, then EAGLE will ask you if you want to connect the two signals. Note that EAGLE treats each wire segment as a single object (e.g. when deleting a wire). When the WIRE command is active the center mouse button can be used to change the layer on which the wire is drawn. Do not use the WIRE command for nets, buses, and airwires. See NET, BUS and SIGNAL. Drawing Arcs Wires and arcs are basically the same objects, so you can draw an arc either by using the ARC command, or by adding the necessary parameters to the WIRE command. To make a wire an arc it needs either the curve parameter, which defines the "curvature" of the arc, or the @radius parameter, which defines the radius of the arc (note the '@', which is necessary to be able to tell apart curve and radius). The valid range for curve is -360..+360, and its value means what part of a full circle the arc consists of. A value of 90, for instance, would result in a 90° arc, while 180 would give you a semicircle. The maximum value of
360 can only be reached theoretically, since this would mean that the arc consists of a full circle, which, because the start and end points have to lie on the circle, would have to have an infinitely large diameter. Positive values for curve mean that the arc is drawn in a mathematically positive sense (i.e. counterclockwise). If curve is 0, the arc is a straight line ("no curvature"), which is actually a wire. Note that in order to distinguish the curve parameter from the width parameter, it always has to be given with a sign ('+' or '-'), even if it is a positive value.
As an example, the command WIRE (0 0) +180 (0 10); would draw a semicircle from the point (0 0) to (0 10), in counterclockwise direction. If a radius is given, the arc will have that radius. Just like the curve parameter, radius also must have a sign in order to determine the arcs orientation. For example, the command WIRE (0 0) @+100 (0 200); would draw a semicircle from the point (0 0) to (0 200) (with a radius of
100), in counterclockwise direction. Note that if the end point is more than twice the radius away from the start point, a straight line will be drawn. The arc radius can also be defined by placing the wire end point with the Ctrl key pressed (typically at the center of the circle on which the arc shall lie). In that case the point is not taken as an actual end point, but is rather used to set the radius of an arc. You can then move the cursor around and place an arc with the given radius (the right mouse button together with Ctrl will toggle the arc's orientation). If you move the cursor more than twice the radius away from the start point, a straight line will be drawn. In order to be able to draw any arc with the WIRE command (which is especially important for generated script files), the keywords ROUND and FLAT are also allowed in the WIRE command. Note, though, that these apply only to actual arcs (straight wires always have round endings). By default, arcs created with the WIRE command have round endings.
LAYER Function Changes and defines layers. Syntax LAYER layer_number LAYER layer_name LAYER layer_number layer_name LAYER [??] -layer_number See also DISPLAY Choose Drawing Layer The LAYER command with one parameter is used to change the current layer, i.e. the layer onto which wires, circles etc. will be drawn. If LAYER is selected from the menu, a popup menu will appear in which you may change to the desired layer. If entered from the command line, 'layer_number' may be the number of any valid layer, and 'layer_name' may be the name of a layer as displayed in the popup menu. Certain layers are not available in all modes. Please note that only those signal layers (1 through 16) are available that have been entered into the layer setup in the Design Rules. Define Layers The LAYER command with two parameters is used to define a new layer or to rename an existing one. If you type in at the command prompt e.g. LAYER 101 SAMPLE; you define a new layer with layer number 101 and layer name SAMPLE. If a package contains layers not yet specified in the board, these layers are added to the board as soon as you place the package into the board (ADD or REPLACE). The predefined layers have a special function. You can change their names, but their functions (related with their number) remain the same. If you define your own layers, you should use only numbers greater than
100. Numbers below may be assigned for special purposes in later EAGLE versions. Delete Layers The LAYER command with the minus sign and a layer_number deletes the layer with the specified number, e.g. LAYER -103; deletes the layer number 103. Layers to be deleted must be empty. If this is not the case, the program generates the error message "layer is not empty: #" where "#" represents the layer number. If you want to avoid any error messages in a layer delete operation you can use the '??' option. This may be useful in scripts that try to delete certain layers, but don't consider it an error if any of these layers is not empty or not present at all. The predefined standard layers cannot be deleted. Supply Layers Layers 2...15 are treated as supply layers if their name starts with the '$' character and there is a signal with an identical name but without the leading '$'. Any pads or vias belonging to that signal are implicitly considered connected by the RATSNEST command and the Autorouter. Supply layers are viewed "inverted", which means that any objects visible on such a layer will result in "copper free" areas on the board. The program automatically generates Thermal and Annulus objects to connect and isolate pads and vias to/from these layers. You should not draw any additional objects into a supply layer, except, for instance, wires along the outlines of the board, which prevent the copper area from extending to the very edges and thus possibly causing short circuits through a metal casing or mounting screw. Note that there are no checks whether a supply layer really connects all pads and vias. If e. g. a user drawn object isolates a pad that should be connected to the supply layer, there will be no airwire generated for that (missing) connection. The same applies if several Annulus symbols form a "ring" around a Thermal symbol (and would thus completely isolate that pad from its signal). Also note that the size of the annulus symbols used in a supply layer is only derived from the value given under "Annulus" in the "Supply" tab of the Design Rules, and that neither the minimum distances under "Clearance" nor those in the net classes go into this calculation. For a safer and more flexible way of implementing supply layers you should use the POLYGON command. Predefined EAGLE Layers Layout
1 Top
Tracks, top side
2 Route2
Inner layer (signal or supply)
3 Route3
Inner layer (signal or supply)
4 Route4
Inner layer (signal or supply)
5 Route5
Inner layer (signal or supply)
6 Route6
Inner layer (signal or supply)
7 Route7
Inner layer (signal or supply)
8 Route8
Inner layer (signal or supply)
9 Route9
Inner layer (signal or supply)
10 Route10
Inner layer (signal or supply)
11 Route11
Inner layer (signal or supply)
12 Route12
Inner layer (signal or supply)
13 Route13
Inner layer (signal or supply)
14 Route14
Inner layer (signal or supply)
15 Route15
Inner layer (signal or supply)
16 Bottom
Tracks, bottom side
17 Pads
Pads (through-hole)
18 Vias
Vias (through-hole)
19 Unrouted
Airwires (rubberbands)
20 Dimension
Board outlines (circles for holes)
21 tPlace
Silk screen, top side
22 bPlace
Silk screen, bottom side
23 tOrigins
Origins, top side
24 bOrigins
Origins, bottom side
25 tNames
Service print, top side
26 bNames
Service print, bottom side
27 tValues
Component VALUE, top side
28 bValues
Component VALUE, bottom side
29 tStop
Solder stop mask, top side
30 bStop
Solder stop mask, bottom side
31 tCream
Solder cream, top side
32 bCream
Solder cream, bottom side
33 tFinish
Finish, top side
34 bFinish
Finish, bottom side
35 tGlue
Glue mask, top side
36 bGlue
Glue mask, bottom side
37 tTest
Test and adjustment inf., top side
38 bTest
Test and adjustment inf. bottom side
39 tKeepout
Nogo areas for components, top side
40 bKeepout
Nogo areas for components, bottom side
41 tRestrict
Nogo areas for tracks, top side
42 bRestrict
Nogo areas for tracks, bottom side
43 vRestrict
Nogo areas for via-holes
44 Drills
Conducting through-holes
45 Holes
Non-conducting holes
46 Milling
Milling
47 Measures
Measures
48 Document
General documentation
49 Reference
Reference marks
51 tDocu
Part documentation, top side
52 bDocu
Part documentation, bottom side
Schematic
91 Nets
Nets
92 Busses
Buses
93 Pins
Connection points for component symbols
with additional information
94 Symbols
Shapes of component symbols
95 Names
Names of component symbols
96 Values
Values/component types
97 Info
General information
98 Guide
Guide lines
CIRCLE Function Adds circles to a drawing. Syntax CIRCLE ? ?.. [center, circumference] CIRCLE width ? ?.. Mouse keys Center selects the layer. See also CHANGE, WIRE The CIRCLE command is used to create circles. Circles in the layers tRestrict, bRestrict, and vRestrict define restricted areas. They should be defined with a width of 0. The width parameter defines the width of the circle's circumference and is the same parameter as used in the WIRE command. The width can be changed with the command: CHANGE WIDTH width; where width is the desired value in the current unit. A circle defined with a width of 0 will be filled. Example GRID inch 1; CIRCLE (0 0) (1 0); generates a circle with a radius of 1 inch and the center at the origin.
RECT Function Adds rectangles to a drawing. Syntax RECT [orientation] ? ?.. Mouse keys Center selects the layer. See also CIRCLE The RECT command is used to add rectangles to a drawing. The two points define two opposite corners of the rectangle. Pressing the center mouse button changes the layer to which the rectangle is to be added. The orientation (see description in ADD) may be any angle in the range R0...R359.9. The S and M flags can't be used here. Note that the coordinates are always defined at an orientation of R0. The possibility of entering an orientation in the RECT command is mainly for use in scripts, where the rectangle data may have been derived through a User Language Program from the UL_RECTANGLE object. When entering a non-zero orientation interactively, the corners of the rectangle may not appear at the actual cursor position. Use the ROTATE command to interactively rotate a rectangle. Not Part of Signals Rectangles in the signal layers Top, Bottom, or Route2...15 don't belong to signals. Therefore the DRC reports errors if they overlap with wires, pads etc. Restricted Areas If used in the layers tRestrict, bRestrict, or vRestrict, the RECT command defines restricted areas for the Autorouter.
Function Draws polygon areas. Syntax POLYGON [signal_name] [width] ? [curve | @radius] ? ?.. Mouse keys Center selects the layer. Right changes the wire bend style (see SET Wire_Bend). Shift+Right reverses the direction of switching bend styles. Ctrl+Right toggles between corresponding bend styles. Ctrl+Left when placing a wire end point defines arc radius. Left twice at the same point closes the polygon. See also CHANGE, DELETE, RATSNEST, RIPUP, WIRE, MITER The POLYGON command is used to draw polygon areas. Polygons in the layers Top, Bottom, and Route2..15 are treated as signals. Polygons in the layers t/b/vRestrict are protected areas for the Autorouter. If the curve or @radius parameter is given, an arc can be drawn as part of the polygon definition (see the detailed description in the WIRE command). Note You should avoid using very small values for the width of a polygon, because this can cause extremely large amounts of data when processing a drawing with the CAM Processor. The polygon width should always be larger than the hardware resolution of the output device. For example when using a Gerber photoplotter with a typical resolution of 1 mil, the polygon width should not be smaller than, say, 6 mil. Typically you should keep the polygon width in the same range as your other wires. If you want to give the polygon a name that starts with a digit (as in 0V), you must enclose the name in single quotes to distinguish it from a width value. The parameters Isolate and Rank only have a meaning for polygons in layers Top...Bottom. Outlines or Real Mode Polygons belonging to a signal can be displayed in two different modes:
Outlines
only the outlines as defined by the user are displayed.
Real mode
all of the areas are visible as calculated by the program.
In "outlines" mode a polygon is drawn with dotted wires, so that it can be distinguished from other wires. The board file contains only the "outlines". The default display mode is "outlines" as the calculation is a time consuming operation. When a drawing is generated with the CAM Processor all polygons are calculated. The RATSNEST command starts the calculation of the polygons (this can be turned off with SET POLYGON_RATSNEST OFF;). Clicking the STOP button terminates the calculation of the polygons. Already calculated polygons are shown in "real mode", all others are shown in "outline mode". The RIPUP command changes the display mode of a polygon to "outline". CHANGE operations re-calculate a polygon if it was shown in "real mode" before. Other commands and Polygons Polygons are selected at their edges (like wires). SPLIT: Inserts a new polygon edge. DELETE: Deletes a polygon corner (if only three corners are left the whole polygon is deleted). CHANGE LAYER: Changes the layer of the whole polygon. CHANGE WIDTH: Changes the parameter width of the whole polygon. MOVE: Moves a polygon edge or corner (like wire segments). COPY: Copies the whole polygon. NAME: If the polygon is located in a signal layer the name of the signal is changed. Parameters Width Line width of the polygon edges. Also used for filling. Layer Polygons can be drawn into any layer. Polygons in signal layers belong to a signal and keep the distance defined in the design rules and net classes from other signals. Objects in the tRestrict layer are substracted from polygons in the Top layer (the same applies to bRestrict/Bottom). This allows you, for instance, to generate "negative" text on a ground area. Pour Fill mode (Solid [default] or Hatch). Rank Defines how polygons are subtracted from each other. Polygons with a lower 'rank' appear "first" and thus get subtracted from polygons with a higher 'rank'. Valid ranks are 1..6 for signal polygons and 0 or 7 for polygons in packages. Polygons with the same rank are checked against each other by the Design Rule Check. The rank parameter only has a meaning for polygons in signal layers (1..16) and will be ignored for polygons in other layers. The default is 1 for signal polygons and 7 for package polygons. Thermals Defines how pads and smds are connected (On = thermals are generated [default], Off = no thermals). Spacing Distance between fill lines when Pour = Hatch (default: 50 Mil). Isolate Distance between polygon areas and other signals or objects in the Dimension layer (default: 0). If a particular polygon is given an Isolate value that exceeds that from the design rules and net classes, the larger value will be taken. See also Design Rules under Distance and Supply, respectively. Orphans As a polygon automatically keeps a certain distance to other signals it can happen that the polygon is separated into a number of smaller polygons. If such a polygon has no electrical connection to any other (non-polygon) object of its signal, the user might want it to disappear. With the parameter Orphans = Off [default] these isolated zones will disappear. With Orphans = On they will remain. If a signal consists only of polygons and has no other electrically connected objects, all polygon parts will remain, independent of the setting of the Orphans parameter. Under certain circumstances, especially with Orphans = Off, a polygon can disappear completely. In that case the polygon's original outlines will be displayed on the screen, to make it possible to delete or otherwise modify it. When going to the printer or CAM Processor these outlines will not be drawn in order to avoid short circuits. A polygon is also displayed with its original outlines if there are other non-polygon objects in the signal, but none of them is connected to the polygon. Thermal dimensions The width of the conducting path in the thermal symbol is calculated as follows: Pads: half the drill diameter of the pad Smds: half the smaller side of the smd at least the width of the polygon a maximum of twice the width of the polygon Outlines data The special signal name _OUTLINES_ gives a polygon certain properties that are used to generate outlines data (for example for milling prototype boards). This name should not be used otherwise. Hatched polygons and airwires Depending on the value of the spacing parameter, pads, smds, vias and wires inside a hatched polygon that are connected to the same signal as the polygon may "fall through" the raster and thus have airwires generated to indicate their connection to the signal. When calculating whether such an object is actually solidly connected to the hatched polygon, it is reduced to several "control points". For a round pad, for instance, these would be the north, east, west and south point on the pad's circumference, while for a wire it's the two end points. A solid connection is considered to exist if there is at least one line in the calculated polygon (outline or hatch line) that runs through these points with its center line. Thermal and annulus rings inside a hatched polygon that do not have solid contact to any of the polygon lines are not generated.
TEXT Function Adds text to a drawing. Syntax TEXT any_text orientation ?.. TEXT 'any_text' orientation ?.. Mouse keys Center selects the layer. Right rotates the text. See also CHANGE, MOVE, MIRROR, PIN, ROTATE, ATTRIBUTE The TEXT command is used to add text to a library element or drawing. When entering several texts it is not necessary to invoke the command each time, as the text command remains active after placing text with the mouse. Orientation The orientation of the text may be defined by the TEXT command (orientation) using the usual definitions as listed in the ADD command (R0, R90 etc.). The right mouse button will change the rotation of the text and the center mouse button will change the current layer. Text is always displayed so that it can be read from in front or from the right - even if rotated. Therefore after every two rotations it appears the same way, but the origin has moved from the lower left to the upper right corner. Remember this if a text appears to be unselectable. If you want to have text that is printed "upside down", you can set the "Spin" flag for that text. Special Characters If the text contains several successive blanks or a semicolon, the whole string has to be enclosed in single quotes. If the text contains single quotes then each one itself has to be enclosed in single quotes. If apostrophes are required in the text, each must be enclosed in single quotes. Key Words If the TEXT command is active and you want to type in a text that contains a string that can be mistaken for a command (e.g. "red" for "REDO") then this string has to be enclosed in single quotes. Text Height The height of characters and the line width can be changed with the CHANGE commands: CHANGE SIZE text_size ?.. CHANGE RATIO ratio ?.. Maximum text height: 2 inches Maximum line width: 0.51602 inch (13.1 mm) Ratio: 0...31 (% of text height). Text Font Texts can have three different fonts: Vector
the program's internal vector font Proportional
a proportional pixel font (usually 'Helvetica') Fixed
a monospaced pixel font (usually 'Courier')
The text font can be changed with the CHANGE command: CHANGE FONT VECTOR|PROPORTIONAL|FIXED ?.. The program makes great efforts to output texts with fonts other than Vector as good as possible. However, since the actual font is drawn by the system's graphics interface, Proportional and Fixed fonts may be output with different sizes and/or lengths. If you set the option "Always vector font" in the user interface dialog, all texts will always be displayed and printed using the builtin vector font. This option is useful if the system doesn't display the other fonts correctly. When creating a new board or schematic, the current setting of this option is stored in the drawing file. This makes sure that the drawing will be printed with the correct setting if it is transferred to somebody else who has a different setting of this option. You can use the SET VECTOR_FONT OFF|ON command to change the setting in an existing board or schematic drawing. When creating output files with the CAM Processor, texts will always be drawn with Vector font. Other fonts are not supported. If a text with a font other than Vector is subtracted from a signal polygon, only the surrounding rectangle is subtracted. Due to the above mentioned possible size/length problems, the actually printed font may exceed that rectangle. Therefore, if you need to subtract a text from a signal polygon it is recommended that you use the Vector font. The Ratio parameter has no meaning for texts with fonts other than Vector. Character Sets Only the characters with ASCII codes below 128 are guaranteed to be printed correctly. Any characters above this may be system dependent and may yield different results with the various fonts. Text Variables Special texts in a symbol or package drawing, marked with the '>' character, will be replaced with actual values in a board or schematic:
Component name (ev.+gate name) 1)
Comp. value/type 1)
Component name 2)
Gate name 2)
Part cross-reference 2)
Contact cross-reference 2)
Drawing name
Time of the last modification
Time of the plot creation
Sheet number of schematic 3)
1) Only for package or symbol
2) Only for symbol
3) Only for symbol or schematic The format in which a part cross-reference is displayed can be controlled through the "Xref part format" string, which is defined in the "Options/Set/Misc" dialog, or with the SET command. The following placeholders are defined, and can be used in any order:
%S
the sheet number %C
the column on the sheet %R
the row on the sheet
The default format string is "/%S.%C%R". Apart from the defined placeholders you can also use any other ASCII characters. Attributes If a symbol or pakage drawing shall display an attribute of the actual part or element, a text with the name of that attribute, marked with the '>' character, can be used. By default, only the actual value of the given attribute will be displayed. If the attribute name is followed by one of the special characters '=', '~' or '!', the actual display is as follows:
123
ABC = 123
ABC
nothing
Overlined text Text can be overlined, which is useful for instance for the names of inverted signals ("active low", see also NET, BUS and PIN). To do so, the text needs to be preceded with an exclamation mark ('!'), as in !RESET which would result in _____ RESET This is not limited to signal names, but can be used in any text. It is also possible to overline only part of a text, as in !RST!/NMI R/!W which would result in ___ RST/NMI _ R/W Note that the second exclamation mark indicates the end of the overline. There can be any number of overlines in a text. If a text shall contain an exclamation mark that doesn't generate an overline, it needs to be escaped by a backslash. In order to keep the need for escaping exclamation marks at a minimum, an exclamation mark doesn't start an overline if it is the last character of a text, or if it is immediately followed by a blank, another exclamation mark, a double or single quote, or by a right parenthesis, bracket or brace. Any non-escaped exclamation mark or comma that appears after an exclamation mark that started an overline will end the overline (the comma as an overline terminator is necessary for busses).
VIA Function Adds vias to a board. Syntax VIA ['signal_name'] [diameter] [shape] [layers] [flags] ?.. See also SMD, CHANGE, DISPLAY, SET, PAD, Design Rules When the VIA command is active, a via symbol is attached to the cursor. Pressing the left mouse button places a via at the current position. The via is added to a signal if it is placed on an existing signal wire. If you try to connect different signals, EAGLE will ask you if you really want to connect them. Signal name The signal_name parameter is intended mainly to be used in script files that read in generated data. If a signal_name is given, all subsequent vias will be added to that signal, and no automatic checks will be performed. This feature should be used with great care because it could result in short circuits, if a via is placed in a way that it would connect wires belonging to different signals. Please run a Design Rule Check after using the VIA command with the signal_name parameter! Via diameter Entering a number changes the diameter of the via (in the actual unit) and the value remains in use for further vias. Via diameters can be up to
0.51602 inch (13.1 mm). The drill diameter of the via is the same as the diameter set for pads. It can be changed with CHANGE DRILL diameter ? Shape A via can have one of the following shapes: Square Round Octagon These shapes only apply to the outer layers (Top and Bottom). In inner layers the shape is always "round". Vias generate drill symbols in the Drills layer and the solder stop mask in the tStop/bStop layers. Like the diameter, the via shape can be entered while the VIA command is active, or it can be changed with the CHANGE command. The shape then remains valid for the next vias and pads. Note that the actual shape and diameter of a via will be determined by the Design Rules of the board the via is used in. Layers The layers parameter defines the layers this via shall cover. The syntax is from-to, where 'from' and 'to' are the layer numbers that shall be covered. For instance 2-7 would create a via that goes from layer 2 to layer 7 (7-2 would have the same meaning). If that exact via is not available in the layer setup of the Design Rules, the next longer via will be used (or an error message will be issued in case no such via can be set). Flags The following flags can be used to control the appearance of a via:
STOP
always generate solder stop mask
By default a via with a drill diameter that is less than or equal to the value of the Design Rules parameter "Masks/Limit" will not have a solder stop mask. The above STOP flag can be used to force a solder stop mask for a via.
Vedi wire.
GRID Function Defines grid. Syntax GRID option..; GRID; Keyboard F6: GRID; turns the grid on or off. See also SCRIPT The GRID command is used to specify the grid and the current unit. Given without an option, this command switches between GRID ON and GRID OFF. The following options exist:
GRID ON;
Displays the grid on the screen GRID OFF;
Turns off displayed grid GRID DOTS;
Displays the grid as dots GRID LINES;
Displays the grid as solid lines GRID MIC;
Sets the grid units to micron GRID MM;
Sets the grid units to mm GRID MIL;
Sets the grid units to mil GRID INCH;
Sets the grid units to inch GRID FINEST;
Sets the grid to 0.1 micron GRID grid_size;
Defines the distance between
the grid points in the actual unit GRID LAST;
Sets grid to the most recently
used values GRID DEFAULT;
Sets grid to the standard values GRID grid_size grid_multiple;
grid_size = grid distance
grid_multiple = grid factor GRID ALT ...;
Defines the alternate grid
Examples Grid mm; Set Diameter_Menu 1.0 1.27 2.54 5.08; Grid Last; In this case you can change back to the last grid definition although you don't know what the definition looked like. GRID mm 1 10; for instance specifies that the distance between the grid points is 1 mm and that every 10th grid line will be displayed. Note: The first number in the GRID command always represents the grid distance, the second - if existing - represents the grid multiple. The GRID command may contain multiple parameters: GRID inch 0.05 mm; In this case the grid distance is first defined as 0.05 inch. Then the coordinates of the cursor are chosen to be displayed in mm. GRID DEFAULT; Sets grid to the standard value for the current drawing type. GRID mil 50 lines on alt mm 1 mil; Defines a 50 mil grid displayed as lines, and sets the alternate grid size to 1 mm, but displays it in mil. Pressing the Alt key switches to the alternate Grid. This can typically be a finer grid than the normal one, which allows you to quickly do some fine positioning in a dense area, for instance, where the normal grid might be too coarse. The alternate grid remains active as long as the Alt key is held pressed down. Parameter Aliases Parameter aliases can be used to define certain parameter settings to the GRID command, which can later be referenced by a given name. The aliases can also be accessed by clicking on the GRID button and holding the mouse button pressed until the list pops up. A right click on the button also pops up the list. The syntax to handle these aliases is: GRID = name parameters Defines the alias with the given name to expand to the given parameters. The name may consist of any number of letters, digits and underlines, and is treated case insensitive. It must begin with a letter or underline and may not be one of the option keywords. GRID = name @ Defines the alias with the given name to expand to the current parameter settings of the command. GRID = ? Asks the user to enter a name for defining an alias for the current parameter settings of the command. GRID = name Opens the GRID dialog and allows the user to adjust the grid parameters and define an alias for them under the given name. GRID = name; Deletes the alias with the given name. GRID name Expands the alias with the given name and executes the GRID command with the resulting set of parameters. The name may be abbreviated and there may be other parameters before and after the alias (even other aliases). Note that in case name is an abbreviation, aliases have precedence over other parameter names of the command. Example: GRID = MyGrid inch 0.1 lines on Defines the alias "MyGrid" which, when used as in GRID myg will change the current grid to the given settings. Note the abbreviated use of the alias and the case insensitivity.
JUNCTION Function Places a dot at intersecting nets. Syntax JUNCTION ¡E.. See also NET This command is used to draw a connection dot at the intersection of nets which are to be connected to each other. Junction points may be placed only on a net. If placed on the intersection of different nets, the user is given the option to connect the nets. If a net wire is placed at a point where there are at least two other net wires and/or pins, a junction will automatically be placed. This function can be disabled with "SET AUTO_JUNCTION OFF;", or by unchecking "Options/Set/Misc/Auto set junction". On the screen junction points are displayed at least with a diameter of five pixels.
SET Function Alters system parameters Syntax SET SET options;
[...]
SET WIRE_BEND bend_nr;
bend_nr can be one of:
0: Starting point - horizontal - vertical - end
1: Starting point - horizontal - 45¢X - end
2: Starting point - end (straight connection)
3: Starting point - 45¢X - horizontal - end
4: Starting point - vertical - horizontal - end
5: Starting point - arc - horizontal - end
6: Starting point - horizontal - arc - end
7: "Freehand" (arc that fits to wire at start, straight otherwise)
Note that 0, 1, 3 and 4 may contain additional miter wires (see MITER).
SET WIRE_BEND @ bend_nr ...;
Defines the bend angles that shall be actually used when switching with the right mouse button.
Vedo che i componenti sono dichiarati con MC e che, con FidoCadJ, è possibile modificare i primi tre parametri (X, Y e rotazione). Ne desumo che il quarto sia l'indirizzo della macro-componente nel database.
Vedo che FidoCadJ si mangia indisturbato anche un testo come quello sottoriportato, dove pippo e pluto potrebbero essere nome e valore del componente, cosa assai comoda quando si spostano i componenti ed ancor di più per compilare netlist.
Qualcuno può provare a vedere se FidoCad fa lo stesso o se s'arrabbia?
[FIDOCAD] MC 40 60 0 0 400 MC 85 65 0 0 210 MC 100 80 0 0 320 pippo pluto MC 90 100 0 0 430 "pippo" "pluto"
Per la compatibilità si potrebbe trasformare gli attributi del componente in text, generando il solito file che inizia con "[FIDOCAD]" o lasciarli in questo formato, anteponendo "[FIDOCADJ]".
Puoi trovare una descrizione di tutto quello che so sul formato FidoCad in fondo al manuale che ho scritto. L'ultimo elemento sulla linea =E8 il nome della macro, preceduto dal nome del file della libreria e separato da un punto. Esempio: pippo.pluto indica la macro pluto nel file di libreria pippo. FidoCadJ ignora tutto quanto segue, quindi effettivamente potrebbe essere usato per associare un testo al componente. I componenti della libreria standard (e solo quelli) non hanno il prefisso.
Per quanto riguarda l'esportazione in Eagle, sto dando un'occhiata. In effetti, forse la cosa pi=F9 semplice sarebbe esportare tutte le linee come wire ed in seguito tutte le macro con un nome di un componente in una libreria compatibile. Se hai voglia di provare a fare qualcosa, ti consiglierei di utilizzare come nome di ogni componente lo stesso codice utilizzato in FidoCad. Questo viene mostrato tra l'altro nella lista dei componenti sulla destra (per esempio, il codice di un fotodiodo =E8 240). Se non fosse possibile utilizzare un codice esclusivamente numerico, magari basta aggiungere un prefisso, che so: fidocad_240. Dato il modo di funzionare di Eagle e di FidoCadJ, mi sto chiedendo se non fosse pi=F9 opportuno fare cos=EC (eventualmente, facendo qualcosa anche per i PCB in un secondo momento), e non fare un'esportazione grafica, ignorando le altre primitive.
Ehehehe, la parte più ingrata del lavoro, così spesso ignorata dagli utenti...
Meglio se due testi, uno per il nome (R1, R2...) ed uno per il valore (1K,
100K...) dei componenti. Eagle non vuole spazi nei primi, ma li accetta nei secondi. Con blank nel formato interno FidocadJ ci se la può quindi cavare senza virgolette.
Questo sarebbe il caso di specificarlo alla fine del punto 3.3 del manuale (gotcha!)
Non ci metto la mano sul fuoco, ma, come dicevo, credo proprio che si debba fare il contrario: prima i componenti, poi le net.
Questo è fuor di dubbio. La grid di default dello schematics editor di Eagle è di 0,1 inch (quale senso abbia il riferimento ad una dimensione fisica mi sfugge...), insomma dovresti aggiungere un punto prima dell'ultima cifra delle coordinate FidoCadJ.
In che ordine vengono presentati i componenti nel menù? In quello in cui sono dichiarati nel file macro? Dove posso trovare la libreria standard fidocad, così rinomino *la descrizione* di alcuni componenti, che è fatta veramente coi piedi e, se la risposta alla domanda precedente è affermativa, li metto in un ordine più umano?
La libreria standard di FidoCadJ è nel .jar stesso? Ne puoi fornire una versione senza, se così carica più alla svelta?
No, vedo che esiste il device 7400 (il mitico quad nand).
Ti ho spaventato con il mio post da 900 righe? Era ciò che volevo... ;-)
Per i PCB lascerei perdere, dato che le piste dello stampato e le net dello schema su Eagle devono avere lo stesso nome, per fare ciò dovresti scrivere tutto un altro programma...
Eh, gi=E0, ma qualcuno doveva pur farla. Adesso, sto anche traducendo il manuale in francese...
(1K,
ei
Se il testo fosse alla riga seguente, FidoCad si pianta?
e
Lo aggiunger=F2 di sicuro.
ba
Far=F2 qualche prova in merito.
Quello non =E8 un problema.
i
Boh? Probabile :-) In realt=E0, la situazione era peggiore prima della versione 0.20.5b.
atta
Basta che scarichi la libreria standard fornita sul sito, la modifichi come vuoi, la metti in una directory qualunque e poi specifichi questa directory a FidoCadJ. Vedi la sezione 2.8 del manuale.
Non cambierebbe quasi nulla. Il tempo di caricamento =E8 quello della JVM.
)
Questo si chiama flooding. E comunque no, non mi hai spaventato :-) Sono abituato alle 21k righe in Java di FidoCadJ.
Allora, ho avuto un po' di tempo, ed ho cercato di fare qualcosa di molto molto rudimentale, ma che dovrebbe bastare a permettere di realizzare qualche prova a chi fosse interessato.
Ho messo a disposizione alla solita pagina una versione preliminare di FidoCadJ 0.20.6. A parte la correzione di un errore nella libreria standard di FidoCad (i simboli del JFET avevevano la polarit=E0 invertita), =E8 a disposizione una versione embrionale dell'esportazione di uno script in Eagle (guardate l'ultima linea nella tabella).
formatting link
I soli elementi che sono esportati in maniera pi=F9 o meno funzionante sono le linee, le connessioni elettriche e le macro. Per il resto, c'=E8 un abbozzo non testato, oppure un warning che viene scritto nello script.
Facciamo un esempio con il file seguente (il bel lampeggiatore a LED proposto da Piccio tempo fa su questo NG, a cui ho tolto tutte le scritte):
[FIDOCAD] MC 70 105 0 1 280 MC 70 55 0 1 290 MC 55 75 0 0 115 MC 115 75 0 0 115 MC 100 55 1 0 115 MC 75 75 0 0 115 MC 90 105 1 0 180 MC 100 105 3 0 180 MC 120 105 0 0 280 MC 150 50 0 0 115 LI 55 65 55 75 0 LI 55 85 55 95 0 LI 75 85 75 105 0 LI 70 105 80 105 0 LI 110 105 120 105 0 LI 115 85 115 105 0 LI 70 55 90 55 0 LI 100 55 105 55 0 LI 105 55 135 55 0 LI 135 55 135 95 0 LI 115 105 115 130 0 LI 115 130 150 130 0 LI 55 45 55 40 0 LI 55 40 150 40 0 LI 150 40 150 50 0 LI 90 105 90 90 0 LI 90 90 135 90 0 LI 100 105 100 130 0 LI 100 130 40 130 0 LI 40 130 40 90 0 LI 40 90 55 90 0 LI 75 75 75 40 0 LI 115 75 115 40 0 LI 55 115 55 120 0 LI 55 120 135 120 0 LI 135 120 135 115 0 SA 55 90 0 SA 75 105 0 SA 75 40 0 SA 115 40 0 SA 115 105 0 SA 135 90 0 LI 150 130 150 95 0 MC 150 80 1 0 220 LI 150 60 150 80 0 LI 150 40 155 40 0 LI 155 40 190 40 0 LI 190 40 190 75 0 LI 135 120 190 120 0 LI 190 120 190 95 0 SA 150 40 0 SA 135 120 0 MC 190 75 0 0 450
Lo script prodotto come risultato =E8 il seguente:
Qualche nota sull'esportazione: i fili dovrebbero essere esportati correttamente, cos=EC come le connessioni. Quello che manca adesso =E8 la presenza di una libreria Eagle compatibile con FidoCadJ. Nell'esecuzione dello script, Eagle si lamenta difatti del fatto che non sa come trattare i componenti che lo script cerca di introdurre. Il nome che ho scelto per la libreria (comunque modificabile facilmente, per adesso solo nel codice) =E8 FidoCadJLIB. Non ho idea se questa sia una scelta ragionevole, ditemi voi, cos=EC che non sono sicuro che le orientazioni siano corrette. Tutte le informazioni relative ai layer (utili soprattutto per i PCB) sono ignorate durante l'esportazione. Non so se l'ordine di introduzione dei componenti sia quello corretto. Per adesso, mi viene comodo rispettare quello con cui gli elementi sono in memoria. Se si mostrer=E0 necessario introdurre i componenti prima dei fili, lo modificher=F2 in seguito.
Bon, che ne pensi allora del primo embrione del filtro di esportazione? Pu=F2 costituire una base per lavorare su una libreria compatibile? Se serve, posso fare in modo che i componenti vengano messi tutti all'inizio (ma riflettendoci, mi pare piuttosto bislacca come limitazione di Eagle).
ma ho solo debuggato (ovvero allungato i terminali e spostato il punto di ancoraggio per farli corrispondere allo schema) i simboli dello schema di piccio, più, credo, le alimentazioni (non provate).
Hou usato quel nome, anche se penso che FidoCadJ basti e avanzi. l'estensione è .lbr, e va messa nella omonima sottodirectory di Eagle.
Pare di sì, visto che, salvo problemi di griglia, si "appiccicano". La prova la puoi fare, molto semplicemente, usando il comando MOVE (la quinta icona dall'alto del menù laterale) per vedere se, spostando il componente (ricorda che il punto di ancoraggio è quello balzano di FidoCad, ovvero l'estremo di un pin) si porta dietro anche le net.
Resto in attesa delle modifiche (spazio dopo R, eventuale M prima di R e griglia con un solo decimale), poi completo la libreria.
Grazie! Ad ogni modo, ho corretto alcuni errori che hai rilevato nella versione alfa attuale presente sul sito. Meno quello sulla griglia con un solo decimale, che non ho ben capito a cosa si riferisca.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.