×
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

Drawing HVAX Flex Duct - Lisp or Other Means ???

Drawing HVAX Flex Duct - Lisp or Other Means ???

Drawing HVAX Flex Duct - Lisp or Other Means ???

(OP)
Does anyone out there have a quick lisp or other means of drawing flex duct (basically an arc with smaller alternating arcs or vertices propogated down the large arc)for HVAC plans.  This may possibly be done within autocad with no outside lisp; if so I am unaware of it.  Anyhow any direction would be greatly appreciate it.  

Thanks   

RE: Drawing HVAX Flex Duct - Lisp or Other Means ???

If you had done the such drawing, a part at least, maybe I can understand the way you want to do it .
Please send me a copy of it.
Just a sketch.

my e mail is

devitg@ciudad.com.ar

Pardal

RE: Drawing HVAX Flex Duct - Lisp or Other Means ???

If you're doing single line ductwork, try drawing an arc with the "Tracks" linetype. I believe this linetype is included with most versions of AutoCad.

I don't know of a double-line solution.

RE: Drawing HVAX Flex Duct - Lisp or Other Means ???

i use a p-line at the width of the flex, then fillet, we have our own mflex layer w the linetype set up, it looks sort of like tracks, but without the center portion, if you want i'll e-mail you a drawing w/ it in there

bdr

RE: Drawing HVAX Flex Duct - Lisp or Other Means ???

try this lisp routine - remeber to turn off ortho & autosnap. the command is 'ductflex' and it only works on lines/arcs:


polyline-----------------------
(defun arcleft (/ p1 p2 arc d1 chord bng1 bng2 cpbng1 cpbng2 tp1 tp2
                  cenpt a1 a2 a3 rad prop arclen num segarc pitch
                  oradbig oradlit iradbig oradlit f1 f2 f3 f4 f5 f6)
       (setq p1 (cdr(assoc 10 e4)))   ;gets the location of the vertex
       (setq arc(* 4.0(atan(cdr(assoc 42 e4)))));gets angle of arc
       (setq e3 (entnext e3))
       (setq e4 (entget e3))
       (setq p2 (cdr(assoc 10 e4)))
       (setq d1 (distance p1 p2))              ;length of run
       (setq chord (angle p1 p2))              ;angle of run
       (setq bng1  (- chord (/ arc 2.0)))      ;forward bearing 1
       (setq bng2  (+ bng1 arc))               ;forward bearing 2
       (setq cpbng1 (+ bng1 (/ pi 2.0)))
       (setq cpbng2 (+ bng2 (/ pi 2.0)))
       (setq tp1 (polar p1 cpbng1 500))
       (setq tp2 (polar p2 cpbng2 500))
       (setq cenpt (inters p1 tp1 p2 tp2 ext))
       (setq a1 (angle cenpt p1)
             a2 (angle cenpt p2)
             a3 (abs(- a2 a1))                 ;included angle
             rad(distance cenpt p1)
       );setq
;next bit to trap angles starting in the third/fourth quadrants
       (if (> a1 a2)
           (setq a3 (- (* pi 2.0) a3))
       );if
       (setq
            prop   (/ (* pi 2.0) a3)           ;proportion of full circle
            arclen (/(* pi 2 rad )prop)        ;length of the arc
            num    (fix(/ arclen nompitch))    ;number of iterations
            segarc (/ a3 num 2.0)              ;half the pitch segment angle
            pitch  (/ arclen num)              ;actual centre line pitch
            oradbig(+ rad (/ dia 2.0))         ;large radius outer
            iradbig(- rad (/ dia 2.0))         ;large radius inner
            oradlit(+ rad (/(- dia nompitch)2.0)) ;small radius outer
            iradlit(- rad (/(- dia nompitch)2.0)) ;small radius inner
       );setq
;--------compute the pitch points---------
       (repeat num
       (setq
            f1 (polar cenpt a1 oradlit)
            f2 (polar cenpt a1 iradlit)
            a1 (+ a1 segarc)                         ;increment the angle
            f3 (polar cenpt a1 oradbig)
            f4 (polar cenpt a1 iradbig)
            a1 (+ a1 segarc)                         ;increment the angle
            f5 (polar cenpt a1 oradlit)
            f6 (polar cenpt a1 iradlit)
       );setq
       (command "PLINE" f3 f1 f2 f4 f3 f5 f6 f4 "")  ;draw the group
       );repeat
       (setq p1 p2)
);defun
;
;------------------curved right part of a polyline-----------------------
(defun arcright (/ p1 p2 arc d1 chord bng1 bng2 cpbng1 cpbng2 tp1 tp2
                  cenpt a1 a2 a3 rad prop arclen num segarc pitch
                  oradbig oradlit iradbig oradlit f1 f2 f3 f4 f5 f6)
       (setq p1 (cdr(assoc 10 e4)))   ;gets the location of the vertex
       (setq arc(* 4.0(atan(abs(cdr(assoc 42 e4))))));gets angle of arc
       (setq e3 (entnext e3))
       (setq e4 (entget e3))
       (setq p2 (cdr(assoc 10 e4)))
       (setq d1 (distance p1 p2))                     ;length of run
       (setq chord (angle p1 p2))                     ;angle of run
       (setq bng1  (+ chord (/ arc 2.0)))             ;forward bearing 1
       (setq bng2  (- bng1 arc))                      ;forward bearing 2
       (setq cpbng1 (- bng1 (/ pi 2.0)))
       (setq cpbng2 (- bng2 (/ pi 2.0)))
       (setq tp1 (polar p1 cpbng1 500))
       (setq tp2 (polar p2 cpbng2 500))
       (setq cenpt (inters p1 tp1 p2 tp2 ext))
       (setq a1 (angle cenpt p1)
             a2 (angle cenpt p2)
             a3 (abs(- a1 a2))                        ;included angle
             rad(distance cenpt p1)
       );setq
;next bit to trap angles starting in the third/fourth quadrants
       (if (> a2 a1)
           (setq a3 (- (* pi 2.0) a3))
       );if
       (setq
            prop   (/ (* pi 2.0) a3)           ;proportion of full circle
            arclen (/(* pi 2 rad )prop)        ;length of the arc
            num    (fix(/ arclen nompitch))    ;number of iterations
            segarc (/ a3 num 2.0)              ;half the pitch segment angle
            pitch  (/ arclen num)              ;actual centre line pitch
            oradbig(+ rad (/ dia 2.0))         ;large radius outer
            iradbig(- rad (/ dia 2.0))         ;large radius inner
            oradlit(+ rad (/(- dia nompitch)2.0)) ;small radius outer
            iradlit(- rad (/(- dia nompitch)2.0)) ;small radius inner
       );setq
;--------compute the pitch points---------
       (repeat num
       (setq
            f1 (polar cenpt a1 oradlit)
            f2 (polar cenpt a1 iradlit)
            a1 (- a1 segarc)                        ;increment the angle
            f3 (polar cenpt a1 oradbig)
            f4 (polar cenpt a1 iradbig)
            a1 (- a1 segarc)                        ;increment the angle
            f5 (polar cenpt a1 oradlit)
            f6 (polar cenpt a1 iradlit)
       );setq
       (command "PLINE" f3 f1 f2 f4 f3 f5 f6 f4 "") ;draw the group
       );repeat
       (setq p1 p2)
);defun
;
;----------------main function to sort and call entities-----------------
(defun c:ductflex (/ blp cmd osm cla plw txst)
       (setq olderr *ERROR*)         ;variable for old error handler
       (setq *ERROR* flxerr)         ;set error handler to flxerr
       (getset)                      ;get current settings
       (setup)                       ;do setup utilities
       (prompt "\nConverting centre lines to flexible ducts ")
       (datin)                       ;get or retain default data
       (setq ent  (entsel "\nSelect a centre line to convert "))
         (while ent
              (setq ent2 (dxf 0 ent))
                    (cond
                         ((= ent2 "LINE")(flexlin))
                         ((= ent2 "ARC")(flexarc))
                         ((= ent2 "POLYLINE")(flexpl))
                         (t(princ "\nNot possible for this entity "))
                     );cond
              (setq ent  (entsel "\nSelect another or RETURN to quit "))
         );while
       (command "REDRAW")                          ;tidy up
       (restset)                                   ;restore settings
       (setq *ERROR* olderr)                       ;restore error handler
       (princ)                                     ;clean exit
);defun
;(c:ductflex)                                       ;calls main function
;END PROGRAM
;Author Richard Elliott Cartesian Computing Ltd. Copyright (C) UK 1996

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