libfpw contains helper functions for both fpw (CLI) and pcb-gfpw (GUI) versions of the pcb FootPrintWizard. More...
Go to the source code of this file.
Functions | |
AttributeTypePtr | create_new_attribute (AttributeListTypePtr list,char *name,char *value) |
Add an Attribute to an AttributeList . | |
ElementTypePtr | create_attributes_in_element (ElementTypePtr element) |
Create all defining attributes of a footprint in the element and add the values to the Attributes struct inside the element . | |
ArcTypePtr | create_new_arc (ElementTypePtr element, LocationType X, LocationType Y, BDimension width, BDimension height, int angle, int delta, BDimension thickness) |
Creates a new arc entity in the element . | |
LineTypePtr | create_new_line (ElementTypePtr element, LocationType X1, LocationType Y1, LocationType X2, LocationType Y2, BDimension thickness) |
Creates a new Line in an Element . | |
PadTypePtr | create_new_pad (ElementTypePtr element, LocationType X1, LocationType Y1, LocationType X2, LocationType Y2, BDimension thickness, BDimension clearance, BDimension mask, char *name, char *number, FlagType flags) |
Creates a new pad in an element . | |
PinTypePtr | create_new_pin (ElementTypePtr element, LocationType X, LocationType Y, BDimension thickness, BDimension clearance, BDimension mask, BDimension drillinghole, char *name, char *number, FlagType flags) |
Creates a new pin in an element. | |
int | get_package_type () |
Determine the package type. | |
int | get_pin_pad_exception (gchar *pin_pad_name) |
Determine if the pin/pad is a non-existing pin or pad. | |
int | get_status_type () |
Determine the status type. | |
int | get_total_number_of_pins () |
Calculate the total number of pins value. | |
int | read_footprintwizard_file (gchar *fpw_filename) |
Read a footprintwizard file into the global variables. | |
int | update_location_variables () |
Update locations type variables. | |
int | update_pad_shapes_variables () |
Update pad shapes type variables. | |
int | update_units_variables () |
Update (units) multiplier and units type variables. | |
int | write_attributes () |
Write attributes based on the global variables. | |
int | write_element_arc (gdouble x, gdouble y, gdouble width, gdouble height, gdouble start_angle, gdouble delta_angle, gdouble line_width) |
Write an element arc. | |
int | write_element_header (gdouble x_text, gdouble y_text) |
Write an element header based on the global variables. | |
int | write_element_line (gdouble x0, gdouble y0, gdouble x1, gdouble y1, gdouble line_width) |
Write an element line. | |
int | write_license () |
Write a GPL alike license statement (at the begin of the footprint file). | |
int | write_pad (gint pad_number, gchar *pad_name, gdouble x0, gdouble y0, gdouble x1, gdouble y1, gdouble width, gdouble clearance, gdouble pad_solder_mask_clearance, gchar *flags) |
Write a pad for any given footprint. | |
int | write_pin (gint pin_number, gchar *pin_name, gdouble x0, gdouble y0, gdouble width, gdouble clearance, gdouble pad_solder_mask_clearance, gdouble drill, gchar *flags) |
Write a pin for any given footprint. | |
int | write_rectangle (gdouble xmin, gdouble ymin, gdouble xmax, gdouble ymax, gdouble line_width) |
Write a rectangle for any given footprint. | |
int | write_footprintwizard_file (gchar *fpw_filename) |
Write a footprintwizard file based on the current global variables. | |
int | write_footprint () |
Write a footprint based on the global variables. | |
Variables | |
ElementTypePtr | current_element |
GList * | packages_list |
libfpw contains helper functions for both fpw (CLI) and pcb-gfpw (GUI) versions of the pcb FootPrintWizard.
fpw (FootPrintWizard) is a program for the creation of footprint files to be used by the pcb layout application (see http://pcb.gpleda.org) for the placement of parts in a pcb layout.
The functions in libfpw are called by both the CLI version of the FootPrintWizard (fpw) as well as the GUI version (pcb-gfpw).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Definition in file libfpw.c.
ElementTypePtr create_attributes_in_element | ( | ElementTypePtr | element | ) |
Create all defining attributes of a footprint in the element
and add the values to the Attributes
struct inside the element
.
Attributes
are already present and do not contain the defining value already, thus avoiding duplication.element
with Attributes
added. element | : a pointer to an element without Attributes . |
Definition at line 65 of file libfpw.c.
References ElementType::Attributes, attributes_in_footprint, c1, c2, count_x, count_y, courtyard, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, create_new_attribute(), footprint_author, footprint_dist_license, footprint_status, footprint_use_license, g1, g2, number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, pad_clearance, pad_diameter, pad_length, pad_shape, pad_solder_mask_clearance, pad_width, pin1_square, pin_1_position, pin_drill_diameter, pin_pad_exceptions_string, pitch_x, pitch_y, silkscreen_indicate_1, silkscreen_line_width, silkscreen_package_outline, thermal, thermal_clearance, thermal_length, thermal_nopaste, thermal_solder_mask_clearance, thermal_width, z1, and z2.
Referenced by bga_create_element(), capa_create_element(), capc_create_element(), capm_create_element(), capmp_create_element(), cappr_create_element(), con_dil_create_element(), con_dip_create_element(), con_sil_create_element(), diom_create_element(), diomelf_create_element(), dip_create_element(), dips_create_element(), indc_create_element(), indm_create_element(), indp_create_element(), pga_create_element(), plcc_create_element(), res_create_element(), resc_create_element(), resm_create_element(), resmelf_create_element(), sil_create_element(), sip_create_element(), sot_create_element(), to_create_element_to92(), and to_create_element_to92_staggered().
ArcTypePtr create_new_arc | ( | ElementTypePtr | element, | |
LocationType | X, | |||
LocationType | Y, | |||
BDimension | width, | |||
BDimension | height, | |||
int | angle, | |||
int | delta, | |||
BDimension | thickness | |||
) |
Creates a new arc
entity in the element
.
Arc
entities in the element
to avoid duplication.arc
within the specified element
. element | : the element to create an arc in. | |
X | : X-coordinate of the arc . | |
Y | : Y-coordinate of the arc . | |
width | : width of the arc . | |
height | : height of the arc . | |
angle | : start angle. | |
delta | : angle of sweep. | |
thickness | : line thickness. |
Definition at line 130 of file libfpw.c.
References ElementType::Arc, ElementType::ArcMax, ElementType::ArcN, ArcType::Delta, ArcType::Height, ID, ArcType::StartAngle, ArcType::Thickness, ArcType::Width, ArcType::X, and ArcType::Y.
Referenced by capm_create_element(), capmp_create_element(), cappr_create_element(), con_dil_create_element(), diom_create_element(), diomelf_create_element(), dip_create_element(), dips_create_element(), indm_create_element(), indp_create_element(), plcc_create_element(), resm_create_element(), resmelf_create_element(), sot_create_element(), to_create_element_to92(), and to_create_element_to92_staggered().
AttributeTypePtr create_new_attribute | ( | AttributeListTypePtr | list, | |
char * | name, | |||
char * | value | |||
) |
Add an Attribute
to an AttributeList
.
Attributes
in the element
to avoid duplication.Attribute
in the AttributeList
. list | : an AttributeList to add the Attribute to. | |
name | : a name for the Attribute . | |
value | : a value for the Attribute . |
Definition at line 201 of file libfpw.c.
Referenced by create_attributes_in_element().
LineTypePtr create_new_line | ( | ElementTypePtr | element, | |
LocationType | X1, | |||
LocationType | Y1, | |||
LocationType | X2, | |||
LocationType | Y2, | |||
BDimension | thickness | |||
) |
Creates a new Line
in an Element
.
Line
entities in the element
to avoid duplication.Line
within the specified element
. element | : the element to create a line in. | |
X1 | : the X-value of the start point. | |
Y1 | : the Y-value of the start point. | |
X2 | : the X-value of the end point. | |
Y2 | : the Y-value of the end point. | |
thickness | : the line thickness. |
Definition at line 241 of file libfpw.c.
References ID, ElementType::Line, ElementType::LineMax, and ElementType::LineN.
Referenced by bga_create_element(), capa_create_element(), capc_create_element(), capm_create_element(), capmp_create_element(), cappr_create_element(), con_dil_create_element(), con_dip_create_element(), con_sil_create_element(), diom_create_element(), diomelf_create_element(), dip_create_element(), dips_create_element(), indc_create_element(), indm_create_element(), indp_create_element(), pga_create_element(), plcc_create_element(), res_create_element(), resc_create_element(), resm_create_element(), resmelf_create_element(), sil_create_element(), sip_create_element(), sot_create_element(), to_create_element_to92(), and to_create_element_to92_staggered().
PadTypePtr create_new_pad | ( | ElementTypePtr | element, | |
LocationType | X1, | |||
LocationType | Y1, | |||
LocationType | X2, | |||
LocationType | Y2, | |||
BDimension | thickness, | |||
BDimension | clearance, | |||
BDimension | mask, | |||
char * | name, | |||
char * | number, | |||
FlagType | flags | |||
) |
Creates a new pad
in an element
.
Pad
entities in the element
to avoid duplication.Pad
within the specified element
. element | : the element to add the pad to. | |
X1 | : the X-value of the start point. | |
Y1 | : the Y-value of the start point. | |
X2 | : the X-value of the end point. | |
Y2 | : the Y-value of the end point. | |
thickness | : the line thickness. | |
clearance | : the clearance of copper around the pad . | |
mask | : the clearance of the solder mask around the pad . | |
name | : the name of the pad . | |
number | : the number of the pad . | |
flags | : flags separated by commas:
|
Definition at line 298 of file libfpw.c.
References ID, PadType::Name, and PadType::Number.
Referenced by bga_create_element(), capa_create_element(), capc_create_element(), capm_create_element(), capmp_create_element(), cappr_create_element(), con_dil_create_element(), con_dip_create_element(), con_sil_create_element(), diom_create_element(), diomelf_create_element(), dip_create_element(), dips_create_element(), indc_create_element(), indm_create_element(), indp_create_element(), plcc_create_element(), res_create_element(), resc_create_element(), resm_create_element(), resmelf_create_element(), sil_create_element(), sip_create_element(), and sot_create_element().
PinTypePtr create_new_pin | ( | ElementTypePtr | element, | |
LocationType | X, | |||
LocationType | Y, | |||
BDimension | thickness, | |||
BDimension | clearance, | |||
BDimension | mask, | |||
BDimension | drillinghole, | |||
char * | name, | |||
char * | number, | |||
FlagType | flags | |||
) |
Creates a new pin in an element.
Pin
entities in the element
to avoid duplication.Pin
within the specified element
. element | : the element to add the pad to. | |
X | : the X-value of the center point. | |
Y | : the Y-value of the center point. | |
thickness | : the annulus thickness. | |
clearance | : the clearance of copper around the pin . | |
mask | : the clearance of the solder mask around the pin . | |
drillinghole | : the size of the drilling hole of the pin . | |
name | : the name of the pin . | |
number | : the number of the pin . | |
flags | : flags separated by commas:
|
Definition at line 374 of file libfpw.c.
References PinType::Clearance, PinType::DrillingHole, ID, PinType::Name, PinType::Number, PinType::Thickness, PinType::X, and PinType::Y.
Referenced by capa_create_element(), cappr_create_element(), con_dil_create_element(), con_dip_create_element(), con_sil_create_element(), dip_create_element(), dips_create_element(), pga_create_element(), res_create_element(), sil_create_element(), sip_create_element(), to_create_element_to92(), and to_create_element_to92_staggered().
int get_package_type | ( | ) |
Determine the package type.
Definition at line 434 of file libfpw.c.
References footprint_type, and package_type.
Referenced by on_footprint_type_entry_changed(), and read_footprintwizard_file().
int get_pin_pad_exception | ( | gchar * | pin_pad_name | ) |
Determine if the pin/pad is a non-existing pin or pad.
pin_pad_exception_string
), EXIT_FAILURE if pin/pad exists (it is not found in the pin_pad_exception_string
). pin_pad_name | : name of the pin/pad. |
Definition at line 612 of file libfpw.c.
References pin_pad_exceptions_string.
Referenced by bga_create_element(), bga_write_footprint(), on_pin_pad_exceptions_button_clicked(), pga_create_element(), pga_write_footprint(), and select_exceptions_create_window().
int get_status_type | ( | ) |
Determine the status type.
footprint_status
, EXIT_FAILURE if no known status was found in footprint_status
. Definition at line 663 of file libfpw.c.
References footprint_status, and status_type.
Referenced by on_footprint_status_entry_changed().
int get_total_number_of_pins | ( | ) |
Calculate the total number of pins value.
Calculate the total number of pins/pads and include fiducials.
For now assume that there are only two fiducials per package.
Parameters: none.
Returns: number_of_pins
total number of pins.
Definition at line 707 of file libfpw.c.
References BGA, CAPC, CAPM, CAPMP, CON_DIL, CON_DIP, CON_HDR, count_x, count_y, DIL, DIOM, DIOMELF, DIP, DIPS, fiducial, INDC, INDM, INDP, number_of_columns, number_of_exceptions, number_of_pins, number_of_rows, package_type, PGA, PLCC, QFN, QFP, RESC, RESM, RESMELF, SIL, SIP, SO, SOT, thermal, and TO92.
Referenced by number_of_pins_has_changed().
int read_footprintwizard_file | ( | gchar * | fpw_filename | ) |
Read a footprintwizard file into the global variables.
fpw_filename | : name of the footprintwizard file. |
Definition at line 814 of file libfpw.c.
References attributes_in_footprint, c1, c2, count_x, count_y, courtyard, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, dummy, fiducial, fiducial_pad_diameter, fiducial_pad_solder_mask_clearance, footprint_author, footprint_dist_license, footprint_filename, footprint_refdes, footprint_status, footprint_type, footprint_units, footprint_use_license, footprint_value, g1, g2, get_package_type(), number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, pad_clearance, pad_diameter, pad_length, pad_shape, pad_solder_mask_clearance, pad_width, pin1_square, pin_1_position, pin_drill_diameter, pin_pad_exceptions_string, pitch_x, pitch_y, silent, silkscreen_indicate_1, silkscreen_line_width, silkscreen_package_outline, thermal, thermal_clearance, thermal_length, thermal_nopaste, thermal_solder_mask_clearance, thermal_width, update_pad_shapes_variables(), update_units_variables(), verbose, z1, and z2.
Referenced by main(), and on_filechooser_dialog_open_button_clicked().
int update_location_variables | ( | ) |
Update locations type variables.
EXIT_SUCCESS
when a the locations variables were updated, EXIT_FAILURE
when errors were encountered. Definition at line 1977 of file libfpw.c.
References pin1_location, and pin_1_position.
Referenced by all_entries_need_updated().
int update_pad_shapes_variables | ( | ) |
Update pad shapes type variables.
EXIT_SUCCESS
when a known pad shape was determined, EXIT_FAILURE
when an unknown pad shape was encountered. Definition at line 2055 of file libfpw.c.
References pad_shape, pad_shapes_type, and verbose.
Referenced by all_entries_need_updated(), on_pad_shape_entry_changed(), and read_footprintwizard_file().
int update_units_variables | ( | ) |
Update (units) multiplier and units type variables.
EXIT_SUCCESS
when a known units type was determined, EXIT_FAILURE
when an unknown units type was encountered. Definition at line 2121 of file libfpw.c.
References footprint_units, multiplier, units_type, and verbose.
Referenced by all_entries_need_updated(), on_footprint_units_entry_changed(), and read_footprintwizard_file().
int write_attributes | ( | ) |
Write attributes based on the global variables.
EXIT_SUCCESS
when the function is completed. Definition at line 2166 of file libfpw.c.
References attributes_in_footprint, c1, c2, count_x, count_y, courtyard, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, footprint_author, footprint_dist_license, footprint_name, footprint_refdes, footprint_status, footprint_type, footprint_units, footprint_use_license, footprint_value, fp, g1, g2, number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, pad_clearance, pad_diameter, pad_length, pad_shape, pad_solder_mask_clearance, pad_width, pin1_square, pin_1_position, pin_drill_diameter, pin_pad_exceptions_string, pitch_x, pitch_y, silkscreen_indicate_1, silkscreen_line_width, silkscreen_package_outline, thermal, thermal_clearance, thermal_length, thermal_nopaste, thermal_solder_mask_clearance, thermal_width, z1, and z2.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), pga_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), sot_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_element_arc | ( | gdouble | x, | |
gdouble | y, | |||
gdouble | width, | |||
gdouble | height, | |||
gdouble | start_angle, | |||
gdouble | delta_angle, | |||
gdouble | line_width | |||
) |
Write an element arc.
This function is here to avoid the exhaustive changes of boiler plate code when the file format of pcb footprint changes.
EXIT_SUCCESS
when the function is completed. x | : X-coordinate of center. | |
y | : Y-coordinate of center. | |
width | : width from center to edge. | |
height | : height from center to edge. | |
start_angle | : the angle of the start of the arc in degrees. 0 = negative X-axis, 90 = positive Y-axis. | |
delta_angle | : the angle of sweep in degrees. positive = CCW, negative = CW. | |
line_width | The width of the line which forms the arc. |
Definition at line 2235 of file libfpw.c.
References fp.
Referenced by capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_hdr_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indm_write_footprint(), indp_write_footprint(), plcc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sot_write_footprint(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_element_header | ( | gdouble | x_text, | |
gdouble | y_text | |||
) |
Write an element header based on the global variables.
EXIT_SUCCESS
when the function is completed. x_text | : X-coordinate of the text insertion point. | |
y_text | : Y-coordinate of the text insertion point. |
Definition at line 2277 of file libfpw.c.
References footprint_name, footprint_refdes, footprint_value, and fp.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), pga_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), sot_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_element_line | ( | gdouble | x0, | |
gdouble | y0, | |||
gdouble | x1, | |||
gdouble | y1, | |||
gdouble | line_width | |||
) |
Write an element line.
This function is here to avoid the exhaustive changes of boiler plate code when the file format of pcb footprint changes.
EXIT_SUCCESS
when the function is completed. x0 | : X-coordinate of the starting point of the line. These are relative to the Elements mark point for new element formats, or absolute for older formats. | |
y0 | : Y-coordinate of the starting point of the line. These are relative to the Elements mark point for new element formats, or absolute for older formats. | |
x1 | : X-coordinate of the ending point of the line. These are relative to the Elements mark point for new element formats, or absolute for older formats. | |
y1 | : Y-coordinate of the ending point of the line. These are relative to the Elements mark point for new element formats, or absolute for older formats. | |
line_width | : the width of the silk for this line. |
Definition at line 2309 of file libfpw.c.
References fp.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dip_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), pga_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_footprint | ( | ) |
Write a footprint based on the global variables.
This function does not write the footprint file itself.
It is a dispatcher for helper functions who actually do write the contents for the footprint to file.
EXIT_SUCCESS
when the function is completed. Definition at line 2830 of file libfpw.c.
References BGA, bga_drc(), bga_write_footprint(), CAPA, capa_drc(), capa_write_footprint(), CAPC, capc_drc(), capc_write_footprint(), CAPM, capm_drc(), capm_write_footprint(), CAPMP, capmp_drc(), capmp_write_footprint(), CAPPR, cappr_drc(), cappr_write_footprint(), CON_DIL, con_dil_drc(), con_dil_write_footprint(), CON_DIP, con_dip_drc(), con_dip_write_footprint(), CON_HDR, con_hdr_drc(), con_hdr_write_footprint(), con_sil_drc(), con_sil_write_footprint(), DIL, DIOM, diom_drc(), diom_write_footprint(), DIOMELF, diomelf_drc(), diomelf_write_footprint(), DIP, dip_drc(), dip_write_footprint(), DIPS, dips_drc(), dips_write_footprint(), footprint_name, footprint_type, INDC, indc_drc(), indc_write_footprint(), INDM, indm_drc(), indm_write_footprint(), INDP, indp_drc(), indp_write_footprint(), package_type, PGA, pga_drc(), pga_write_footprint(), PLCC, plcc_drc(), plcc_write_footprint(), QFN, QFP, RES, res_drc(), res_write_footprint(), RESC, resc_drc(), resc_write_footprint(), RESM, resm_drc(), resm_write_footprint(), RESMELF, resmelf_drc(), resmelf_write_footprint(), SIL, sil_drc(), sil_write_footprint(), silent, SIP, sip_drc(), sip_write_footprint(), SO, SOT, sot_drc(), sot_write_footprint(), TO220, TO220S, TO220SW, TO220W, TO92, to_drc(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and verbose.
Referenced by main(), and on_footprint_button_clicked().
int write_footprintwizard_file | ( | gchar * | fpw_filename | ) |
Write a footprintwizard file based on the current global variables.
EXIT_SUCCESS
when the function is completed. fpw_filename | : a NULL terminated fpw_filename. |
Definition at line 2689 of file libfpw.c.
References attributes_in_footprint, c1, c2, count_x, count_y, courtyard, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, fiducial, fiducial_pad_diameter, fiducial_pad_solder_mask_clearance, footprint_author, footprint_dist_license, footprint_filename, footprint_name, footprint_refdes, footprint_status, footprint_type, footprint_units, footprint_use_license, footprint_value, g1, g2, number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, pad_clearance, pad_diameter, pad_length, pad_shape, pad_width, pin1_square, pin_1_position, pin_drill_diameter, pin_pad_exceptions_string, pitch_x, pitch_y, silkscreen_indicate_1, silkscreen_line_width, silkscreen_package_outline, thermal, thermal_clearance, thermal_length, thermal_nopaste, thermal_solder_mask_clearance, thermal_width, z1, and z2.
Referenced by on_save_button_clicked(), and sot_create_fpw_files_from_packages_list().
int write_license | ( | ) |
Write a GPL alike license statement (at the begin of the footprint file).
This license text is not identical to the GPL version 2, due to the fact that generated footprints are not a program or (shared) library.
All software components of pcb-fpw is released under the GNU General Public License (GPL) version 2 or later.
However, some confusion may exist about the footprints.
What license do they use?
Will GPL footprints "infect" your design, thereby requiring you to release your design to the public?
If you modify any of these footprints, must you release the modified versions under the GPL?
The goal of the pcb-fpw Project is to provide an open-source program which may be used for non-commerical as well as commercial projects.
This program is aimed for use by students, hobbyists, educators, consultants, and -- yes -- corporate engineers.
We are not interested in exerting any control over your designs, or forcing you to reveal proprietary information contained in your designs.
Footprints are similar to the font files used in document processing software -- they are graphical objects used to express your ideas.
We want you to retain control of your own ideas (your design), while the pcb-fpw Project retains a say in how you redistribute the footprints themselves.
There are three ways a footprint might be distributed:
There is a distinction between cases 1 and (2, 3).
In case 1, the object of interest is the symbol library (or individual symbol) itself.
In case (2, 3), the object of interest is the design.
Some label case 1 "distribution", and case (2, 3) "use" of the symbol. Our goals for the footprints are:
The Free Software Foundation has recognized a possible conflict of the base GPL with the use of fonts -- and, by analogy, footprints used in case (2, 3).
Their solution is to use an exemption clause in the GPL which you explicitly insert for fonts.
Read about it here: http://www.fsf.org/licensing/licenses/gpl-faq.html#FontException
Therefore, using this as a template, all footprints released with pcb-fpw are covered under the GPL with the following exception clause:
# This footprint is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # As a special exception, if you create a design which uses this # footprint, and embed this footprint or unaltered portions of this # footprint into the design, this footprint does not by itself cause # the resulting design to be covered by the GNU General Public # License. # This exception does not however invalidate any other reasons why # the design itself might be covered by the GNU General Public # License. # If you modify this footprint, you may extend this exception to your # version of the footprint, but you are not obligated to do so. # If you do not wish to do so, delete this exception statement from # your version.
EXIT_SUCCESS
when the function is completed. Definition at line 2447 of file libfpw.c.
References fp.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), pga_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), sot_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_pad | ( | gint | pad_number, | |
gchar * | pad_name, | |||
gdouble | x0, | |||
gdouble | y0, | |||
gdouble | x1, | |||
gdouble | y1, | |||
gdouble | width, | |||
gdouble | clearance, | |||
gdouble | pad_solder_mask_clearance, | |||
gchar * | flags | |||
) |
Write a pad for any given footprint.
This function is here to avoid the exhaustive changes of boiler plate code when the file format of pcb footprint changes.
EXIT_SUCCESS
when the function is completed. pad_number | : pad number | |
pad_name | : pad name | |
x0 | : X-coordinate of the starting point of the pad. | |
y0 | : Y-coordinate of the starting point of the pad. | |
x1 | : X-coordinate of the end point of the pad. | |
y1 | : Y-coordinate of the end point of the pad. | |
width | : the width of the pad. | |
clearance | : clearance of other copper around the pad. | |
pad_solder_mask_clearance | : solder mask clearance araound the pad. | |
flags | : flags separated by commas:
|
Definition at line 2482 of file libfpw.c.
References fp.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), sot_write_footprint(), to_write_footprint_to220(), and to_write_footprint_to220_staggered().
int write_pin | ( | gint | pin_number, | |
gchar * | pin_name, | |||
gdouble | x0, | |||
gdouble | y0, | |||
gdouble | width, | |||
gdouble | clearance, | |||
gdouble | pad_solder_mask_clearance, | |||
gdouble | drill, | |||
gchar * | flags | |||
) |
Write a pin for any given footprint.
This function is here to avoid the exhaustive changes of boiler plate code when the file format of pcb footprint changes.
EXIT_SUCCESS
when the function is completed. pin_number | : pin number | |
pin_name | : pin name | |
x0 | : X-coordinate of the pin. | |
y0 | : Y-coordinate of the pin. | |
width | : width of the annulus ring of the pin (pad). | |
clearance | : clearance of other copper around the pin. | |
pad_solder_mask_clearance | : solder mask clearance around the pin (pad) | |
drill | : pin drill diameter. | |
flags | : flags separated by commas:
|
Definition at line 2547 of file libfpw.c.
References fp.
Referenced by capa_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), dip_write_footprint(), dips_write_footprint(), pga_write_footprint(), res_write_footprint(), sil_write_footprint(), sip_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().
int write_rectangle | ( | gdouble | xmin, | |
gdouble | ymin, | |||
gdouble | xmax, | |||
gdouble | ymax, | |||
gdouble | line_width | |||
) |
Write a rectangle for any given footprint.
Write a rectangle for any given footprint. If line_width is 0.0 no rectangle is drawn. If line_width is < 0.0 a rectangle with a linewidth of 1/100 of a mil is drawn (define THIN_DRAW 1).
EXIT_SUCCESS
when the function is completed. xmin | : minimum X-coordinate of rectangle. | |
ymin | : minimum Y-coordinate of rectangle. | |
xmax | : maximum X-coordinate of rectangle. | |
ymax | : maximum Y-coordinate of rectangle. | |
line_width | : line width. |
Definition at line 2610 of file libfpw.c.
References fp.
Referenced by bga_write_footprint(), capa_write_footprint(), capc_write_footprint(), capm_write_footprint(), capmp_write_footprint(), cappr_write_footprint(), con_dil_write_footprint(), con_dip_write_footprint(), con_hdr_write_footprint(), con_sil_write_footprint(), diom_write_footprint(), diomelf_write_footprint(), dip_write_footprint(), dips_write_footprint(), indc_write_footprint(), indm_write_footprint(), indp_write_footprint(), pga_write_footprint(), plcc_write_footprint(), res_write_footprint(), resc_write_footprint(), resm_write_footprint(), resmelf_write_footprint(), sil_write_footprint(), sip_write_footprint(), sot_write_footprint(), to_write_footprint_to220(), to_write_footprint_to220_staggered(), to_write_footprint_to220_standing(), to_write_footprint_to220_standing_staggered(), to_write_footprint_to92(), and to_write_footprint_to92_staggered().