Jump to content

Recommended Posts

Posted
Adapting the brick hatch pattern to the curve is just fantastic. I need to design a curved brick paved sidewalk to my house just so I can use the lisp routine! Oh yeah!

 

I want it just to learn the method in which something like that is accomplished. :oops:

 

I mean... Is a new hatch created on the fly, is the hatch drawn with autocad and then blocked? Is the block then converted to a new custom hatch only in the drawing? :?

Posted
I'm writing ... unfortunately slowly because I have little time available.

 

 

 

@ReMark: Thanks.

 

 

An example of using, the hatch is adapted to the curves of destination and transformed into block.

 

[ATTACH=CONFIG]37317[/ATTACH]

 

wow! been looking for that all this time but to no avail!

how did you do that??

 

that is so great! it really is!!

Posted

Thanks to all.

 

The concept is: the hatch is composed of lines which are in a certain position with respect to the source lines, just find the position proportionally compared to the destination curves.

 

So nothing exceptional. :)

 

 

@BIGAL

You can adapt any composition of lines that is not a hatch, but at the expense of speed, you should try layer and color of each line, but now is only done for the hatch.

  • 3 weeks later...
Posted
;;; draws cardioid - animated
(defun c:cdda (/ c ip p p1 pp r ai osn e e1 e2 oecho p2 ohl)
 (command "_.undo" "begin")
 (setq	osn (getvar "osmode")
oecho (getvar "cmdecho")
ohl  (getvar "highlight")
r  2;(getdist "\n Radius?: ")
ip (getpoint "\n Insert animated cardioid curve: ")
ai (* (/ pi 360) 2.0)
c  0
p1 (polar ip (+ pi (* c ai)) (* 2.0 r))
p  (polar p1 (* 2 c ai) r)
)
 (setvar "cmdecho" 0)
 (setvar "highlight"0)
 (command "delay" 1000)
 (command "circle" ip r)
 (setq e (entlast))
 (command "delay" 1000)
 (command "circle" (polar ip pi (* 2.0 r)) r)
 (command "delay" 1000)
 (setq e1 (entlast))
 (command "line" (polar ip pi r)(polar ip pi (* 2.0 r)) "")
 (setq e2 (entlast))
 (command "delay" 2000)
;;;**********************************
 (repeat 360
   (command "delay" 20)
   (setq c  (1+ c)
  p1 (polar ip (+ pi (* c ai)) (* 2.0 r))
  p2 (polar p1 (* 2 c ai) r)
   )
   (command "rotate" e1 e2 "" ip (/ (* ai 180) pi))
   (command "rotate" e2 "" p1 (/ (* ai 180) pi))
   (setq p p2)
 )
 (repeat 360
   (command "delay" 20)
   (setq c  (1+ c)
  p1 (polar ip (+ pi (* c ai)) (* 2.0 r))
  p2 (polar p1 (* 2 c ai) r)
   )
   (command "rotate" e1 e2 "" ip (/ (* ai 180) pi))
   (command "rotate" e2 "" p1 (/ (* ai 180) pi))
   (entmake (list (cons 0 "line")(cons 10 p)(cons 11 p2)(cons 62 1)))
   (setq p p2)
 )
 (repeat 360
   (command "delay" 30)
   (setq c  (1+ c)
  p1 (polar ip (+ pi (* c ai)) (* 2.0 r))
  p2 (polar p1 (* 2 c ai) r)
   )
   (command "rotate" e1 e2 "" ip (/ (* ai 180) pi))
   (command "rotate" e2 "" p1 (/ (* ai 180) pi))
   (setq p p2)
 )
 ;;;**********************************
 (command "delay" 4000)
 (command "erase" e e1 e2 "")
 (setvar "osmode" 0)
 (setvar "cmdecho" oecho)
 (setvar "osmode" osn)
 (setvar "highlight"ohl)
 (command "_.undo" "end")
 ;(command "_.undo" 4)
 (princ))

Animated cardioid

Posted
when can we see the code? :)

 

One day (or two). :)

  • 4 weeks later...
Posted

...just stumbled here and what do i find...a marvelous lisp...great stuff GP_....awaiting code :shock:

Posted
Looking for interesting automations on commands via autoLISP. Nothing specific comes to mind. But if you have some cool ideas or want to challenge me to develop a command please leave a comment. Love designing via CAD and Max and want to better my tactics. :beard:

 

Read this :

 

http://www.cadtutor.net/forum/showthread.php?74605-No-DCL-window-or-Toolbar

 

and if you have any ideas, I'm listening.

 

Costin

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...