can formulae be entered in the command line?

Drop in here to discuss whatever you want.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
algrass
Active Member
Posts: 44
Joined: Mon Aug 10, 2015 8:13 pm

can formulae be entered in the command line?

Post by algrass » Mon Aug 10, 2015 8:17 pm

I need to draw some geometric figure with a high precision and need to enter formulae in the command line. Does QCAD accept formulae entry and if so which ones? More specifically: is there a way of entering a distance as for example @rootx,0 or √x,0? In Autocad it was possible using Lisp. What about QCAD?

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

Re: can formulae be entered in the command line?

Post by andrew » Tue Aug 18, 2015 9:20 am

Yes, you can enter formulas in almost every field for which a numerical value is expected.

For example:
@sqrt(x),0

For available constants and functions, please refer to the documentation of the JavaScript Math object:
http://www.w3schools.com/js/js_math.asp

For convenience, you can write 'sqrt(x)' instead of 'Math.sqrt(x)' but Math.sqrt(x) also works.

If you are adventurous, you may also use other standard JavaScript terms and expressions, for example to start a line at the X coordinate matching the current hour:
new Date().getHours(),0

This will start the line at 10,0 at 10:xx in the morning.

algrass
Active Member
Posts: 44
Joined: Mon Aug 10, 2015 8:13 pm

Re: can formulae be entered in the command line?

Post by algrass » Tue Aug 18, 2015 9:23 am

Great, I love that!
Thank you for your reply.

Post Reply

Return to “Chat”