Request - Shape/Polygon created with Center+incircle radius
Moderators: andrew, Husky, J-J
Request - Shape/Polygon created with Center+incircle radius
Hi everybody!
Right now I have again to design a lot of hexagons with different sizes (Bolts and nuts - A/F [across flats]). It isn't easy to do that with the current tools of QCad - you need to use a couple of construction lines to get this simple task done.That brings me back to an old Feature Request of mine ...
http://www.qcad.org/bugtracker/index.ph ... ask_id=388
Goal:
We have already the Shape/Polygon tools to create multiple corner Polygons - created with a "Center/circumradius" or a "Two corner" determination (Symbol 1+2).
I like to ask for additional options:
"Incircle radius + center between two corners" (Symbol 3)
and/or
"Incircle Diameter (A/F) + center between two corners". (Symbol 4)
I guess that isn't to complicated - but I'm not a programmer ....
It would be really nice to have all usual possibility's covert for the Shape/Polygon tool similarly to the Arc / Circle / Ellipse tools.
What do you think?
Right now I have again to design a lot of hexagons with different sizes (Bolts and nuts - A/F [across flats]). It isn't easy to do that with the current tools of QCad - you need to use a couple of construction lines to get this simple task done.That brings me back to an old Feature Request of mine ...
http://www.qcad.org/bugtracker/index.ph ... ask_id=388
Goal:
We have already the Shape/Polygon tools to create multiple corner Polygons - created with a "Center/circumradius" or a "Two corner" determination (Symbol 1+2).
I like to ask for additional options:
"Incircle radius + center between two corners" (Symbol 3)
and/or
"Incircle Diameter (A/F) + center between two corners". (Symbol 4)
I guess that isn't to complicated - but I'm not a programmer ....
It would be really nice to have all usual possibility's covert for the Shape/Polygon tool similarly to the Arc / Circle / Ellipse tools.
What do you think?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Request - Shape/Polygon created with Center+incircle rad
Hi,
I sustain this idea, I have come across that need a few time, and yes, it would save some construction, but our favorite developer may have other priorities...
I sustain this idea, I have come across that need a few time, and yes, it would save some construction, but our favorite developer may have other priorities...
JJ Win7 pro-64
Re: Request - Shape/Polygon created with Center+incircle rad
Hi Husky,
Finding myself with some time on my hands, I decided to give this a try.
The current shortcuts for the existing polygon options are 'pg1' and 'pg2'. So I have added the shortcuts 'pg3' and 'pg4' for the two extra commands.
I have also changed the prompt in the options toolbar from 'No. of corners' to 'No. of sides', and added a checkbox labelled 'Corners'.
pg3 prompts for a centre point and a side (or corner, if the Corners check box is selected).. It then draws a polygon that is twice the distance between the center point and selected point.
Note: Because the center point doesn't change, the polygon for odd numbered sides are slightly offset from the current mouse pointer. Here the mouse pointer is 10 units away from the center point, but the line of the polygon is drawn approximately 9 units from the center point.
Instead of selecting the distance between sides, you can specify the distance between corners by selecting the 'Corners' checkbox.
pg4 works the same as pg3, except it asks for the two sides (or corners) instead of a center and side. Also because the center point changes, when drawing odd sided polygons, they display correctly, passing through the two points selected.
The attached file 'ShapePolygon.zip' contains two directories. Copy these to the 'scripts/Draw/Shape' directory.
Instead of a long-winded explanation, just start using these to see what you think. Because I am not an engineer, I don't know if this is what you envisioned. Perhaps you could let me know.
Thanks
riverbuoy
Finding myself with some time on my hands, I decided to give this a try.
I have added two options to the shape toolbar.Husky wrote:I like to ask for additional options:
"Incircle radius + center between two corners" (Symbol 3)
and/or
"Incircle Diameter (A/F) + center between two corners". (Symbol 4)
The current shortcuts for the existing polygon options are 'pg1' and 'pg2'. So I have added the shortcuts 'pg3' and 'pg4' for the two extra commands.
I have also changed the prompt in the options toolbar from 'No. of corners' to 'No. of sides', and added a checkbox labelled 'Corners'.
pg3 prompts for a centre point and a side (or corner, if the Corners check box is selected).. It then draws a polygon that is twice the distance between the center point and selected point.
Note: Because the center point doesn't change, the polygon for odd numbered sides are slightly offset from the current mouse pointer. Here the mouse pointer is 10 units away from the center point, but the line of the polygon is drawn approximately 9 units from the center point.
Instead of selecting the distance between sides, you can specify the distance between corners by selecting the 'Corners' checkbox.
pg4 works the same as pg3, except it asks for the two sides (or corners) instead of a center and side. Also because the center point changes, when drawing odd sided polygons, they display correctly, passing through the two points selected.
The attached file 'ShapePolygon.zip' contains two directories. Copy these to the 'scripts/Draw/Shape' directory.
Instead of a long-winded explanation, just start using these to see what you think. Because I am not an engineer, I don't know if this is what you envisioned. Perhaps you could let me know.
Thanks
riverbuoy
- Attachments
-
- ShapePolygon.zip
- (25.53 KiB) Downloaded 816 times
Re: Request - Shape/Polygon created with Center+incircle rad
Thanks riverbuoy! Looks great
Somehow, I find the behavior of ShapePolygonAFCP more intuitive without the special treatment for an odd number of corners: Or maybe I didn't get the point of having the cursor offset from the corner? What do you think?
Somehow, I find the behavior of ShapePolygonAFCP more intuitive without the special treatment for an odd number of corners: Or maybe I didn't get the point of having the cursor offset from the corner? What do you think?
- Attachments
-
- ShapePolygonAFCP.js
- (5.43 KiB) Downloaded 801 times
Re: Request - Shape/Polygon created with Center+incircle rad
Nice! Thank you very much for your effort!!!riverbuoy wrote:Hi Husky,
Finding myself with some time on my hands, I decided to give this a try.
I did ... here are my thoughts ...riverbuoy wrote: ... just start using these to see what you think. Because I am not an engineer, I don't know if this is what you envisioned. Perhaps you could let me know.
... and I like to show you one example why I'm asking for something like this.
If I need to draw fasteners like bolts and nuts with a hex head I have to design it as a hexagon.
I will find the correct dimensions in my Table book or also, by this time, online. I'm looking for the in-circle or the out circle diameter.
Something like this - check the first table: http://www.fastenerexperts.com/
Now I have to check for the "s" or "e" dimensions and I'm ready to design my hexagon for a bolt and/or a nut.
Your first tool PG3 is pretty good for all shapes of Polygons with even numbers of sides (4, 6, 8, 10, 12 etc etc sides). But I still need to use construction lines.
It would be nice to have also the option to work with a diameter (radius?) value - maybe with an on/off switch to use it on both ways.
Uneven numbers of sides: Right now I can't imagine how to solve the problematic with the uneven number behavior. Would it make sence to restrict this tool just to even numbers of sides ..... I'm not sure.
The same with PG4. Very nice but I need also the possibility to work with/without diameters and or radian. And I think we have not the problem like PG3 with uneven numbers of sides. What do you think?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Request - Shape/Polygon created with Center+incircle rad
Hi,
Perhaps an option could be provided so the user could decide if the centre can be changed for polygons with an odd number of sides. This would then allow the flat side and corner to pass through the mouse pointer position (as is the case in pg4, where the centre does change). Or perhaps the command takes the decision to move the centre for all polygons with an odd number of sides. What do you think?
pg4 is the same except the distance between the two points is the diameter of a circle. If the distance is between flat sides, then that is the in-circle diameter (s in your example) . The distance between corners is the out-circle diameter (e in your example).
riverbuoy
The reason for this is to meet Husky's original request, where, for polygons with an odd number of sides, the user could enter the distance from the centre of a flat side to the opposite corner. In this case the user selects a centre point, and then either a flat side point or a corner. If treats the distance entered as half the height of the polygon. So if you enter a distance of 10, the height is 20 units. If the distance from the centre point to the line is 10 units, then the height of the polygon is just over 22 units. Similarly if the distance to the corner is 10, then the height is less than 20 units. So I made the assumption that because the user selected the centre point, it should probably not be changed without the user's knowledge. This results in the behaviour you see.andrew wrote:Or maybe I didn't get the point of having the cursor offset from the corner? What do you think?
Perhaps an option could be provided so the user could decide if the centre can be changed for polygons with an odd number of sides. This would then allow the flat side and corner to pass through the mouse pointer position (as is the case in pg4, where the centre does change). Or perhaps the command takes the decision to move the centre for all polygons with an odd number of sides. What do you think?
You can enter relative coordinates when prompted for the second point. (In fact you can use them at any time a point is expected).Husky wrote:But I still need to use construction lines.
The distance entered with pg3 is the in-circle radius, if the distance is to a flat side. If the distance is to a corner then that is the out-circle radius.Husky wrote: I'm looking for the in-circle or the out circle diameter.
pg4 is the same except the distance between the two points is the diameter of a circle. If the distance is between flat sides, then that is the in-circle diameter (s in your example) . The distance between corners is the out-circle diameter (e in your example).
I looked at the table but discovered the sizes don't tally with the generated polygons. For example, if you draw a polygon at 4mm between the flat sides, the distance between the corners is 4.62mm, not 4.32 as stated in the table. If you draw a polygon with a distance of 4.32mm between the corners, then the distance between the flat sides is 3.74mm. What am I missing?Husky wrote:I will find the correct dimensions in my Table book or also, by this time, online. I'm looking for the in-circle or the out circle diameter.
Something like this - check the first table:
riverbuoy
Re: Request - Shape/Polygon created with Center+incircle rad
Hi riverbuoy,
But ...
1. I have to start additional the relative coordinate tool and I have to put in 2 values. To define a diameter I need only one value.
Remark: That would also work with many other tools e.g. "Circle/Center point". But for an easier and faster work flow QCad provides also the Circle/Center radius tool without the need to start the relative coordinate tool. Very convenient!
2. If you don't have a straight x or y orientation - how will you define a A/F diameter of e.g. 13 on a rotated hexagon like this one?
My intention was only to show that I'm looking for the possibility to use a diameter to determine the Corner/Corner or the Flat/Flat distance on an even side polygon.
Right now I'm not sure what would be the best solution for an uneven side polygon ...
Yes you are right. That would work perfectly for a clear vertically or horizontally orientation.riverbuoy wrote:You can enter relative coordinates when prompted for the second point. (In fact you can use them at any time a point is expected).Husky wrote:But I still need to use construction lines.
But ...
1. I have to start additional the relative coordinate tool and I have to put in 2 values. To define a diameter I need only one value.
Remark: That would also work with many other tools e.g. "Circle/Center point". But for an easier and faster work flow QCad provides also the Circle/Center radius tool without the need to start the relative coordinate tool. Very convenient!
2. If you don't have a straight x or y orientation - how will you define a A/F diameter of e.g. 13 on a rotated hexagon like this one?
Maybe that wasn't a good example - sorry for that. The table is used for the dependency between a bolt / screw Hex Head and the size of a wrench / socket tool etc.riverbuoy wrote:I looked at the table but discovered the sizes don't tally with the generated polygons. For example, if you draw a polygon at 4mm between the flat sides, the distance between the corners is 4.62mm, not 4.32 as stated in the table. If you draw a polygon with a distance of 4.32mm between the corners, then the distance between the flat sides is 3.74mm. What am I missing?
My intention was only to show that I'm looking for the possibility to use a diameter to determine the Corner/Corner or the Flat/Flat distance on an even side polygon.
Right now I'm not sure what would be the best solution for an uneven side polygon ...
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Request - Shape/Polygon created with Center+incircle rad
Hi Husky
@13<45
This will draw a polygon rotated 45 degrees and distance between flat sides of 13.
Hope this helps.
riverbuoy
Use relative polar coordinates. So for your example, using pg4, select the first point and enter in the command line:-Husky wrote:2. If you don't have a straight x or y orientation - how will you define a A/F diameter of e.g. 13 on a rotated hexagon like this one?
@13<45
This will draw a polygon rotated 45 degrees and distance between flat sides of 13.
Hope this helps.
riverbuoy
Re: Request - Shape/Polygon created with Center+incircle rad
Works for me! I guess I would prefer more the "Restrict Angle or length" option but that works on a similar way.riverbuoy wrote:Use relative polar coordinates. So for your example, using pg4, select the first point and enter in the command line:-
@13<45
This will draw a polygon rotated 45 degrees and distance between flat sides of 13.
This solution works much better for me because I don't know how I could handle an offset at the corner ...andrew wrote:Thanks riverbuoy! Looks great
Somehow, I find the behavior of ShapePolygonAFCP more intuitive without the special treatment for an odd number of corners: Or maybe I didn't get the point of having the cursor offset from the corner? What do you think?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Request - Shape/Polygon created with Center+incircle rad
Hi Husky,
Note: EL is a toggle. So if the angle and distance boxes are not currently displayed, typing EL will display them. If the boxes are currently displayed, typing EL switches them off.
Perhaps the button in 'Line' and 'Draw Polyline' has given the impression that you need the button to use this restriction. You don't. This could be made more clear to users.
Again, I hope this helps.
riverbuoy
You can actually use the 'Restrict Angle or Length' option here. The shortcut is EL. This works the same way as it does in line. You can in fact use this restriction any time a point is expected, in any command. The command button in line is there more as a convenience (in case the user doesn't remember the shortcut, or the fact that you can restrict the angle and length).Husky wrote:Works for me! I guess I would prefer more the "Restrict Angle or length" option but that works on a similar way.
Note: EL is a toggle. So if the angle and distance boxes are not currently displayed, typing EL will display them. If the boxes are currently displayed, typing EL switches them off.
Perhaps the button in 'Line' and 'Draw Polyline' has given the impression that you need the button to use this restriction. You don't. This could be made more clear to users.
Again, I hope this helps.
riverbuoy
Re: Request - Shape/Polygon created with Center+incircle rad
Hi riverbuoy,
@Andrew
Any chance to get this in the next update? With your modified ShapePolygonAFCP?
Yes - thats helps a lot. Thank you very much!!!riverbuoy wrote:Again, I hope this helps.
@Andrew
Any chance to get this in the next update? With your modified ShapePolygonAFCP?
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Request - Shape/Polygon created with Center+incircle rad
Hi Andrew,
OK, I took the decision to have ShapePolygonAFCP.js alter the centre point automatically without asking the user. So the polygon flat side and corner point now pass through the mouse pointer position, for polygons with an odd number of sides.
I have attached the new version.
If a user wishes to find the centre point, you can draw a line from a corner to the opposite middle point of the flat side. Draw a second line from another corner again to the opposite middle point. The centre is the intersection where the two lines cross.
riverbuoy
OK, I took the decision to have ShapePolygonAFCP.js alter the centre point automatically without asking the user. So the polygon flat side and corner point now pass through the mouse pointer position, for polygons with an odd number of sides.
I have attached the new version.
If a user wishes to find the centre point, you can draw a line from a corner to the opposite middle point of the flat side. Draw a second line from another corner again to the opposite middle point. The centre is the intersection where the two lines cross.
riverbuoy
- Attachments
-
- ShapePolygonAFCP.js
- (5.78 KiB) Downloaded 841 times