parameters for Arc2PR ecma script
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.
parameters for Arc2PR ecma script
I'm looking for an example to draw an arc through 2 points and the radius with the ecma script function Arc2PR, the docu from the ecma script is in that case not very useful.
Re: parameters for Arc2PR ecma script
Are you trying to draw an arc though 2 points using the QCAD application (i.e. point and click with the mouse) or are you developing a script which should at one point programmatically create an arc from 2 points? Thanks for your clarification.
Re: parameters for Arc2PR ecma script
I'm trying to create programmatically an arc through 2 points and the given radius
Re: parameters for Arc2PR ecma script
You could call getArc2PR of class Arc2PR directly:
var obj = {}; obj.point1 = new RVector(50,50); obj.point2 = new RVector(75,100); obj.radius = 50; obj.reversed = false; // true for clockwise obj.alternativeSolution = false; // true for longer of the two possible arcs var arc = Arc2PR.prototype.getArc2PR.call(obj, false);