Jump to content

Centerline between two polylines


GP_

Recommended Posts

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
Link to comment
Share on other sites

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_
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 9 months later...
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 5 weeks later...

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

Link to comment
Share on other sites

  • 1 year later...
  • 3 years later...
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"

Link to comment
Share on other sites

  • 1 year later...
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

 

Link to comment
Share on other sites

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