Main Content

intersect

Boolean intersection operation on two RF PCB shapes

Since R2021b

Description

c = intersect(shape1,shape2) intersects shape1 and shape2 using the intersect operation. You can also use the & to intersect the two shapes.

example

Examples

collapse all

Create and display an annular ring.

shape1 = ringAnnular(InnerRadius=1e-3);
show(shape1)

Figure contains an axes object. The axes object with xlabel x (mm), ylabel y (mm) contains 2 objects of type patch. These objects represent PEC, myringAnnular.

Create and display a square ring.

shape2 = ringSquare(InnerSide=1e-3);
show(shape2)

Figure contains an axes object. The axes object with xlabel x (mm), ylabel y (mm) contains 2 objects of type patch. These objects represent PEC, myringSquare.

Find and display the intersection of the shapes.

shapeIntersection = intersect(shape1,shape2);
show(shapeIntersection)

Figure contains an axes object. The axes object with xlabel x (mm), ylabel y (mm) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Create and display an annular ring.

shape1 = ringAnnular;

Create and display a square ring.

shape2 = ringSquare('InnerSide',8e-3);

Find and display the intersection of the shapes.

shapeIntersection = shape1&shape2;
show(shapeIntersection)

Figure contains an axes object. The axes object with xlabel x (mm), ylabel y (mm) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Input Arguments

collapse all

First shape created using custom elements and shape objects of RF PCB Toolbox™, specified as an object.

Example: shape1 = bendCurved; specifies the first shape as a bendCurved object.

Second shape created using custom elements and shape objects of RF PCB Toolbox, specified as an object.

Example: shape2 = ringAnnular; specifies the second shape as a ringAnnular object.

Version History

Introduced in R2021b