ModEdit: editing modules PCBNEW

Headings:

11 - ModEdit: editing modules
11.1 - Overview.
11.2 - Module elements.
11.2.1 - Pads.
11.2.2 - Contours.
11.2.3 - Fields.
11.3 - Starting ModEdit and selecting a module to edit.
11.4 - Module Editor Toolbars:
11.4.1 - Righthand Toolbar - editing
11.4.2 - Lefthand Toolbar – display options
11.5 - Context Menus.
11.6 - The Module Properties dialog.
11.7 - Creating a new module.
11.8 - Adding and editing pads.
11.8.1 - Adding a pad.
11.8.2 - Setting pad properties.
11.9 - Information about automatic placement for a module.
11.10 - Attributes.
11.11 - Documenting modules in a library.
11.12 - Managing 3-dimensional visualisation
11.13 - Saving a module to the active library

11 - ModEdit: editing modules

11.1 - Overview.

ModEdit is used for editing and creating modules; this includes:

11.2 - Module elements.

A module is the physical representation of the part to be inserted, but it must also link to the schematic. Each module comprises three different elements:
In addition, a number of other parameters must be correctly defined if the autoplacement function is to used. The same holds for the generation of auto-insertion files.

11.2.1 - Pads.

Two pad properties are important:

11.2.2 - Contours.

Graphical contours are used to draw the physical shape of the module. Several different types of contour are available: lines, circles, arcs, and text. Contours have no electrical significance – they are simply graphical aids.

11.2.3 - Fields.

These are text elements associated with a module. Two are obligatory and always present: the reference and the value fields. These are automatically read and updated by Pcbnew when a netlist is read during the loading of modules into a board. The reference is replaced by the appropriate schematic reference (U1, IC3,...). The value is replaced by the value of the corresponding part in the schematic (47K, 74LS02,...). Other fields can be added; these will behave like graphical text.

11.3 - Starting ModEdit and selecting a module to edit.

ModEdit can be started in two ways:

11.4 - Module Editor Toolbars:

Calling ModEdit will launch a window like this:

11.4.1 - Righthand Toolbar - editing

This toolbar contains tools for:
- Placing pads.
- Adding graphic elements (contours, text).
- Positioning the anchor.
- Deleting elements.

The specific functions are the following:

Add a pad.

Draw line segments and polygons.

Draw circles.

Draw circular arcs.

Add graphical text (fields are not managed by this tool).

Position the module anchor.

Delete elements.

11.4.2 - Lefthand Toolbar – display options

These tools manage the display options in ModEdit

These options are active when the button is pressed:

Display the grid.

Display polar coordinates.

Use units of mm (update: now mm/inches are toggled via two buttons).

Crosshair cursor.

Display pad in outline mode.

Display text in outline mode.

Display contours in outline mode.

11.5 - Context Menus.

The right mouse button calls up menus that depend upon the element beneath the cursor:

The context menu for editing module parameters.

The context menu for editing pads.

The context menu for editing graphic elements.


11.6 - The Module Properties dialog.

This dialog can be launched when the cursor is over a module by clicking on the right mouse button and then selecting 'Edit Module'.

The dialog can be used to define the main module parameters.

11.7 - Creating a new module.

This icon is used to create a new module.
The name of the new module will be requisted (this will be the name by which the module will be identified in the library).
This text also serves as the module reference, which is ultimately replaced by the real reference (U1, IC3...).
The new module will require:
Alternative method:
When a new module is similar to an existing module in a library or a circuit board, an alternative and quicker method of creating the new module is as follows:
  1. Load the similar module (, , or )
  2. Modify the reference field in order to generate a new identifier (name).
  3. Edit and save the new module.

11.8 - Adding and editing pads.

Once a module has been created, pads can be added, deleted or modified.
Modification of pads can be local, affecting only the pad under the cursor, or global, affecting all pads of the module.

11.8.1 - Adding a pad.

Select the tool in the right-hand toolbar.
Pads can be added by clicking in the desired position with the left mouse button.
Their properties are predefined in the Pad properties menu.
Don't forget to enter the pad number.

11.8.2 - Setting pad properties.

This can be done in three ways.
  1. Selecting the tool from the horizontal toolbar.
  2. Clicking on an existing pad and selecting 'Edit Pad'. The pad's settings can then be edited.
  3. Clicking on an existing pad and selecting 'Export Pad Settings'. In this case, the geometrical properties of the selected pad will become the default pad properties.
In the first two cases, the following dialog window will be displayed:

Care should be taken to define correctly the layers to which the pad will belong.
In particular, although the copper layers are easy to define, the management of non-copper layers (solder mask, solder pads...) is equally important for circuit manufacture and documentation.
The Pad Type selector triggers an automatic selection of layers that is generally sufficient.
Note 1:
For smd modules of the VQFP/PQFP type, which have rectangular pads on all four sides, i.e., both horizontal and vertical, it is recommended to use just one shape (for example, a horizontal rectangle) and to place it with different orientations (0 for horizontal and 90 degrees for vertical). Global resizing of pads can then be done in a single operation.
Note 2:
Rotations of -90 or -180 are only required for trapezoidal pads used in microwave modules.

11.9 - Information about automatic placement for a module.

If the user wishes to exploit the the full capabilities of the autoplacement functions, it is necessary to define the allowed orientations of the module (Module Properties dialog).

Usually, rotation of 180 degrees (Translators note: French said 190 degrees...) is permitted for resistors, non-polarised capacitors and other symmetrical elements.
Some modules (small transistors, for example) are often permitted to rotate by +/- 90 or 180 degrees.
By default, a new module will have its rotation permissions set to zero.
This can be adjusted according to the following rule:
A vallue of 0 makes rotation impossible, 10 allows it completely, and any intermediate value represents a penalty for rotation.
For example, a resistor might have a permission of 10 to rotate 180 degrees (unrestrained) and a permission of 5 for a +/- 90 degree rotation (allowed, but discouraged).

11.10 - Attributes.

The attributes section is the following:

11.11 - Documenting modules in a library.

It is strongly recommended to document newly created modules, in order to facilitate their rapid and accurate retrieval.
Who is able to recall the multiple pinout variants of a TO92 module?
The Module Properties dialog offers a simple solution to this problem.

It allows:
The comment line is displayed with the component list in CVPCB and in the module selection menus in PCBNEW.
The keywords can be used to restrict searches to those parts possessing the given keywords.
Thus, while using the load module command ( in the right-hand toolbar in Pcbnew), it is possible to type the text ''=TO220'' into the dialog box to have PCBNEW display a list of the modules possessing the keyword ''TO220''.

11.12 - Managing 3-dimensional visualisation

A module may have associated with it a file containing a three-dimensional representation of the component. In order to assocate such a file with a module, select the 3D Settings tab.
The options panel is the following:

The follwing information should be specified:
If such a file has been specified, it is possible to view the component in 3D:

The 3D model will automatically appear in the 3D representation of the printed circuit board.

11.13 - Saving a module to the active library

The save command (modification of the file of the active library) is activated by the icon.
If a module of the same name exists (an older version), it will be overwritten.
Because it is important to be able to have confidence in the library modules, it is worth double-checking the module for errors before saving.
Before saving, it is also recommended to change the reference or value of the module to be equal to the library name of the module.

Page 11 - - 11