DRect.rotate - bad results???

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
flycast
Posts: 5
Joined: 15 Sep 2013, 03:05

DRect.rotate - bad results???

Post by flycast » 13 Oct 2013, 03:51

I have the following code:

Code: Select all

Dim box As New DRect
box.left = 5
box.right = 10
box.top = 6
box.bottom = 5
I end up with a box as expected:
bottomRight.x: 10
bottomRight.y: 5
topLeft.x: 5
topLeft.y: 6
width: 5
height: 1
I execute:

Code: Select all

box.Rotate(90)
And I get:
bottomRight.x = 10
bottomRight.y = -10
topLeft.x = -10
topLeft.y = 10
width: 20
height: 20
I expect the box to have rotated either 90 degrees using the center of the box as the rotation point or 90 degrees into a different quadrant of an x,y plot.

Is this working as expected and I am misunderstanding the result?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: DRect.rotate - bad results???

Post by support » 15 Oct 2013, 17:14

Hello!

There is a problem with recalculating DRect coordinates after rotation. We will consider this problem. Thank you for your post!


Mikhail.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply