RhinoSurface.transform(T) No action

Hi All,

the transform method of a RhinoSurface object, does not transform the object. Tested with rhinoscriptsyntax and the same transformation matrix and it actually performs the transformation. Any hints?

Thank you!

could you post a short snippet?

from compas.geometry import Transformation
from compas_rhino.conversions import RhinoSurface
from compas_rhino.utilities import select_surface

guid = select_surface()
surf = RhinoSurface.from_guid(guid)

matrix = [[1., 0., 0., 2000.],
          [0., 1., 0., 1000.],
          [0., 0., 1., -8000.],
          [0., 0., 0., 1.]]
T = Transformation(matrix)

surf.transform(T)

hi,

thanks for pointing this out.

there is indeed a bug in the transform method since it only transforms the underlying geometry and doesn’t commit those changes to the surface object. it will be fixed soon.

however, i do want to point out that the fact that the method is even there is actually a leftover from an earlier implementation that we simply forgot to remove. the purpose of the conversion objects is to provide an easy way to convert Rhino objects and Rhino geometry to equivalent COMPAS geometry. therefore they also all have a method to_compas.

they are not necessarily meant to provide an alternative API to work with the Rhino objects themselves. that is indeed what rhinoscriptsyntax is for and COMPAS doesn’t try to replace this.

that said, i can see why this is confusing (especially since the transform method is there). we will be more clear about this in the documentation in the future.

currently, the relationship between COMPAS and Rhino is one-directional. you can easily add COMPAS objects to a Rhino model and convert Rhino objects to equivalent COMPAS objects, but after that there is no link anymore between the two.

this kind of bidirectional connection will be added in future versions…

hope this clarifies things a bit :slight_smile:

1 Like

should be solved in the latest version (1.14.0)

2 Likes