Difference between revisions of "Arcs"
(Created page with 'The CreateArcElement1 function is easiest for 2D drawings because it only requires three points: starting and ending points along the arc along with the center of the arc. <PRE>…') |
|||
Line 11: | Line 11: | ||
Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd) | Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd) | ||
ActiveModelReference.AddElement oArc | ActiveModelReference.AddElement oArc | ||
+ | </PRE> | ||
+ | |||
+ | When showing an arc for an angle callout, you place arrowheads on the ends of the arc. To correct the angle of the arrowhead, apply a correction factor based on the length of the arrowhead and the radius of the arc, where atn() is the arctangent: | ||
+ | |||
+ | <PRE> | ||
+ | deltaAngle = atn(length_arrowhead/arc_radius) | ||
</PRE> | </PRE> |
Revision as of 15:10, 17 August 2010
The CreateArcElement1 function is easiest for 2D drawings because it only requires three points: starting and ending points along the arc along with the center of the arc.
Dim ptStart As Point3d Dim ptEnd As Point3d Dim ptOrigin As Point3d Dim oArc As ArcElement
Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd) ActiveModelReference.AddElement oArc
When showing an arc for an angle callout, you place arrowheads on the ends of the arc. To correct the angle of the arrowhead, apply a correction factor based on the length of the arrowhead and the radius of the arc, where atn() is the arctangent:
deltaAngle = atn(length_arrowhead/arc_radius)