Main Content

rmholes

説明

polyout = rmholes(polyin) は、多角形 polyin の固体の境界で構成され、すべての穴の境界が削除されている polyshape オブジェクトを返します。

すべて折りたたむ

穴がある多角形を作成します。

t = 0.05:0.5:2*pi;
x1 = cos(t);
y1 = sin(t);
x2 = 0.5*cos(t);
y2 = 0.5*sin(t);
polyin = polyshape({x1,x2},{y1,y2})
polyin = 
  polyshape with properties:

      Vertices: [27x2 double]
    NumRegions: 1
      NumHoles: 1

plot(polyin)

Figure contains an axes object. The axes object contains an object of type polygon.

穴が削除されている新しい多角形を作成します。

polyout = rmholes(polyin)
polyout = 
  polyshape with properties:

      Vertices: [13x2 double]
    NumRegions: 1
      NumHoles: 0

plot(polyout)

Figure contains an axes object. The axes object contains an object of type polygon.

入力引数

すべて折りたたむ

入力 polyshape。スカラー、ベクトル、行列または多次元配列として指定します。

データ型: polyshape

拡張機能

バージョン履歴

R2017b で導入