Documentation |
This example shows how to represent a geometry that includes rounded corners (fillets) using Constructive Solid Geometry (CSG) modeling. You learn how to draw several overlapping solid objects, and specify how these objects should combine to produce the desired geometry.
Start the PDE app using pdetool and turn on the grid and the "snap-to-grid" feature using the Options menu. Also, change the grid spacing to -1.5:0.1:1.5 for the x-axis and -1:0.1:1 for the y-axis.
Select Rectangle/square from the Draw menu or click the button with the rectangle icon. Then draw a rectangle with a width of 2 and a height of 1 using the mouse, starting at (–1,0.5). To get the round corners, add circles, one in each corner. The circles should have a radius of 0.2 and centers at a distance that is 0.2 units from the left/right and lower/upper rectangle boundaries ((–0.8,–0.3), (–0.8,0.3), (0.8,–0.3), and (0.8,0.3)). To draw several circles, double-click the button for drawing ellipses/circles (centered). Then draw the circles using the right mouse button or Ctrl+click starting at the circle centers. Finally, at each of the rectangle corners, draw four small squares with a side of 0.2.
The following figure shows the complete drawing.
Now you have to edit the set formula. To get the rounded corners, subtract the small squares from the rectangle and then add the circles. As a set formula, this is expressed as
R1-(SQ1+SQ2+SQ3+SQ4)+C1+C2+C3+C4
Enter the set formula into the edit box at the top of the PDE app. Then enter the Boundary mode by clicking the ∂Ω button or by selecting the Boundary Mode option from the Boundary menu. The CSG model is now decomposed using the set formula, and you get a rectangle with rounded corners, as shown in the following figure.
Because of the intersection of the solid objects used in the initial CSG model, a number of subdomain borders remain. They are drawn using gray lines. If this is a model of, e.g., a homogeneous plate, you can remove them. Select the Remove All Subdomain Borders option from the Boundary menu. The subdomain borders are removed and the model of the plate is now complete.