Eliminate curves in the model
1 view (last 30 days)
Show older comments
I am trying to model a thrust pad bearing. I have modeled it using a polygon and 2 circles. How do I eliminate the circles from the model? I just need the rectangle with curves.
Code:
rect1 = [3
4
0.1789
0.40735
0.5205
0.2286
0.14231
0.32402
0
0];
C1=[1
0
0
0.2286];
C2=[1
0
0
0.5205];
C1 = [C1;zeros(length(rect1) - length(C1),1)];
C2 = [C2;zeros(length(rect1) - length(C2),1)];
gd = [rect1,C1,C2];
ns = char('rect1','C1','C2');
ns = ns';
sf='(rect1+C2)-C1';
[dl,bt] = decsg(gd,sf,ns);
pdegplot(dl,"EdgeLabels","on","FaceLabels","on")
xlim([-1.5,1.5])
axis equal
0 Comments
Accepted Answer
Ganesh
on 7 Jun 2024
When you access "dl", you will find it to be a matrix. In your case "dl" contains 16 elements, each of which corresponds to the edge number you see in the original figure. I used this idea to extract the required edges from the given figure and plot the figure you are looking for. Please find the code attached below:
rect1 = [3
4
0.1789
0.40735
0.5205
0.2286
0.14231
0.32402
0
0];
C1=[1
0
0
0.2286];
C2=[1
0
0
0.5205];
C1 = [C1;zeros(length(rect1) - length(C1),1)];
C2 = [C2;zeros(length(rect1) - length(C2),1)];
gd = [rect1,C1,C2];
ns = char('rect1','C1','C2');
ns = ns';
sf='(rect1+C2)-C1';
[dl,bt] = decsg(gd,sf,ns);
pdegplot(dl(:,[1 2 8 13]),"EdgeLabels","on","FaceLabels","on")
% Do note the Warning Message, and ensure that Meshing is possible for any
% future use
xlim([0.1,0.6])
axis equal
Note: Ideally, it is advised to find the boundary conventionally and then use it to plot and mesh.
1 Comment
Ganesh
on 7 Jun 2024
I have found the root cause of the issue. It seems that, in your figure, an extra edge and face is being formed. This might be arising due to a precision issue.
At the intersection you can see "E14" and "F4", which is restricting the model from forming when we use only the 4 required edges. Do note that there are no warnings when we include E14 and generate the plot, and setting the "FaceLabels" and "EdgeLabels" to "off".
Perhaps you can make the rectangle freely intersect the outer circle instead of the vertices intersecting?
More Answers (0)
See Also
Categories
Find more on Model Order Reduction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!