R = Abs(ChordL / (2 * Sin((4 * Atn(BulgeN)) / 2))) ' Find Radius of Arc Pt2(0) = RetCoord(X): Pt2(1) = RetCoord(y): Pt2(2) = 0īulgeAngle = (4 * Atn(BulgeN)) * 180 / pi ' included angle - Convert from radians? ' Set Start point of Arc as pt1 and End Point as pt2 ' Set G-Word based on Bulge value - G1, G2, G3ĬhordL = Sqr((RetCoord(X) - RetCoord(X - 2)) ^ 2 + (RetCoord(y) - RetCoord(y - 2)) ^ 2) I don't know if ProgeCAD has the "AnglefromXaxis" function, but it's easy to calculate if it doesn't.īulgeN = Ent.GetBulge(b - 1) ' Get Bulge of current coordinate Here's some code I use for finding the incremental IJ locations, using the bulge of the polyline. As any arc can quickly be turned into a polyline using PEDIT. In my macro, I use polylines instead of arcs, because then I only need to support 1 entity, instead of several.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |