Jump to content

Recommended Posts

Posted

Hello freinds

how can i draw spline from a list

say i have a list

(setq mylist(append list1 list2))

(command "_spline")

(foreach pt mylist

(comand pt)

)

(command "")

(command"")

(command"")

i saw this way from working lisp

but here not working any help will be appreciated

thanks

Posted
Hello freinds

how can i draw spline from a list

say i have a list

(setq mylist(append list1 list2))

(command "_spline")

(foreach pt mylist

(command pt)

)

(command "")

(command"")

(command"")

i saw this way from working lisp

but here not working any help will be appreciated

thanks

 

Could this be your problem?

Posted

this is my lisp to draw spline and asking for z value

i got the list of points i picked but spline not drawen

;;;;;;;;;;

(defun c:3dsp (/)

(setq allpt '())

 

(while

(setq a (getpoint "\n Pick Point: "))

(setq osmd(getvar"osmode"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(initget 1)

(setq pt11 (entget (car (entsel "\nSelect Text level: "))))

(setq txtstr1 (assoc 1 pt11))

(setq dlv1 (atof(cdr txtstr1)))

(princ dlv1)

(setq pts(list(car a)(cadr a)dlv1))

(setq allpt(append pts allpt))

(setvar "osmode"0)

)

(command "_spline")

(foreach pont allpt

(command pont)

)

(command "")

(command "")

(command "")

 

(setvar"osmode"osmd)

 

 

(princ)

)

Posted

Perhaps:

 

(defun c:3dsp  (/ vLst oVar pt txt txtl allpt)
 (setq vLst '("CMDECHO" "OSMODE")
   oVar (mapcar 'getvar vLst))
 (while (and (setq pt (getpoint "\nPick Point: "))
         (setq txt (car (entsel "\nSelect Text level: "))))
    (setq txtl (atof (cdr (assoc 1 (entget txt)))))
    (princ txtl)
    (setq pt (subst txtl (last pt) pt)
      allpt (cons pt allpt)))
 (mapcar 'setvar vLst '(0 0))
 (setq allpt (append (reverse allpt) '("" "" "")))
 (command "_spline")
 (mapcar 'command allpt)
 (mapcar 'setvar vLst oVar)
 (princ))

Posted

thank you lee mack realy you are a good man

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