I have a plugin that handles the user input with groups of RhinoObject.
Each group has some of the RhinoObject hidden, and I’m trying to avoid the use of the hide-show of the layers to decouple the complexity of the user from the layer list.
The only part that I’m missing is that a group of RhinoObject with a part of them hidden is translated as expected from Rhino.Geometry.GeometryBase.Transform (with RhinoObjects.CommitChanges() afterwards and optional show of the hidden objects in the call stack); if instead the user translates the group from the Rhinoceros viewport, in a certain sequence the hidden objects of the group are not moved.
With the solution attached and the sequence obtained from executing
1- the commands of step1.txt
2- move from viewport with mouse of the group of rhnoobject as reported in a move from Rhinoceros UI after step1.txt.png
3- the commands of step2.txt
4- move from viewport as reported in b move from Rhinoceros UI after 'step2.txt'.png
5- the commands of step3.txt
6- I obtain the pieces with the position as in the print screen c result of 'step3.txt'.PNG
even if the group is made as in print screen group with 20 lines created from 'valueExpectedAsGroupWithPartialHidden.txt'.PNG
Rather than using CommitChanges, make a copy of the geometry, transform it, and then call ObjectTable.Replace and pass a true value for the ignoreModes parameter.
I still have the problem, even If I have replaced the GeometryBase.Transform call with the override of RhinoDoc.Objects.Replace you mentioned.
Have you fixed the solution I have attached in the previous post? In this case could you please pass the changed version? I don’t remember if the RhinoCommon.dll is in a custom nuget package or in the nuget.org server, however the dll is the same.
(in my actual problem, at the beginning of the malfunction, I have the hidden objects that do not show the start position grayed out during the move preview, as replicated in the print screen of step 4-. I’m assuming that the fix is related to the feature of showing hidden objects of moving selection by mouse that is not working anymore after a GeometryBase.Transform. However my real problem is that the hidden objects are not translated in the same manner as reported also in this sample, maybe the grayed out preview is a hint of the core problem?)
I had a show/hide of hidden objects in the stack from the GeometryBase.Transform()+RhinoObject.CommitChanges() version that caused the mentioned shift.
However the state of group selected should be kept on each component not considering if it is hidden, in my opinion.