AutoCAD 2000/2000i/2002 Archive (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can you turn an ellipse into a pline?

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
369 Views, 10 Replies

Can you turn an ellipse into a pline?

Can you turn an ellipse into a pline and give it a thickness?

--
Dale Jarvis, Engineering Technologist
Gairns Santos Engineering Inc.
Ph. (250) 562-0330
Fax. (250) 562-0331
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

Try re-drawing the ellipse as a polyline by setting

the variable "pellipse" to 1 (setvar "pellipse" 1).



Leo
Message 3 of 11
Anonymous
in reply to: Anonymous

Sure in a round about way. WBLOCK all your Ellipses into a separate
drawing. Open the WBLOCKed drawing and SAVEAS r12 which doesn't support
ELLIPSE objects automatically converting them into Plines. Then Insert the
WBLOCKed drawing back into the original drawing.

Paul

"Dale Jarvis" wrote in message
news:5C30C29ACCE2B1D75CB402456DB4F52F@in.WebX.maYIadrTaRb...
> Can you turn an ellipse into a pline and give it a thickness?
>
> --
> Dale Jarvis, Engineering Technologist
> Gairns Santos Engineering Inc.
> Ph. (250) 562-0330
> Fax. (250) 562-0331
>
>
Message 4 of 11
Anonymous
in reply to: Anonymous

This old trick doesn't work in ACAD 2002, because you can't saveas r12
(dwg).

Juergen


Paul Li schrieb:
>
> Sure in a round about way. WBLOCK all your Ellipses into a separate
> drawing. Open the WBLOCKed drawing and SAVEAS r12 which doesn't support
> ELLIPSE objects automatically converting them into Plines. Then Insert the
> WBLOCKed drawing back into the original drawing.
Message 5 of 11
Anonymous
in reply to: Anonymous

Dale,

Or try this lisp program. Converts a selection set of arcs, circles, splines
or ellipses to lwplines with a user defined number of vertices. Don't thank
me. I only tweaked it. Thanks goes to Andrzej Gumula.

;based on spline2poly.lsp by Andrzej Gumula - customization NG 9/27/02
;modified to include ellipses, circles and arcs - added undo
;needs A2k or above

(defun c:Curve2Pline (/ Fit SSet Count Delta Measure Pts Mark)

(defun *error* (Msg)
(cond
((or (not Msg)
(member Msg '("console break"
"Function cancelled"
"quit / exit abort"))))
((princ (strcat "\nError: " Msg)))
) ;cond
(UndoEnd)
(princ)
) ;end error

(vl-load-com)

;by John Uhden
(setq *acad* (vlax-get-acad-object))
(defun UndoBegin ()
(vla-StartUndoMark (vla-get-activedocument *acad*))
)
(defun UndoEnd ()
(vla-EndUndoMark (vla-get-activedocument *acad*))
)

;by Joe Burke with lotsa help
(defun SSAfterEnt (ent / ss* entlst)
(and
(setq ss* (ssadd))
(while
(setq ent (entnext ent))
(setq entlst (entget ent))
(if
(and
(not
(wcmatch (cdr (assoc 0 entlst)) "ATTRIB,VERTEX,SEQEND")
) ;not
(eq (cdr (assoc 410 entlst)) (getvar "ctab"))
) ;and
(ssadd ent ss*)
) ;if
) ;while
) ;and
ss*
) ;end

(defun MakePoly ()
(entmake
(append
(list
'(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline")
(cons 6 (vla-get-linetype Obj)) (cons 62 (vla-get-color Obj))
(cons 8 (vla-get-layer Obj)) (cons 90 (length Pts))
(if (vlax-curve-isclosed Obj) (cons 70 1) (cons 70 0))
)
(mapcar '(lambda (x) (cons 10 x)) Pts)
)
)
);end MakePoly

(defun StatLayer (Name Id)
(/= Id
(logand Id
(cdr (assoc 70 (entget (tblobjname "layer" Name))))
)
)
);end StatLayer

(UndoBegin)
(setq Mark (entlast))
(princ "Select circles, arcs, ellipses or splines: ")
(cond
((setq SSet (ssget ":L" '((0 . "SPLINE,ELLIPSE,CIRCLE,ARC"))))
(while (not (and (>= Fit 3) (<= Fit 500)))
(initget 7)
(setq Fit (getint "\nEnter number of segments [3 - 500]: "))
) ;while
(repeat (setq Count (sslength SSet))
(setq Count (1- Count)
Obj (vlax-ename->vla-object (ssname SSet Count))
Delta (/ (vlax-curve-getdistatparam Obj
(vlax-curve-GetEndParam Obj)) Fit)
Measure 0.0 Pts nil)
(repeat (1+ Fit)
(setq Pts (cons (vlax-curve-getpointatdist Obj Measure) Pts)
Measure (+ Measure Delta))
);end repeat
(cond
((StatLayer (vla-get-layer Obj) 4)
(MakePoly)
(vla-delete Obj))
);end cond
);end repeat
)
(T (prompt "\nCurves not selected "))
) ;cond
(cond ((> (sslength SSet) 0)
(princ (strcat "\nNumber of curves converted: "(itoa (sslength SSet))))
(sssetfirst nil (SSAfterEnt Mark))) ;select
) ;cond
(*Error* nil)
(princ)
);end

> Can you turn an ellipse into a pline and give it a thickness?
>
> --
> Dale Jarvis, Engineering Technologist
> Gairns Santos Engineering Inc.
> Ph. (250) 562-0330
> Fax. (250) 562-0331
Message 6 of 11
Anonymous
in reply to: Anonymous

R12DXF is just fine, which you can INSERT.

--
Dean Saadallah
http://www.pendean.com
Expanded Links Page
http://www.pendean.com/lt/links.htm
--

"Jürgen Palme" wrote in message
news:3DA7D0B0.E51DE679@debitel.net...
> This old trick doesn't work in ACAD 2002, because you can't
saveas r12
> (dwg).
>
> Juergen
>
>
> Paul Li schrieb:
> >
> > Sure in a round about way. WBLOCK all your Ellipses into a
separate
> > drawing. Open the WBLOCKed drawing and SAVEAS r12 which
doesn't support
> > ELLIPSE objects automatically converting them into Plines.
Then Insert the
> > WBLOCKed drawing back into the original drawing.
>
>
Message 7 of 11
Anonymous
in reply to: Anonymous

OK, I wrote "you can't saveas R12 (dwg !!)". The problems if you use the
dxf-export/-import are
- the drawing must not include 3D-Solids
- you can't use dxfin in an existing drawing (e.g. you can't follow the
steps described by Paul Li but have to export/import the whole drawing)

... or is it possible and I'm not aware of this?


Juergen


Dean Saadallah schrieb:
>
> R12DXF is just fine, which you can INSERT.
>
> --
> Dean Saadallah
> http://www.pendean.com
> Expanded Links Page
> http://www.pendean.com/lt/links.htm
Message 8 of 11
Anonymous
in reply to: Anonymous

"Dale Jarvis" a écrit dans le message de news:
5C30C29ACCE2B1D75CB402456DB4F52F@in.WebX.maYIadrTaRb...
> Can you turn an ellipse into a pline and give it a thickness?


A small LISP which does the trick at
http://www.afitec.com/Support/epaissir.php

--
/////
(o)-(o)
---ooO---(_)---Ooo--------------------------
http://www.afitec.com
Message 9 of 11
Anonymous
in reply to: Anonymous

"Dale Jarvis" a écrit dans le message de news:
5C30C29ACCE2B1D75CB402456DB4F52F@in.WebX.maYIadrTaRb...
> Can you turn an ellipse into a pline and give it a thickness?


You cannot do that because a Pline cannot take the shape of an ellipse, this
is simply mathematicaly impossible...
This is why the Offset command does'nt work on an ellipse and instead
creates a Pline approximately the shape of the Ellipse.
Using a very small offset amount like 0.00000000001 you can offset your
ellipse and turn it into a Pline, then apply a thickness with the pedit
command. The small Lisp I advise you in my other reply to your message just
do that.

--
/////
(o)-(o)
---ooO---(_)---Ooo--------------------------
http://www.afitec.com
Message 10 of 11
Anonymous
in reply to: Anonymous

To quote Paul Li's post:
"WBLOCK all your Ellipses into a separate drawing. Open the WBLOCKed
drawing and SAVEAS r12 which doesn't support ELLIPSE objects automatically
converting them into Plines. Then Insert the WBLOCKed drawing back into the
original drawing."

What 3D Solids, we are talking about Ellipses?
INSERT command let's you pick DWG or DXF, no need for DXFIN command (which
is OPEN command BTW). Look it all up in HELP in R2002.

--
Dean Saadallah
http://www.pendean.com
Expanded Links Page
http://www.pendean.com/lt/links.htm
--

"Jürgen Palme" wrote in message
news:3DA92F5B.A1371119@debitel.net...
> OK, I wrote "you can't saveas R12 (dwg !!)". The problems if you use the
> dxf-export/-import are
> - the drawing must not include 3D-Solids
> - you can't use dxfin in an existing drawing (e.g. you can't follow the
> steps described by Paul Li but have to export/import the whole drawing)
>
> ... or is it possible and I'm not aware of this?
>
>
> Juergen
>
>
> Dean Saadallah schrieb:
> >
> > R12DXF is just fine, which you can INSERT.
> >
> > --
> > Dean Saadallah
> > http://www.pendean.com
> > Expanded Links Page
> > http://www.pendean.com/lt/links.htm
>
>
Message 11 of 11
Anonymous
in reply to: Anonymous

I knew it: there was a black hole in my brain 😞
I was not aware that you can insert DXF-files too.

Thanks for correcting me.

Juergen

Dean Saadallah schrieb:
>
> INSERT command let's you pick DWG or DXF, no need for DXFIN command (which
> is OPEN command BTW).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums