Rotating shapes together with groups attached

Hello,
suppose I have a shape Shape_1 together with groups of subshapes Group_1, Group_2, ..., where the groups have been attached to the "father" shape by means of
geompy.addToStudyInFather(Shape_1, Group_1, 'Group_1') , etc.
Now when I rotate Shape_1 via
geompy.Rotate(Shape_1, axis, angle) ,
I note that the groups have been left in their old orientation; supposedly I would have to manually rotate each of them in a separate step.
Is there a way to rotate the "father" shape together with its groups attached, in a single command?
Thank you very much.
Hi
There is no way to transform groups together with the main shape. Another possible approach is to transform the main shape WITH COPY and then restore groups using geompy.RestoreSubShapes() command. In your case:
Shape_2 = geompy.Rotate(Shape_1, axis, angle, theCopy=True)
groups = geompy.RestoreSubShapes( Shape_2, [], GEOM.FSM_Transformed, True, False)
geompy.RestoreSubShapes() command corresponds to "Set presentation parameters and sub-shapes from arguments" parameter in Rotation and other dialogs.
St.Michael
Thank you very much!
Previously Saint Michael wrote:
Hi
There is no way to transform groups together with the main shape. Another possible approach is to transform the main shape WITH COPY and then restore groups using geompy.RestoreSubShapes() command. In your case:
Shape_2 = geompy.Rotate(Shape_1, axis, angle, theCopy=True)
groups = geompy.RestoreSubShapes( Shape_2, [], GEOM.FSM_Transformed, True, False)
geompy.RestoreSubShapes() command corresponds to "Set presentation parameters and sub-shapes from arguments" parameter in Rotation and other dialogs.
St.Michae
Hi Michael,
I tried to do this in salome 6/7/9.3 and this does not work for Rotate. However, it works for TranslateDXDYDZ with theCopy=True. Can you think of something why Rotate with theCopy=True is not working.
Many thanks!
Previously Saint Michael wrote:
Hi
There is no way to transform groups together with the main shape. Another possible approach is to transform the main shape WITH COPY and then restore groups using geompy.RestoreSubShapes() command. In your case:
Shape_2 = geompy.Rotate(Shape_1, axis, angle, theCopy=True)
groups = geompy.RestoreSubShapes( Shape_2, [], GEOM.FSM_Transformed, True, False)
geompy.RestoreSubShapes() command corresponds to "Set presentation parameters and sub-shapes from arguments" parameter in Rotation and other dialogs.
St.Michael