Line drawing with relative angle

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

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

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: 9037
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 Programming, Script Programming and Contributing”