Main Content

removeSlivers

Remove sliver outliers from boundary of shape

Since R2020b

Description

example

s = removeSlivers(shapeobject,slivertol) removes sliver outliers from boundary of shape.

Examples

collapse all

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.Center = [0,0.75];

Add rectangle 1 and rectangle 2.

rect3 = rect1 + rect2
rect3 = 
  Polygon with properties:

        Name: 'mypolygon'
    Vertices: [8x3 double]

show(rect3)

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

Remove slivers.

rect4 = removeSlivers(rect3,1e-6)
rect4 = 
  Polygon with properties:

        Name: 'mypolygon'
    Vertices: [4x3 double]

show(rect4)

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

Input Arguments

collapse all

Antenna shape with sliver outlier, specified as antenna.Circle, antenna.Rectangle, antenna.Polygon objects, antenna.Ellipse, or the shapes function.

Data Types: function

Sliver tolerance, specified as a nonnegative scalar.

Data Types: double

Version History

Introduced in R2020b

See Also