MATLAB Answers


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

Asked by Heinrich Villinger on 12 Jul 2018
Latest activity Commented on by Heinrich Villinger on 14 Jul 2018
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'.


Can you provide an example showing the problem?
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
% plot polygon
% define boundary
% add boundary
% plot result of addboundary
% addboundary obviously adds a closed polgon and not a boundary (open polygon)

Sign in to comment.

0 Answers