QCAD Pro 3.21.3.15 on Ubuntu 16.04
Is it possible to draw a curve based on mathematical equations?
As a simple example, I need to draw a family of hyperbolas with the same asymptotes. Similarly, I need to draw some ellipses.
The equations can be given in parametric form for x and y coordinates, for example.
Is it possible to do this in qcad?
Thanks, and cheers,
- charles
drawing curve based on mathematical equation
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Junior Member
- Posts: 16
- Joined: Wed Nov 28, 2018 9:17 pm
Re: drawing curve based on mathematical equation
Yes, using the script interface. Please have a look at this example:
https://qcad.org/en/tutorial-running-sc ... rom-a-file
https://qcad.org/en/tutorial-running-sc ... rom-a-file
-
- Junior Member
- Posts: 16
- Joined: Wed Nov 28, 2018 9:17 pm
Re: drawing curve based on mathematical equation
Thanks for the help and suggestion.
In some cases it would be useful to be able to pass arguments to such a function in some way. I am new to this area, and I have not yet come across the way to do this. Where is the best place to look further for such functionality.
While the capability of writing such functions in C is very good, given the rapid expansion of Python into so many areas, is there any plan to add Python as a language in which one can write such functions?
Thanks very much for you help with this.
Cheers,
- charles
In some cases it would be useful to be able to pass arguments to such a function in some way. I am new to this area, and I have not yet come across the way to do this. Where is the best place to look further for such functionality.
While the capability of writing such functions in C is very good, given the rapid expansion of Python into so many areas, is there any plan to add Python as a language in which one can write such functions?
Thanks very much for you help with this.
Cheers,
- charles
Re: drawing curve based on mathematical equation
As soon as you want the user to be able to input something (enter values, click coordinates, etc.) you're looking at an interactive script:
https://qcad.org/en/tutorial-interactive-script-actions
This is all ECMAScript (JavaScript) by the way, not C.
No plans for Python (or Ruby, Haskell, LISP, etc.)
https://qcad.org/en/tutorial-interactive-script-actions
This is all ECMAScript (JavaScript) by the way, not C.
No plans for Python (or Ruby, Haskell, LISP, etc.)