title: SVG is there a way to combine multiple lines into a single path
body: <p>I have an app where I draw multiple lines and arcs as single elements, is there a way to make a copy of these elements into a single path?  For example, if I draw a rectangle using 4 lines, can I make a copy of the 4 sides into a single path so that I can fill the path?</p>
  
  <p><img src="https://i.stack.imgur.com/oXbv9.jpg" alt="Block changing width"></p>
  
  <p>Here is an example of a block changing widths, going from 4 columns to 3 columns to 2 columns to 1 column.  When initially added it is at 4 columns, each side has a unique class and id and also the top and top and bottom lines have 4 unique classes and id's each. So when I go from 4 to 3 I just hide certain classes and sane goes for going down to 2 or 1.</p>
  
  <p><img src="https://i.stack.imgur.com/PiqYm.jpg" alt="Another block example"></p>
  
  <p>Here is another example of a differently shaped block.</p>