Jump to content

A challenge: how to draw this? Floor heating ...


Recommended Posts

  • 2 months later...
Posted

Hi all is it possible to get a lisp routine to draw the circuits parallel see attachedufhl.jpg

  • 2 years later...
Posted

Hello!

I wanted to try this lisp in Autocap MEP 2017. It prompts me to use LW Polyline but I have no idea how to convert polylines to lwpolylines. Tryed "convertpoly" command but I end up with a 2D Polyline. Any ideas or help? Thank you.

Posted
Hello!

I wanted to try this lisp in Autocap MEP 2017. It prompts me to use LW Polyline but I have no idea how to convert polylines to lwpolylines. Tryed "convertpoly" command but I end up with a 2D Polyline. Any ideas or help? Thank you.

 

Have you tried EXPLODE => JOIN or PEDIT => "Multiple" => "Join" => ENTER few times...

  • 3 years later...
Posted
On 12/11/2013 at 22:10, marko_ribar said:

Is it possible to create this?  Because one pipe style is not very preferred in heat transfer aspect. Inputs can be distance between lines and radius. 

image.png.d0096c5aefce486d29c0bb33f3e2ec04.png

  • Like 1
Posted

LeeMac, in your heat grid LSP, how could i eliminate the radiuses? I would like that the joints to not be rounded at all, so it is easier to move them around. 

Posted (edited)
On 3/1/2020 at 11:36 PM, arber96 said:

image.png.d0096c5aefce486d29c0bb33f3e2ec04.png

 

 

I see your example...

 

Try this code :

 

(defun c:fh-small-arcs ( / rectangle-p es rec d r pl pp p w h pll k kk fr )

  (vl-load-com)

  (defun rectangle-p ( e f / nobulge-p dpar stp enp ptn k parpts index ptlst )

     (vl-load-com)

     (defun nobulge-p ( e i f )
        (apply 'and (mapcar '(lambda ( x ) (equal (vla-getbulge e x) 0.0 f)) i))
     )

     (setq dpar (/ (+ (abs (setq enp (vlax-curve-getendparam e))) (abs (setq stp (vlax-curve-getstartparam e)))) (setq ptn (cdr (assoc 90 (entget e))))))
     (setq k -1.0)
     (repeat ptn
        (setq parpts (append parpts (setq parpts (list (+ stp (* (setq k (1+ k)) dpar))))))
     )
     (setq k -1)
     (repeat ptn
        (setq index (append index (setq index (list (setq k (1+ k))))))
     )
     (setq ptlst (mapcar '(lambda ( x ) (vlax-curve-getpointatparam e x)) parpts))
     (and
        (eq ptn 4)
        (nobulge-p (if (eq (type e) 'ENAME) (vlax-ename->vla-object e) e) index f)
        (equal (distance (nth 0 ptlst) (nth 1 ptlst)) (distance (nth 2 ptlst) (nth 3 ptlst)) f)
        (equal (distance (nth 1 ptlst) (nth 2 ptlst)) (distance (nth 3 ptlst) (nth 0 ptlst)) f)
        (equal (distance (nth 0 ptlst) (nth 2 ptlst)) (distance (nth 1 ptlst) (nth 3 ptlst)) f)
     )
  )

  (while
    (or
      (not (setq rec (car (setq es (entsel "\nPick rectangle near vertex where heating lines start/end...")))))
      (if rec
        (or
          (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getendpoint (list rec)))
          (not (rectangle-p rec 1e-6))
        )
      )
    )
    (prompt "\nMissed or picked wrong entity type or picked curve not rectangle...")
  )
  (initget 7)
  (setq d (getdist "\nPick or specify distance between floor heating lines : "))
  (initget 7)
  (setq r (getdist "\nPick or specify radius of small arcs : "))
  (while (>= r (* 0.5 d))
    (prompt "\nRadius of small arcs must be smaller than : ") (princ (rtos (* 0.5 d) 2 8))
    (initget 7)
    (setq r (getdist "\nPick or specify radius of small arcs : "))
  )
  (vl-cmdf "_.UCS" "_E" (cadr es))
  (setq pl (mapcar '(lambda ( p ) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget rec)))) rec 1)) (mapcar 'cdr (vl-remove-if '(lambda ( x ) (/= (car x) 10)) (entget rec)))))
  (setq pp (vl-some '(lambda ( x ) (if (not (vl-some '(lambda ( y ) (equal y 0.0 1e-6)) x)) x)) (mapcar '(lambda ( x ) (mapcar '+ '(0 0) x)) pl)))
  (setq w (abs (car pp)) h (abs (cadr pp)))
  (setq pll (cons (list (* 0.5 d) 0.0) pll))
  (setq k -1)
  (while (<= (cadr (setq p (list (* 0.5 d) (+ (* (setq k (1+ k)) (* 4.0 d)) (* 1.5 d))))) (- h (* 0.5 d)))
    (setq pll (cons p pll))
    (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
    (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
    (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  )
  (setq pll (cdddr pll))
  (setq p (car pll))
  (if (<= (cadr (polar p (* 0.5 pi) (* 2.0 d))) (- h (* 0.5 d)))
    (progn
      (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p 0.0 (- w d))) pll))
      (setq kk 0)
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      )
      (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
    )
    (progn
      (setq kk 0)
      (setq p (polar p 0.0 (- w d)))
      (setq pll (cons p pll))
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* kk (* 3.0 d)))) pll))
      )
    )
  )
  (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  (setq pll (cons (polar p (* 1.5 pi) (* 0.5 d)) pll))
  (cond
    ( (and (minusp (car pp)) (not (minusp (cadr pp))))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (cadr x))) pll))
    )
    ( (and (not (minusp (car pp))) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (car x) (- (cadr x)))) pll))
    )
    ( (and (minusp (car pp)) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (- (cadr x)))) pll))
    )
  )    
  (vl-cmdf "_.PLINE")
  (foreach p (reverse pll)
    (vl-cmdf "_non" p)
  )
  (vl-cmdf "")
  (setq fr (getvar 'filletrad))
  (setvar 'filletrad r)
  (vl-cmdf "_.FILLET" "_P" "_L")
  (vl-cmdf "_.UCS" "_P")
  (setvar 'filletrad fr)
  (princ)
)

Regards, M.R.

Edited by marko_ribar
  • 1 month later...
Posted
On 05/03/2020 at 17:52, marko_ribar said:

Thank you so much, you have done an amazing  job. But i think there is a problem, sometime it gets out of rectangle. 

  

I see your example...

 

Try this code :

 


(defun c:fh-small-arcs ( / rectangle-p es rec d r pl pp p w h pll k kk fr )

  (vl-load-com)

  (defun rectangle-p ( e f / nobulge-p dpar stp enp ptn k parpts index ptlst )

     (vl-load-com)

     (defun nobulge-p ( e i f )
        (apply 'and (mapcar '(lambda ( x ) (equal (vla-getbulge e x) 0.0 f)) i))
     )

     (setq dpar (/ (+ (abs (setq enp (vlax-curve-getendparam e))) (abs (setq stp (vlax-curve-getstartparam e)))) (setq ptn (cdr (assoc 90 (entget e))))))
     (setq k -1.0)
     (repeat ptn
        (setq parpts (append parpts (setq parpts (list (+ stp (* (setq k (1+ k)) dpar))))))
     )
     (setq k -1)
     (repeat ptn
        (setq index (append index (setq index (list (setq k (1+ k))))))
     )
     (setq ptlst (mapcar '(lambda ( x ) (vlax-curve-getpointatparam e x)) parpts))
     (and
        (eq ptn 4)
        (nobulge-p (if (eq (type e) 'ENAME) (vlax-ename->vla-object e) e) index f)
        (equal (distance (nth 0 ptlst) (nth 1 ptlst)) (distance (nth 2 ptlst) (nth 3 ptlst)) f)
        (equal (distance (nth 1 ptlst) (nth 2 ptlst)) (distance (nth 3 ptlst) (nth 0 ptlst)) f)
        (equal (distance (nth 0 ptlst) (nth 2 ptlst)) (distance (nth 1 ptlst) (nth 3 ptlst)) f)
     )
  )

  (while
    (or
      (not (setq rec (car (setq es (entsel "\nPick rectangle near vertex where heating lines start/end...")))))
      (if rec
        (or
          (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getendpoint (list rec)))
          (not (rectangle-p rec 1e-6))
        )
      )
    )
    (prompt "\nMissed or picked wrong entity type or picked curve not rectangle...")
  )
  (initget 7)
  (setq d (getdist "\nPick or specify distance between floor heating lines : "))
  (initget 7)
  (setq r (getdist "\nPick or specify radius of small arcs : "))
  (while (>= r (* 0.5 d))
    (prompt "\nRadius of small arcs must be smaller than : ") (princ (rtos (* 0.5 d) 2 8))
    (initget 7)
    (setq r (getdist "\nPick or specify radius of small arcs : "))
  )
  (vl-cmdf "_.UCS" "_E" (cadr es))
  (setq pl (mapcar '(lambda ( p ) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget rec)))) rec 1)) (mapcar 'cdr (vl-remove-if '(lambda ( x ) (/= (car x) 10)) (entget rec)))))
  (setq pp (vl-some '(lambda ( x ) (if (not (vl-some '(lambda ( y ) (equal y 0.0 1e-6)) x)) x)) (mapcar '(lambda ( x ) (mapcar '+ '(0 0) x)) pl)))
  (setq w (abs (car pp)) h (abs (cadr pp)))
  (setq pll (cons (list (* 0.5 d) 0.0) pll))
  (setq k -1)
  (while (<= (cadr (setq p (list (* 0.5 d) (+ (* (setq k (1+ k)) (* 4.0 d)) (* 1.5 d))))) (- h (* 0.5 d)))
    (setq pll (cons p pll))
    (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
    (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
    (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  )
  (setq pll (cdddr pll))
  (setq p (car pll))
  (if (<= (cadr (polar p (* 0.5 pi) (* 2.0 d))) (- h (* 0.5 d)))
    (progn
      (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p 0.0 (- w d))) pll))
      (setq kk 0)
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      )
      (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
    )
    (progn
      (setq kk 0)
      (setq p (polar p 0.0 (- w d)))
      (setq pll (cons p pll))
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* kk (* 3.0 d)))) pll))
      )
    )
  )
  (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  (setq pll (cons (polar p (* 1.5 pi) (* 0.5 d)) pll))
  (cond
    ( (and (minusp (car pp)) (not (minusp (cadr pp))))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (cadr x))) pll))
    )
    ( (and (not (minusp (car pp))) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (car x) (- (cadr x)))) pll))
    )
    ( (and (minusp (car pp)) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (- (cadr x)))) pll))
    )
  )    
  (vl-cmdf "_.PLINE")
  (foreach p (reverse pll)
    (vl-cmdf "_non" p)
  )
  (vl-cmdf "")
  (setq fr (getvar 'filletrad))
  (setvar 'filletrad r)
  (vl-cmdf "_.FILLET" "_P" "_L")
  (vl-cmdf "_.UCS" "_P")
  (setvar 'filletrad fr)
  (princ)
)

Regards, M.R.

 

Annotation 2020-04-25 152711.png

Annotation 2020-04-25 153221.png

Posted (edited)

Hi @arber96,

can we see sample DWG for testing...

Can you upload DWG instead of pictures?

 

Also it would be nice if you provide us exact inputs you did when wrong results occur...

Edited by marko_ribar
Posted
26 minutes ago, marko_ribar said:

Hi @arber96,

can we see sample DWG for testing...

Can you upload DWG instead of pictures?

 

Also it would be nice if you provide us exact inputs you did when wrong results occur...

I attached dwg file and commands. I tested it in autocad 2020 MEP but the same result i got in autocad 2016 and 2021.

testingfh.dwg command.txt

Posted (edited)

I think I fixed it...

Try this mod... BTW. Thanks for reporting...

 

(defun c:fh-small-arcs ( / rectangle-p es rec d r pl pp p w h pll k kk fr )

  (vl-load-com)

  (defun rectangle-p ( e f / nobulge-p dpar stp enp ptn k parpts index ptlst )

     (vl-load-com)

     (defun nobulge-p ( e i f )
        (apply 'and (mapcar '(lambda ( x ) (equal (vla-getbulge e x) 0.0 f)) i))
     )

     (setq dpar (/ (+ (abs (setq enp (vlax-curve-getendparam e))) (abs (setq stp (vlax-curve-getstartparam e)))) (setq ptn (cdr (assoc 90 (entget e))))))
     (setq k -1.0)
     (repeat ptn
        (setq parpts (append parpts (setq parpts (list (+ stp (* (setq k (1+ k)) dpar))))))
     )
     (setq k -1)
     (repeat ptn
        (setq index (append index (setq index (list (setq k (1+ k))))))
     )
     (setq ptlst (mapcar '(lambda ( x ) (vlax-curve-getpointatparam e x)) parpts))
     (and
        (eq ptn 4)
        (nobulge-p (if (eq (type e) 'ENAME) (vlax-ename->vla-object e) e) index f)
        (equal (distance (nth 0 ptlst) (nth 1 ptlst)) (distance (nth 2 ptlst) (nth 3 ptlst)) f)
        (equal (distance (nth 1 ptlst) (nth 2 ptlst)) (distance (nth 3 ptlst) (nth 0 ptlst)) f)
        (equal (distance (nth 0 ptlst) (nth 2 ptlst)) (distance (nth 1 ptlst) (nth 3 ptlst)) f)
     )
  )

  (while
    (or
      (not (setq rec (car (setq es (entsel "\nPick rectangle near vertex where heating lines start/end...")))))
      (if rec
        (or
          (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getendpoint (list rec)))
          (not (rectangle-p rec 1e-6))
        )
      )
    )
    (prompt "\nMissed or picked wrong entity type or picked curve not rectangle...")
  )
  (initget 7)
  (setq d (getdist "\nPick or specify distance between floor heating lines : "))
  (initget 7)
  (setq r (getdist "\nPick or specify radius of small arcs : "))
  (while (>= r (* 0.5 d))
    (prompt "\nRadius of small arcs must be smaller than : ") (princ (rtos (* 0.5 d) 2 8))
    (initget 7)
    (setq r (getdist "\nPick or specify radius of small arcs : "))
  )
  (vl-cmdf "_.UCS" "_E" (cadr es))
  (setq pl (mapcar '(lambda ( p ) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget rec)))) rec 1)) (mapcar 'cdr (vl-remove-if '(lambda ( x ) (/= (car x) 10)) (entget rec)))))
  (setq pp (vl-some '(lambda ( x ) (if (not (vl-some '(lambda ( y ) (equal y 0.0 1e-6)) x)) x)) (mapcar '(lambda ( x ) (mapcar '+ '(0 0) x)) pl)))
  (setq w (abs (car pp)) h (abs (cadr pp)))
  (setq pll (cons (list (* 0.5 d) 0.0) pll))
  (setq k -1)
  (while (<= (cadr (setq p (list (* 0.5 d) (+ (* (setq k (1+ k)) (* 4.0 d)) (* 1.5 d))))) (- h (* 0.5 d)))
    (setq pll (cons p pll))
    (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
    (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
    (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  )
  (setq pll (cdddr pll))
  (setq p (car pll))
  (if (<= (cadr (polar p (* 0.5 pi) (* 2.0 d))) (- h (* 0.5 d)))
    (progn
      (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
      (setq pll (cons (setq p (polar p (* 0.5 pi) d)) pll))
      (setq pll (cons (setq p (polar p 0.0 (- w d))) pll))
      (setq kk 0)
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
      )
      (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
    )
    (progn
      (setq kk 0)
      (setq p (polar p 0.0 (- w d)))
      (setq pll (cons p pll))
      (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
      (while (/= (setq kk (1+ kk)) k)
        (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) d)) pll))
        (setq pll (cons (setq p (polar p 0.0 (- w (* 2.0 d)))) pll))
        (setq pll (cons (setq p (polar p (* 1.5 pi) (* 3.0 d))) pll))
      )
    )
  )
  (setq pll (cons (setq p (polar p pi (- w (* 2.0 d)))) pll))
  (setq pll (cons (polar p (* 1.5 pi) (* 0.5 d)) pll))
  (cond
    ( (and (minusp (car pp)) (not (minusp (cadr pp))))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (cadr x))) pll))
    )
    ( (and (not (minusp (car pp))) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (car x) (- (cadr x)))) pll))
    )
    ( (and (minusp (car pp)) (minusp (cadr pp)))
      (setq pll (mapcar '(lambda ( x ) (list (- (car x)) (- (cadr x)))) pll))
    )
  )    
  (vl-cmdf "_.PLINE")
  (foreach p (reverse pll)
    (vl-cmdf "_non" p)
  )
  (vl-cmdf "")
  (setq fr (getvar 'filletrad))
  (setvar 'filletrad r)
  (vl-cmdf "_.FILLET" "_P" "_L")
  (vl-cmdf "_.UCS" "_P")
  (setvar 'filletrad fr)
  (princ)
)

 

Edited by marko_ribar
Posted
6 minutes ago, marko_ribar said:

I think I fixed it...

Try this mod... BTW. Thanks for reporting...

 

Yes, it works every time now. Thank you for your time.

 

Posted

There was an issue with number of vertices also...

Hopefully now fixed that too...

 

Regards, M.R.

  • Like 1
Posted (edited)

Can this be achieved ?. It can be very practical when pipes needs to be denser near windows and outer walls.  

p.s. is there an easy way to modify existing one ?

heat floor .png

Edited by arber96
  • Like 1
Posted (edited)

Manually, perhaps...

But I think you are exaggerating...

Near windows and outer walls come heating bodies like radiators or ovens or air conditioning...

To me it would be ridiculous to change floor heating tubes proportions just because of edges warming/cooling conditions - even equal spacing is difficult to realize not to mention that influences of outer temperature could be almost always uniformly distributed over whole area and very rarely partially... IMHO there is no strict rule of how heating plan should look like, but it is better to warm/cool complete area equally - how would you adapt to situations where some space is warmer and some not - you would choose where to stand or exist - shouldn't be better that you would have freedom to move and walk and do things over complete area room space and not just its edges or central partitions...

Edited by marko_ribar
Posted
53 minutes ago, marko_ribar said:

Manually, perhaps...

But I think you are exaggerating...

Near windows and outer walls come heating bodies like radiators or ovens or air conditioning...

To me it would be ridiculous to change floor heating tubes proportions just because of edges warming/cooling conditions - even equal spacing is difficult to realize not to mention that influences of outer temperature could be almost always uniformly distributed over whole area and very rarely partially... IMHO there is no strict rule of how heating plan should look like, but it is better to warm/cool complete area equally - how would you adapt to situations where some space is warmer and some not - you would choose where to stand or exist - shouldn't be better that you would have freedom to move and walk and do things over complete area room space and not just its edges or central partitions...

 

Yes, I think I'm asking too much, but this way of laying floor heating pipes is actually used because heat losses near outer walls and windows are greater than other areas (in this way temperature is equalized) denser pips are spread only around the perimeter (less then 1-meter form wall) of the area that most of the times is not in use or is cover with furniture so it does not affect the comfort. Some objects are heated only with floor heating not radiators etc.  

 

Thank you for your contribution, I appreciate it!

  • 9 months later...
Posted
On 1/15/2013 at 11:43 PM, Lee Mac said:

This seemed like a fun challenge, so I thought I might participate...

 

Here is my version:

 

heatgrid.gif

 

The attached program will prompt for a rectangular closed LWPolyline and a 'wire spacing' (the distance between the coils), and will generate a maximal filleted spiral centered within the selected LWPolyline.

 

The program should perform successfully with all rectangular closed LWPolylines, at any rotation or orientation, and in all UCS & Views.

 

For an arbitrary rectangle of any dimension, one cannot specify both the spacing between the coils and the offset from the rectangle boundary, since multiples of these values will not necessary equate to the rectangular dimensions.

 

Hence, my program will prompt for the spacing between the coils and will center the spiral within the selected rectangular LWPolyline, maximising the number of spiral coils for the given spacing, with the division remainder equal to the offset from the boundary.

 

If the spacing is a multiple of the dimensions of the boundary, the program will offset the spiral from the boundary by the given spacing to ensure that the coils do not touch the boundary edge.

 

The code isn't pretty, but should hopefully perform correctly.

 

Interesting challenge!

HeatGridV1-0.lspUnavailable

 

 

 

 

 

 

Hello;

How can i get this app?

this is my email if you can send it I will be appreciated your favor eng_torman@hotmail.com

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...