Index: find_geo.c =================================================================== --- find_geo.c (revision 34998) +++ find_geo.c (revision 34999) @@ -1157,15 +1157,17 @@ if (anylayer) PCB_ISC_PSTK_ANYLAYER(ps, pcb_isc_pstk_poly_shp(ctx, ps, poly, &tshp->shape[n])); - /* optimization: if thre's a clearance between the padstack and the poly, no - need to calculate anything */ - clr = pcb_obj_clearance_at(PCB, (pcb_any_obj_t *)ps, poly->parent.layer); - if (clr > 0) { - unsigned char *thr = pcb_pstk_get_thermal(ps, pcb_layer2id(PCB->Data, poly->parent.layer), 0); + if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, poly) && PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, ps)) { + /* optimization: if thre's a clearance between the padstack and the poly, no + need to calculate anything */ + clr = pcb_obj_clearance_at(PCB, (pcb_any_obj_t *)ps, poly->parent.layer); + if (clr > 0) { + unsigned char *thr = pcb_pstk_get_thermal(ps, pcb_layer2id(PCB->Data, poly->parent.layer), 0); - /* but only if there's no thermal that'd connect it through the clearance */ - if ((thr == NULL) || (!(*thr & PCB_THERMAL_ON) || ((*thr & 0x07) == PCB_THERMAL_NOSHAPE))) - return rnd_false; + /* but only if there's no thermal that'd connect it through the clearance */ + if ((thr == NULL) || (!(*thr & PCB_THERMAL_ON) || ((*thr & 0x07) == PCB_THERMAL_NOSHAPE))) + return rnd_false; + } } shape = pcb_pstk_shape_at(PCB, ps, poly->parent.layer);