createHole
Description
creates a hole of 2-D shape resultantShape
= createHole(shape1
,shape2
)shape2
on a custom shape
shape1
.
Examples
Cut Rectangular Hole from Box
This example shows how to cut a 2-D hole in a shape.
Create and view a box.
box = shape.Box; show(box)
Create a rectangle to cut as a hole from the box.
rect = shape.Rectangle(Length=0.4,Width=0.2); [~] = translate(rect,[0 0 1]);
Create the hole on the box and view the resultant shape.
out_shape = createHole(box,rect); show(out_shape) view([52.89 26.87]) annotation("textarrow", [0.7964 0.5268], [0.8881 0.6881], "String", "Hole") % Property editing positionPropObjs = findobj(gcf, "-property", "Position"); positionPropObjs(1).Position = [1.0000 1.0000 560.0000, 420.0000];
Input Arguments
shape1
— Shape to cut hole
shape object
Shape to cut hole, specified as a shape object from Custom 2-D and 3-D Antenna category.
Example: shape.Box
Example: shape.Circle
shape2
— Shape of 2-D hole
2-D shape object
Shape of 2-D hole, specified as a 2-D shape object from Custom 2-D and 3-D Antenna category.
Example: shape.Circle
Output Arguments
resultantShape
— Resultant shape after cutting 2-D hole
shape object
Resultant shape after cutting the 2-D hole, returned as a shape object.
Version History
Introduced in R2023b
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)