|
|
Description
3D-Hemispherical-Head is an AutoLisp program with a command named 3dHH, by CadToolChest, which functions within AutoCAD 2002, and later (possibly earlier). It constructs 3D Butt Weld Hemispherical Heads, with or without wall thickness.
A sub-function be called by your AutoLisp programs (syntax shown below).
Command Prompts:
The following are the prompts issued by the 3dHH command:
Base point of hemi-head/Quit/<0.0000,0.0000,0.0000>:
Point in OPPOSITE head direction/Quit/Oops/Direction/<0.0000,1.0000,0.0000>:
Diameter of hemi-head/Rad/Oops<12.7500>:
Thickness/0/Solid/Oops< Solid>:
Tangent distance of hemi-head/0/2/3/Oops<3.0000>:
And the following is an example of the message displayed on the text screen:
3d HH dims: 12.7500 dia. x 6.1875 high x 0.75 thick.
Calling the Sub-Function from other AutoLisp Programs:
T%3D-Hemispherical-Head.lsp contains a sub-function that can be called by other AutoLisp programs, bypassing the input prompts and the looping behavior of the 3dHH command.
Syntax of the callable sub-function:
(T%3D-Hemispherical-Head-CREATE BASE-PT DIR-PT RAD HEAD-HEIGHT TANG-DIST DIR THICK)
Where:
BASE-PT=The centerline of the hemispherical head and at its base. If there is a tangent distance, that distance begins at this point and the curved portion of the head begins at the end of the tangent.
DIR-PT=A point that defines the direction of the head with respect to BASE-PT. This point does not have to be at the "top" of the head. It need only be in the direction, or opposite direction, of the head (see DIR).
RAD=The radius of the head.
HEAD-HEIGHT=The height of the head past TANG-DIST.
Note: The command 3dHH uses 1/2 the head radius for the head height. Your program can provide any appropriate value.
TANG-DIST=The distance from the base of the head to where the curve of the head begins.
DIR=A flag indicating if DIR-PT is in the direction of the head, or in the opposite direction of the head. If -1, DIR-PT is in the opposite direction of the head (the initial default). If +1, it is in the direction of the head.
THICK=The wall thickness of the head. This can be a real greater that zero or the string "SOLID". If "SOLID", the head will be constructed as a solid mass (no wall thickness).
Example:
(T%3D-Hemispherical-Head-Create Base-PT Dir-PT Rad Head-Height Tang-Dist Dir Thick)
(T%3D-Hemispherical-Head-Create (getpoint) (getpoint) 5.375 3.0 2.5 -1 1.25)
The Butt Weld Hemispherical Head is constructed on the current layer, using the current color and line type with the butt weld end at PT1 (see image below) and the head in the opposite direction of PT2. The diameter is 10.75, the overall length is 3.0 plus 2.5 or 5.5, the tangent length is 2.5, and the wall thickness is 1.25.
|
|
<Back
|
This program is distributed, by CadToolChest, as Freeware without guarantee or
warranty of any type. You may freely use, modify and/or distribute this
program for personal or commercial use, but you may not sell or charge for it
or any portion of it. If bundled with a product that is sold, you must
make this program available for free. As customary, acknowledge the
original author's contribution if you build upon or distribute this work.
The author of CadToolChest retains all copyrights other than described above.
|