How do use equations to link a bent tube with its unbent cut-length?

I am using SW 2015 (Standard) SP 1.1.

The drawing below shows a tube in two different states -- the straight cut length before bending, and that same length after bending.

Currently they are two separate part files pulled into the same drawing.

I would like them to be different configurations of the same part.

The bent part was formed first.  Then I did some manual calculations to figure out how long the straight cut length should be.

We use round and square tube in aluminum, mild steel and stainless steel.

When using round tube, my sketch represents the center of the tube.

when using square or rectangular tube, my sketch represents the outside of the tube.

We use a K-factor of 0.41, so I can't just use the length of the sketch.

In this example, the sketch would be on the outside of the bends.

how would you use equations (including the 0.41 K-factor) to link these parts?

SolidworksWeldments