Jump to content

Recommended Posts

Posted (edited)

A graphical approach to approximate a centerline between two polylines.

 

To play :)

 

 

465.gif

 

 

p.s. Do not exaggerate with sharp curves.

p.p.s. For AutoCAD 2011 or higher

centerPline.LSP

Edited by GP_
  • Like 1
Posted

Interesting method Gian - thanks for sharing!

 

cpl.png

 

Aside: I never realised vlax-erased-p would accept an ename argument - that's quite convenient :)

Posted (edited)

Thank you, Lee. :)

 

 

... vlax-erased-p would accept an ename argument

 

In effect:

 

(vlax-erased-p obj)

Arguments

obj

A VLA-object.

Edited by GP_
Posted

It would seem that vlax-erased-p is similar to the vlax-curve-* functions in that it will accept either a VLA-Object or ename argument: (contrary to the documentation for these functions):

_$ (setq ent (car (entsel)))
<Entity name: 7ef16a08>
_$ (setq obj (vlax-ename->vla-object ent))
#<VLA-OBJECT IAcadLine 1662331c>

_$ (vlax-curve-getendparam ent)
10.0
_$ (vlax-curve-getendparam obj)
10.0

_$ (vlax-erased-p ent)
nil
_$ (vlax-erased-p obj)
nil

_$ (entdel ent)
<Entity name: 7ef16a08>

_$ (vlax-erased-p ent)
T
_$ (vlax-erased-p obj)
T

  • 9 months later...
Posted

You're welcome, suryacad :)

 

Glad it's of use to someone.

Posted

You're welcome cadplayer, thank you for the comment :)

Posted

when appload

Command: ap
APPLOAD centerPline.LSP successfully loaded.
Command: ; error: misplaced dot on input

Posted
when appload

Command: ap
APPLOAD centerPline.LSP successfully loaded.
Command: ; error: misplaced dot on input

 

 

Sorry, I don't know the solution for your problem.

Posted (edited)

Thanks for sharing sir, though i cant try it on 2007 :)

 

 

 

when appload

Command: ap
APPLOAD centerPline.LSP successfully loaded.
Command: ; error: misplaced dot on input

 

i recognize this error happen if dot place before a number.

try to separate dot.

example: if you see

(40 [color="red"][b].[/b][/color]123)

at least has space

(40 [color="red"][b].[/b][/color] 123)

Edited by hanhphuc
typo: palce -> place
Posted
Thanks for sharing sir, though i cant try it on 2007 :)

 

 

 

 

 

i recognize this error happen if dot place before a number.

try to separate dot.

example: if you see

(40 [color=red][b].[/b][/color]123)

at least has space

(40 [color=red][b].[/b][/color] 123)

 

My dear friend hanhphuc ,

Thank you for your idea, I think I found the reason .

just I test it with "vlide" , Found the wrong point .

Now I open it with notepad++

sshot-1.png

sshot-5.jpg

  • 5 weeks later...
Posted

Hey guys, can anyone help me to get this work for closed polygons or is there also a LISP code?

Posted

Thanks for your anwser M.R.!

 

But it should work more in the way that it create the centerline of one polygon and not with another.

So that i get the green centerline out of the with closed polygon in the picture.

 

Centerline.jpg

  • 1 year later...
Posted

unfortunately I cant download the routine... there is an error popping out :(

any chance of reuploading?

  • 3 years later...
Posted
On 10/9/2014 at 7:14 PM, GP_ said:

 

 

Sorry, I don't know the solution for your problem.

 

On 12/21/2013 at 9:06 PM, GP_ said:

A graphical approach to approximate a centerline between two polylines.

 

To play :)

 

 

465.gif

 

 

p.s. Do not exaggerate with sharp curves.

p.p.s. For AutoCAD 2011 or higher

centerPline.LSP

When aploaded getting message

"no function definition: VLAX-CURVE-GETENDPARAM"

Posted
2 hours ago, nasarpki said:

 

When aploaded getting message

"no function definition: VLAX-CURVE-GETENDPARAM"

Add (vl-load-com) to the code.

  • 1 year later...
Posted
On 12/21/2013 at 9:06 PM, GP_ said:

A graphical approach to approximate a centerline between two polylines.

 

To play :)

 

 

465.gif

 

 

p.s. Do not exaggerate with sharp curves.

p.p.s. For AutoCAD 2011 or higher

centerPline.LSPUnavailable

 

Can i get the CenterPline.LSP file to my mail please. It is not downloadable

 

Posted (edited)

It appears that 615 people have been able to download it, from GP_s original post, which he edited in 2014. 13 of them since yesterday.

image.png.960d713f68fba4552c7d179ae0612480.png

Edited by Dadgad
update

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