Carve a shape from other shape
minus( carves out
shape1 and plots the resultant
shape. Alternatively, you can also use the
'-' operator to carve
out a shape from other shape (
shape1 - shape2).
Carve out Circle from Rectangle
Create and view a rectangular shape.
r = antenna.Rectangle; show(r)
Create and view a circular shape.
c = antenna.Circle; show(c)
Carve out the circle from the rectangle and view the resultant shape.
s = r-c; show(s)
Create Hollow Square Nut Shape
This example shows how to create a hollow sqaure nut shape by carving out a sphere from a box shape.
Create and view a spherical shape.
a = shape.Sphere; show(a)
Create and view a box shape.
b = shape.Box; show(b)
Carve out the sphere from the box and view the resultant shape.
c — Resultant shape
2-D or 3-D shape obtained after carving out
Introduced in R2017a