Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rod-end lisp 2

Status
Not open for further replies.

besomdave

Structural
Jul 19, 2002
25
Does any one out there have an Acad 2000 lisp routine for creating a typical 'break' symbol for use on elevations
of pipes, solid rouds etc.
Any info would be useful. Thanks in advace
 
Replies continue below

Recommended for you

I use a simple multi-elliptical polyline block that I insert and scale as required.
 
Not sure if this is what you mean, and I did not writ this, but try it:
;CUTUBE.LSP
;a command to show break symbol in a pipe or tube
;
;cutubex - routine to draw the curved lines as one polyline
(defun cutubex ()
(setq P1A (polar P1 A QD))
(setq P1A (polar P1A (+ A HPI) (/ QD 2.0)))
(setq P2A (polar P2 A QD))
(setq P2A (polar P2A (- A HPI) (/ QD 2.0)))
(setq P3A (polar P2A (+ A HPI) QD))
(setvar "blipmode" 0)
(command "pline" P1 "arc" "S" P1A P2 "S" P2A P3 "S" P3A P2 "")
(setvar "blipmode" 0)
)
(defun C:CUTUBE ()
(setvar "cmdecho" 0) ;turn off screen echo
(setq CL (getvar "clayer")) ;get current layer
(setq HPI (/ PI 2.0)) ;make half of PI a variable
(setq P1 (GETPOINT)) ;get first point
(setq P3 (GETPOINT)) ;get second point
(setq A (angle P1 P3)) ;angle between two picked points
(setq D (distance P1 P3)) ;distance between two picked points
(setq HD (/ D 2.0)) ;half the distance
(setq QD (/ HD 2.0)) ;quarter the distance
(setq P2 (polar P1 A HD)) ;find midpoint between picked points
(setq P1X P1) ;p1x used if wrong orientation
(cutubex)
(setq ans (strcase (getstring &quot;\nChange orientation <y/N>? &quot;)))
(if (= ans &quot;Y&quot;) ;if yes do the following
(progn
(setvar &quot;highlight&quot; 0) ;turn of graphics higlighting
(setq P1 P3 P3 P1X) ;switch points
(setq A (angle P1 P3)) ;change angle between picked points
(command &quot;erase&quot; &quot;L&quot; &quot;&quot;) ;get rid of wrong one
(cutubex) ;create the curves again
(setvar &quot;highlight&quot; 1) ;reset highlighting
)
)
(setq ANS nil) ;reset variable ANS to nil
(setq ANS (strcase (getstring &quot;\nDarken half symbol <y/N>? &quot;)))
(if (= ANS &quot;Y&quot;) ;if yes, do the following
(progn
(prompt &quot; wait..&quot;) ;takes a little while
(setvar &quot;blipmode&quot; 0) ;turn blips off
(setvar &quot;highlight&quot; 0) ;turn off highlighting
;create a closed curve to hatch
(command &quot;pline&quot; P2 &quot;arc&quot; &quot;S&quot; P2A P3 &quot;S&quot; P3A P2 &quot;&quot;)
;hatch closed curve with 12 lines
(command &quot;Hatch&quot; &quot;U&quot; (rtd A) (/ QD 12.0) &quot;N&quot; &quot;L&quot; &quot;&quot;)
(command &quot;erase&quot; &quot;P&quot; &quot;&quot;) ;erase closed curve
(redraw) ;redraw screen
(setvar &quot;blipmode&quot; 1) ;turn blips back on
(setvar &quot;highlight&quot; 1) ;turn highlighting back on
)
)
(princ) ;quiet exit
) ;end of command

(defun rtd (a) ;routine for radians to degrees
(/ (* A 180.0) pi)
)
(princ)
 
Post email and I will send requested lisp routine.

Flores
 
Flores,
Thanks for the offer. My e-mail is :
wilsondave@pbworld.com

Thanks to everyone that replied to the original post.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor