Is there a good way to create a path in TikZ only some segments of which are stroked? I want to create the whole path in a single command so that it can be filled, but I also want to stroke some parts of the boundary of the filled region, but not all of them. The best solution I've thought of so far is to use
edge operations in the middle of the path to do the stroking; for instance here is a green-filled square with one edge stroked:
\path[fill=green] (0,0) -- (1,0) edge (1,1) -- (1,1) -- (0,1) -- cycle;
This is a little better than
\path[fill=green] (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle; \draw (1,0) -- (1,1);
but it still requires giving the command that draws the segment from (1,0) to (1,1) twice, which is annoying and error-prone if it's a more complicated command like a Bézier curve, and impossible if it's something like a circular arc that can't be drawn by a
edge command (at least, not without writing a custom "to path"). Any suggestions?