Jump to content

Bezier tool in acad!


Sasa

Recommended Posts

Hi!

 

I wanna ask where in acad i can find Bezier tool? Because i have coordinates, and if i draw Bezier tool through this coordinates i get my line!

 

And coordinates are:

 

-

-

 

 

 

-

 

 

 

-

 

 

 

-

 

 

 

 

thenks!

 

Edit:

Done

1) draw polyline through this 4 points

2) type pedit

3) chose S (spline)

3) and we get bezier line (T1 T2 T3 T4)

Link to comment
Share on other sites

There isn't Bezier tool in plain AutoCAD. Maybe it is in Land Desktop? Do you need Cubic Bezier curve or Bezier spline with more than four points? I think possible to write lisp program with Cubic Bezier equation. For spline it is more diffcult.

Link to comment
Share on other sites

  • 3 months later...
Hi!

 

I wanna ask where in acad i can find Bezier tool? Because i have coordinates, and if i draw Bezier tool through this coordinates i get my line!

.....

 

Edit:

Done

1) draw polyline through this 4 points

2) type pedit

3) chose S (spline)

3) and we get bezier line (T1 T2 T3 T4)

 

I know this is an old post, but I was looking for how to create a bezier curve and came across this post.

 

I don't think your solution creates a bezier curve, at least not to the bezier curve available in TurboCAD,

 

Now I'm not too sure of the different types, but TurboCAD has 3 types ofs splines, spline by fit, spline by control and bezier spline, and the 3 curves looks different when drawn on the same points. The difference between the spline and the bezier curve in TC is apparent when you do node edit. For the splines you move the control points while for the bezier you can move the control points and at the same time control the tagency to the neighbor points.

spline.jpg

Link to comment
Share on other sites

Yeah, I've never known of the Bezier curve tool to be in AutoCAD. It is a really handy tool that I use frequently in Photoshop, but it is definitely different than anything AutoCAD has to offer. Not to say that AutoCAD doesn't have a good selection of tools that do the job, however. :)

Link to comment
Share on other sites

Try this:

;|3D bezier curve
_____mfuccaro@hotmail.com___2008.10
|;
(defun c:bezier( / division result lp p)
 (setq division 100)
 (setq result nil)
 (setq lp nil p t)
 (while p
   (setq p (getpoint "select point"))
   (if p (setq lp (cons (trans p 1 0) lp)))
   )
 (setq r (/ 1.0 division))
 (repeat division
   (setq p (reverse lp))
   (setq result (cons (car (r1 p r)) result))
   (setq r (+ r (/ 1.0 division)))
   )
 (setq result (cons (car lp) (reverse result)))
 (make3dpoly result)
 (princ)
 )
(defun div(a b r / i p)
 (setq i -1 p nil)
 (foreach x a
   (setq p (cons (+ (* r (nth (setq i (1+ i)) a)) (* (- 1 r) (nth i b))) p))
   )
 (reverse p)
 )
(defun parc1(p r / i l p1)
 (setq i 0 l (length p) p1 nil)
   (repeat (1- l)
     (setq a (nth i p))
     (setq b (nth (1+ i) p))
     (setq p1 (cons (div a b r) p1))
     (setq i (1+ i))
     )
 (reverse p1)
 )
(defun r1(p r / p1)
 (repeat (1- (length p))
   (setq p1 (parc1 p r))
   (setq p p1)
   )
 )
(defun make3dpoly (vertlist)
 (entmake (list '(0 . "POLYLINE")'(66 . 1)'(100 . "AcDb3dPolyline")'(70 . ))
 (foreach point vertlist
   (entmake (list (cons 0 "VERTEX")'(100 . "AcDb3dPolylineVertex")'(70 . 32)(cons 10 point))))
 (entmake '((0 . "SEQEND")))
 )

Tested in WCS only!

Link to comment
Share on other sites

  • 3 years later...

hi! fuccaro

 

i have tried your below mentioned program in autocad but its not working.

after entering command bezier.

its ask to select point as such we select point its asking for another n on n on n on...

 

command prompt looks like:

select pointselect pointselect pointselect pointselect pointselect pointselect pointselect pointselect pointselect pointselect pointselect point

 

could you pls have a check an let me guide.

 

I respectfully request you for this.

 

 

Try this:

;|3D bezier curve
_____mfuccaro@hotmail.com___2008.10
|;
(defun c:bezier( / division result lp p)
 (setq division 100)
 (setq result nil)
 (setq lp nil p t)
 (while p
   (setq p (getpoint "select point"))
   (if p (setq lp (cons (trans p 1 0) lp)))
   )
 (setq r (/ 1.0 division))
 (repeat division
   (setq p (reverse lp))
   (setq result (cons (car (r1 p r)) result))
   (setq r (+ r (/ 1.0 division)))
   )
 (setq result (cons (car lp) (reverse result)))
 (make3dpoly result)
 (princ)
 )
(defun div(a b r / i p)
 (setq i -1 p nil)
 (foreach x a
   (setq p (cons (+ (* r (nth (setq i (1+ i)) a)) (* (- 1 r) (nth i b))) p))
   )
 (reverse p)
 )
(defun parc1(p r / i l p1)
 (setq i 0 l (length p) p1 nil)
   (repeat (1- l)
     (setq a (nth i p))
     (setq b (nth (1+ i) p))
     (setq p1 (cons (div a b r) p1))
     (setq i (1+ i))
     )
 (reverse p1)
 )
(defun r1(p r / p1)
 (repeat (1- (length p))
   (setq p1 (parc1 p r))
   (setq p p1)
   )
 )
(defun make3dpoly (vertlist)
 (entmake (list '(0 . "POLYLINE")'(66 . 1)'(100 . "AcDb3dPolyline")'(70 . ))
 (foreach point vertlist
   (entmake (list (cons 0 "VERTEX")'(100 . "AcDb3dPolylineVertex")'(70 . 32)(cons 10 point))))
 (entmake '((0 . "SEQEND")))
 )

Tested in WCS only!

Link to comment
Share on other sites

Hello, and sorry for the late answer.

I dont use AutoCAD any more, but it should end the input when a null entry is detected. With other words: when it asks you for a a new point, just press . Like in the LINE command.

Post again if it doesn't work and I will find a computer with AutoCAD and I will try to solve the problem.

Link to comment
Share on other sites

Hello, and sorry for the late answer.

I dont use AutoCAD any more, but it should end the input when a null entry is detected. With other words: when it asks you for a a new point, just press . Like in the LINE command.

Post again if it doesn't work and I will find a computer with AutoCAD and I will try to solve the problem.

 

hey mate..

thank you very much.. its working.

by the way i got d solution of my problem but if you can help me to learn logic behind the programming or the algorithm you used.

I heartily request you for this thing.

Link to comment
Share on other sites

FYI - in 2013 spline can be set up for Bezier curves, search help on "bezier". It is in 2012 also, just confirmed.

 

Spline, Method = CV, Degree = 3, pick four points.

Link to comment
Share on other sites

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