Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5834

GetPointDynamicDrawFunc wrong drawing if rotating

$
0
0

@Felix1 wrote:

Hello i m new to Rhino scripting and have implement a DynamicDrawFunc to show a preview of my objects.

I am scaling some objects based of a start and a endpoint and if the endpoint is over the startpoint i rotate the objects about 180 degree.

Here my python code:

def GetPointDynamicDrawFunc(sender, args):
                global _afassung
                _afassung = TransformBrep(_afassung, _aDurchmesser ,_startpoint, args.CurrentPoint)
                brilliant = _afassung[0]
                afassung = _afassung[1]
                body = afassung[0]
                krappen = afassung[1]
                krappen_oben = afassung[2]
                alles = []

                alles.append(body)
                vector_direction = Rhino.Geometry.Vector3d(0, 1, 0)
                for i in krappen:
                     alles.append(i)
                for i in krappen_oben:
                     alles.append(i)
                for i in brilliant:
                     alles.append(i)
                for i in alles:
                    i.Rotate(_rotation * math.pi / 180, vector_direction, _startpoint)
                    args.Display.DrawBrepWires(i, Color.Yellow)

but only own view get rotated but all views get updated scales

some idee whats going wrong?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5834

Latest Images

Trending Articles



Latest Images