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() |
Via this class it is possible to access the Boolean utility. All operation between two set of shapes can be performed. The result of the Boolean operation is added to the currentCell in the drawing to the active layer unless otherwise specified. The result is selected. After any Boolean operation the two sets of shapes will be reset. The source shapes may remain in the design or will be deleted depending on the called Boolean operation..
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. (introduced with releases 20190324)
adds the e to group A. e can be a path, polygon or rect. Any references and array references will be ignored. (introduced with releases 20190324)
adds the polygon to group B.
adds the rectangle to group B. (introduced with releases 20190324)
adds the e to group B. e can be a path, polygon or rect. Any references and array references will be ignored. (introduced with releases 20190324)
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. The result is added to layerResult. The boolean operation is set by operation Valid parameters are: "A+B", "A-B", "B-A", "A*B", "AeorB", AxorB", "A merge", A xor", "A invert". The boolean operation is splitten into frames. The number of frames is calculated automaticly, if nx and ny is set to 0. Otherwise nx times ny frames are used. This operation will reset a previous setA, setB, etc. to the boolean engine. Previous set shapes are ignored.
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.