how to copy part of a path in d3
<p>I am trying to copy a path using d3, javascript, this is part of the code</p>

<pre><code>var orig = d3.select(".line"+i);
var origNode = orig.node();
var copy = d3.select(origNode.parentNode.appendChild(origNode.cloneNode(true),origNode.nextSibling))
    .attr("class","lineCopy"+d+copyIndex)
    .attr("id","lineCopy"+i)
    .style("visibility","visible");
</code></pre>

<p>".line" is the path's class name, I am wondering instead of copying the whole path, is there a way to just copy part of it? Thank you very much!</p>