# How can I draw a rectangle with one edge not drawn?

I want to draw a rectangle and have one of the edges not drawn

Manipulate[Graphics[{
{Gray,Disk[{0,0},2]},
Circle[{0,0},2+#]&/@Range[k],
EdgeForm[{Thin}], White,
Rectangle[{-2-k,2+k},{0,2+k-1}]
}],{k,2,10,1}]


The right edge in this case to have a visual effect of a wire unwinding, like this:

• I would build my own replacement for Rectangle using an edgeless Rectangle and Line as needed, e.g. mathematica.stackexchange.com/a/10498/121 Nov 14, 2016 at 8:35
• I wanted to see some elegant solution to not draw the edge, but thanks - overlaping Rectangle with a Line worked. Nov 14, 2016 at 9:00

This looks OK to me. Will it work for you?

Manipulate[
Graphics[
{{Gray, Disk[{0, 0}, 2]},
AbsoluteThickness[2], Circle[{0, 0}, 2 + #] & /@ Range[k],
White, EdgeForm[{AbsoluteThickness[2], Black}],
Polygon[{{0, 2 + k}, {-2 - k, 2 + k}, {-2 - k, 2 + k - 1}, {0, 2 + k - 1}}],
{AbsoluteThickness[4], Line[{{0, 2 + k}, {0, 2 + k - 1}}]},
Black,
Line[{{-.02 k, 2 + k}, {.02 k, 2 + k}}],
Line[{{-.02 k, 2 + k - 1}, {.02 k, 2 + k - 1}}]}],
{k, 2, 10, 1, Appearance -> "Labeled"}]


Try this:

Manipulate[
Show[{
Graphics[{{Gray, Disk[{0, 0}, 2]},
Circle[{0, 0}, 2 + #] & /@ Range[k], EdgeForm[{Thin}], White,
Rectangle[{-2 - k, 2 + k}, {0, 2 + k - 1}]}],
Graphics[{White, EdgeForm[White],
Rectangle[{-0.001, 2 + k}, {0.001, 2 + k - 1}]}]
}], {k, 2, 10, 1}]


with the effect as follows:

Have fun!

• This produces an image of unacceptable quality as the rectangle with offset also "wipes" the cirle edges a bit. I tried overlapping a white rectangle with Line[] but that is also not what I wanted to have to further manipulate. Isn't there a "proper" way to just not draw an edge? Nov 14, 2016 at 8:59
• @grandrew "Isn't there a "proper" way to just not draw an edge?" Not that I know. You may also add points to my solution on top of the rectangle to cover the edges. Or you may alternatively add a white line on top of your rectangle and play with its thickness and length to cover the edge, but this is in fact goes into a direction that Mr. Wizard proposed. You may also add a rectangle like you did, but not only fix its bulk to be white, but also its edges: EdgeForm[White], and then on top of it you may draw a line covering those three edges of the rectangle that you need. Nov 14, 2016 at 9:10