I have a model with 3 groups nested in each other, each translated by a different axis (the innermost 10 mm on the red axis, . I have a vertex of the inner most.
I open the innermost group and run in the console:
view.screen_coords(vertex.position)
(29555.15246mm, 7802.605234mm, 12.098059mm)
I close it and run again:
view.screen_coords(vertex.position)
(28756.582618mm, 8377.890821mm, 12.487469mm)
I close that one and again:
view.screen_coords(vertex.position)
(28756.582618mm, 8377.890821mm, 12.022149mm)
I close the outermost and again:
view.screen_coords(vertex.position)
(28756.582618mm, 8377.890821mm, 11.769223mm)
As you can see, even all are translated with respect to the axis of each, the result when the inner most open is different than the other cases.
This phenomena appears again. For example, given g1 for the inner most, this are the results when it is open and then each of the groups is closed (#to_matrix is a method I added to format the transformation nicely, i print the group’s transformation and then the model.edit_transform)
puts g.transformation.to_matrix; puts model.edit_transform.to_matrix
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
0mm 0mm 0mm 1.000
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
10mm 10mm 10mm 1.000
puts g.transformation.to_matrix; puts model.edit_transform.to_matrix
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
10mm 10mm 10mm 1.000
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
0mm 10mm 10mm 1.000
puts g.transformation.to_matrix; puts model.edit_transform.to_matrix
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
10mm 0mm 0mm 1.000
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
10mm 10mm 10mm 1.000
puts g.transformation.to_matrix; puts model.edit_transform.to_matrix
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
10mm 0mm 0mm 1.000
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
0mm 0mm 0mm 1.000
These methods are not consistent. This also applies to getting the bounding box and calling #contains? with a model space position: it returns true or false depending on if a group is opened or not.