Line drawing with relative angle

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
sarlaa
Active Member
Posts: 47
Joined: Mon Aug 28, 2017 4:39 pm

Line drawing with relative angle

Post by sarlaa » Tue Jul 10, 2018 1:41 pm

Hi,

I have as input a line and precesion for angle and length for second line to draw, knowing that the angle is relative to first line.

Is there a way to caclulate the point considering relative angle ?
soemthing like the function : RVector createPolar (double radius, double angle) but with relative angle.

Thanks.

User avatar
andrew
Site Admin
Posts: 5556
Joined: Fri Mar 30, 2007 6:07 am

Re: Line drawing with relative angle

Post by andrew » Tue Jul 10, 2018 2:03 pm

You can get the angle of a line using line.getAngle(), then add the relative angle to that.

sarlaa
Active Member
Posts: 47
Joined: Mon Aug 28, 2017 4:39 pm

Re: Line drawing with relative angle

Post by sarlaa » Tue Jul 10, 2018 4:40 pm

I see, thanks again.

Post Reply

Return to “QCAD Developers and Contributors”