@pagarcia wrote:
Hello,
I'm using the commands
EnableGetGripPointXform(bool bEnable)
andGetGripPointXform(ON_Xform& xform)
to record the transformation applied by Translate, Rotate and Scale.I need this transformation to be applied to an
ON_3dPointArray points
, member of myCRhinoObjectGrips
class, to draw a mesh inCRhinoObjectGrips::Draw()
and return it inCRhinoObjectGrips::NewObject()
.The problem is that it seems that the transformations are being subsequently accumulated, thus the mesh blows away after some translation/rotation.
Ideally, the transformxform
should forget about past transforms and just become the new one applied between last time the mesh was drawn and the most recent one (i.e. between subsequent calls ofDraw()
).In my code so far, only when I create the grips
m_grips[i]
I callm_grips[i].EnableGetGripPointXform(true)
. Then, inDraw()
andNewObject()
(or inside myUpdateMesh()
method) I write
m_grips[i].GetGripPointXform(xform);
and, for an index
k
depending oni
, I update my mesh points
points[k].Transform(xform);
What am I missing?
Thanks for any help,
Pablo
Posts: 2
Participants: 2