File: polybool.html

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (31 lines) | stat: -rw-r--r-- 1,464 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
The boolean operation argument is one of these:
<ul>
	<li> unite: calculate the union of the polygons
	<li> isect: calculate the intersection of all polygons; the result is the area where all argument polygons are present
	<li> sub: subtract subsequent polygons from the first polygon
</ul>
<p>
A polygon is a pcb layer object, that is: if it's fullpoly, it may have
multiple islands. The code operates on the clipped shape of the input polygons,
not on the 'as drawn shape'. The result is zero or more polygon layer objects,
each with a single island, created on the current layer.
<p>
The rest of the arguments will build a flat list of polygon objects to
work on and need to address at least two polygons. Each argument may be
one of:
<ul>
	<li> object: the user needs to click an object using the GUI
	<li> selected: all selected polygons are appended to the list
	<li> found: all found (green highlight) polygons are appended to the list
	<li> <i>ipdath</i>: address a specific polygon
</ul>
<p>
Note: for the <i>sub</i> operation the first polygon is special, so order
of attributes matter. When using <i>selected</i> or <i>found</i> to address
polygons, if multiple polygons are selected or found at the time, the order
they end up added to the operation object list is undefined.
<p>
Input polygons are unchanged, new polygons are created on the current layer.
<p>
Demo video: <a href="https://archive.org/details/polybool"> PolyBool(sub) mini-howto.</a>