How to maintain object's world transform manually?

from 4-5 days, I am trying to solve this problem. I used parent.attach() method, but its not always working correct. I want to dynamically update Object3d’s children, when I want to update the childrens, I am using parent.children = temp.children , its updating the childerns, but the transformation is not getting maintained always. sometimes after updating childrens, instances inside the children array looking big and rotating incorrectly. please help me.