Arc: 2 Points and Height

This forum is for 'Work-in-Progress' QCAD user developed script Add Ons and Plug-ins.

Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: andrew, Husky, J-J

Post Reply
riverbuoy
Senior Member
Posts: 121
Joined: Thu Oct 03, 2013 5:37 pm

Arc: 2 Points and Height

Post by riverbuoy » Mon Sep 14, 2015 11:37 pm

Hi,

This is a new method of drawing arcs. When googling for a way to draw arcs with a specified length, I noticed quite a few people, in different forums, looking for a way to calculate the radius of an arc with just knowing the chord length and arc height. For example someone wanted to draw the arc of a bridge but only knew the start and endpoints and the height of the arc. So I thought this might be a good option to have.
The chord length is the distance between the start point of the arc and the end point. The height is the distance between the middle point of the chord and the middle point of the arc. If the height equals half the chord length, a semi-circle is drawn. If the height is greater than half the chord length, then the included angle is greater than 180 degrees. If the height is less than half the chord length, then the included angle is less than 180 degrees.
This works in the same way as the other 2 point options. You enter the height in the options toolbar, and choose the arc direction. You then specify the start point and endpoint of the arc.
The command is 'archeight' or 'ah'. The shortcut is 'AH'.
The attached file contains a directory called 'Arc2PH'. Extract this to the 'scripts/Draw/Arc' directory. The file also contains a file called 'Arc3PInit.js'. Extract this to 'scripts/Draw/Arc/Arc3P', replacing the existing file. The reason for replacing this file is to change the sort order, so the '3 point' option appears after the '2 Points and Height' option.

Hope someone finds this useful.

riverbuoy
Attachments
Arc2PH.zip
(18.6 KiB) Downloaded 700 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Arc: 2 Points and Height

Post by Husky » Tue Sep 15, 2015 8:45 am

Hi riverbuoy,
riverbuoy wrote:Hope someone finds this useful.
Yes - this new arc tool is very useful. Thank you very much! :D

@Andrew,
could we get this new tool permanently implemented in QCAD? Please! 8)
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Arc: 2 Points and Height

Post by andrew » Tue Sep 15, 2015 3:04 pm

Thanks riverbuoy, this looks great and very useful indeed.
I've added this tool to the repository at:
https://github.com/qcad/qcad/tree/maste ... Arc/Arc2PH

Husky, yes, I've just added the documentation files and translations for it.

riverbuoy
Senior Member
Posts: 121
Joined: Thu Oct 03, 2013 5:37 pm

Re: Arc: 2 Points and Height

Post by riverbuoy » Fri Sep 18, 2015 4:13 pm

Andrew,

Just a quick note. I noticed on github that the sortorder in Arc3PInit.js hasn't been changed. I changed this from 300 to 500 so that the 3 point option appears after the four 2 point options. It seemed logical to group the 2 point options together, followed by the 3 point option.
Perhaps you could change this?

Thanks

riverbuoy

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

Re: Arc: 2 Points and Height

Post by andrew » Fri Sep 18, 2015 5:08 pm

OK. You might want to open a github account at one point. Even if you don't want to use git right now, with an account, you can even change text files directly on github using a comfortable text editor in your browser.

Post Reply

Return to “QCAD 'Script Add-On & Plug-in challenge' - Work in Progress”