Spline --> Method --> 1. Fit, 2. CV

Spline --> Method --> 1. Fit, 2. CV

Anonymous
Not applicable
1,127 Views
4 Replies
Message 1 of 5

Spline --> Method --> 1. Fit, 2. CV

Anonymous
Not applicable

1. Spline --> Method --> Fit
2. Spline --> Method --> CV

 

 na foums.autodesk.com
 Hello,
 from a long time I try to write the lisps:
1. "Draw Spline with Method: Fit."
 and
2. Draw Spline with metod "CV."

 So I wrote these lisps:

 

(DEFUN C:S () (COMMAND "_SPLINE"))
; Spline VeRtex
(DEFUN C:SVR (/)(setvar "cmdecho" 0) (princ "\nDraw Spline Fitted to Vertices." ) (command "_SPLINE" "_M" "_Fit"))
(DEFUN C:SSEG (/)(setvar "cmdecho" 0) (princ "\nDraw Spline Tangemt to Poliline Segments." ) (command "_SPLINE" "_M" "_CV"))
(DEFUN C:SSEG1 (command "_SPLINE" "_M" "_FIT"))

 

 

 , but they don't work properly.

 In the CommandLine, there is:
Command: svr
 Rysuje Spline DO WIERZCHOŁKÓW
Point or option keyword required.
; error: Function cancelled

 

 Could anybody tell me, what is wrong and how should this lisp be written?

0 Likes
1,128 Views
4 Replies
Replies (4)
Message 2 of 5

hmsilva
Mentor
Mentor

Perhaps something like this

 

(defun c:svr (/ echo)
  (setq echo (getvar 'CMDECHO))
  (setvar "cmdecho" 0)
  (princ "\nDraw Spline Fitted to Vertices.")
  (initcommandversion)
  (command "_.spline" "_M" "_Fit")
  (while (> (getvar 'cmdactive) 0)
    (command "\\")
  )
  (setvar "cmdecho" echo)
  (princ)
)
(defun c:sseg (/ echo)
  (setq echo (getvar 'CMDECHO))
  (setvar "cmdecho" 0)
  (princ "\nDraw Spline Tangemt to Poliline Segments.")
  (initcommandversion)
  (command "_SPLINE" "_M" "_CV")
  (while (> (getvar 'cmdactive) 0)
    (command "\\")
  )
  (setvar "cmdecho" echo)
  (princ)
)

 

Henrique

EESignature

0 Likes
Message 3 of 5

Anonymous
Not applicable

Yes, it works!

Thank you very much.

I named it at beginning SVRH and SSEGSH, because "H" is like "Henrique", who helped me 🙂

But I changed their name on: SF (like Spline FIt) and SCV (like Spline Control Vertices), respectively.

0 Likes
Message 4 of 5

hmsilva
Mentor
Mentor
You're welcome!
Glad I could help

Henrique

EESignature

0 Likes
Message 5 of 5

Anonymous
Not applicable

How to insert points from a txt file ?

0 Likes