Complex poly math question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 07:23 AM
I have a fairly complex math question (or at least for me). In a gdl object i want to draw a polygon that has 2 sides made from a curve and 2 sides a straight line. This is easy enough but i also want to fillet where they join, see sketch.
Does anyone know the how to work out the formula for this, i believe the formula lies in analytical geometry but is a bit beyond me.
P.S. I realise 2 lines can be filleted using status codes using poly_b but i need to know the start, end and centre points of the fillet when a straight line and curve intersect to use this.
Thanks for any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 11:01 AM
HTH. Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 05:11 PM
!-----------------------------------------
r2 = r1 + d
u = ATN(f/(r2-f))
w = ATN(f/(r1+f))
x1=r1+f :y1=0
x2=r2-f :y2=0
x3=r2*cos(u) :y3=r2*sin(u)
x4=r2*cos(alpha-u) :y4=r2*sin(alpha-u)
x5=(r2-f)*cos(alpha) :y5=(r2-f)*sin(alpha)
x6=(r1+f)*cos(alpha) :y6=(r1+f)*sin(alpha)
x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)
x8=r1*cos(w) :y8=r1*sin(w)
!-----------------------------------------
poly2_ 9,7,
x1, y1, 1,
x2, y2, 1,
x3, y3, 1001,
x4, y4, 1001,
x5, y5, 1001,
x6, y6, 1,
x7, y7, 1001,
x8, y8, 1001,
x1, y1, 1001
Win 10, Archicad 19 INT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 05:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 10:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-30 11:26 PM
That's a quiet good approximation, but it is not the exact solution. Add this at the end of your script:
!-----------------------------------------
line2 r1,0,r1+d,0
arc2 0,0,r1,0,alpha
arc2 0,0,r1+d,0,alpha
rot2 alpha
line2 r1,0,r1+d,0
del 1
!-----------------------------------------
And you will see intersection of the boundarys, which might not exist. The reason:
X2 is NOT R2-F. If you have a look on it in a larger scale you will see. The dependance of the edge radius and the distance of the tangiantial point is as complex as I wrote in my posting above. So it is for all other points. Maybe it is easier to give the radius known instead of the distance. Does make not much difference as one can see. In every case I am shure that there is a simple solution, because the angle of the rounding arc can be found in any of the known triangles. I don't know the English expressions, but there is a basic trigonometric rule that lets me believe in this.
If I get my work done before I sleep I spent still a thought on it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-31 08:51 AM
!-----------------------------------------
r2 = r1 + d
L1 = sqr(r1) * sqr(2*f+r1) - R1
L2 = r2 - sqr(r2^2-2*f*r2)
u = ATN(f/(r2-L2))
w = ATN(f/(r1+L1))
x1=r1+L1 : y1=0
x2=f/tan(u) : y2=0
x3=r2*cos(u) : y3=f*r2/(r2-f)
x4=r2*cos(alpha-u) : y4=r2*sin(alpha-u)
x5=(r2-L2)*cos(alpha) : y5=(r2-L2)*sin(alpha)
x6=(r1+L1)*cos(alpha) : y6=(r1+L1)*sin(alpha)
x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)
x8=r1*cos(w) :y8=f*r1/(r1+f)
!-----------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-31 08:58 AM
May I use your illustration and script for a documentation page on opengdl?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-31 12:56 PM
F. wrote:Sure! feel free to do so.
@LiHigh
May I use your illustration and script for a documentation page on opengdl?
Win 10, Archicad 19 INT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-01-31 01:35 PM
F. wrote:You are right!
@LiHigh
That's a quiet good approximation, but it is not the exact solution.

The Fix:
!-----------------------------------------
r2 = r1 + d
u = ASN(f/(r2-f))
w = ASN(f/(r1+f))
x1=(r1+f)*cos(w) :y1=0
x2=(r2-f)*cos(u) :y2=0
x3=r2*cos(u) :y3=r2*sin(u)
x4=r2*cos(alpha-u) :y4=r2*sin(alpha-u)
x5=(r2-f)*cos(u)*cos(alpha) :y5=(r2-f)*cos(u)*sin(alpha)
x6=(r1+f)*cos(w)*cos(alpha) :y6=(r1+f)*cos(w)*sin(alpha)
x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)
x8=r1*cos(w) :y8=r1*sin(w)
!-----------------------------------------
poly2_ 9,7,
x1, y1, 1,
x2, y2, 1,
x3, y3, 1001,
x4, y4, 1001,
x5, y5, 1001,
x6, y6, 1,
x7, y7, 1001,
x8, y8, 1001,
x1, y1, 1001
Win 10, Archicad 19 INT