PDETool Dividing up a polygon created by polyshape with an internal boundary

3 ビュー (過去 30 日間)
Heinrich Villinger
Heinrich Villinger 2018 年 7 月 12 日
コメント済み: Heinrich Villinger 2018 年 7 月 14 日
I have a 2D polygon, created with 'polyshape' and would like to separate it with an internal boundary (an irregular open polygon) in two regions which have different material properties. 'Addboundary' does not do the job. I want to use the result in 'triangulation' and 'geometryFromMesh'.
  2 件のコメント
Ravi Kumar
Ravi Kumar 2018 年 7 月 12 日
Can you provide an example showing the problem?
Heinrich Villinger
Heinrich Villinger 2018 年 7 月 14 日
Here is a little bit of code trying to illustrate the problem. The hope was that addboundary cuts my polygon in half so that in the end I have two regions to which I can assign material properties. But it doesn't work that way. Setting the 'simplify' option to false doesn't change anything. Thanks for your help.
% test of addboundary
% vertices of a polygon
x=[0,1,1,0]; y=[0,0,1,1];
%create polygon with polyshape
polygon=polyshape(x,y)
% plot polygon
figure(1),plot(polygon)
% define boundary
xBoundary=[0,0.25,0.5,0.75,1];yBoundary=[0.5,0.25,0.5,0.75,0.5];
% add boundary
polygonWithBoundary=addboundary(polygon,xBoundary,yBoundary)
% plot result of addboundary
% addboundary obviously adds a closed polgon and not a boundary (open polygon)
plot(polygonWithBoundary)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by