×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Rod-end lisp
2

Rod-end lisp

Rod-end lisp

(OP)
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

RE: Rod-end lisp

I use a simple multi-elliptical polyline block that I insert and scale as required.

RE: Rod-end lisp

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 "\nChange orientation <y/N>? ")))
  (if (= ans "Y")                       ;if yes do the following
   (progn
   (setvar "highlight" 0)           ;turn of graphics higlighting
   (setq P1 P3 P3 P1X)              ;switch points
   (setq A (angle P1 P3))           ;change angle between picked points
   (command "erase" "L" "")         ;get rid of wrong one
   (cutubex)                        ;create the curves again
   (setvar "highlight" 1)           ;reset highlighting
   )
  )
  (setq ANS nil)                        ;reset variable ANS to nil
  (setq ANS (strcase (getstring "\nDarken half symbol <y/N>? ")))
  (if (= ANS "Y")                       ;if yes, do the following
   (progn
   (prompt "   wait..")            ;takes a little while
   (setvar "blipmode" 0)           ;turn blips off
   (setvar "highlight" 0)          ;turn off highlighting
                                   ;create a closed curve to hatch
   (command "pline" P2 "arc" "S" P2A P3 "S" P3A P2 "")
                                   ;hatch closed curve with 12 lines
   (command "Hatch" "U" (rtd A) (/ QD 12.0) "N" "L" "")
   (command "erase" "P" "")        ;erase closed curve
   (redraw)                        ;redraw screen
   (setvar "blipmode" 1)           ;turn blips back on
   (setvar "highlight" 1)          ;turn highlighting back on
   )
  )
 (princ)                           ;quiet exit
)                                  ;end of command

(defun rtd (a)                          ;routine for radians to degrees
  (/ (* A 180.0) pi)
)
(princ)

RE: Rod-end lisp

Post email and I will send requested lisp routine.

Flores

RE: Rod-end lisp

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

Thanks to everyone that replied to the original post.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources