00001
00025 #include "register_functions.c"
00026 #include "sot.h"
00027
00028
00035 int
00036 sot_create_element ()
00037 {
00038 gdouble xmax;
00039 gdouble xmin;
00040 gdouble ymax;
00041 gdouble ymin;
00042 gdouble x_text;
00043 gdouble y_text;
00044 gdouble dx;
00045 gint pin_number;
00046 gchar *pin_pad_name = g_strdup ("");
00047 FlagType pad_flag;
00048 ElementTypePtr element;
00049
00050 if (!element)
00051 {
00052 if (verbose)
00053 g_log ("", G_LOG_LEVEL_WARNING,
00054 _("could not create a valid element pointer for a %s package."),
00055 footprint_type);
00056 return (EXIT_FAILURE);
00057 }
00058
00059
00060 element->MarkX = 0;
00061 element->MarkY = 0;
00062
00063
00064 xmin = multiplier *
00065 (
00066 ((-pitch_x * number_of_columns) / 2.0) -
00067 (pad_length / 2.0) -
00068 pad_solder_mask_clearance
00069 );
00070 xmax = multiplier *
00071 (
00072 ((pitch_x * number_of_columns) / 2.0) +
00073 (pad_length / 2.0) +
00074 pad_solder_mask_clearance
00075 );
00076 ymin = multiplier *
00077 (
00078 ((-pitch_y * number_of_rows) / 2.0) -
00079 (pad_width / 2.0) -
00080 pad_solder_mask_clearance
00081 );
00082 ymax = multiplier *
00083 (
00084 ((pitch_y * number_of_rows) / 2.0) +
00085 (pad_width / 2.0) +
00086 pad_solder_mask_clearance
00087 );
00088
00089
00090 if ((multiplier * ((-package_body_length / 2.0) - courtyard_clearance_with_package)) < xmin)
00091 {
00092 xmin = (multiplier * ((-package_body_length / 2.0) - courtyard_clearance_with_package));
00093 }
00094 if ((multiplier * ((package_body_length / 2.0) + courtyard_clearance_with_package)) > xmax)
00095 {
00096 xmax = (multiplier * ((package_body_length / 2.0) + courtyard_clearance_with_package));
00097 }
00098 if ((multiplier * ((-package_body_width / 2.0) - courtyard_clearance_with_package)) < ymin)
00099 {
00100 ymin = (multiplier * ((-package_body_width / 2.0) - courtyard_clearance_with_package));
00101 }
00102 if ((multiplier * ((package_body_width / 2.0) + courtyard_clearance_with_package)) > ymax)
00103 {
00104 ymax = (multiplier * ((package_body_width / 2.0) + courtyard_clearance_with_package));
00105 }
00106
00107 if (multiplier * (-courtyard_length / 2.0) < xmin)
00108 {
00109 xmin = multiplier * (-courtyard_length / 2.0);
00110 }
00111 if (multiplier * (courtyard_length / 2.0) > xmax)
00112 {
00113 xmax = multiplier * (courtyard_length / 2.0);
00114 }
00115 if (multiplier * (-courtyard_width / 2.0) < ymin)
00116 {
00117 ymin = multiplier * (-courtyard_width / 2.0);
00118 }
00119 if (multiplier * (courtyard_width / 2.0) > ymax)
00120 {
00121 ymax = multiplier * (courtyard_width / 2.0);
00122 }
00123
00124 element->Name[1].Scale = 100;
00125 element->Name[1].X = 0.0 ;
00126 element->Name[1].Y = (ymin - 10000.0);
00127 element->Name[1].TextString = footprint_name;
00128 element->Name[1].Element = element;
00129 element->Name[1].Direction = EAST;
00130 element->Name[1].ID = ID++;
00131
00132 element->Name[2].Scale = 100;
00133 element->Name[2].X = 0.0 ;
00134 element->Name[2].Y = (ymin - 10000.0);
00135 element->Name[2].TextString = footprint_refdes;
00136 element->Name[2].Element = element;
00137 element->Name[2].Direction = EAST;
00138 element->Name[2].ID = ID++;
00139
00140 element->Name[3].Scale = 100;
00141 element->Name[3].X = 0.0 ;
00142 element->Name[3].Y = (ymin - 10000.0);
00143 element->Name[3].TextString = footprint_value;
00144 element->Name[3].Element = element;
00145 element->Name[3].Direction = EAST;
00146 element->Name[3].ID = ID++;
00147
00148 if (pad_shapes_type == SQUARE)
00149 pad_flag.f = SQUARE;
00150 else
00151 pad_flag.f = CLEAR;
00152 if (thermal)
00153 {
00154
00155 int i;
00156 for (i = 0; (i < (number_of_rows)); i++)
00157 {
00158 pin_number = 1 + i;
00159 create_new_pad
00160 (
00161 element,
00162 (int) (multiplier * ((-pitch_x - pad_length + pad_width) / 2.0)),
00163 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00164 (int) (multiplier * ((-pitch_x + pad_length - pad_width) / 2.0)),
00165 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00166 (int) (multiplier * pad_width),
00167 (int) (multiplier * pad_clearance),
00168 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00169 "",
00170 g_strdup_printf ("%d", pin_number),
00171 pad_flag
00172 );
00173 }
00174
00175 pin_number++;
00176 create_new_pad
00177 (
00178 element,
00179 (int) (thermal_length > thermal_width
00180 ? multiplier * ((pitch_x - thermal_length + thermal_width) / 2.0)
00181 : multiplier * (pitch_x / 2.0)),
00182 (int) (thermal_length > thermal_width
00183 ? 0
00184 : multiplier * ((- thermal_width + thermal_length) / 2.0)),
00185 (int) (thermal_length > thermal_width
00186 ? multiplier * ((pitch_x + thermal_length - thermal_width) / 2.0)
00187 : multiplier * (pitch_x / 2.0)),
00188 (int) (thermal_length > thermal_width
00189 ? 0
00190 : multiplier * ((+ thermal_width - thermal_length) / 2.0)),
00191 (int) (thermal_length > thermal_width
00192 ? multiplier * thermal_width
00193 : multiplier * thermal_length),
00194 (int) (multiplier * pad_clearance),
00195 (int) (multiplier * ((thermal_length > thermal_width ? thermal_width : thermal_length) + (2 * pad_solder_mask_clearance))),
00196 "",
00197 g_strdup_printf ("%d", pin_number),
00198 pad_flag
00199 );
00200 }
00201 else
00202 {
00203 if (number_of_pins == 3)
00204 {
00205
00206 pin_number = 1;
00207 create_new_pad
00208 (
00209 element,
00210 (int) (multiplier * ((-pitch_x - pad_length + pad_width) / 2.0)),
00211 (int) (multiplier * (-pitch_y)),
00212 (int) (multiplier * ((-pitch_x + pad_length - pad_width) / 2.0)),
00213 (int) (multiplier * (-pitch_y)),
00214 (int) (multiplier * pad_width),
00215 (int) (multiplier * pad_clearance),
00216 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00217 "",
00218 g_strdup_printf ("%d", pin_number),
00219 pad_flag
00220 );
00221
00222 pin_number++;
00223 create_new_pad
00224 (
00225 element,
00226 (int) (multiplier * ((-pitch_x - pad_length + pad_width) / 2.0)),
00227 (int) (multiplier * (pitch_y)),
00228 (int) (multiplier * ((-pitch_x + pad_length - pad_width) / 2.0)),
00229 (int) (multiplier * (pitch_y)),
00230 (int) (multiplier * pad_width),
00231 (int) (multiplier * pad_clearance),
00232 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00233 "",
00234 g_strdup_printf ("%d", pin_number),
00235 pad_flag
00236 );
00237
00238 pin_number++;
00239 create_new_pad
00240 (
00241 element,
00242 (int) (multiplier * ((pitch_x + pad_length - pad_width) / 2.0)),
00243 0,
00244 (int) (multiplier * ((pitch_x - pad_length + pad_width) / 2.0)),
00245 0,
00246 (int) (multiplier * pad_width),
00247 (int) (multiplier * pad_clearance),
00248 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00249 "",
00250 g_strdup_printf ("%d", pin_number),
00251 pad_flag
00252 );
00253 }
00254 else if (number_of_pins == 4)
00255 {
00256 if (verbose)
00257 {
00258 g_log ("", G_LOG_LEVEL_WARNING,
00259 _("for now a number of pins of %d without a thermal pad is not implemented yet in sot_write_footprint()."),
00260 number_of_pins);
00261 }
00262 }
00263 else if (number_of_pins == 5)
00264 {
00265
00266 int i;
00267 for (i = 0; (i < (number_of_rows)); i++)
00268 {
00269 pin_number = 1 + i;
00270 create_new_pad
00271 (
00272 element,
00273 (int) (multiplier * ((-pitch_x - pad_length + pad_width) / 2.0)),
00274 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00275 (int) (multiplier * ((-pitch_x + pad_length - pad_width) / 2.0)),
00276 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00277 (int) (multiplier * pad_width),
00278 (int) (multiplier * pad_clearance),
00279 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00280 "",
00281 g_strdup_printf ("%d", pin_number),
00282 pad_flag
00283 );
00284
00285 pin_number++;
00286 create_new_pad
00287 (
00288 element,
00289 (int) (multiplier * ((pitch_x - pad_length + pad_width) / 2.0)),
00290 (int) (multiplier * (pitch_y)),
00291 (int) (multiplier * ((pitch_x + pad_length - pad_width) / 2.0)),
00292 (int) (multiplier * (pitch_y)),
00293 (int) (multiplier * pad_width),
00294 (int) (multiplier * pad_clearance),
00295 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00296 "",
00297 g_strdup_printf ("%d", pin_number),
00298 pad_flag
00299 );
00300 pin_number++;
00301 create_new_pad
00302 (
00303 element,
00304 (int) (multiplier * ((pitch_x - pad_length + pad_width) / 2.0)),
00305 (int) (multiplier * (-pitch_y)),
00306 (int) (multiplier * ((pitch_x + pad_length - pad_width) / 2.0)),
00307 (int) (multiplier * (-pitch_y)),
00308 (int) (multiplier * pad_width),
00309 (int) (multiplier * pad_clearance),
00310 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00311 "",
00312 g_strdup_printf ("%d", pin_number),
00313 pad_flag
00314 );
00315 }
00316 }
00317 else if ((number_of_pins == 6) || (number_of_pins == 8))
00318 {
00319
00320 int i;
00321 for (i = 0; (i < (number_of_rows)); i++)
00322 {
00323 pin_number = 1 + i;
00324 create_new_pad
00325 (
00326 element,
00327 (int) (multiplier * ((-pitch_x - pad_length + pad_width) / 2.0)),
00328 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00329 (int) (multiplier * ((-pitch_x + pad_length - pad_width) / 2.0)),
00330 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y)),
00331 (int) (multiplier * pad_width),
00332 (int) (multiplier * pad_clearance),
00333 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00334 "",
00335 g_strdup_printf ("%d", pin_number),
00336 pad_flag
00337 );
00338 pin_number = (number_of_columns * number_of_rows) - i;
00339 create_new_pad
00340 (
00341 element,
00342 (int) (multiplier * (pitch_x - pad_length + pad_width) / 2.0),
00343 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) + 1 + i) * pitch_y)),
00344 (int) (multiplier * (pitch_x + pad_length - pad_width) / 2.0),
00345 (int) (multiplier * ((((-number_of_rows - 1) / 2.0) + 1 + i) * pitch_y)),
00346 (int) (multiplier * pad_width),
00347 (int) (multiplier * pad_clearance),
00348 (int) (multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance))),
00349 "",
00350 g_strdup_printf ("%d", pin_number),
00351 pad_flag
00352 );
00353 }
00354 }
00355 else
00356 {
00357 if (verbose)
00358 {
00359 g_log ("", G_LOG_LEVEL_WARNING,
00360 _("number of pins of %d is not defined in sot_write_footprint()."),
00361 number_of_pins);
00362 }
00363 }
00364 }
00365
00366 if (silkscreen_package_outline)
00367 {
00368 create_new_line
00369 (
00370 element,
00371 (int) (multiplier * (-silkscreen_length / 2.0)),
00372 (int) (multiplier * (-silkscreen_width / 2.0)),
00373 (int) (multiplier * (-silkscreen_length / 2.0)),
00374 (int) (multiplier * (silkscreen_width / 2.0)),
00375 (int) (multiplier * silkscreen_line_width)
00376 );
00377 create_new_line
00378 (
00379 element,
00380 (int) (multiplier * (silkscreen_length / 2.0)),
00381 (int) (multiplier * (-silkscreen_width / 2.0)),
00382 (int) (multiplier * (silkscreen_length / 2.0)),
00383 (int) (multiplier * (silkscreen_width / 2.0)),
00384 (int) (multiplier * silkscreen_line_width)
00385 );
00386 create_new_line
00387 (
00388 element,
00389 (int) (multiplier * (-silkscreen_length / 2.0)),
00390 (int) (multiplier * (-silkscreen_width / 2.0)),
00391 (int) (multiplier * (silkscreen_length / 2.0)),
00392 (int) (multiplier * (-silkscreen_width / 2.0)),
00393 (int) (multiplier * silkscreen_line_width)
00394 );
00395 create_new_line
00396 (
00397 element,
00398 (int) (multiplier * (silkscreen_length / 2.0)),
00399 (int) (multiplier * (silkscreen_width / 2.0)),
00400 (int) (multiplier * (-silkscreen_length / 2.0)),
00401 (int) (multiplier * (silkscreen_width / 2.0)),
00402 (int) (multiplier * silkscreen_line_width)
00403 );
00404 }
00405
00406 if (silkscreen_indicate_1)
00407 {
00408 create_new_arc
00409 (
00410 element,
00411 (int) (multiplier * (-pitch_x)),
00412 (int) (multiplier * (-pitch_y * (number_of_rows) / 2.0)),
00413 (int) (multiplier * 0.5 * silkscreen_line_width),
00414 (int) (multiplier * 0.5 * silkscreen_line_width),
00415 0,
00416 360,
00417 (int) (multiplier * silkscreen_line_width)
00418 );
00419 }
00420
00421 if (courtyard)
00422 {
00423 create_new_line
00424 (
00425 element,
00426 (int) (xmin),
00427 (int) (ymin),
00428 (int) (xmin),
00429 (int) (ymax),
00430 (int) (multiplier * courtyard_line_width)
00431 );
00432 create_new_line
00433 (
00434 element,
00435 (int) (xmax),
00436 (int) (ymin),
00437 (int) (xmax),
00438 (int) (ymax),
00439 (int) (multiplier * courtyard_line_width)
00440 );
00441 create_new_line
00442 (
00443 element,
00444 (int) (xmin),
00445 (int) (ymin),
00446 (int) (xmax),
00447 (int) (ymin),
00448 (int) (multiplier * courtyard_line_width)
00449 );
00450 create_new_line
00451 (
00452 element,
00453 (int) (xmax),
00454 (int) (ymax),
00455 (int) (xmin),
00456 (int) (ymax),
00457 (int) (multiplier * courtyard_line_width)
00458 );
00459 }
00460
00461 if (attributes_in_footprint)
00462 {
00463 element = create_attributes_in_element (element);
00464 }
00465
00466 if (verbose)
00467 {
00468 g_log ("", G_LOG_LEVEL_INFO,
00469 _("created an element for a %s package: %s."),
00470 footprint_type,
00471 footprint_filename);
00472 }
00473 current_element = (ElementTypePtr) &element;
00474 return (EXIT_SUCCESS);
00475 }
00476
00477
00488 int
00489 sot_create_fpw_files_from_packages_list ()
00490 {
00491 guint i = 1;
00492 sot_create_packages_list ();
00493 while (g_list_nth_data (packages_list, i))
00494 {
00495
00496 gchar *data;
00497 data = (char *) g_list_nth_data (packages_list, i);
00498 footprint_name = g_strconcat ("?", data);
00499 sot_get_default_footprint_values (footprint_name);
00500
00501 gchar *fpw_filename = g_strdup (footprint_name);
00502 if (g_str_has_suffix (fpw_filename, fp_suffix))
00503 {
00504
00505
00506
00507 fpw_filename = g_strconcat (fpw_filename, "w", NULL);
00508 }
00509 else
00510 {
00511 if (g_str_has_suffix (fpw_filename, fpw_suffix))
00512 {
00513
00514
00515
00516 }
00517 else
00518 {
00519
00520
00521 fpw_filename = g_strconcat (fpw_filename, ".fpw", NULL);
00522 }
00523 }
00524 if (write_footprintwizard_file (fpw_filename) == EXIT_FAILURE)
00525 {
00526 if (verbose)
00527 {
00528 g_log ("", G_LOG_LEVEL_WARNING,
00529 _("ERROR: Unable to write footprintwizard file %s."),
00530 footprint_filename);
00531 }
00532 }
00533 g_free (fpw_filename);
00534 i++;
00535 }
00536 if (verbose)
00537 {
00538 g_log ("", G_LOG_LEVEL_INFO,
00539 (_("%s done creating all default fpw files")),
00540 footprint_type);
00541 }
00542 return (EXIT_SUCCESS);
00543 }
00544
00545
00555 int
00556 sot_create_packages_list ()
00557 {
00558 g_list_free (packages_list);
00559 packages_list = g_list_append (packages_list, "SOT50P160X90-3N");
00560 packages_list = g_list_append (packages_list, "SOT50P210X110-8N");
00561 packages_list = g_list_append (packages_list, "SOT65P210X100-3N");
00562 packages_list = g_list_append (packages_list, "SOT65P210X100-6N");
00563 packages_list = g_list_append (packages_list, "SOT65P210X110-3N");
00564 packages_list = g_list_append (packages_list, "SOT65P210X110-5N");
00565 packages_list = g_list_append (packages_list, "SOT65P210X110-6N");
00566 packages_list = g_list_append (packages_list, "SOT65P210X110-6AN");
00567 packages_list = g_list_append (packages_list, "SOT65P275X110-8N");
00568 packages_list = g_list_append (packages_list, "SOT65P280X100-8N");
00569 packages_list = g_list_append (packages_list, "SOT65P280X130-8N");
00570 packages_list = g_list_append (packages_list, "SOT65P280X145-8AN");
00571 packages_list = g_list_append (packages_list, "SOT65P280X145-8BN");
00572 packages_list = g_list_append (packages_list, "SOT65P280X145-8N");
00573 packages_list = g_list_append (packages_list, "SOT80P330X140-8N");
00574 packages_list = g_list_append (packages_list, "SOT95P228X102-3N");
00575 packages_list = g_list_append (packages_list, "SOT95P230X109-3N");
00576 packages_list = g_list_append (packages_list, "SOT95P230X110-3N");
00577 packages_list = g_list_append (packages_list, "SOT95P230X124-3N");
00578 packages_list = g_list_append (packages_list, "SOT95P237X112-3N");
00579 packages_list = g_list_append (packages_list, "SOT95P237X117-3N");
00580 packages_list = g_list_append (packages_list, "SOT95P240X110-3N");
00581 packages_list = g_list_append (packages_list, "SOT95P251X112-3N");
00582 packages_list = g_list_append (packages_list, "SOT95P270X145-5N");
00583 packages_list = g_list_append (packages_list, "SOT95P275X130-3N");
00584 packages_list = g_list_append (packages_list, "SOT95P275X145-6N");
00585 packages_list = g_list_append (packages_list, "SOT95P279X142-5N");
00586 packages_list = g_list_append (packages_list, "SOT95P280X100-5N");
00587 packages_list = g_list_append (packages_list, "SOT95P280X100-6N");
00588 packages_list = g_list_append (packages_list, "SOT95P280X110-5N");
00589 packages_list = g_list_append (packages_list, "SOT95P280X110-6N");
00590 packages_list = g_list_append (packages_list, "SOT95P280X115-6N");
00591 packages_list = g_list_append (packages_list, "SOT95P280X135-3AN");
00592 packages_list = g_list_append (packages_list, "SOT95P280X135-3N");
00593 packages_list = g_list_append (packages_list, "SOT95P280X135-5N");
00594 packages_list = g_list_append (packages_list, "SOT95P280X145-5AN");
00595 packages_list = g_list_append (packages_list, "SOT95P280X145-5N");
00596 packages_list = g_list_append (packages_list, "SOT95P280X145-6AN");
00597 packages_list = g_list_append (packages_list, "SOT95P280X145-6N");
00598 packages_list = g_list_append (packages_list, "SOT95P284X122-5N");
00599 packages_list = g_list_append (packages_list, "SOT95P284X122-6N");
00600 packages_list = g_list_append (packages_list, "SOT95P285X140-3N");
00601 packages_list = g_list_append (packages_list, "SOT95P285X90-6N");
00602 packages_list = g_list_append (packages_list, "SOT95P470X124-8N");
00603 packages_list = g_list_append (packages_list, "SOT100P230X110-3N");
00604 packages_list = g_list_append (packages_list, "SOT127P700X180-6N");
00605 packages_list = g_list_append (packages_list, "SOT150P700X180-5N");
00606 packages_list = g_list_append (packages_list, "SOT230P700X180-4N");
00607 packages_list = g_list_append (packages_list, "SOT230P700X180-4AN");
00608 packages_list = g_list_append (packages_list, "SOT230P700X180-4BN");
00609 return (EXIT_SUCCESS);
00610 }
00611
00612
00642 int
00643 sot_drc ()
00644 {
00645 int result = EXIT_SUCCESS;
00646 if (verbose)
00647 {
00648 g_log ("", G_LOG_LEVEL_INFO,
00649 (_("[%s] DRC Check: checking package %s.")),
00650 footprint_type, footprint_name);
00651 }
00652
00653 switch (pad_shapes_type)
00654 {
00655 case NO_SHAPE:
00656 {
00657 if (verbose)
00658 {
00659 g_log ("", G_LOG_LEVEL_WARNING,
00660 (_("[%s] DRC Error: NO_SHAPE specified for check for allowed pad shapes.")),
00661 footprint_type);
00662 }
00663 result = EXIT_FAILURE;
00664 break;
00665 }
00666 case ROUND:
00667 {
00668 if (verbose)
00669 {
00670 g_log ("", G_LOG_LEVEL_WARNING,
00671 (_("[%s] DRC Error: circular pad shape specified for check for allowed pad shapes.")),
00672 footprint_type);
00673 }
00674 result = EXIT_FAILURE;
00675 break;
00676 }
00677 case SQUARE:
00678 {
00679 break;
00680 }
00681 case OCTAGONAL:
00682 {
00683 if (verbose)
00684 {
00685 g_log ("", G_LOG_LEVEL_WARNING,
00686 (_("[%s] DRC Error: octagonal pad shape specified for check for allowed pad shapes.")),
00687 footprint_type);
00688 }
00689 result = EXIT_FAILURE;
00690 break;
00691 }
00692 case ROUND_ELONGATED:
00693 {
00694 break;
00695 }
00696 default:
00697 {
00698 if (verbose)
00699 {
00700 g_log ("", G_LOG_LEVEL_WARNING,
00701 (_("[%s] DRC Error: no valid pad shape type specified.")),
00702 footprint_type);
00703 }
00704 result = EXIT_FAILURE;
00705 break;
00706 }
00707 }
00708
00709 if (package_body_length <= 0.0)
00710 {
00711 if (verbose)
00712 {
00713 g_log ("", G_LOG_LEVEL_WARNING,
00714 (_("[%s] DRC Error: check for package body length is <= 0.0.")),
00715 footprint_type);
00716 }
00717 result = EXIT_FAILURE;
00718 }
00719 if (package_body_width <= 0.0)
00720 {
00721 if (verbose)
00722 {
00723 g_log ("", G_LOG_LEVEL_WARNING,
00724 (_("[%s] DRC Error: check for package body width is <= 0.0.")),
00725 footprint_type);
00726 }
00727 result = EXIT_FAILURE;
00728 }
00729 if (package_body_height <= 0.0)
00730 {
00731 if (verbose)
00732 {
00733 g_log ("", G_LOG_LEVEL_WARNING,
00734 (_("[%s] DRC Error: check for package body height is <= 0.0.")),
00735 footprint_type);
00736 }
00737 result = EXIT_FAILURE;
00738 }
00739
00740 if (courtyard_length <= 0.0)
00741 {
00742 if (verbose)
00743 {
00744 g_log ("", G_LOG_LEVEL_WARNING,
00745 (_("[%s] DRC Error: check for courtyard length is <= 0.0.")),
00746 footprint_type);
00747 }
00748 result = EXIT_FAILURE;
00749 }
00750 if (courtyard_width <= 0.0)
00751 {
00752 if (verbose)
00753 {
00754 g_log ("", G_LOG_LEVEL_WARNING,
00755 (_("[%s] DRC Error: check for courtyard width is <= 0.0.")),
00756 footprint_type);
00757 }
00758 result = EXIT_FAILURE;
00759 }
00760
00761 if (pitch_x - pad_length < pad_clearance)
00762 {
00763 if (verbose)
00764 {
00765 g_log ("", G_LOG_LEVEL_WARNING,
00766 (_("[%s] DRC Error: check for minimum clearance between copper (X-direction).")),
00767 footprint_type);
00768 }
00769 result = EXIT_FAILURE;
00770 }
00771
00772 if (pitch_y - pad_width < pad_clearance)
00773 {
00774 if (verbose)
00775 {
00776 g_log ("", G_LOG_LEVEL_WARNING,
00777 (_("[%s] DRC Error: check for minimum clearance between copper (Y-direction).")),
00778 footprint_type);
00779 }
00780 result = EXIT_FAILURE;
00781 }
00782
00783 if (fiducial)
00784 {
00785
00786 if (fiducial_pad_diameter == 0.0)
00787 {
00788 if (verbose)
00789 {
00790 g_log ("", G_LOG_LEVEL_WARNING,
00791 (_("[%s] DRC Error: check for zero width fiducial pad.")),
00792 footprint_type);
00793 }
00794 result = EXIT_FAILURE;
00795 }
00796
00797 if (fiducial_pad_solder_mask_clearance == 0.0)
00798 {
00799 if (verbose)
00800 {
00801 g_log ("", G_LOG_LEVEL_WARNING,
00802 (_("[%s] DRC Error: check for zero width solder mask clearance.")),
00803 footprint_type);
00804 }
00805 result = EXIT_FAILURE;
00806 }
00810
00811
00812 #if 0
00813 if ()
00814 {
00815 if (verbose)
00816 {
00817 g_log ("", G_LOG_LEVEL_WARNING,
00818 (_("[%s] DRC Error: check for distance between fiducial and nearest pad.")),
00819 footprint_type);
00820 }
00821 result = EXIT_FAILURE;
00822 }
00823 #endif
00824 }
00825
00826
00827 if (package_body_length - courtyard_length < courtyard_clearance_with_package)
00828 {
00829 if (verbose)
00830 {
00831 g_log ("", G_LOG_LEVEL_WARNING,
00832 (_("[%s] DRC Error: check for clearance of the package length with regard to the courtyard dimensions.")),
00833 footprint_type);
00834 }
00835 result = EXIT_FAILURE;
00836 }
00837
00838
00839 if (package_body_width - courtyard_width < courtyard_clearance_with_package)
00840 {
00841 if (verbose)
00842 {
00843 g_log ("", G_LOG_LEVEL_WARNING,
00844 (_("[%s] DRC Error: check for clearance of the package width with regard to the courtyard dimensions.")),
00845 footprint_type);
00846 }
00847 result = EXIT_FAILURE;
00848 }
00854
00855 if (silkscreen_package_outline && (silkscreen_line_width == 0.0))
00856 {
00857 if (verbose)
00858 {
00859 g_log ("", G_LOG_LEVEL_WARNING,
00860 (_("[%s] DRC Error: line width 0.0 specified for check for a reasonable silk line width.")),
00861 footprint_type);
00862 }
00863 result = EXIT_FAILURE;
00864 }
00865 switch (units_type)
00866 {
00867 case NO_UNITS:
00868 {
00869 if (verbose)
00870 {
00871 g_log ("", G_LOG_LEVEL_WARNING,
00872 (_("[%s] DRC Error: no units specified for check for a reasonable silk line width.")),
00873 footprint_type);
00874 }
00875 result = EXIT_FAILURE;
00876 break;
00877 }
00878 case MIL:
00879 if (silkscreen_package_outline && (silkscreen_line_width > 40.0))
00880 {
00881 if (verbose)
00882 {
00883 g_log ("", G_LOG_LEVEL_WARNING,
00884 (_("[%s] DRC Error: line width > 40.0 mil specified check for a reasonable silk line width.")),
00885 footprint_type);
00886 }
00887 result = EXIT_FAILURE;
00888 break;
00889 }
00890 case MIL_100:
00891 if (silkscreen_package_outline && (silkscreen_line_width > 4000.0))
00892 {
00893 if (verbose)
00894 {
00895 g_log ("", G_LOG_LEVEL_WARNING,
00896 (_("[%s] DRC Error: line width > 40.0 mil specified check for a reasonable silk line width.")),
00897 footprint_type);
00898 }
00899 result = EXIT_FAILURE;
00900 break;
00901 }
00902 case MM:
00903 if (silkscreen_package_outline && (silkscreen_line_width > 1.0))
00904 {
00905 if (verbose)
00906 {
00907 g_log ("", G_LOG_LEVEL_WARNING,
00908 (_("[%s] DRC Error: line width > 1.0 mm specified check for a reasonable silk line width.")),
00909 footprint_type);
00910 }
00911 result = EXIT_FAILURE;
00912 break;
00913 }
00914 default:
00915 {
00916 if (verbose)
00917 {
00918 g_log ("", G_LOG_LEVEL_WARNING,
00919 (_("[%s] DRC Error: no valid units type specified for check for a reasonable silk line width.")),
00920 footprint_type);
00921 }
00922 result = EXIT_FAILURE;
00923 break;
00924 }
00925 }
00926
00927 if (verbose && (result == EXIT_SUCCESS))
00928 {
00929 g_log ("", G_LOG_LEVEL_INFO,
00930 (_("[%s] DRC Check: no errors while checking package %s.")),
00931 footprint_type, footprint_name);
00932 }
00933 return result;
00934 }
00935
00936
00999 int
01000 sot_get_default_footprint_values ()
01001 {
01002 if (!strcmp (footprint_name, "?SOT50P160X90-3N"))
01003 {
01004 footprint_units = g_strdup ("mm");
01005 package_body_length = 0.85;
01006 package_body_width = 1.70;
01007 package_body_height = 0.90;
01008 package_is_radial = FALSE;
01009 number_of_pins = 3;
01010 number_of_columns = 2;
01011 number_of_rows = 2;
01012 count_x = 0;
01013 count_y = 0;
01014 pitch_x = 1.60;
01015 pitch_y = 0.50;
01016 pad_length = 0.85;
01017 pad_width = 0.30;
01018 pad_shape = g_strdup ("rounded pad, elongated");
01019 pad_shapes_type = ROUND_ELONGATED;
01020 thermal = FALSE;
01021 thermal_length = 0.0;
01022 thermal_width = 0.0;
01023 fiducial = FALSE;
01024 fiducial_pad_diameter = 0.00;
01025 fiducial_pad_solder_mask_clearance = 0.00;
01026 silkscreen_package_outline = FALSE;
01027 silkscreen_length = 0.20;
01028 silkscreen_width = 1.60;
01029 silkscreen_line_width = 0.20;
01030 courtyard_length = 3.00;
01031 courtyard_width = 2.20;
01032 courtyard_line_width = 0.05;
01033 g_free (footprint_name);
01034 footprint_name = g_strdup ("SOT50P160X90-3N");
01035 if (verbose)
01036 {
01037 g_log ("", G_LOG_LEVEL_WARNING,
01038 (_("%s: pads are being trimmed.")),
01039 footprint_name);
01040 g_log ("", G_LOG_LEVEL_INFO,
01041 (_("%s is also known as")),
01042 footprint_name,
01043 " SOT523.");
01044 }
01045 return (EXIT_SUCCESS);
01046 }
01047 else if (!strcmp (footprint_name, "?SOT50P210X110-8N"))
01048 {
01049 footprint_units = g_strdup ("mm");
01050 package_body_length = 1.40;
01051 package_body_width = 2.15;
01052 package_body_height = 1.10;
01053 package_is_radial = FALSE;
01054 number_of_pins = 8;
01055 number_of_columns = 2;
01056 number_of_rows = 4;
01057 count_x = 0;
01058 count_y = 0;
01059 pitch_x = 2.20;
01060 pitch_y = 0.50;
01061 pad_length = 0.95;
01062 pad_width = 0.30;
01063 pad_shape = g_strdup ("rounded pad, elongated");
01064 pad_shapes_type = ROUND_ELONGATED;
01065 thermal = FALSE;
01066 thermal_length = 0.0;
01067 thermal_width = 0.0;
01068 fiducial = FALSE;
01069 fiducial_pad_diameter = 0.00;
01070 fiducial_pad_solder_mask_clearance = 0.00;
01071 silkscreen_length = 0.60;
01072 silkscreen_width = 2.00;
01073 silkscreen_line_width = 0.20;
01074 courtyard_length = 3.70;
01075 courtyard_width = 2.70;
01076 courtyard_line_width = 0.05;
01077 g_free (footprint_name);
01078 footprint_name = g_strdup ("SOT50P210X110-8N");
01079 if (verbose)
01080 {
01081 g_log ("", G_LOG_LEVEL_INFO,
01082 (_("%s is also known as")),
01083 footprint_name,
01084 " JEDEC MO-203BA.");
01085 }
01086 return (EXIT_SUCCESS);
01087 }
01088 else if (!strcmp (footprint_name, "?SOT65P210X100-3N"))
01089 {
01090 footprint_units = g_strdup ("mm");
01091 package_body_length = 1.35;
01092 package_body_width = 2.10;
01093 package_body_height = 1.00;
01094 package_is_radial = FALSE;
01095 number_of_pins = 3;
01096 number_of_columns = 2;
01097 number_of_rows = 3;
01098 count_x = 0;
01099 count_y = 0;
01100 pitch_x = 2.10;
01101 pitch_y = 0.65;
01102 pad_length = 0.90;
01103 pad_width = 0.50;
01104 pad_shape = g_strdup ("rectangular pad");
01105 pad_shapes_type = SQUARE;
01106 thermal = FALSE;
01107 thermal_length = 0.0;
01108 thermal_width = 0.0;
01109 fiducial = FALSE;
01110 fiducial_pad_diameter = 0.00;
01111 fiducial_pad_solder_mask_clearance = 0.00;
01112 silkscreen_length = 0.55;
01113 silkscreen_width = 2.00;
01114 silkscreen_line_width = 0.20;
01115 courtyard_length = 3.50;
01116 courtyard_width = 2.60;
01117 courtyard_line_width = 0.05;
01118 g_free (footprint_name);
01119 footprint_name = g_strdup ("SOT65P210X100-3N");
01120 if (verbose)
01121 {
01122 g_log ("", G_LOG_LEVEL_INFO,
01123 (_("%s is also known as")),
01124 footprint_name,
01125 " JEITA SC-70.");
01126 }
01127 return (EXIT_SUCCESS);
01128 }
01129 else if (!strcmp (footprint_name, "?SOT65P210X100-6N"))
01130 {
01131 footprint_units = g_strdup ("mm");
01132 package_body_length = 1.35;
01133 package_body_width = 2.10;
01134 package_body_height = 1.00;
01135 package_is_radial = FALSE;
01136 number_of_pins = 6;
01137 number_of_columns = 2;
01138 number_of_rows = 3;
01139 count_x = 0;
01140 count_y = 0;
01141 pitch_x = 2.20;
01142 pitch_y = 0.65;
01143 pad_length = 1.00;
01144 pad_width = 0.40;
01145 pad_shape = g_strdup ("rounded pad, elongated");
01146 pad_shapes_type = ROUND_ELONGATED;
01147 thermal = FALSE;
01148 thermal_length = 0.0;
01149 thermal_width = 0.0;
01150 fiducial = FALSE;
01151 fiducial_pad_diameter = 0.00;
01152 fiducial_pad_solder_mask_clearance = 0.00;
01153 silkscreen_length = 0.55;
01154 silkscreen_width = 2.00;
01155 silkscreen_line_width = 0.20;
01156 courtyard_length = 3.70;
01157 courtyard_width = 2.60;
01158 courtyard_line_width = 0.05;
01159 g_free (footprint_name);
01160 footprint_name = g_strdup ("SOT65P210X100-6N");
01161 return (EXIT_SUCCESS);
01162 }
01163 else if (!strcmp (footprint_name, "?SOT65P210X110-3N"))
01164 {
01165 footprint_units = g_strdup ("mm");
01166 package_body_length = 1.35;
01167 package_body_width = 2.10;
01168 package_body_height = 1.10;
01169 package_is_radial = FALSE;
01170 number_of_pins = 3;
01171 number_of_columns = 2;
01172 number_of_rows = 3;
01173 count_x = 0;
01174 count_y = 0;
01175 pitch_x = 2.10;
01176 pitch_y = 0.65;
01177 pad_length = 0.85;
01178 pad_width = 0.55;
01179 pad_shape = g_strdup ("rounded pad, elongated");
01180 pad_shapes_type = ROUND_ELONGATED;
01181 thermal = FALSE;
01182 thermal_length = 0.0;
01183 thermal_width = 0.0;
01184 fiducial = FALSE;
01185 fiducial_pad_diameter = 0.00;
01186 fiducial_pad_solder_mask_clearance = 0.00;
01187 silkscreen_length = 0.60;
01188 silkscreen_width = 2.00;
01189 silkscreen_line_width = 0.20;
01190 courtyard_length = 3.50;
01191 courtyard_width = 2.60;
01192 courtyard_line_width = 0.05;
01193 g_free (footprint_name);
01194 footprint_name = g_strdup ("SOT65P210X110-3N");
01195 if (verbose)
01196 {
01197 g_log ("", G_LOG_LEVEL_INFO,
01198 (_("%s is also known as")),
01199 footprint_name,
01200 " SOT323.");
01201 }
01202 return (EXIT_SUCCESS);
01203 }
01204 else if (!strcmp (footprint_name, "?SOT65P210X110-5N"))
01205 {
01206 footprint_units = g_strdup ("mm");
01207 package_body_length = 1.40;
01208 package_body_width = 2.15;
01209 package_body_height = 1.10;
01210 package_is_radial = FALSE;
01211 number_of_pins = 5;
01212 number_of_columns = 2;
01213 number_of_rows = 3;
01214 count_x = 0;
01215 count_y = 0;
01216 pitch_x = 2.20;
01217 pitch_y = 0.65;
01218 pad_length = 0.95;
01219 pad_width = 0.40;
01220 pad_shape = g_strdup ("rounded pad, elongated");
01221 pad_shapes_type = ROUND_ELONGATED;
01222 thermal = FALSE;
01223 thermal_length = 0.0;
01224 thermal_width = 0.0;
01225 fiducial = FALSE;
01226 fiducial_pad_diameter = 0.00;
01227 fiducial_pad_solder_mask_clearance = 0.00;
01228 silkscreen_length = 0.60;
01229 silkscreen_width = 2.00;
01230 silkscreen_line_width = 0.20;
01231 courtyard_length = 3.70;
01232 courtyard_width = 2.70;
01233 courtyard_line_width = 0.05;
01234 g_free (footprint_name);
01235 footprint_name = g_strdup ("SOT65P210X110-5N");
01236 if (verbose)
01237 {
01238 g_log ("", G_LOG_LEVEL_INFO,
01239 (_("%s is also known as")),
01240 footprint_name,
01241 " JEDEC MO-203AA.");
01242 }
01243 return (EXIT_SUCCESS);
01244 }
01245 else if (!strcmp (footprint_name, "?SOT65P210X110-6N"))
01246 {
01247 footprint_units = g_strdup ("mm");
01248 package_body_length = 1.40;
01249 package_body_width = 2.15;
01250 package_body_height = 1.10;
01251 package_is_radial = FALSE;
01252 number_of_pins = 6;
01253 number_of_columns = 2;
01254 number_of_rows = 3;
01255 count_x = 0;
01256 count_y = 0;
01257 pitch_x = 2.20;
01258 pitch_y = 0.65;
01259 pad_length = 0.95;
01260 pad_width = 0.40;
01261 pad_shape = g_strdup ("rounded pad, elongated");
01262 pad_shapes_type = ROUND_ELONGATED;
01263 thermal = FALSE;
01264 thermal_length = 0.0;
01265 thermal_width = 0.0;
01266 fiducial = FALSE;
01267 fiducial_pad_diameter = 0.00;
01268 fiducial_pad_solder_mask_clearance = 0.00;
01269 silkscreen_length = 0.60;
01270 silkscreen_width = 2.00;
01271 silkscreen_line_width = 0.20;
01272 courtyard_length = 3.70;
01273 courtyard_width = 2.70;
01274 courtyard_line_width = 0.05;
01275 g_free (footprint_name);
01276 footprint_name = g_strdup ("SOT65P210X110-6N");
01277 if (verbose)
01278 {
01279 g_log ("", G_LOG_LEVEL_INFO,
01280 (_("%s is also known as")),
01281 footprint_name,
01282 " JEDEC MO-203AB.");
01283 }
01284 return (EXIT_SUCCESS);
01285 }
01286 else if (!strcmp (footprint_name, "?SOT65P210X110-6AN"))
01287 {
01288 footprint_units = g_strdup ("mm");
01289 package_body_length = 1.35;
01290 package_body_width = 2.20;
01291 package_body_height = 1.10;
01292 package_is_radial = FALSE;
01293 number_of_pins = 6;
01294 number_of_columns = 2;
01295 number_of_rows = 3;
01296 count_x = 0;
01297 count_y = 0;
01298 pitch_x = 2.10;
01299 pitch_y = 0.65;
01300 pad_length = 0.90;
01301 pad_width = 0.40;
01302 pad_shape = g_strdup ("rounded pad, elongated");
01303 pad_shapes_type = ROUND_ELONGATED;
01304 thermal = FALSE;
01305 thermal_length = 0.0;
01306 thermal_width = 0.0;
01307 fiducial = FALSE;
01308 fiducial_pad_diameter = 0.00;
01309 fiducial_pad_solder_mask_clearance = 0.00;
01310 silkscreen_length = 0.55;
01311 silkscreen_width = 2.00;
01312 silkscreen_line_width = 0.20;
01313 courtyard_length = 3.50;
01314 courtyard_width = 2.70;
01315 courtyard_line_width = 0.05;
01316 g_free (footprint_name);
01317 footprint_name = g_strdup ("SOT65P210X110-6AN");
01318 return (EXIT_SUCCESS);
01319 }
01320 else if (!strcmp (footprint_name, "?SOT65P275X110-8N"))
01321 {
01322 footprint_units = g_strdup ("mm");
01323 package_body_length = 1.65;
01324 package_body_width = 3.00;
01325 package_body_height = 1.10;
01326 package_is_radial = FALSE;
01327 number_of_pins = 8;
01328 number_of_columns = 2;
01329 number_of_rows = 4;
01330 count_x = 0;
01331 count_y = 0;
01332 pitch_x = 2.60;
01333 pitch_y = 0.65;
01334 pad_length = 1.05;
01335 pad_width = 0.50;
01336 pad_shape = g_strdup ("rounded pad, elongated");
01337 pad_shapes_type = ROUND_ELONGATED;
01338 thermal = FALSE;
01339 thermal_length = 0.0;
01340 thermal_width = 0.0;
01341 fiducial = FALSE;
01342 fiducial_pad_diameter = 0.00;
01343 fiducial_pad_solder_mask_clearance = 0.00;
01344 silkscreen_length = 0.90;
01345 silkscreen_width = 2.90;
01346 silkscreen_line_width = 0.20;
01347 courtyard_length = 4.20;
01348 courtyard_width = 3.50;
01349 courtyard_line_width = 0.05;
01350 g_free (footprint_name);
01351 footprint_name = g_strdup ("SOT65P275X110-8N");
01352 if (verbose)
01353 {
01354 g_log ("", G_LOG_LEVEL_WARNING,
01355 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01356 footprint_name);
01357 g_log ("", G_LOG_LEVEL_INFO,
01358 (_("%s is also known as")),
01359 footprint_name,
01360 " JEDEC MO-193BA.");
01361 }
01362 return (EXIT_SUCCESS);
01363 }
01364 else if (!strcmp (footprint_name, "?SOT65P280X100-8N"))
01365 {
01366 footprint_units = g_strdup ("mm");
01367 package_body_length = 1.75;
01368 package_body_width = 3.00;
01369 package_body_height = 1.00;
01370 package_is_radial = FALSE;
01371 number_of_pins = 8;
01372 number_of_columns = 2;
01373 number_of_rows = 4;
01374 count_x = 0;
01375 count_y = 0;
01376 pitch_x = 2.70;
01377 pitch_y = 0.65;
01378 pad_length = 0.95;
01379 pad_width = 0.50;
01380 pad_shape = g_strdup ("rounded pad, elongated");
01381 pad_shapes_type = ROUND_ELONGATED;
01382 thermal = FALSE;
01383 thermal_length = 0.0;
01384 thermal_width = 0.0;
01385 fiducial = FALSE;
01386 fiducial_pad_diameter = 0.00;
01387 fiducial_pad_solder_mask_clearance = 0.00;
01388 silkscreen_length = 0.95;
01389 silkscreen_width = 2.90;
01390 silkscreen_line_width = 0.20;
01391 courtyard_length = 4.30;
01392 courtyard_width = 3.50;
01393 courtyard_line_width = 0.05;
01394 g_free (footprint_name);
01395 footprint_name = g_strdup ("SOT65P280X100-8N");
01396 if (verbose)
01397 {
01398 g_log ("", G_LOG_LEVEL_WARNING,
01399 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01400 footprint_name);
01401 }
01402 return (EXIT_SUCCESS);
01403 }
01404 else if (!strcmp (footprint_name, "?SOT65P280X130-8N"))
01405 {
01406 footprint_units = g_strdup ("mm");
01407 package_body_length = 1.75;
01408 package_body_width = 3.00;
01409 package_body_height = 1.30;
01410 package_is_radial = FALSE;
01411 number_of_pins = 8;
01412 number_of_columns = 2;
01413 number_of_rows = 4;
01414 count_x = 0;
01415 count_y = 0;
01416 pitch_x = 2.60;
01417 pitch_y = 0.65;
01418 pad_length = 1.10;
01419 pad_width = 0.50;
01420 pad_shape = g_strdup ("rounded pad, elongated");
01421 pad_shapes_type = ROUND_ELONGATED;
01422 thermal = FALSE;
01423 thermal_length = 0.0;
01424 thermal_width = 0.0;
01425 fiducial = FALSE;
01426 fiducial_pad_diameter = 0.00;
01427 fiducial_pad_solder_mask_clearance = 0.00;
01428 silkscreen_length = 0.85;
01429 silkscreen_width = 2.90;
01430 silkscreen_line_width = 0.20;
01431 courtyard_length = 4.20;
01432 courtyard_width = 3.50;
01433 courtyard_line_width = 0.05;
01434 g_free (footprint_name);
01435 footprint_name = g_strdup ("SOT65P280X130-8N");
01436 if (verbose)
01437 {
01438 g_log ("", G_LOG_LEVEL_WARNING,
01439 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01440 footprint_name);
01441 }
01442 return (EXIT_SUCCESS);
01443 }
01444 else if (!strcmp (footprint_name, "?SOT65P280X145-8AN"))
01445 {
01446 footprint_units = g_strdup ("mm");
01447 package_body_length = 1.75;
01448 package_body_width = 3.00;
01449 package_body_height = 1.45;
01450 package_is_radial = FALSE;
01451 number_of_pins = 8;
01452 number_of_columns = 2;
01453 number_of_rows = 4;
01454 count_x = 0;
01455 count_y = 0;
01456 pitch_x = 2.60;
01457 pitch_y = 0.65;
01458 pad_length = 1.10;
01459 pad_width = 0.50;
01460 pad_shape = g_strdup ("rounded pad, elongated");
01461 pad_shapes_type = ROUND_ELONGATED;
01462 thermal = FALSE;
01463 thermal_length = 0.0;
01464 thermal_width = 0.0;
01465 fiducial = FALSE;
01466 fiducial_pad_diameter = 0.00;
01467 fiducial_pad_solder_mask_clearance = 0.00;
01468 silkscreen_length = 0.85;
01469 silkscreen_width = 2.90;
01470 silkscreen_line_width = 0.20;
01471 courtyard_length = 4.20;
01472 courtyard_width = 3.50;
01473 courtyard_line_width = 0.05;
01474 g_free (footprint_name);
01475 footprint_name = g_strdup ("SOT65P280X145-8AN");
01476 if (verbose)
01477 {
01478 g_log ("", G_LOG_LEVEL_WARNING,
01479 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01480 footprint_name);
01481 g_log ("", G_LOG_LEVEL_INFO,
01482 (_("%s is also known as")),
01483 footprint_name,
01484 " JEDEC MO-178BA.");
01485 }
01486 return (EXIT_SUCCESS);
01487 }
01488 else if (!strcmp (footprint_name, "?SOT65P280X145-8BN"))
01489 {
01490 footprint_units = g_strdup ("mm");
01491 package_body_length = 1.75;
01492 package_body_width = 3.00;
01493 package_body_height = 1.45;
01494 package_is_radial = FALSE;
01495 number_of_pins = 8;
01496 number_of_columns = 2;
01497 number_of_rows = 4;
01498 count_x = 0;
01499 count_y = 0;
01500 pitch_x = 2.60;
01501 pitch_y = 0.65;
01502 pad_length = 1.10;
01503 pad_width = 0.55;
01504 pad_shape = g_strdup ("rounded pad, elongated");
01505 pad_shapes_type = ROUND_ELONGATED;
01506 thermal = FALSE;
01507 thermal_length = 0.0;
01508 thermal_width = 0.0;
01509 fiducial = FALSE;
01510 fiducial_pad_diameter = 0.00;
01511 fiducial_pad_solder_mask_clearance = 0.00;
01512 silkscreen_length = 0.85;
01513 silkscreen_width = 2.90;
01514 silkscreen_line_width = 0.20;
01515 courtyard_length = 4.20;
01516 courtyard_width = 3.50;
01517 courtyard_line_width = 0.05;
01518 g_free (footprint_name);
01519 footprint_name = g_strdup ("SOT65P280X145-8BN");
01520 if (verbose)
01521 {
01522 g_log ("", G_LOG_LEVEL_WARNING,
01523 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01524 footprint_name);
01525 g_log ("", G_LOG_LEVEL_INFO,
01526 (_("%s is also known as")),
01527 footprint_name,
01528 " EIAJ SC-74.");
01529 }
01530 return (EXIT_SUCCESS);
01531 }
01532 else if (!strcmp (footprint_name, "?SOT65P280X145-8N"))
01533 {
01534 footprint_units = g_strdup ("mm");
01535 package_body_length = 1.75;
01536 package_body_width = 3.05;
01537 package_body_height = 1.45;
01538 package_is_radial = FALSE;
01539 number_of_pins = 8;
01540 number_of_columns = 2;
01541 number_of_rows = 4;
01542 count_x = 0;
01543 count_y = 0;
01544 pitch_x = 2.60;
01545 pitch_y = 0.65;
01546 pad_length = 1.10;
01547 pad_width = 0.50;
01548 pad_shape = g_strdup ("rounded pad, elongated");
01549 pad_shapes_type = ROUND_ELONGATED;
01550 thermal = FALSE;
01551 thermal_length = 0.0;
01552 thermal_width = 0.0;
01553 fiducial = FALSE;
01554 fiducial_pad_diameter = 0.00;
01555 fiducial_pad_solder_mask_clearance = 0.00;
01556 silkscreen_length = 0.85;
01557 silkscreen_width = 2.90;
01558 silkscreen_line_width = 0.20;
01559 courtyard_length = 4.20;
01560 courtyard_width = 3.60;
01561 courtyard_line_width = 0.05;
01562 g_free (footprint_name);
01563 footprint_name = g_strdup ("SOT65P280X145-8N");
01564 if (verbose)
01565 {
01566 g_log ("", G_LOG_LEVEL_WARNING,
01567 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01568 footprint_name);
01569 g_log ("", G_LOG_LEVEL_INFO,
01570 (_("%s is also known as")),
01571 footprint_name,
01572 " JEDEC MO-193BA.");
01573 }
01574 return (EXIT_SUCCESS);
01575 }
01576 else if (!strcmp (footprint_name, "?SOT80P330X140-8N"))
01577 {
01578
01579
01580
01581
01582 footprint_units = g_strdup ("mm");
01583 package_body_width = 2.27;
01584 package_body_length = 3.70;
01585 package_body_height = 1.40;
01586 package_is_radial = FALSE;
01587 number_of_pins = 8;
01588 number_of_columns = 2;
01589 number_of_rows = 4;
01590 count_x = 0;
01591 count_y = 0;
01592 pitch_x = 3.10;
01593 pitch_y = 0.80;
01594 pad_length = 1.00;
01595 pad_width = 0.50;
01596 pad_shape = g_strdup ("rectangular pad");
01597 pad_shapes_type = SQUARE;
01598 thermal = FALSE;
01599 thermal_length = 0.0;
01600 thermal_width = 0.0;
01601 fiducial = FALSE;
01602 fiducial_pad_diameter = 0.00;
01603 fiducial_pad_solder_mask_clearance = 0.00;
01604 silkscreen_length = 1.45;
01605 silkscreen_width = 3.50;
01606 silkscreen_line_width = 0.20;
01607 courtyard_length = 4.60;
01608 courtyard_width = 4.20;
01609 courtyard_line_width = 0.05;
01610 g_free (footprint_name);
01611 footprint_name = g_strdup ("SOT80P330X140-8N");
01612 if (verbose)
01613 {
01614 g_log ("", G_LOG_LEVEL_WARNING,
01615 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01616 footprint_name);
01617 g_log ("", G_LOG_LEVEL_INFO,
01618 (_("%s is also known as")),
01619 footprint_name,
01620 " SOT23-8.");
01621 }
01622 return (EXIT_SUCCESS);
01623 }
01624 else if (!strcmp (footprint_name, "?SOT95P228X102-3N"))
01625 {
01626
01627
01628
01629
01630 footprint_units = g_strdup ("mm");
01631 package_body_length = 3.05;
01632 package_body_width = 1.52;
01633 package_body_height = 1.02;
01634 package_is_radial = FALSE;
01635 number_of_pins = 3;
01636 number_of_columns = 2;
01637 number_of_rows = 3;
01638 count_x = 0;
01639 count_y = 0;
01640 pitch_x = 2.20;
01641 pitch_y = 0.95;
01642 pad_length = 1.00;
01643 pad_width = 0.65;
01644 pad_shape = g_strdup ("rectangular pad");
01645 pad_shapes_type = SQUARE;
01646 thermal = FALSE;
01647 thermal_length = 0.0;
01648 thermal_width = 0.0;
01649 fiducial = FALSE;
01650 fiducial_pad_diameter = 0.00;
01651 fiducial_pad_solder_mask_clearance = 0.00;
01652 silkscreen_length = 0.55;
01653 silkscreen_width = 2.80;
01654 silkscreen_line_width = 0.20;
01655 courtyard_length = 3.70;
01656 courtyard_width = 3.60;
01657 courtyard_line_width = 0.05;
01658 g_free (footprint_name);
01659 footprint_name = g_strdup ("SOT95P228X102-3N");
01660 if (verbose)
01661 {
01662 g_log ("", G_LOG_LEVEL_WARNING,
01663 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01664 footprint_name);
01665 }
01666 return (EXIT_SUCCESS);
01667 }
01668 else if (!strcmp (footprint_name, "?SOT95P230X109-3N"))
01669 {
01670
01671
01672
01673
01674 footprint_units = g_strdup ("mm");
01675 package_body_length = 3.05;
01676 package_body_width = 1.40;
01677 package_body_height = 1.09;
01678 package_is_radial = FALSE;
01679 number_of_pins = 3;
01680 number_of_columns = 2;
01681 number_of_rows = 3;
01682 count_x = 0;
01683 count_y = 0;
01684 pitch_x = 2.30;
01685 pitch_y = 0.95;
01686 pad_length = 1.00;
01687 pad_width = 0.60;
01688 pad_shape = g_strdup ("rectangular pad");
01689 pad_shapes_type = SQUARE;
01690 thermal = FALSE;
01691 thermal_length = 0.0;
01692 thermal_width = 0.0;
01693 fiducial = FALSE;
01694 fiducial_pad_diameter = 0.00;
01695 fiducial_pad_solder_mask_clearance = 0.00;
01696 silkscreen_length = 0.65;
01697 silkscreen_width = 2.90;
01698 silkscreen_line_width = 0.20;
01699 courtyard_length = 3.80;
01700 courtyard_width = 3.60;
01701 courtyard_line_width = 0.05;
01702 g_free (footprint_name);
01703 footprint_name = g_strdup ("SOT95P230X109-3N");
01704 if (verbose)
01705 {
01706 g_log ("", G_LOG_LEVEL_WARNING,
01707 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01708 footprint_name);
01709 g_log ("", G_LOG_LEVEL_INFO,
01710 (_("%s is also known as")),
01711 footprint_name,
01712 " JEDEC TO-236AB.");
01713 }
01714 return (EXIT_SUCCESS);
01715 }
01716 else if (!strcmp (footprint_name, "?SOT95P230X110-3N"))
01717 {
01718
01719
01720
01721
01722 footprint_units = g_strdup ("mm");
01723 package_body_length = 3.00;
01724 package_body_width = 1.40;
01725 package_body_height = 1.10;
01726 package_is_radial = FALSE;
01727 number_of_pins = 3;
01728 number_of_columns = 2;
01729 number_of_rows = 3;
01730 count_x = 0;
01731 count_y = 0;
01732 pitch_x = 2.30;
01733 pitch_y = 0.95;
01734 pad_length = 1.00;
01735 pad_width = 0.60;
01736 pad_shape = g_strdup ("rectangular pad");
01737 pad_shapes_type = SQUARE;
01738 thermal = FALSE;
01739 thermal_length = 0.0;
01740 thermal_width = 0.0;
01741 fiducial = FALSE;
01742 fiducial_pad_diameter = 0.00;
01743 fiducial_pad_solder_mask_clearance = 0.00;
01744 silkscreen_length = 0.65;
01745 silkscreen_width = 2.90;
01746 silkscreen_line_width = 0.20;
01747 courtyard_length = 3.80;
01748 courtyard_width = 3.50;
01749 courtyard_line_width = 0.05;
01750 g_free (footprint_name);
01751 footprint_name = g_strdup ("SOT95P230X110-3N");
01752 if (verbose)
01753 {
01754 g_log ("", G_LOG_LEVEL_WARNING,
01755 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01756 footprint_name);
01757 g_log ("", G_LOG_LEVEL_INFO,
01758 (_("%s is also known as")),
01759 footprint_name,
01760 " JEDEC TO-236AB.");
01761 }
01762 return (EXIT_SUCCESS);
01763 }
01764 else if (!strcmp (footprint_name, "?SOT95P230X124-3N"))
01765 {
01766
01767
01768
01769
01770 footprint_units = g_strdup ("mm");
01771 package_body_length = 3.04;
01772 package_body_width = 1.40;
01773 package_body_height = 1.24;
01774 package_is_radial = FALSE;
01775 number_of_pins = 3;
01776 number_of_columns = 2;
01777 number_of_rows = 3;
01778 count_x = 0;
01779 count_y = 0;
01780 pitch_x = 2.20;
01781 pitch_y = 0.95;
01782 pad_length = 1.00;
01783 pad_width = 0.65;
01784 pad_shape = g_strdup ("rectangular pad");
01785 pad_shapes_type = SQUARE;
01786 thermal = FALSE;
01787 thermal_length = 0.0;
01788 thermal_width = 0.0;
01789 fiducial = FALSE;
01790 fiducial_pad_diameter = 0.00;
01791 fiducial_pad_solder_mask_clearance = 0.00;
01792 silkscreen_length = 0.55;
01793 silkscreen_width = 2.90;
01794 silkscreen_line_width = 0.20;
01795 courtyard_length = 3.70;
01796 courtyard_width = 3.60;
01797 courtyard_line_width = 0.05;
01798 g_free (footprint_name);
01799 footprint_name = g_strdup ("SOT95P230X124-3N");
01800 if (verbose)
01801 {
01802 g_log ("", G_LOG_LEVEL_WARNING,
01803 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01804 footprint_name);
01805 g_log ("", G_LOG_LEVEL_INFO,
01806 (_("%s is also known as")),
01807 footprint_name,
01808 " JEDEC TO-236AA.");
01809 }
01810 return (EXIT_SUCCESS);
01811 }
01812 else if (!strcmp (footprint_name, "?SOT95P237X112-3N"))
01813 {
01814
01815
01816
01817
01818
01819
01820
01821
01822
01823
01824 footprint_units = g_strdup ("mm");
01825 package_body_length = 3.04;
01826 package_body_width = 1.40;
01827 package_body_height = 1.12;
01828 package_is_radial = FALSE;
01829 number_of_pins = 3;
01830 number_of_columns = 2;
01831 number_of_rows = 3;
01832 count_x = 0;
01833 count_y = 0;
01834 pitch_x = 2.10;
01835 pitch_y = 0.95;
01836 pad_length = 1.30;
01837 pad_width = 0.60;
01838 pad_shape = g_strdup ("rounded pad, elongated");
01839 pad_shapes_type = ROUND_ELONGATED;
01840 thermal = FALSE;
01841 thermal_length = 0.0;
01842 thermal_width = 0.0;
01843 fiducial = FALSE;
01844 fiducial_pad_diameter = 0.00;
01845 fiducial_pad_solder_mask_clearance = 0.00;
01846 silkscreen_length = 0.20;
01847 silkscreen_width = 2.90;
01848 silkscreen_line_width = 0.20;
01849 courtyard_length = 3.90;
01850 courtyard_width = 3.60;
01851 courtyard_line_width = 0.05;
01852 g_free (footprint_name);
01853 footprint_name = g_strdup ("SOT95P237X112-3N");
01854 if (verbose)
01855 {
01856 g_log ("", G_LOG_LEVEL_INFO,
01857 (_("%s is also known as")),
01858 footprint_name,
01859 " JEDEC TO-236AB.");
01860 }
01861 return (EXIT_SUCCESS);
01862 }
01863 else if (!strcmp (footprint_name, "?SOT95P237X117-3N"))
01864 {
01865 footprint_units = g_strdup ("mm");
01866 package_body_length = 3.04;
01867 package_body_width = 1.40;
01868 package_body_height = 1.17;
01869 package_is_radial = FALSE;
01870 number_of_pins = 3;
01871 number_of_columns = 2;
01872 number_of_rows = 3;
01873 count_x = 0;
01874 count_y = 0;
01875 pitch_x = 2.30;
01876 pitch_y = 0.95;
01877 pad_length = 1.05;
01878 pad_width = 0.60;
01879 pad_shape = g_strdup ("rectangular pad");
01880 pad_shapes_type = SQUARE;
01881 thermal = FALSE;
01882 thermal_length = 0.0;
01883 thermal_width = 0.0;
01884 fiducial = FALSE;
01885 fiducial_pad_diameter = 0.00;
01886 fiducial_pad_solder_mask_clearance = 0.00;
01887 silkscreen_length = 0.60;
01888 silkscreen_width = 2.90;
01889 silkscreen_line_width = 0.20;
01890 courtyard_length = 3.90;
01891 courtyard_width = 3.60;
01892 courtyard_line_width = 0.05;
01893 g_free (footprint_name);
01894 footprint_name = g_strdup ("SOT95P237X117-3N");
01895 if (verbose)
01896 {
01897 g_log ("", G_LOG_LEVEL_WARNING,
01898 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01899 footprint_name);
01900 g_log ("", G_LOG_LEVEL_INFO,
01901 (_("%s is also known as")),
01902 footprint_name,
01903 " JEDEC TO-236AB.");
01904 }
01905 return (EXIT_SUCCESS);
01906 }
01907 else if (!strcmp (footprint_name, "?SOT95P240X110-3N"))
01908 {
01909
01910
01911
01912
01913 footprint_units = g_strdup ("mm");
01914 package_body_length = 3.00;
01915 package_body_width = 1.40;
01916 package_body_height = 1.10;
01917 package_is_radial = FALSE;
01918 number_of_pins = 3;
01919 number_of_columns = 2;
01920 number_of_rows = 3;
01921 count_x = 0;
01922 count_y = 0;
01923 pitch_x = 2.30;
01924 pitch_y = 0.95;
01925 pad_length = 1.05;
01926 pad_width = 0.65;
01927 pad_shape = g_strdup ("rectangular pad");
01928 pad_shapes_type = SQUARE;
01929 thermal = FALSE;
01930 thermal_length = 0.0;
01931 thermal_width = 0.0;
01932 fiducial = FALSE;
01933 fiducial_pad_diameter = 0.00;
01934 fiducial_pad_solder_mask_clearance = 0.00;
01935 silkscreen_length = 0.60;
01936 silkscreen_width = 2.90;
01937 silkscreen_line_width = 0.20;
01938 courtyard_length = 3.90;
01939 courtyard_width = 3.50;
01940 courtyard_line_width = 0.05;
01941 g_free (footprint_name);
01942 footprint_name = g_strdup ("SOT95P240X110-3N");
01943 if (verbose)
01944 {
01945 g_log ("", G_LOG_LEVEL_WARNING,
01946 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01947 footprint_name);
01948 }
01949 return (EXIT_SUCCESS);
01950 }
01951 else if (!strcmp (footprint_name, "?SOT95P240X114-3N"))
01952 {
01953
01954
01955
01956
01957 footprint_units = g_strdup ("mm");
01958 package_body_length = 3.00;
01959 package_body_width = 1.40;
01960 package_body_height = 1.14;
01961 package_is_radial = FALSE;
01962 number_of_pins = 3;
01963 number_of_columns = 2;
01964 number_of_rows = 3;
01965 count_x = 0;
01966 count_y = 0;
01967 pitch_x = 2.30;
01968 pitch_y = 0.95;
01969 pad_length = 1.00;
01970 pad_width = 0.60;
01971 pad_shape = g_strdup ("rectangular pad");
01972 pad_shapes_type = SQUARE;
01973 thermal = FALSE;
01974 thermal_length = 0.0;
01975 thermal_width = 0.0;
01976 fiducial = FALSE;
01977 fiducial_pad_diameter = 0.00;
01978 fiducial_pad_solder_mask_clearance = 0.00;
01979 silkscreen_length = 0.65;
01980 silkscreen_width = 2.90;
01981 silkscreen_line_width = 0.20;
01982 courtyard_length = 3.80;
01983 courtyard_width = 3.50;
01984 courtyard_line_width = 0.05;
01985 g_free (footprint_name);
01986 footprint_name = g_strdup ("SOT95P240X114-3N");
01987 if (verbose)
01988 {
01989 g_log ("", G_LOG_LEVEL_WARNING,
01990 (_("%s: pads are being trimmed to prevent extension under the package body.")),
01991 footprint_name);
01992 }
01993 return (EXIT_SUCCESS);
01994 }
01995 else if (!strcmp (footprint_name, "?SOT95P251X112-3N"))
01996 {
01997
01998
01999
02000
02001 footprint_units = g_strdup ("mm");
02002 package_body_length = 3.04;
02003 package_body_width = 1.52;
02004 package_body_height = 1.12;
02005 package_is_radial = FALSE;
02006 number_of_pins = 3;
02007 number_of_columns = 2;
02008 number_of_rows = 3;
02009 count_x = 0;
02010 count_y = 0;
02011 pitch_x = 2.40;
02012 pitch_y = 0.95;
02013 pad_length = 1.05;
02014 pad_width = 0.65;
02015 pad_shape = g_strdup ("rectangular pad");
02016 pad_shapes_type = SQUARE;
02017 thermal = FALSE;
02018 thermal_length = 0.0;
02019 thermal_width = 0.0;
02020 fiducial = FALSE;
02021 fiducial_pad_diameter = 0.00;
02022 fiducial_pad_solder_mask_clearance = 0.00;
02023 silkscreen_length = 0.70;
02024 silkscreen_width = 2.90;
02025 silkscreen_line_width = 0.20;
02026 courtyard_length = 4.00;
02027 courtyard_width = 3.60;
02028 courtyard_line_width = 0.05;
02029 g_free (footprint_name);
02030 footprint_name = g_strdup ("SOT95P251X112-3N");
02031 if (verbose)
02032 {
02033 g_log ("", G_LOG_LEVEL_WARNING,
02034 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02035 footprint_name);
02036 }
02037 return (EXIT_SUCCESS);
02038 }
02039 else if (!strcmp (footprint_name, "?SOT95P270X145-5N"))
02040 {
02041
02042
02043
02044
02045
02046 footprint_units = g_strdup ("mm");
02047 package_body_length = 3.10;
02048 package_body_width = 1.80;
02049 package_body_height = 1.45;
02050 package_is_radial = FALSE;
02051 number_of_pins = 5;
02052 number_of_columns = 2;
02053 number_of_rows = 3;
02054 count_x = 0;
02055 count_y = 0;
02056 pitch_x = 2.70;
02057 pitch_y = 0.95;
02058 pad_length = 1.15;
02059 pad_width = 0.60;
02060 pad_shape = g_strdup ("rectangular pad");
02061 pad_shapes_type = SQUARE;
02062 thermal = FALSE;
02063 thermal_length = 0.0;
02064 thermal_width = 0.0;
02065 fiducial = FALSE;
02066 fiducial_pad_diameter = 0.00;
02067 fiducial_pad_solder_mask_clearance = 0.00;
02068 silkscreen_length = 0.90;
02069 silkscreen_width = 2.90;
02070 silkscreen_line_width = 0.20;
02071 courtyard_length = 4.40;
02072 courtyard_width = 3.60;
02073 courtyard_line_width = 0.05;
02074 g_free (footprint_name);
02075 footprint_name = g_strdup ("SOT95P270X145-5N");
02076 if (verbose)
02077 {
02078 g_log ("", G_LOG_LEVEL_WARNING,
02079 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02080 footprint_name);
02081 g_log ("", G_LOG_LEVEL_INFO,
02082 (_("%s is also known as")),
02083 footprint_name,
02084 " EIAJ SC-74A.");
02085 }
02086 return (EXIT_SUCCESS);
02087 }
02088 else if (!strcmp (footprint_name, "?SOT95P275X130-3N"))
02089 {
02090
02091
02092
02093
02094 footprint_units = g_strdup ("mm");
02095 package_body_length = 3.10;
02096 package_body_width = 1.70;
02097 package_body_height = 1.30;
02098 package_is_radial = FALSE;
02099 number_of_pins = 3;
02100 number_of_columns = 2;
02101 number_of_rows = 3;
02102 count_x = 0;
02103 count_y = 0;
02104 pitch_x = 2.50;
02105 pitch_y = 0.95;
02106 pad_length = 1.25;
02107 pad_width = 0.60;
02108 pad_shape = g_strdup ("rectangular pad");
02109 pad_shapes_type = SQUARE;
02110 thermal = FALSE;
02111 thermal_length = 0.0;
02112 thermal_width = 0.0;
02113 fiducial = FALSE;
02114 fiducial_pad_diameter = 0.00;
02115 fiducial_pad_solder_mask_clearance = 0.00;
02116 silkscreen_length = 0.40;
02117 silkscreen_width = 3.10;
02118 silkscreen_line_width = 0.20;
02119 courtyard_length = 4.30;
02120 courtyard_width = 3.60;
02121 courtyard_line_width = 0.05;
02122 g_free (footprint_name);
02123 footprint_name = g_strdup ("SOT95P275X130-3N");
02124 return (EXIT_SUCCESS);
02125 }
02126 else if (!strcmp (footprint_name, "?SOT95P275X145-6N"))
02127 {
02128
02129
02130
02131
02132 footprint_units = g_strdup ("mm");
02133 package_body_length = 3.10;
02134 package_body_width = 1.80;
02135 package_body_height = 1.45;
02136 package_is_radial = FALSE;
02137 number_of_pins = 6;
02138 number_of_columns = 2;
02139 number_of_rows = 3;
02140 count_x = 0;
02141 count_y = 0;
02142 pitch_x = 2.50;
02143 pitch_y = 0.95;
02144 pad_length = 1.25;
02145 pad_width = 0.65;
02146 pad_shape = g_strdup ("rectangular pad");
02147 pad_shapes_type = SQUARE;
02148 thermal = FALSE;
02149 thermal_length = 0.0;
02150 thermal_width = 0.0;
02151 fiducial = FALSE;
02152 fiducial_pad_diameter = 0.00;
02153 fiducial_pad_solder_mask_clearance = 0.00;
02154 silkscreen_length = 0.40;
02155 silkscreen_width = 3.10;
02156 silkscreen_line_width = 0.20;
02157 courtyard_length = 4.30;
02158 courtyard_width = 3.60;
02159 courtyard_line_width = 0.05;
02160 g_free (footprint_name);
02161 footprint_name = g_strdup ("SOT95P275X145-6N");
02162 return (EXIT_SUCCESS);
02163 }
02164 else if (!strcmp (footprint_name, "?SOT95P279X142-5N"))
02165 {
02166
02167
02168
02169
02170
02171 footprint_units = g_strdup ("mm");
02172 package_body_length = 3.04;
02173 package_body_width = 1.80;
02174 package_body_height = 1.42;
02175 package_is_radial = FALSE;
02176 number_of_pins = 5;
02177 number_of_columns = 2;
02178 number_of_rows = 3;
02179 count_x = 0;
02180 count_y = 0;
02181 pitch_x = 2.70;
02182 pitch_y = 0.95;
02183 pad_length = 1.10;
02184 pad_width = 0.60;
02185 pad_shape = g_strdup ("rectangular pad");
02186 pad_shapes_type = SQUARE;
02187 thermal = FALSE;
02188 thermal_length = 0.0;
02189 thermal_width = 0.0;
02190 fiducial = FALSE;
02191 fiducial_pad_diameter = 0.00;
02192 fiducial_pad_solder_mask_clearance = 0.00;
02193 silkscreen_length = 0.95;
02194 silkscreen_width = 2.90;
02195 silkscreen_line_width = 0.20;
02196 courtyard_length = 4.30;
02197 courtyard_width = 3.60;
02198 courtyard_line_width = 0.05;
02199 g_free (footprint_name);
02200 footprint_name = g_strdup ("SOT95P279X142-5N");
02201 if (verbose)
02202 {
02203 g_log ("", G_LOG_LEVEL_WARNING,
02204 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02205 footprint_name);
02206 g_log ("", G_LOG_LEVEL_INFO,
02207 (_("%s is also known as")),
02208 footprint_name,
02209 " SOT23-5.");
02210 }
02211 return (EXIT_SUCCESS);
02212 }
02213 else if (!strcmp (footprint_name, "?SOT95P280X100-5N"))
02214 {
02215
02216
02217
02218
02219 footprint_units = g_strdup ("mm");
02220 package_body_length = 3.00;
02221 package_body_width = 1.75;
02222 package_body_height = 1.00;
02223 package_is_radial = FALSE;
02224 number_of_pins = 5;
02225 number_of_columns = 2;
02226 number_of_rows = 3;
02227 count_x = 0;
02228 count_y = 0;
02229 pitch_x = 2.70;
02230 pitch_y = 0.95;
02231 pad_length = 1.10;
02232 pad_width = 0.55;
02233 pad_shape = g_strdup ("rounded pad, elongated");
02234 pad_shapes_type = ROUND_ELONGATED;
02235 thermal = FALSE;
02236 thermal_length = 0.0;
02237 thermal_width = 0.0;
02238 fiducial = FALSE;
02239 fiducial_pad_diameter = 0.00;
02240 fiducial_pad_solder_mask_clearance = 0.00;
02241 silkscreen_length = 0.95;
02242 silkscreen_width = 2.90;
02243 silkscreen_line_width = 0.20;
02244 courtyard_length = 4.30;
02245 courtyard_width = 3.50;
02246 courtyard_line_width = 0.05;
02247 g_free (footprint_name);
02248 footprint_name = g_strdup ("SOT95P280X100-5N");
02249 if (verbose)
02250 {
02251 g_log ("", G_LOG_LEVEL_WARNING,
02252 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02253 footprint_name);
02254 g_log ("", G_LOG_LEVEL_INFO,
02255 (_("%s is also known as")),
02256 footprint_name,
02257 " JEDEC MO-193.");
02258 }
02259 return (EXIT_SUCCESS);
02260 }
02261 else if (!strcmp (footprint_name, "?SOT95P280X100-6N"))
02262 {
02263
02264
02265
02266
02267 footprint_units = g_strdup ("mm");
02268 package_body_length = 3.00;
02269 package_body_width = 1.75;
02270 package_body_height = 1.00;
02271 package_is_radial = FALSE;
02272 number_of_pins = 6;
02273 number_of_columns = 2;
02274 number_of_rows = 3;
02275 count_x = 0;
02276 count_y = 0;
02277 pitch_x = 2.70;
02278 pitch_y = 0.95;
02279 pad_length = 1.10;
02280 pad_width = 0.55;
02281 pad_shape = g_strdup ("rounded pad, elongated");
02282 pad_shapes_type = ROUND_ELONGATED;
02283 thermal = FALSE;
02284 thermal_length = 0.0;
02285 thermal_width = 0.0;
02286 fiducial = FALSE;
02287 fiducial_pad_diameter = 0.00;
02288 fiducial_pad_solder_mask_clearance = 0.00;
02289 silkscreen_length = 0.95;
02290 silkscreen_width = 2.90;
02291 silkscreen_line_width = 0.20;
02292 courtyard_length = 4.30;
02293 courtyard_width = 3.50;
02294 courtyard_line_width = 0.05;
02295 g_free (footprint_name);
02296 footprint_name = g_strdup ("SOT95P280X100-6N");
02297 if (verbose)
02298 {
02299 g_log ("", G_LOG_LEVEL_WARNING,
02300 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02301 footprint_name);
02302 g_log ("", G_LOG_LEVEL_INFO,
02303 (_("%s is also known as")),
02304 footprint_name,
02305 " JEDEC MO-193.");
02306 }
02307 return (EXIT_SUCCESS);
02308 }
02309 else if (!strcmp (footprint_name, "?SOT95P280X110-5N"))
02310 {
02311
02312
02313
02314
02315
02316
02317 footprint_units = g_strdup ("mm");
02318 package_body_length = 3.05;
02319 package_body_width = 1.75;
02320 package_body_height = 1.10;
02321 package_is_radial = FALSE;
02322 number_of_pins = 5;
02323 number_of_columns = 2;
02324 number_of_rows = 3;
02325 count_x = 0;
02326 count_y = 0;
02327 pitch_x = 2.70;
02328 pitch_y = 0.95;
02329 pad_length = 1.10;
02330 pad_width = 0.60;
02331 pad_shape = g_strdup ("rectangular pad");
02332 pad_shapes_type = SQUARE;
02333 thermal = FALSE;
02334 thermal_length = 0.0;
02335 thermal_width = 0.0;
02336 fiducial = FALSE;
02337 fiducial_pad_diameter = 0.00;
02338 fiducial_pad_solder_mask_clearance = 0.00;
02339 silkscreen_length = 0.95;
02340 silkscreen_width = 2.90;
02341 silkscreen_line_width = 0.20;
02342 courtyard_length = 4.30;
02343 courtyard_width = 3.60;
02344 courtyard_line_width = 0.05;
02345 g_free (footprint_name);
02346 footprint_name = g_strdup ("SOT95P280X110-5N");
02347 if (verbose)
02348 {
02349 g_log ("", G_LOG_LEVEL_WARNING,
02350 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02351 footprint_name);
02352 g_log ("", G_LOG_LEVEL_INFO,
02353 (_("%s is also known as")),
02354 footprint_name,
02355 " JEDEC MO-193AB.");
02356 }
02357 return (EXIT_SUCCESS);
02358 }
02359 else if (!strcmp (footprint_name, "?SOT95P280X110-6N"))
02360 {
02361
02362
02363
02364
02365
02366
02367
02368 footprint_units = g_strdup ("mm");
02369 package_body_length = 3.05;
02370 package_body_width = 1.75;
02371 package_body_height = 1.10;
02372 package_is_radial = FALSE;
02373 number_of_pins = 6;
02374 number_of_columns = 2;
02375 number_of_rows = 3;
02376 count_x = 0;
02377 count_y = 0;
02378 pitch_x = 2.70;
02379 pitch_y = 0.95;
02380 pad_length = 1.10;
02381 pad_width = 0.60;
02382 pad_shape = g_strdup ("rectangular pad");
02383 pad_shapes_type = SQUARE;
02384 thermal = FALSE;
02385 thermal_length = 0.0;
02386 thermal_width = 0.0;
02387 fiducial = FALSE;
02388 fiducial_pad_diameter = 0.00;
02389 fiducial_pad_solder_mask_clearance = 0.00;
02390 silkscreen_length = 0.95;
02391 silkscreen_width = 2.90;
02392 silkscreen_line_width = 0.20;
02393 courtyard_length = 4.30;
02394 courtyard_width = 3.60;
02395 courtyard_line_width = 0.05;
02396 g_free (footprint_name);
02397 footprint_name = g_strdup ("SOT95P280X110-6N");
02398 if (verbose)
02399 {
02400 g_log ("", G_LOG_LEVEL_WARNING,
02401 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02402 footprint_name);
02403 g_log ("", G_LOG_LEVEL_INFO,
02404 (_("%s is also known as")),
02405 footprint_name,
02406 " JEDEC MO-193AA.");
02407 }
02408 return (EXIT_SUCCESS);
02409 }
02410 else if (!strcmp (footprint_name, "?SOT95P280X115-6N"))
02411 {
02412
02413
02414
02415
02416 footprint_units = g_strdup ("mm");
02417 package_body_length = 3.10;
02418 package_body_width = 2.00;
02419 package_body_height = 1.15;
02420 package_is_radial = FALSE;
02421 number_of_pins = 6;
02422 number_of_columns = 2;
02423 number_of_rows = 3;
02424 pitch_x = 2.70;
02425 pitch_y = 0.95;
02426 count_x = 0;
02427 count_y = 0;
02428 pad_length = 1.00;
02429 pad_width = 0.60;
02430 pad_shape = g_strdup ("rectangular pad");
02431 pad_shapes_type = SQUARE;
02432 thermal = FALSE;
02433 thermal_length = 0.0;
02434 thermal_width = 0.0;
02435 fiducial = FALSE;
02436 fiducial_pad_diameter = 0.00;
02437 fiducial_pad_solder_mask_clearance = 0.00;
02438 silkscreen_length = 1.05;
02439 silkscreen_width = 2.90;
02440 silkscreen_line_width = 0.20;
02441 courtyard_length = 4.20;
02442 courtyard_width = 3.60;
02443 courtyard_line_width = 0.05;
02444 g_free (footprint_name);
02445 footprint_name = g_strdup ("SOT95P280X115-6N");
02446 if (verbose)
02447 {
02448 g_log ("", G_LOG_LEVEL_WARNING,
02449 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02450 footprint_name);
02451 g_log ("", G_LOG_LEVEL_INFO,
02452 (_("%s is also known as")),
02453 footprint_name,
02454 " JEDEC MO-178.");
02455 }
02456 return (EXIT_SUCCESS);
02457 }
02458 else if (!strcmp (footprint_name, "?SOT95P280X135-3AN"))
02459 {
02460
02461
02462
02463
02464 footprint_units = g_strdup ("mm");
02465 package_body_length = 3.00;
02466 package_body_width = 1.70;
02467 package_body_height = 1.35;
02468 package_is_radial = FALSE;
02469 number_of_pins = 3;
02470 number_of_columns = 2;
02471 number_of_rows = 3;
02472 count_x = 0;
02473 count_y = 0;
02474 pitch_x = 2.60;
02475 pitch_y = 0.95;
02476 pad_length = 1.10;
02477 pad_width = 0.60;
02478 pad_shape = g_strdup ("rectangular pad");
02479 pad_shapes_type = SQUARE;
02480 thermal = FALSE;
02481 thermal_length = 0.0;
02482 thermal_width = 0.0;
02483 fiducial = FALSE;
02484 fiducial_pad_diameter = 0.00;
02485 fiducial_pad_solder_mask_clearance = 0.00;
02486 silkscreen_length = 0.85;
02487 silkscreen_width = 2.90;
02488 silkscreen_line_width = 0.20;
02489 courtyard_length = 4.20;
02490 courtyard_width = 3.50;
02491 courtyard_line_width = 0.05;
02492 g_free (footprint_name);
02493 footprint_name = g_strdup ("SOT95P280X135-3AN");
02494 if (verbose)
02495 {
02496 g_log ("", G_LOG_LEVEL_WARNING,
02497 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02498 footprint_name);
02499 }
02500 return (EXIT_SUCCESS);
02501 }
02502 else if (!strcmp (footprint_name, "?SOT95P280X135-3N"))
02503 {
02504
02505
02506
02507
02508 footprint_units = g_strdup ("mm");
02509 package_body_length = 3.00;
02510 package_body_width = 1.70;
02511 package_body_height = 1.35;
02512 package_is_radial = FALSE;
02513 number_of_pins = 3;
02514 number_of_columns = 2;
02515 number_of_rows = 3;
02516 count_x = 0;
02517 count_y = 0;
02518 pitch_x = 2.60;
02519 pitch_y = 0.95;
02520 pad_length = 1.10;
02521 pad_width = 0.65;
02522 pad_shape = g_strdup ("rectangular pad");
02523 pad_shapes_type = SQUARE;
02524 thermal = FALSE;
02525 thermal_length = 0.0;
02526 thermal_width = 0.0;
02527 fiducial = FALSE;
02528 fiducial_pad_diameter = 0.00;
02529 fiducial_pad_solder_mask_clearance = 0.00;
02530 silkscreen_length = 0.85;
02531 silkscreen_width = 2.90;
02532 silkscreen_line_width = 0.20;
02533 courtyard_length = 4.20;
02534 courtyard_width = 3.50;
02535 courtyard_line_width = 0.05;
02536 g_free (footprint_name);
02537 footprint_name = g_strdup ("SOT95P280X135-3N");
02538 if (verbose)
02539 {
02540 g_log ("", G_LOG_LEVEL_WARNING,
02541 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02542 footprint_name);
02543 }
02544 return (EXIT_SUCCESS);
02545 }
02546 else if (!strcmp (footprint_name, "?SOT95P280X135-5N"))
02547 {
02548
02549
02550
02551
02552 footprint_units = g_strdup ("mm");
02553 package_body_length = 3.00;
02554 package_body_width = 1.70;
02555 package_body_height = 1.35;
02556 package_is_radial = FALSE;
02557 number_of_pins = 5;
02558 number_of_columns = 2;
02559 number_of_rows = 3;
02560 count_x = 0;
02561 count_y = 0;
02562 pitch_x = 2.60;
02563 pitch_y = 0.95;
02564 pad_length = 1.10;
02565 pad_width = 0.60;
02566 pad_shape = g_strdup ("rectangular pad");
02567 pad_shapes_type = SQUARE;
02568 thermal = FALSE;
02569 thermal_length = 0.0;
02570 thermal_width = 0.0;
02571 fiducial = FALSE;
02572 fiducial_pad_diameter = 0.00;
02573 fiducial_pad_solder_mask_clearance = 0.00;
02574 silkscreen_length = 0.85;
02575 silkscreen_width = 2.90;
02576 silkscreen_line_width = 0.20;
02577 courtyard_length = 4.20;
02578 courtyard_width = 3.50;
02579 courtyard_line_width = 0.05;
02580 g_free (footprint_name);
02581 footprint_name = g_strdup ("SOT95P280X135-5N");
02582 if (verbose)
02583 {
02584 g_log ("", G_LOG_LEVEL_WARNING,
02585 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02586 footprint_name);
02587 g_log ("", G_LOG_LEVEL_INFO,
02588 (_("%s is also known as")),
02589 footprint_name,
02590 " JEDEC MO-178.");
02591 }
02592 return (EXIT_SUCCESS);
02593 }
02594 else if (!strcmp (footprint_name, "?SOT95P280X145-5AN"))
02595 {
02596
02597
02598
02599
02600
02601 footprint_units = g_strdup ("mm");
02602 package_body_length = 3.00;
02603 package_body_width = 1.75;
02604 package_body_height = 1.45;
02605 package_is_radial = FALSE;
02606 number_of_pins = 5;
02607 number_of_columns = 2;
02608 number_of_rows = 3;
02609 count_x = 0;
02610 count_y = 0;
02611 pitch_x = 2.60;
02612 pitch_y = 0.95;
02613 pad_length = 1.10;
02614 pad_width = 0.60;
02615 pad_shape = g_strdup ("rectangular pad");
02616 pad_shapes_type = SQUARE;
02617 thermal = FALSE;
02618 thermal_length = 0.0;
02619 thermal_width = 0.0;
02620 fiducial = FALSE;
02621 fiducial_pad_diameter = 0.00;
02622 fiducial_pad_solder_mask_clearance = 0.00;
02623 silkscreen_length = 0.85;
02624 silkscreen_width = 2.90;
02625 silkscreen_line_width = 0.20;
02626 courtyard_length = 4.20;
02627 courtyard_width = 3.50;
02628 courtyard_line_width = 0.05;
02629 g_free (footprint_name);
02630 footprint_name = g_strdup ("SOT95P280X145-5AN");
02631 if (verbose)
02632 {
02633 g_log ("", G_LOG_LEVEL_WARNING,
02634 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02635 footprint_name);
02636 g_log ("", G_LOG_LEVEL_INFO,
02637 (_("%s is also known as")),
02638 footprint_name,
02639 " JEDEC MO-178AA.");
02640 }
02641 return (EXIT_SUCCESS);
02642 }
02643 else if (!strcmp (footprint_name, "?SOT95P280X145-5N"))
02644 {
02645
02646
02647
02648
02649
02650
02651 footprint_units = g_strdup ("mm");
02652 package_body_length = 3.05;
02653 package_body_width = 1.75;
02654 package_body_height = 1.45;
02655 package_is_radial = FALSE;
02656 number_of_pins = 5;
02657 number_of_columns = 2;
02658 number_of_rows = 3;
02659 count_x = 0;
02660 count_y = 0;
02661 pitch_x = 2.60;
02662 pitch_y = 0.95;
02663 pad_length = 1.10;
02664 pad_width = 0.60;
02665 pad_shape = g_strdup ("rectangular pad");
02666 pad_shapes_type = SQUARE;
02667 thermal = FALSE;
02668 thermal_length = 0.0;
02669 thermal_width = 0.0;
02670 fiducial = FALSE;
02671 fiducial_pad_diameter = 0.00;
02672 fiducial_pad_solder_mask_clearance = 0.00;
02673 silkscreen_length = 0.85;
02674 silkscreen_width = 2.90;
02675 silkscreen_line_width = 0.20;
02676 courtyard_length = 4.20;
02677 courtyard_width = 3.60;
02678 courtyard_line_width = 0.05;
02679 g_free (footprint_name);
02680 footprint_name = g_strdup ("SOT95P280X145-5N");
02681 if (verbose)
02682 {
02683 g_log ("", G_LOG_LEVEL_WARNING,
02684 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02685 footprint_name);
02686 g_log ("", G_LOG_LEVEL_INFO,
02687 (_("%s is also known as")),
02688 footprint_name,
02689 " JEDEC MO-178AA.");
02690 }
02691 return (EXIT_SUCCESS);
02692 }
02693 else if (!strcmp (footprint_name, "?SOT95P280X145-6AN"))
02694 {
02695
02696
02697
02698
02699
02700 footprint_units = g_strdup ("mm");
02701 package_body_length = 3.00;
02702 package_body_width = 1.70;
02703 package_body_height = 1.45;
02704 package_is_radial = FALSE;
02705 number_of_pins = 6;
02706 number_of_columns = 2;
02707 number_of_rows = 3;
02708 count_x = 0;
02709 count_y = 0;
02710 pitch_x = 2.60;
02711 pitch_y = 0.95;
02712 pad_length = 1.10;
02713 pad_width = 0.60;
02714 pad_shape = g_strdup ("rectangular pad");
02715 pad_shapes_type = SQUARE;
02716 thermal = FALSE;
02717 thermal_length = 0.0;
02718 thermal_width = 0.0;
02719 fiducial = FALSE;
02720 fiducial_pad_diameter = 0.00;
02721 fiducial_pad_solder_mask_clearance = 0.00;
02722 silkscreen_length = 0.85;
02723 silkscreen_width = 2.90;
02724 silkscreen_line_width = 0.20;
02725 courtyard_length = 4.20;
02726 courtyard_width = 3.50;
02727 courtyard_line_width = 0.05;
02728 g_free (footprint_name);
02729 footprint_name = g_strdup ("SOT95P280X145-6AN");
02730 if (verbose)
02731 {
02732 g_log ("", G_LOG_LEVEL_WARNING,
02733 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02734 footprint_name);
02735 g_log ("", G_LOG_LEVEL_INFO,
02736 (_("%s is also known as")),
02737 footprint_name,
02738 " JEDEC MO-178AB.");
02739 }
02740 return (EXIT_SUCCESS);
02741 }
02742 else if (!strcmp (footprint_name, "?SOT95P280X145-6N"))
02743 {
02744
02745
02746
02747
02748
02749 footprint_units = g_strdup ("mm");
02750 package_body_length = 3.05;
02751 package_body_width = 1.75;
02752 package_body_height = 1.45;
02753 package_is_radial = FALSE;
02754 number_of_pins = 6;
02755 number_of_columns = 2;
02756 number_of_rows = 3;
02757 count_x = 0;
02758 count_y = 0;
02759 pitch_x = 2.60;
02760 pitch_y = 0.95;
02761 pad_length = 1.10;
02762 pad_width = 0.60;
02763 pad_shape = g_strdup ("rectangular pad");
02764 pad_shapes_type = SQUARE;
02765 thermal = FALSE;
02766 thermal_length = 0.0;
02767 thermal_width = 0.0;
02768 fiducial = FALSE;
02769 fiducial_pad_diameter = 0.00;
02770 fiducial_pad_solder_mask_clearance = 0.00;
02771 silkscreen_length = 0.85;
02772 silkscreen_width = 2.90;
02773 silkscreen_line_width = 0.20;
02774 courtyard_length = 4.20;
02775 courtyard_width = 3.60;
02776 courtyard_line_width = 0.05;
02777 g_free (footprint_name);
02778 footprint_name = g_strdup ("SOT95P280X145-6N");
02779 if (verbose)
02780 {
02781 g_log ("", G_LOG_LEVEL_WARNING,
02782 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02783 footprint_name);
02784 g_log ("", G_LOG_LEVEL_INFO,
02785 (_("%s is also known as")),
02786 footprint_name,
02787 " JEDEC MO-178AB.");
02788 }
02789 return (EXIT_SUCCESS);
02790 }
02791 else if (!strcmp (footprint_name, "?SOT95P284X122-5N"))
02792 {
02793
02794
02795
02796
02797 footprint_units = g_strdup ("mm");
02798 package_body_length = 2.99;
02799 package_body_width = 1.67;
02800 package_body_height = 1.22;
02801 package_is_radial = FALSE;
02802 number_of_pins = 5;
02803 number_of_columns = 2;
02804 number_of_rows = 3;
02805 count_x = 0;
02806 count_y = 0;
02807 pitch_x = 2.60;
02808 pitch_y = 0.95;
02809 pad_length = 1.10;
02810 pad_width = 0.60;
02811 pad_shape = g_strdup ("rectangular pad");
02812 pad_shapes_type = SQUARE;
02813 thermal = FALSE;
02814 thermal_length = 0.0;
02815 thermal_width = 0.0;
02816 fiducial = FALSE;
02817 fiducial_pad_diameter = 0.00;
02818 fiducial_pad_solder_mask_clearance = 0.00;
02819 silkscreen_length = 0.85;
02820 silkscreen_width = 2.90;
02821 silkscreen_line_width = 0.20;
02822 courtyard_length = 4.20;
02823 courtyard_width = 3.50;
02824 courtyard_line_width = 0.05;
02825 g_free (footprint_name);
02826 footprint_name = g_strdup ("SOT95P284X122-5N");
02827 if (verbose)
02828 {
02829 g_log ("", G_LOG_LEVEL_WARNING,
02830 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02831 footprint_name);
02832 g_log ("", G_LOG_LEVEL_INFO,
02833 (_("%s is also known as")),
02834 footprint_name,
02835 " JEDEC MO-178AA.");
02836 }
02837 return (EXIT_SUCCESS);
02838 }
02839 else if (!strcmp (footprint_name, "?SOT95P284X122-6N"))
02840 {
02841
02842
02843
02844
02845
02846
02847 footprint_units = g_strdup ("mm");
02848 package_body_length = 3.00;
02849 package_body_width = 1.70;
02850 package_body_height = 1.22;
02851 package_is_radial = FALSE;
02852 number_of_pins = 6;
02853 number_of_columns = 2;
02854 number_of_rows = 3;
02855 count_x = 0;
02856 count_y = 0;
02857 pitch_x = 2.60;
02858 pitch_y = 0.95;
02859 pad_length = 1.10;
02860 pad_width = 0.60;
02861 pad_shape = g_strdup ("rectangular pad");
02862 pad_shapes_type = SQUARE;
02863 thermal = FALSE;
02864 thermal_length = 0.0;
02865 thermal_width = 0.0;
02866 fiducial = FALSE;
02867 fiducial_pad_diameter = 0.00;
02868 fiducial_pad_solder_mask_clearance = 0.00;
02869 silkscreen_length = 0.85;
02870 silkscreen_width = 2.90;
02871 silkscreen_line_width = 0.20;
02872 courtyard_length = 4.20;
02873 courtyard_width = 3.50;
02874 courtyard_line_width = 0.05;
02875 g_free (footprint_name);
02876 footprint_name = g_strdup ("SOT95P284X122-6N");
02877 if (verbose)
02878 {
02879 g_log ("", G_LOG_LEVEL_WARNING,
02880 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02881 footprint_name);
02882 g_log ("", G_LOG_LEVEL_INFO,
02883 (_("%s is also known as")),
02884 footprint_name,
02885 " JEDEC MO-178AB.");
02886 }
02887 return (EXIT_SUCCESS);
02888 }
02889 else if (!strcmp (footprint_name, "?SOT95P285X140-3N"))
02890 {
02891
02892
02893
02894
02895 footprint_units = g_strdup ("mm");
02896 package_body_length = 3.10;
02897 package_body_width = 1.70;
02898 package_body_height = 1.40;
02899 package_is_radial = FALSE;
02900 number_of_pins = 3;
02901 number_of_columns = 2;
02902 number_of_rows = 3;
02903 count_x = 0;
02904 count_y = 0;
02905 pitch_x = 2.60;
02906 pitch_y = 0.95;
02907 pad_length = 1.10;
02908 pad_width = 0.60;
02909 pad_shape = g_strdup ("rectangular pad");
02910 pad_shapes_type = SQUARE;
02911 thermal = FALSE;
02912 thermal_length = 0.0;
02913 thermal_width = 0.0;
02914 fiducial = FALSE;
02915 fiducial_pad_diameter = 0.00;
02916 fiducial_pad_solder_mask_clearance = 0.00;
02917 silkscreen_length = 0.85;
02918 silkscreen_width = 3.00;
02919 silkscreen_line_width = 0.20;
02920 courtyard_length = 4.20;
02921 courtyard_width = 3.60;
02922 courtyard_line_width = 0.05;
02923 g_free (footprint_name);
02924 footprint_name = g_strdup ("SOT95P285X140-3N");
02925 if (verbose)
02926 {
02927 g_log ("", G_LOG_LEVEL_WARNING,
02928 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02929 footprint_name);
02930 g_log ("", G_LOG_LEVEL_INFO,
02931 (_("%s is also known as")),
02932 footprint_name,
02933 " SC-59.");
02934 }
02935 return (EXIT_SUCCESS);
02936 }
02937 else if (!strcmp (footprint_name, "?SOT95P285X90-6N"))
02938 {
02939
02940
02941
02942
02943 footprint_units = g_strdup ("mm");
02944 package_body_length = 3.07;
02945 package_body_width = 1.75;
02946 package_body_height = 0.90;
02947 package_is_radial = FALSE;
02948 number_of_pins = 6;
02949 number_of_columns = 2;
02950 number_of_rows = 3;
02951 count_x = 0;
02952 count_y = 0;
02953 pitch_x = 2.70;
02954 pitch_y = 0.95;
02955 pad_length = 1.05;
02956 pad_width = 0.60;
02957 pad_shape = g_strdup ("rectangular pad");
02958 pad_shapes_type = SQUARE;
02959 thermal = FALSE;
02960 thermal_length = 0.0;
02961 thermal_width = 0.0;
02962 fiducial = FALSE;
02963 fiducial_pad_diameter = 0.00;
02964 fiducial_pad_solder_mask_clearance = 0.00;
02965 silkscreen_length = 1.00;
02966 silkscreen_width = 3.00;
02967 silkscreen_line_width = 0.20;
02968 courtyard_length = 4.30;
02969 courtyard_width = 3.60;
02970 courtyard_line_width = 0.05;
02971 g_free (footprint_name);
02972 footprint_name = g_strdup ("SOT95P285X90-6N");
02973 if (verbose)
02974 {
02975 g_log ("", G_LOG_LEVEL_WARNING,
02976 (_("%s: pads are being trimmed to prevent extension under the package body.")),
02977 footprint_name);
02978 g_log ("", G_LOG_LEVEL_INFO,
02979 (_("%s is also known as")),
02980 footprint_name,
02981 " JEDEC MO-193AA.");
02982 }
02983 return (EXIT_SUCCESS);
02984 }
02985 else if (!strcmp (footprint_name, "?SOT95P470X124-8N"))
02986 {
02987
02988
02989
02990
02991 footprint_units = g_strdup ("mm");
02992 package_body_length = 4.18;
02993 package_body_width = 3.42;
02994 package_body_height = 1.24;
02995 package_is_radial = FALSE;
02996 number_of_pins = 8;
02997 number_of_columns = 2;
02998 number_of_rows = 4;
02999 count_x = 0;
03000 count_y = 0;
03001 pitch_x = 4.40;
03002 pitch_y = 0.95;
03003 pad_length = 1.20;
03004 pad_width = 0.60;
03005 pad_shape = g_strdup ("rounded pad, elongated");
03006 pad_shapes_type = ROUND_ELONGATED;
03007 thermal = FALSE;
03008 thermal_length = 0.0;
03009 thermal_width = 0.0;
03010 fiducial = FALSE;
03011 fiducial_pad_diameter = 0.00;
03012 fiducial_pad_solder_mask_clearance = 0.00;
03013 silkscreen_length = 2.55;
03014 silkscreen_width = 4.10;
03015 silkscreen_line_width = 0.20;
03016 courtyard_length = 6.10;
03017 courtyard_width = 4.70;
03018 courtyard_line_width = 0.05;
03019 g_free (footprint_name);
03020 footprint_name = g_strdup ("SOT95P470X124-8N");
03021 if (verbose)
03022 {
03023 g_log ("", G_LOG_LEVEL_WARNING,
03024 (_("%s: pads are being trimmed to prevent extension under the package body.")),
03025 footprint_name);
03026 }
03027 return (EXIT_SUCCESS);
03028 }
03029 else if (!strcmp (footprint_name, "?SOT100P230X110-3N"))
03030 {
03031 footprint_units = g_strdup ("mm");
03032 package_body_length = 3.00;
03033 package_body_width = 1.40;
03034 package_body_height = 1.10;
03035 package_is_radial = FALSE;
03036 number_of_pins = 3;
03037 number_of_columns = 2;
03038 number_of_rows = 3;
03039 count_x = 0;
03040 count_y = 0;
03041 pitch_x = 1.00;
03042 pitch_y = 1.00;
03043 pad_length = 1.10;
03044 pad_width = 0.60;
03045 pad_shape = g_strdup ("rounded pad, elongated");
03046 pad_shapes_type = ROUND_ELONGATED;
03047 thermal = FALSE;
03048 thermal_length = 0.0;
03049 thermal_width = 0.0;
03050 fiducial = FALSE;
03051 fiducial_pad_diameter = 0.00;
03052 fiducial_pad_solder_mask_clearance = 0.00;
03053 silkscreen_length = 0.40;
03054 silkscreen_width = 3.00;
03055 courtyard_length = 3.70;
03056 courtyard_width = 3.50;
03057 g_free (footprint_name);
03058 footprint_name = g_strdup ("SOT100P230X110-3N");
03059 return (EXIT_SUCCESS);
03060 }
03061 else if (!strcmp (footprint_name, "?SOT127P700X180-6N"))
03062 {
03063 footprint_units = g_strdup ("mm");
03064 package_body_length = 6.55;
03065 package_body_width = 3.55;
03066 package_body_height = 1.80;
03067 package_is_radial = FALSE;
03068 number_of_pins = 6;
03069 number_of_columns = 2;
03070 number_of_rows = 5;
03071 count_x = 0;
03072 count_y = 0;
03073 pitch_x = 6.00;
03074 pitch_y = 1.27;
03075 pad_length = 2.05;
03076 pad_width = 0.65;
03077 pad_shape = g_strdup ("rectangular pad");
03078 pad_shapes_type = SQUARE;
03079 thermal = TRUE;
03080 thermal_length = 2.05;
03081 thermal_width = 3.20;
03082 fiducial = FALSE;
03083 fiducial_pad_diameter = 0.00;
03084 fiducial_pad_solder_mask_clearance = 0.00;
03085 silkscreen_length = 3.30;
03086 silkscreen_width = 6.50;
03087 silkscreen_line_width = 0.20;
03088 courtyard_length = 8.60;
03089 courtyard_width = 7.10;
03090 courtyard_line_width = 0.05;
03091 g_free (footprint_name);
03092 footprint_name = g_strdup ("SOT127P700X180-6N");
03093 return (EXIT_SUCCESS);
03094 }
03095 else if (!strcmp (footprint_name, "?SOT150P700X180-5N"))
03096 {
03097 footprint_units = g_strdup ("mm");
03098 package_body_length = 6.70;
03099 package_body_width = 3.76;
03100 package_body_height = 1.80;
03101 package_is_radial = FALSE;
03102 number_of_pins = 5;
03103 number_of_columns = 2;
03104 number_of_rows = 4;
03105 count_x = 0;
03106 count_y = 0;
03107 pitch_x = 5.80;
03108 pitch_y = 1.50;
03109 pad_length = 2.15;
03110 pad_width = 0.95;
03111 pad_shape = g_strdup ("rectangular pad");
03112 pad_shapes_type = SQUARE;
03113 thermal = TRUE;
03114 thermal_length = 2.15;
03115 thermal_width = 3.15;
03116 fiducial = FALSE;
03117 fiducial_pad_diameter = 0.00;
03118 fiducial_pad_solder_mask_clearance = 0.00;
03119 silkscreen_length = 3.00;
03120 silkscreen_width = 6.50;
03121 silkscreen_line_width = 0.20;
03122 courtyard_length = 8.50;
03123 courtyard_width = 7.20;
03124 courtyard_line_width = 0.05;
03125 g_free (footprint_name);
03126 footprint_name = g_strdup ("SOT150P700X180-5N");
03127 if (verbose)
03128 {
03129 g_log ("", G_LOG_LEVEL_INFO,
03130 (_("%s is also known as")),
03131 footprint_name,
03132 " JEDEC TO-261AB.");
03133 }
03134 return (EXIT_SUCCESS);
03135 }
03136 else if (!strcmp (footprint_name, "?SOT230P700X180-4N"))
03137 {
03138 footprint_units = g_strdup ("mm");
03139 package_body_length = 6.70;
03140 package_body_width = 3.70;
03141 package_body_height = 1.80;
03142 package_is_radial = FALSE;
03143 number_of_pins = 4;
03144 number_of_columns = 2;
03145 number_of_rows = 3;
03146 count_x = 0;
03147 count_y = 0;
03148 pitch_x = 5.80;
03149 pitch_y = 2.30;
03150 pad_length = 2.15;
03151 pad_width = 0.95;
03152 pad_shape = g_strdup ("rectangular pad");
03153 pad_shapes_type = SQUARE;
03154 thermal = TRUE;
03155 thermal_length = 2.15;
03156 thermal_width = 3.25;
03157 fiducial = FALSE;
03158 fiducial_pad_diameter = 0.00;
03159 fiducial_pad_solder_mask_clearance = 0.00;
03160 silkscreen_length = 3.00;
03161 silkscreen_width = 6.50;
03162 silkscreen_line_width = 0.20;
03163 courtyard_length = 8.50;
03164 courtyard_width = 7.20;
03165 courtyard_line_width = 0.05;
03166 g_free (footprint_name);
03167 footprint_name = g_strdup ("SOT230P700X180-4N");
03168 if (verbose)
03169 {
03170 g_log ("", G_LOG_LEVEL_INFO,
03171 (_("%s is also known as")),
03172 footprint_name,
03173 " JEDEC TO-261AA.");
03174 }
03175 return (EXIT_SUCCESS);
03176 }
03177 else if (!strcmp (footprint_name, "?SOT230P700X180-4AN"))
03178 {
03179 footprint_units = g_strdup ("mm");
03180 package_body_length = 6.70;
03181 package_body_width = 3.70;
03182 package_body_height = 1.80;
03183 package_is_radial = FALSE;
03184 number_of_pins = 4;
03185 number_of_columns = 2;
03186 number_of_rows = 3;
03187 count_x = 0;
03188 count_y = 0;
03189 pitch_x = 6.00;
03190 pitch_y = 2.30;
03191 pad_length = 1.95;
03192 pad_width = 0.90;
03193 pad_shape = g_strdup ("rectangular pad");
03194 pad_shapes_type = SQUARE;
03195 thermal = TRUE;
03196 thermal_length = 1.95;
03197 thermal_width = 3.20;
03198 fiducial = FALSE;
03199 fiducial_pad_diameter = 0.00;
03200 fiducial_pad_solder_mask_clearance = 0.00;
03201 silkscreen_length = 3.40;
03202 silkscreen_width = 6.50;
03203 silkscreen_line_width = 0.20;
03204 courtyard_length = 8.50;
03205 courtyard_width = 7.20;
03206 courtyard_line_width = 0.05;
03207 g_free (footprint_name);
03208 footprint_name = g_strdup ("SOT230P700X180-4AN");
03209 if (verbose)
03210 {
03211 g_log ("", G_LOG_LEVEL_INFO,
03212 (_("%s is also known as")),
03213 footprint_name,
03214 " JEITA SC-73.");
03215 }
03216 return (EXIT_SUCCESS);
03217 }
03218 else if (!strcmp (footprint_name, "?SOT230P700X180-4BN"))
03219 {
03220 footprint_units = g_strdup ("mm");
03221 package_body_length = 6.70;
03222 package_body_width = 3.70;
03223 package_body_height = 1.80;
03224 package_is_radial = FALSE;
03225 number_of_pins = 4;
03226 number_of_columns = 2;
03227 number_of_rows = 3;
03228 count_x = 0;
03229 count_y = 0;
03230 pitch_x = 6.10;
03231 pitch_y = 2.30;
03232 pad_length = 1.90;
03233 pad_width = 0.95;
03234 pad_shape = g_strdup ("rectangular pad");
03235 pad_shapes_type = SQUARE;
03236 thermal = TRUE;
03237 thermal_length = 1.90;
03238 thermal_width = 3.25;
03239 fiducial = FALSE;
03240 fiducial_pad_diameter = 0.00;
03241 fiducial_pad_solder_mask_clearance = 0.00;
03242 silkscreen_length = 3.55;
03243 silkscreen_width = 6.50;
03244 silkscreen_line_width = 0.20;
03245 courtyard_length = 8.50;
03246 courtyard_width = 7.20;
03247 courtyard_line_width = 0.05;
03248 g_free (footprint_name);
03249 footprint_name = g_strdup ("SOT230P700X180-4BN");
03250 if (verbose)
03251 {
03252 g_log ("", G_LOG_LEVEL_INFO,
03253 (_("%s is also known as")),
03254 footprint_name,
03255 " JEDEC TO-261.");
03256 }
03257 return (EXIT_SUCCESS);
03258 }
03259 else
03260 {
03261 if (verbose)
03262 {
03263 g_log ("", G_LOG_LEVEL_WARNING,
03264 _("default values for footprint %s not found.\n"),
03265 footprint_name);
03266 }
03267 return (EXIT_FAILURE);
03268 }
03269 }
03270
03271
03272 #if GUI
03273
03280 int
03281 sot_set_gui_constraints ()
03282 {
03283
03284 GtkWidget *package_is_radial_checkbutton = lookup_widget (GTK_WIDGET (widget),
03285 "package_is_radial_checkbutton");
03286 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (package_is_radial_checkbutton), FALSE);
03287 gtk_widget_set_sensitive (package_is_radial_checkbutton, FALSE);
03288
03289
03290 GtkWidget *number_of_columns_entry = lookup_widget (GTK_WIDGET (widget),
03291 "number_of_columns_entry");
03292 gtk_entry_set_text (GTK_ENTRY (number_of_columns_entry), "2");
03293 gtk_widget_set_sensitive (number_of_columns_entry, FALSE);
03294 GtkWidget *number_of_rows_entry = lookup_widget (GTK_WIDGET (widget),
03295 "number_of_rows_entry");
03296 gtk_entry_set_text (GTK_ENTRY (number_of_rows_entry), "");
03297 gtk_widget_set_sensitive (number_of_rows_entry, TRUE);
03298 GtkWidget *count_x_entry = lookup_widget (GTK_WIDGET (widget),
03299 "count_x_entry");
03300 gtk_entry_set_text (GTK_ENTRY (count_x_entry), "");
03301 gtk_widget_set_sensitive (count_x_entry, FALSE);
03302 GtkWidget *count_y_entry = lookup_widget (GTK_WIDGET (widget),
03303 "count_y_entry");
03304 gtk_entry_set_text (GTK_ENTRY (count_y_entry), "");
03305 gtk_widget_set_sensitive (count_y_entry, FALSE);
03306 GtkWidget *number_1_position_entry = lookup_widget (GTK_WIDGET (widget),
03307 "number_1_position_entry");
03308 gtk_combo_box_set_active (GTK_COMBO_BOX (number_1_position_entry), UPPER_LEFT);
03309 gtk_widget_set_sensitive (number_1_position_entry, FALSE);
03310
03311
03312 gui_constraints_disable_fiducial_widgets (widget);
03313
03314
03315 gui_constraints_disable_heel_and_toe_goals_tab_widgets (widget);
03316 return (EXIT_SUCCESS);
03317 }
03318 #endif
03319
03320
03327 int
03328 sot_write_footprint ()
03329 {
03330 gdouble xmax;
03331 gdouble xmin;
03332 gdouble ymax;
03333 gdouble ymin;
03334 gdouble x_text;
03335 gdouble y_text;
03336 gdouble dx;
03337 gint pin_number;
03338 gchar *pin_pad_name = g_strdup ("");
03339 gchar *pin_pad_flags = g_strdup ("");
03340
03341
03342 fp = fopen (footprint_filename, "w");
03343 if (!fp)
03344 {
03345 if (verbose)
03346 {
03347 g_log ("", G_LOG_LEVEL_WARNING,
03348 _("could not open file for %s footprint: %s."),
03349 footprint_type, footprint_filename);
03350 }
03351 fclose (fp);
03352 return (EXIT_FAILURE);
03353 }
03354
03355 if (license_in_footprint)
03356 {
03357 write_license ();
03358 }
03359
03360
03361 xmin = multiplier *
03362 (
03363 ((-pitch_x * number_of_columns) / 2.0) -
03364 (pad_length / 2.0) -
03365 pad_solder_mask_clearance
03366 );
03367 xmax = multiplier *
03368 (
03369 ((pitch_x * number_of_columns) / 2.0) +
03370 (pad_length / 2.0) +
03371 pad_solder_mask_clearance
03372 );
03373 ymin = multiplier *
03374 (
03375 ((-pitch_y * number_of_rows) / 2.0) -
03376 (pad_width / 2.0) -
03377 pad_solder_mask_clearance
03378 );
03379 ymax = multiplier *
03380 (
03381 ((pitch_y * number_of_rows) / 2.0) +
03382 (pad_width / 2.0) +
03383 pad_solder_mask_clearance
03384 );
03385
03386
03387 if ((multiplier * ((-package_body_length / 2.0) - courtyard_clearance_with_package)) < xmin)
03388 {
03389 xmin = (multiplier * ((-package_body_length / 2.0) - courtyard_clearance_with_package));
03390 }
03391 if ((multiplier * ((package_body_length / 2.0) + courtyard_clearance_with_package)) > xmax)
03392 {
03393 xmax = (multiplier * ((package_body_length / 2.0) + courtyard_clearance_with_package));
03394 }
03395 if ((multiplier * ((-package_body_width / 2.0) - courtyard_clearance_with_package)) < ymin)
03396 {
03397 ymin = (multiplier * ((-package_body_width / 2.0) - courtyard_clearance_with_package));
03398 }
03399 if ((multiplier * ((package_body_width / 2.0) + courtyard_clearance_with_package)) > ymax)
03400 {
03401 ymax = (multiplier * ((package_body_width / 2.0) + courtyard_clearance_with_package));
03402 }
03403
03404 if (multiplier * (-courtyard_length / 2.0) < xmin)
03405 {
03406 xmin = multiplier * (-courtyard_length / 2.0);
03407 }
03408 if (multiplier * (courtyard_length / 2.0) > xmax)
03409 {
03410 xmax = multiplier * (courtyard_length / 2.0);
03411 }
03412 if (multiplier * (-courtyard_width / 2.0) < ymin)
03413 {
03414 ymin = multiplier * (-courtyard_width / 2.0);
03415 }
03416 if (multiplier * (courtyard_width / 2.0) > ymax)
03417 {
03418 ymax = multiplier * (courtyard_width / 2.0);
03419 }
03420
03421
03422 x_text = 0.0 ;
03423 y_text = (ymin - 10000.0);
03424 write_element_header (x_text, y_text);
03425
03426 if (pad_shapes_type == SQUARE)
03427 {
03428 pin_pad_flags = g_strdup ("square");
03429 }
03430 else
03431 {
03432 pin_pad_flags = g_strdup ("");
03433 }
03434 if (thermal)
03435 {
03436
03437 int i;
03438 for (i = 0; (i < (number_of_rows)); i++)
03439 {
03440 pin_number = 1 + i;
03441 write_pad
03442 (
03443 pin_number,
03444 "",
03445 multiplier * ((-pitch_x - pad_length + pad_width) / 2.0),
03446 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03447 multiplier * ((-pitch_x + pad_length - pad_width) / 2.0),
03448 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03449 multiplier * pad_width,
03450 multiplier * pad_clearance,
03451 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03452 pin_pad_flags
03453 );
03454 }
03455
03456 pin_number++;
03457 write_pad
03458 (
03459 pin_number,
03460 "",
03461 thermal_length > thermal_width
03462 ? multiplier * ((pitch_x - thermal_length + thermal_width) / 2.0)
03463 : multiplier * (pitch_x / 2.0),
03464 thermal_length > thermal_width
03465 ? 0
03466 : multiplier * ((- thermal_width + thermal_length) / 2.0),
03467 thermal_length > thermal_width
03468 ? multiplier * ((pitch_x + thermal_length - thermal_width) / 2.0)
03469 : multiplier * (pitch_x / 2.0),
03470 thermal_length > thermal_width
03471 ? 0
03472 : multiplier * ((+ thermal_width - thermal_length) / 2.0),
03473 thermal_length > thermal_width
03474 ? multiplier * thermal_width
03475 : multiplier * thermal_length,
03476 multiplier * pad_clearance,
03477 multiplier * ((thermal_length > thermal_width ? thermal_width : thermal_length) + (2 * pad_solder_mask_clearance)),
03478 pin_pad_flags
03479 );
03480 }
03481 else
03482 {
03483 if (number_of_pins == 3)
03484 {
03485
03486 pin_number = 1;
03487 write_pad
03488 (
03489 pin_number,
03490 "",
03491 multiplier * ((-pitch_x - pad_length + pad_width) / 2.0),
03492 multiplier * (-pitch_y),
03493 multiplier * ((-pitch_x + pad_length - pad_width) / 2.0),
03494 multiplier * (-pitch_y),
03495 multiplier * pad_width,
03496 multiplier * pad_clearance,
03497 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03498 pin1_square ? "square" : pin_pad_flags
03499 );
03500
03501 pin_number++;
03502 write_pad
03503 (
03504 pin_number,
03505 "",
03506 multiplier * ((-pitch_x - pad_length + pad_width) / 2.0),
03507 multiplier * (pitch_y),
03508 multiplier * ((-pitch_x + pad_length - pad_width) / 2.0),
03509 multiplier * (pitch_y),
03510 multiplier * pad_width,
03511 multiplier * pad_clearance,
03512 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03513 pin_pad_flags
03514 );
03515
03516 pin_number++;
03517 write_pad
03518 (
03519 pin_number,
03520 "",
03521 multiplier * ((pitch_x + pad_length - pad_width) / 2.0),
03522 0,
03523 multiplier * ((pitch_x - pad_length + pad_width) / 2.0),
03524 0,
03525 multiplier * pad_width,
03526 multiplier * pad_clearance,
03527 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03528 pin_pad_flags
03529 );
03530 }
03531 else if (number_of_pins == 4)
03532 {
03533 if (verbose)
03534 {
03535 g_log ("", G_LOG_LEVEL_WARNING,
03536 _("for now a number of pins of %d without a thermal pad is not implemented yet in sot_write_footprint()."),
03537 number_of_pins);
03538 }
03539 }
03540 else if (number_of_pins == 5)
03541 {
03542 int i;
03543 for (i = 0; (i < (number_of_rows)); i++)
03544 {
03545 pin_number = 1 + i;
03546
03547 write_pad
03548 (
03549 pin_number,
03550 "",
03551 multiplier * ((-pitch_x - pad_length + pad_width) / 2.0),
03552 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03553 multiplier * ((-pitch_x + pad_length - pad_width) / 2.0),
03554 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03555 multiplier * pad_width,
03556 multiplier * pad_clearance,
03557 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03558 pin_pad_flags
03559 );
03560
03561 pin_number++;
03562 write_pad
03563 (
03564 pin_number,
03565 "",
03566 multiplier * ((pitch_x - pad_length + pad_width) / 2.0),
03567 multiplier * (pitch_y),
03568 multiplier * ((pitch_x + pad_length - pad_width) / 2.0),
03569 multiplier * (pitch_y),
03570 multiplier * pad_width,
03571 multiplier * pad_clearance,
03572 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03573 pin_pad_flags
03574 );
03575 pin_number++;
03576 write_pad
03577 (
03578 pin_number,
03579 "",
03580 multiplier * ((pitch_x - pad_length + pad_width) / 2.0),
03581 multiplier * (-pitch_y),
03582 multiplier * ((pitch_x + pad_length - pad_width) / 2.0),
03583 multiplier * (-pitch_y),
03584 multiplier * pad_width,
03585 multiplier * pad_clearance,
03586 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03587 pin_pad_flags
03588 );
03589 }
03590 }
03591 else if ((number_of_pins == 6) || (number_of_pins == 8))
03592 {
03593 int i;
03594 for (i = 0; (i < (number_of_rows)); i++)
03595 {
03596 pin_number = 1 + i;
03597
03598 write_pad
03599 (
03600 pin_number,
03601 "",
03602 multiplier * ((-pitch_x - pad_length + pad_width) / 2.0),
03603 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03604 multiplier * ((-pitch_x + pad_length - pad_width) / 2.0),
03605 multiplier * ((((-number_of_rows - 1) / 2.0) +1 + i) * pitch_y),
03606 multiplier * pad_width,
03607 multiplier * pad_clearance,
03608 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03609 pin_pad_flags
03610 );
03611 pin_number = (number_of_columns * number_of_rows) - i;
03612
03613 write_pad
03614 (
03615 pin_number,
03616 pin_pad_name,
03617 multiplier * (pitch_x - pad_length + pad_width) / 2.0,
03618 multiplier * ((((-number_of_rows - 1) / 2.0) + 1 + i) * pitch_y),
03619 multiplier * (pitch_x + pad_length - pad_width) / 2.0,
03620 multiplier * ((((-number_of_rows - 1) / 2.0) + 1 + i) * pitch_y),
03621 multiplier * pad_width,
03622 multiplier * pad_clearance,
03623 multiplier * ((pad_length > pad_width ? pad_width : pad_length) + (2 * pad_solder_mask_clearance)),
03624 pin_pad_flags
03625 );
03626 }
03627 }
03628 else
03629 {
03630 if (verbose)
03631 {
03632 g_log ("", G_LOG_LEVEL_WARNING,
03633 _("number of pins of %d is not defined in sot_write_footprint()."),
03634 number_of_pins);
03635 }
03636 }
03637 }
03638
03639 if (silkscreen_package_outline)
03640 {
03641 fprintf (fp, "# Write a package body on the silkscreen\n");
03642 write_rectangle
03643 (
03644 multiplier * (-silkscreen_length / 2.0),
03645 multiplier * (-silkscreen_width / 2.0),
03646 multiplier * (silkscreen_length / 2.0),
03647 multiplier * (silkscreen_width / 2.0),
03648 multiplier * silkscreen_line_width
03649 );
03650 }
03651
03652 if (silkscreen_indicate_1)
03653 {
03654 fprintf (fp, "# Write a pin 1 marker on the silkscreen\n");
03655 write_element_arc
03656 (
03657 multiplier * (-pitch_x),
03658 multiplier * (-pitch_y * (number_of_rows) / 2.0),
03659 multiplier * 0.5 * silkscreen_line_width,
03660 multiplier * 0.5 * silkscreen_line_width,
03661 0,
03662 360,
03663 multiplier * silkscreen_line_width
03664 );
03665 }
03666
03667 if (courtyard)
03668 {
03669 fprintf (fp, "# Write a courtyard on the silkscreen\n");
03670 write_rectangle
03671 (
03672 xmin,
03673 ymin,
03674 xmax,
03675 ymax,
03676 multiplier * courtyard_line_width
03677 );
03678 }
03679
03680 if (attributes_in_footprint)
03681 {
03682 write_attributes ();
03683 }
03684
03685 fprintf (fp, "\n");
03686 fprintf (fp, ")\n");
03687 fclose (fp);
03688
03689 if (verbose)
03690 {
03691 g_log ("", G_LOG_LEVEL_INFO,
03692 _("wrote a footprint for a %s package: %s."),
03693 footprint_type,
03694 footprint_filename);
03695 }
03696 return (EXIT_SUCCESS);
03697 }
03698
03699
03703 static fpw_function_t
03704 sot_function_list[] =
03705 {
03706 #if GUI
03707 {
03708 "Set GUI constraints",
03709 sot_set_gui_constraints,
03710 "Set GUI constraints for a SOT package",
03711 NULL
03712 },
03713 #endif
03714 {
03715 "Create fpw files",
03716 sot_create_fpw_files_from_packages_list,
03717 "Create fpw files for all known SOT packages",
03718 NULL
03719 },
03720 {
03721 "Packages list",
03722 sot_create_packages_list,
03723 "Create a list of known SOT packages",
03724 NULL
03725 },
03726 {
03727 "DRC SOT Element",
03728 sot_drc,
03729 "Design Rule Check for a SOT package",
03730 NULL
03731 },
03732 {
03733 "Default Element Values",
03734 sot_get_default_footprint_values,
03735 "Get default values for a selected SOT package",
03736 NULL
03737 },
03738 {
03739 "Write footprint",
03740 sot_write_footprint,
03741 "Write a footprint for a SOT package",
03742 NULL
03743 }
03744 };
03745
03746
03750 REGISTER_FUNCTIONS (sot_function_list)
03751
03752
03753
03756 void
03757 sot_init ()
03758 {
03759 register_sot_function_list ();
03760 }
03761
03762
03763