A module to perform boolean operations. More...
| void | aExorB() |
| void | aExorBDel() |
| void | aExorBDelA() |
| void | aExorBDelB() |
| void | aMinusB() |
| void | aMinusBDel() |
| void | aMinusBDelA() |
| void | aMinusBDelB() |
| void | aMultiB() |
| void | aMultiBDel() |
| void | aMultiBDelA() |
| void | aMultiBDelB() |
| void | aPlusB() |
| void | aPlusBDel() |
| void | aPlusBDelA() |
| void | aPlusBDelB() |
| void | addA(pointArray pointarray) |
| void | addA(rect rectangle) |
| void | addA(element * e) |
| void | addB(pointArray pointarray) |
| void | addB(rect rectangle) |
| void | addB(element * e) |
| void | addLayerA(int layer) |
| void | addLayerB(int layer) |
| void | bMinusA() |
| void | bMinusADel() |
| void | bMinusADelA() |
| void | bMinusADelB() |
| void | boolOnLayer(int layerA,int layerB,int layerResult,string operation,int nx=0,int ny=0, int borderMerge=0) |
| void | clear() |
| pointArray | getResultingPolygon() |
| void | mergeSelect(int layer) |
| void | performAEorB() |
| void | performAMinusB() |
| void | performAMultiB() |
| void | performAPlusB() |
| void | performBMinusA() |
| void | setA() |
| void | setB() |
| void | setResultToA() |
| void | setResultToB() |
Boolean operations live on layout->booleanTool, a booleanHandler. Fill group A and group B from the current selection with setA() and setB(), or add polygons, rectangles, elements or whole layers with addA and addB. Each union, difference, intersection or exclusive-or writes the result into the currentCell of the drawing, on the activeLayer unless you name another layer. The new shapes are selected so you can see them at once. After the operation both groups are cleared; methods whose names end with Del, DelA or DelB also delete the source shapes when they are still unmodified in that cell.
Example:
layout->drawing->currentCell->fSelect(rect1);
layout->booleanTool->setA();
layout->drawing->currentCell->fSelect(rect2);
layout->booleanTool->setB();
layout->drawing->activeLayer=1;
layout->booleanTool->aPlusB();
The exor of A and B is added on the active Layer.
The exor of A and B is added on the active Layer. Shapes belonging to group A and group B are deleted, if it still exists unmodified in the current cell.
The exor of A and B is added on the active Layer. Shapes belonging to group A are deleted, if it still exists unmodified in the current cell.
The exor of A and B is added on the active Layer. Shapes belonging to group B are deleted, if it still exists unmodified in the current cell.
The difference of A and B is added on the active Layer.
The difference of A and B is added on the active Layer. Shapes belonging to group A and group B are deleted, if it still exists unmodified in the current cell.
The difference of A and B is added on the active Layer. Shapes belonging to group A are deleted, if it still exists unmodified in the current cell.
The difference of A and B is added on the active Layer. Shapes belonging to group B are deleted, if it still exists unmodified in the current cell.
The intersection of A and B is added on the active Layer.
The intersection of A and B is added on the active Layer. Shapes belonging to group A and group B are deleted, if it still exists unmodified in the current cell.
The intersection of A and B is added on the active Layer. Shapes belonging to group A are deleted, if it still exists unmodified in the current cell.
The intersection of A and B is added on the active Layer. Shapes belonging to group B are deleted, if it still exists unmodified in the current cell.
The sum of A and B is added on the active Layer.
The sum of A and B is added on the active Layer. Shapes belonging to group A and B are deleted, if it still exists unmodified in the current cell.
The sum of A and B is added on the active Layer. Shapes belonging to group A are deleted, if it still exists unmodified in the current cell.
The sum of A and B is added on the active Layer. Shapes belonging to group B are deleted, if it still exists unmodified in the current cell.
adds the polygon to group A.
adds the rectangle to group A.
adds the e to group A. e can be a path, polygon or rect. Any references and array references will be ignored.
adds the polygon to group B.
adds the rectangle to group B.
adds the e to group B. e can be a path, polygon or rect. Any references and array references will be ignored.
adds all element including hierarchical element on layer in the current cell to group A. Added shapes will never be deleted after the boolean operation.
adds all element including hierarchical element on layer in the current cell to group B. Added shapes will never be deleted after the boolean operation.
The difference of group B and group A is added on the active Layer.
The difference of B and A is added on the active Layer. Shapes belonging to group A and group B are deleted, if it still exists unmodified in the current cell.
The difference of B and A is added on the active Layer. Shapes belonging to group A are deleted, if it still exists unmodified in the current cell.
The difference of B and A is added on the active Layer. Shapes belonging to group B are deleted, if it still exists unmodified in the current cell.
Performs a Boolean operation between layerA and layerB and writes the result to layerResult. operation selects the operator (see the table). The work is split into frames: if nx and ny are 0, the frame count is chosen automatically, otherwise nx by ny frames are used. This call clears any previous setA / setB groups; those shapes are ignored.
| Parameter: | |
|---|---|
| layerA | first layer |
| layerB | second layer |
| layerResult | layer that receives the result |
| operation | Boolean operation string |
| nx | count in x; 0 means automatic |
| ny | count in y; 0 means automatic |
| borderMerge | how frame borders are merged |
| operation | description |
|---|---|
| A+B | a merge of shapes on both layers |
| A-B | shapes on layer B are subtracted from layer A |
| B-A | shapes on layer A are subtracted from layer B |
| A*B | area that exists on both layers |
| AxorB | area that exists on just one layer |
| A merge | a merge of all shapes on layer A |
| A xor | area that is within an uneven number of shapes, so a shape will be output at location with 3 shapes over it, but not for location with 2 shapes over it |
| A invert | an inversion of layer A, the bounding box of the cell will be used as outer boundry |
| A Invert (hierarchical) | an inversion of layer A, the bounding box of the cell will be used as outer boundry, refered cells will be modified in a way that a minimum area in the main cell needs to be created |
| A-B (multi-shape) | similar to 'A-B' but it respect the number of shape at one location. So it will out a shape at a location with two shapes on layer A and 1 shape on layer B, but it will not output at a location with two shapes on layer A and two shapes on layer B (introduced with release 20220416) |
borderMerge will define how the borders of the frames are handled:
| value | boder handling |
|---|---|
| 0 | only small shapes are merged at the border |
| 1 | shapes at frame border are not merged |
| 2 | all border shapes are merged |
Remove any previous set shapes from the handler. This method is only required when incorrect shapes were set. Any previous Boolean operation will remove any shape from the handler as well. (introduced with release 20221031)
Returns: one pointarray of the previous boolean operation, if it was made with performAEorB(), performAMinusB(), performAMultiB(), performAPlusB(), performBMinusA(). If the boolean operation result in more polygons, consequent call will return the next pointarray. A empty pointarray is return, if no more pointarray are available or a other boolean operation as mentioned before was made.
Selected elements will be merged and added to layer.
The operation A exclusive or B is performed. Use the result with getResultingPolygon(), setResultToA() or setResultToB().
The operation A minus B is performed. Use the result with getResultingPolygon(), setResultToA() or setResultToB().
The intersection of A nad B is performed. Use the result with getResultingPolygon(), setResultToA() or setResultToB().
The operation A and B is performed. Use the result with getResultingPolygon(), setResultToA() or setResultToB().
The operation B minus A is performed. Use the result with getResultingPolygon(), setResultToA() or setResultToB().
Selected elements will be added to the group A. All elements will be deselected.
Selected elements will be added to the group B. All elements will be deselected.
The result of the previous boolean operation, if it was made with performAEorB(), performAMinusB(), performAMultiB(), performAPlusB(), performBMinusA(), is set to group A for a following operation.
The resultof the previous boolean operation, if it was made with performAEorB(), performAMinusB(), performAMultiB(), performAPlusB(), performBMinusA(), is set to group B for a following operation.