Mr. Bodo Hasubek 3 Report post Posted January 15, 2013 Hello, I'am playing around with offsets and offsetGroups in order to match them to the standard coordinate orientation of shipflow to avoid problems there with setting the correct coordinate frame. I was a bit confused, that statments like offsetGroup originalGroup(<fill in some offsets here>)offsetGroup copyOfGroup(originalGroup) would no create a deep copy of all the points of all the offsets in the original group: When I modified the coordinates of the offsets of the copyOfGroup using setEqualCoordinates(...) I always would modify the original points of the original offsets in originalGroup. That is not really what I expected. That means that the second statement above does not create a deep copy of the original group but rather a copy of the list of references to the original sections. Is there any particular reason for this behaviour? Thank you,B. Hasubek Share this post Link to post Share on other sites
Stefan Wunderlich 6 Report post Posted January 16, 2013 Hi Bodo, this is true, the copyOfGroup will contain the same offsets like the original group (and can be modified by adding or removing offsets). This changes in the case where the original offsets are generated i.e. by a sectiongroup. The (temporarily) generated offsets will then be deep-copied. Do you think we should change this in the future? Cheers,Stefan Share this post Link to post Share on other sites
Mr. Daehwan Park 1 Report post Posted January 16, 2013 Hi Bodo, I am Daehwan.Pleaes see an example below : offsetGroup originalGroup(<fill in some offsets here>)imageoffsetGroup imog(originalGroup)offsetGroup copyOfGroup(imog) And play the copyOfGroup. That might be what you want to do with the offset group. ;) Share this post Link to post Share on other sites
Stefan Wunderlich 6 Report post Posted January 17, 2013 Nice trick :) Share this post Link to post Share on other sites
Mr. Bodo Hasubek 3 Report post Posted January 24, 2013 Hi Stefan and Daehwan, thank you for your replies. Really a nice trick, Daehwan. I don't think any changes are required as long as it is properly documented and there is a simple way to create a deep copy - which there is as I just learned. Just copying references has its merits too: It's faster.Apparently my problem has dissolved as well: The new shipflow 5.0 defines the standard coordinate system as I did: Position [0,0,0] is now at the aft perpendicular using a standard right hand rule coordinate system. Regards,Bodo Share this post Link to post Share on other sites