Hello,
can please someone help how to draw with script attached curve?
Many thanks Martin
Help with radius
Moderator: andrew
Help with radius
 Attachments

 qcadforum.dxf
 (104 KiB) Downloaded 67 times
Re: Help with radius
A: Your arc has a radius of 25000, not 50000
There is a second text "R 50.000" @ (2900,1142.35677...)
B: By simple math ... calculate the centerpoint from two points on an arc and the radius.
C: Calculate the inclosed arc and the start and end angle.
D: Use the simple API function addArc(center, radius, startAngle, endAngle, reversed)
Where: 'center' is a Rvector, 'radius' and 'angles' are values, the angles are in degrees, reversed is a boolean.
Regards,
CVH.
There is a second text "R 50.000" @ (2900,1142.35677...)
B: By simple math ... calculate the centerpoint from two points on an arc and the radius.
C: Calculate the inclosed arc and the start and end angle.
D: Use the simple API function addArc(center, radius, startAngle, endAngle, reversed)
Where: 'center' is a Rvector, 'radius' and 'angles' are values, the angles are in degrees, reversed is a boolean.
Regards,
CVH.
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520
Re: Help with radius
Hello CVH,
Thank you, for your reply. I understand how work addArc, but how to calculate start and end angle. I want to find some setup for different radius and width between two parallel lines. I import numbers as coordinates from excel table and do not know how to calculate in this setup start and end angle for different radius... Can you please let me know how to do it?
Thank you Martin
Thank you, for your reply. I understand how work addArc, but how to calculate start and end angle. I want to find some setup for different radius and width between two parallel lines. I import numbers as coordinates from excel table and do not know how to calculate in this setup start and end angle for different radius... Can you please let me know how to do it?
Thank you Martin
Re: Help with radius
Hi,
Do I understand that correctly that your plan is to automatically create a script based drawing for pool enclosures but you are struggeling to calculate the different radii parameter ...
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: Help with radius
Assuming:
The chord is always horizontal.
The arc passes thrue P1(x1,y) and P2(x2,y).
The arc has radius R.
The chord length: c = x2x1
The x coordinate of the center is x1+(c/2)
The central angle: a = 2arcsin(c/2R) (! in degrees)
The sagitta: h = R(1cos(a/2))
The center is Rh lower then P1 & P2
The y coordinate of the center is y(Rh)
Straight up is 90 degrees.
Start angle is 90+(a/2), End angle is 90(a/2), nonreversed
Done.
CVH
The chord is always horizontal.
The arc passes thrue P1(x1,y) and P2(x2,y).
The arc has radius R.
The chord length: c = x2x1
The x coordinate of the center is x1+(c/2)
The central angle: a = 2arcsin(c/2R) (! in degrees)
The sagitta: h = R(1cos(a/2))
The center is Rh lower then P1 & P2
The y coordinate of the center is y(Rh)
Straight up is 90 degrees.
Start angle is 90+(a/2), End angle is 90(a/2), nonreversed
Done.
CVH
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520
Re: Help with radius
MM1970,
you had send me a PM where I did reply on.
I see my reply is still in my Outbox.
Pls have a look at your 'Private messages'.
CVH
you had send me a PM where I did reply on.
I see my reply is still in my Outbox.
Pls have a look at your 'Private messages'.
CVH
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520
Re: Help with radius
Hello CVH,
I am sorry for not replying sooner, I solved my request alone thank to your explanation how to draw curved lines. I made calculation(was not so easy for me, but after some mistakes I finished it..) in Excel for curved and straight lines and then I made set of coordinates for complicated drawing and with help of Ctrl C and Ctrl V I load set of coordinates into QCAD, where nice and exact drawing is finished in 2 seconds...this is absolutely outstanding solution, because I can spend 34 hours with each customer drawing!!!! So very easy change of parameters in few seconds.
Many thanks for your time and help!
Martin
I am sorry for not replying sooner, I solved my request alone thank to your explanation how to draw curved lines. I made calculation(was not so easy for me, but after some mistakes I finished it..) in Excel for curved and straight lines and then I made set of coordinates for complicated drawing and with help of Ctrl C and Ctrl V I load set of coordinates into QCAD, where nice and exact drawing is finished in 2 seconds...this is absolutely outstanding solution, because I can spend 34 hours with each customer drawing!!!! So very easy change of parameters in few seconds.
Many thanks for your time and help!
Martin