6 * PCB, interactive printed circuit board design
7 * Copyright (C) 1994,1995,1996 Thomas Nau
8 * Copyright (C) 1998,1999,2000,2001 harry eaton
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * Contact addresses for paper mail and Email:
25 * harry eaton, 6697 Buttonhole Ct, Columbia, MD 21044 USA
26 * haceaton@aplcomm.jhuapl.edu
30 /* this file, mtspace.h, was written and is
31 * Copyright (c) 2001 C. Scott Ananian.
34 /* prototypes for "empty space" routines (needed for via-space tracking
38 #ifndef __MTSPACE_INCLUDED__
39 #define __MTSPACE_INCLUDED__
40 /* mtspace data structures are built on r-trees. */
43 #include "vector.h" /* for vector_t in mtspace_query_rect prototype */
45 typedef struct mtspace mtspace_t
;
47 { FIXED
, ODD
, EVEN
} mtspace_type_t
;
48 typedef struct vetting vetting_t
;
50 /* create an "empty space" representation with a shrunken boundary */
51 mtspace_t
*mtspace_create (void);
52 /* destroy an "empty space" representation. */
53 void mtspace_destroy (mtspace_t
** mtspacep
);
57 /* add a space-filler to the empty space representation. The given box
58 * should *not* be bloated; it should be "true". The feature will fill
59 * *at least* a radius of keepaway around it;
61 void mtspace_add (mtspace_t
* mtspace
,
62 const BoxType
* box
, mtspace_type_t which
, BDimension
64 /* remove a space-filler from the empty space representation. The given box
65 * should *not* be bloated; it should be "true". The feature will fill
66 * *at least* a radius of keepaway around it;
68 void mtspace_remove (mtspace_t
* mtspace
,
69 const BoxType
* box
, mtspace_type_t which
,
73 vetting_t
*mtspace_query_rect (mtspace_t
* mtspace
, const BoxType
* region
,
74 BDimension radius
, BDimension keepaway
,
76 vector_t
* free_space_vec
,
77 vector_t
* lo_conflict_space_vec
,
78 vector_t
* hi_conflict_space_vec
,
79 bool is_odd
, bool with_conflicts
,
80 CheapPointType
*desired
);
82 void mtsFreeWork (vetting_t
**);
83 int mtsBoxCount (vetting_t
*);
84 #endif /* ! __MTSPACE_INCLUDED__ */