Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 12402) +++ trunk/src/thermal.c (revision 12403) @@ -23,3 +23,25 @@ #include "config.h" #include "thermal.h" +#include "obj_pinvia_therm.h" + +pcb_polyarea_t *pcb_thermal_area(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_layer_id_t lid) +{ + switch(obj->type) { + case PCB_OBJ_PIN: + case PCB_OBJ_VIA: + return ThermPoly(pcb, (pcb_pin_t *)obj, lid); + + case PCB_OBJ_LINE: + case PCB_OBJ_POLYGON: + case PCB_OBJ_ARC: + + case PCB_OBJ_PADSTACK: + break; + + default: break; + } + + return NULL; +} + Index: trunk/src/thermal.h =================================================================== --- trunk/src/thermal.h (revision 12402) +++ trunk/src/thermal.h (revision 12403) @@ -20,9 +20,15 @@ * */ +#ifndef PCB_THERMAL_H +#define PCB_THERMAL_H + +#include "obj_common.h" +#include "layer.h" + typedef enum pcb_thermal_e { /* bit 0 and 1: shape */ - PCB_THERMAL_NOSHAPE = 0, /* no shape shall be drawn, omit copper, no connection */ + PCB_THERMAL_NOSHAPE = 0, /* padstack: no shape shall be drawn, omit copper, no connection */ PCB_THERMAL_ROUND = 1, PCB_THERMAL_SHARP = 2, PCB_THERMAL_SOLID = 3, @@ -31,3 +37,6 @@ PCB_THERMAL_DIAGONAL = 4 } pcb_thermal_t; +pcb_polyarea_t *pcb_thermal_area(pcb_board_t *p, pcb_any_obj_t *obj, pcb_layer_id_t lid); + +#endif