pcb 4.1.1
An interactive printed circuit board layout editor.

thermal.c File Reference

Negative thermal finger polygons. More...

#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <memory.h>
#include <ctype.h>
#include <signal.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <math.h>
#include "global.h"
#include "create.h"
#include "data.h"
#include "draw.h"
#include "error.h"
#include "misc.h"
#include "move.h"
#include "polygon.h"
#include "rtree.h"
#include "thermal.h"
#include "undo.h"
Include dependency graph for thermal.c:

Go to the source code of this file.

Data Structures

struct  cent

Functions

static POLYAREAdiag_line (Coord X, Coord Y, Coord l, Coord w, bool rt)
static POLYAREAsquare_therm (PinType *pin, Cardinal style)
static POLYAREAoct_therm (PinType *pin, Cardinal style)
POLYAREAThermPoly (PCBType *p, PinType *pin, Cardinal laynum)
 

Variables

static PCBTypepcb

Detailed Description

Negative thermal finger polygons.

Thermals are normal lines on the layout

The only thing unique about them is that they have the USETHERMALFLAG set so that they can be identified as thermals.

It is handy for pcb to automatically make adjustments to the thermals when the user performs certain operations, and the functions in thermal.h help implement that.

Author:
This file, thermal.c was written by and is (C) Copyright 2006, harry eaton

Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996,2004,2006 Thomas Nau

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email:

Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany

Thomas.Nau@rz.uni-ulm.de

Definition in file thermal.c.


Function Documentation

static POLYAREA* diag_line ( Coord  X,
Coord  Y,
Coord  l,
Coord  w,
bool  rt 
) [static]

Definition at line 99 of file thermal.c.

References c, ContourToPoly(), PLINE::head, M_SQRT1_2, poly_CreateNode(), poly_InclVertex(), poly_NewContour(), and VNODE::prev.

Referenced by oct_therm(), and ThermPoly().

Here is the call graph for this function:

static POLYAREA* oct_therm ( PinType pin,
Cardinal  style 
) [static]

Definition at line 371 of file thermal.c.

References pin_st::Clearance, diag_line(), m, OctagonPoly(), PBO_ISECT, PBO_SUB, PBO_UNITE, poly_Boolean_free(), RectPoly(), square_therm(), PCBType::ThermScale, pin_st::Thickness, pin_st::X, and pin_st::Y.

Referenced by ThermPoly().

Here is the call graph for this function:

static POLYAREA* square_therm ( PinType pin,
Cardinal  style 
) [static]
POLYAREA* ThermPoly ( PCBType p,
PinType pin,
Cardinal  laynum 
)

Returns:
ThermPoly returns a POLYAREA having all of the clearance that when subtracted from the plane create the desired thermal fingers. Usually this is 4 disjoint regions.

Definition at line 419 of file thermal.c.

References ArcPoly(), POLYAREA::b, CirclePoly(), ArcType::Clearance, pin_st::Clearance, ArcType::Delta, diag_line(), POLYAREA::f, GET_THERM, ArcType::Height, m, M_PI, NoFlags, oct_therm(), PBO_SUB, poly_Boolean_free(), RectPoly(), square_therm(), ArcType::StartAngle, style, TEST_FLAG, PCBType::ThermScale, ArcType::Thickness, pin_st::Thickness, ArcType::Width, ArcType::X, pin_st::X, ArcType::Y, and pin_st::Y.

Referenced by pin_sub_callback(), and SubtractPin().

Here is the call graph for this function:


Variable Documentation

PCBType* pcb [static]

Definition at line 88 of file thermal.c.

Referenced by set_scroll().