GP_ Posted December 21, 2013 Share Posted December 21, 2013 (edited) A graphical approach to approximate a centerline between two polylines. To play p.s. Do not exaggerate with sharp curves. p.p.s. For AutoCAD 2011 or higher centerPline.LSP Edited February 15, 2014 by GP_ 1 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 21, 2013 Share Posted December 21, 2013 Interesting method Gian - thanks for sharing! Aside: I never realised vlax-erased-p would accept an ename argument - that's quite convenient Quote Link to comment Share on other sites More sharing options...
GP_ Posted December 22, 2013 Author Share Posted December 22, 2013 (edited) Thank you, Lee. ... vlax-erased-p would accept an ename argument In effect: (vlax-erased-p obj) Arguments obj A VLA-object. Edited December 24, 2013 by GP_ Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 22, 2013 Share Posted December 22, 2013 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 Quote Link to comment Share on other sites More sharing options...
suryacad Posted October 8, 2014 Share Posted October 8, 2014 Thank you for this LISP GP_ Quote Link to comment Share on other sites More sharing options...
GP_ Posted October 8, 2014 Author Share Posted October 8, 2014 You're welcome, suryacad Glad it's of use to someone. Quote Link to comment Share on other sites More sharing options...
cadplayer Posted October 8, 2014 Share Posted October 8, 2014 Fantastic done, thanks for your work _GP Quote Link to comment Share on other sites More sharing options...
GP_ Posted October 9, 2014 Author Share Posted October 9, 2014 You're welcome cadplayer, thank you for the comment Quote Link to comment Share on other sites More sharing options...
AIberto Posted October 9, 2014 Share Posted October 9, 2014 when appload Command: ap APPLOAD centerPline.LSP successfully loaded. Command: ; error: misplaced dot on input Quote Link to comment Share on other sites More sharing options...
GP_ Posted October 9, 2014 Author Share Posted October 9, 2014 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. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted October 10, 2014 Share Posted October 10, 2014 (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 October 10, 2014 by hanhphuc typo: palce -> place Quote Link to comment Share on other sites More sharing options...
AIberto Posted October 10, 2014 Share Posted October 10, 2014 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++ Quote Link to comment Share on other sites More sharing options...
GreenDD Posted November 8, 2014 Share Posted November 8, 2014 Hey guys, can anyone help me to get this work for closed polygons or is there also a LISP code? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted November 8, 2014 Share Posted November 8, 2014 Hey guys, can anyone help me to get this work for closed polygons or is there also a LISP code? Maybe this can help... http://www.cadtutor.net/forum/showthread.php?88968-Endless-Centre-Lines/page2&p=#11 M.R. Quote Link to comment Share on other sites More sharing options...
GreenDD Posted November 8, 2014 Share Posted November 8, 2014 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. Quote Link to comment Share on other sites More sharing options...
mardoq Posted February 2, 2016 Share Posted February 2, 2016 unfortunately I cant download the routine... there is an error popping out any chance of reuploading? Quote Link to comment Share on other sites More sharing options...
nasarpki Posted February 14, 2019 Share Posted February 14, 2019 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 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" Quote Link to comment Share on other sites More sharing options...
ronjonp Posted February 14, 2019 Share Posted February 14, 2019 2 hours ago, nasarpki said: When aploaded getting message "no function definition: VLAX-CURVE-GETENDPARAM" Add (vl-load-com) to the code. Quote Link to comment Share on other sites More sharing options...
Muthalagan Chidambaram Posted June 2, 2020 Share Posted June 2, 2020 On 12/21/2013 at 9:06 PM, GP_ said: A graphical approach to approximate a centerline between two polylines. To play 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 Quote Link to comment Share on other sites More sharing options...
Dadgad Posted June 2, 2020 Share Posted June 2, 2020 (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. Edited June 3, 2020 by Dadgad update Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.