Remove holes from shape
Remove Holes from Rectangular Shape of Antenna
Create two rectangle shapes. Change the length and the center of orientation of the second rectangle to the values shown.
rect1 = antenna.Rectangle; rect2 = antenna.Rectangle; rect2.Length = 1e-7; rect2.Width = 0.5
rect2 = Rectangle with properties: Name: 'myrectangle' Center: [0 0] Length: 1.0000e-07 Width: 0.5000 NumPoints: 2
Subtract rectangle 1 from rectangle 2
rect3 = rect1-rect2
rect3 = Polygon with properties: Name: 'mypolygon' Vertices: [9x3 double]
Remove holes from the new rectangle.
rect4 = removeHoles(rect3,1e-6)
rect4 = Polygon with properties: Name: 'mypolygon' Vertices: [4x3 double]
holetol — Hole tolerance
Hole tolerance, specified as a nonnegative scalar.