Four Sided Triangle
(1953)

As children, Robin, Bill and Lena are the best of friends. Robin and Bill grow up to work together as inventors.  Together they build the "reproducer", a machine that can duplicate the exact physical structure of any object.  Lena returns, and both men fall madly in love with her.  Lena marries Robin.  While Robin and Lena are off together, Bill builds a larger reproducer that can fit a person. He experiments with animals until he learns how to keep them alive.

Bill convinces Lena to enter the reproducer, so he can have the duplicate as his wife.  He names the duplicate Helen, and they get married and appear happy. However, Helen has Lena's memories.  Helen is such an exact replica that she also loves Robin.

Bill plans to erase Helen's memory, so she will only know him.  He coerces Lena into helping him, or he will tell Robin that they made the duplicate. Robin learns of the duplicate and the plan to erase memory. The lab catches fire.  Robin arrives to save one woman, while Bill and the other woman die.  The woman has amnesia, so Robin does not know if he has saved Lena or Helen.  Robin learns from a doctor who helped Bill, that Helen would have scars from the device that started her heart.  There are no scars, so it is Lena.  

Thanks Joseph C!