Circle Tangents

See also GrSnap.

Function Syntax ctan
Current Version 1.0
Download CircleTangentsV1-0.lsp
View HTML Version CircleTangentsV1-0.html
Donate

Program Description

This program allows the user to dynamically construct two circles connected with a pair of lines meeting the circumference of each circle at a tangent, resulting in a belt or cam shape.

Upon issuing the command syntax ctan at the AutoCAD command-line, the program will issue four successive prompts: the user is prompted to specify the center of the first circle and the radius of the first circle, followed by the center & radius of the second circle.

During each of these prompts, the circles and adjoining lines are displayed dynamically in real-time relative to the position of the AutoCAD cursor.

Following valid responses to all prompts, the program will construct the resulting shape using a 2D polyline (LWPolyline).

However, if the radius of the second circle is greater than the combination of the distance between the circle centers & radius of the first circle, the program will instead construct a circle centered at the second given center, with radius equal to this maximum limit.

Similarly, if the distance between the two circle centers is less than the radius of the first circle, the program will construct only the first circle.

Although the dynamic visual effect is dependent on heavy use of the AutoLISP grread function, this program utilises my GrSnap utility to enable full Object Snap functionality during the dynamic prompts. Furthermore, this program has been designed to perform successfully under all UCS & View settings.

Demonstration

Circle Tangents Demo

See also GrSnap.

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010