designerstuart Posted August 31, 2011 Share Posted August 31, 2011 hi all i've searched for a while, but cannot find out how to join splines - because i need them to remain splines not convert to polylines. i found here someone who claims to have written a lisp which -might- do this, but cannot find what / what they refer to. have a suspicion it will be a polyline convert routine anyway. anyone seen or made such a thing? to clarify, i guess the routine would ask for a selection of splines, extract their coordinates, draw a spline using those points, and delete the originals. this is definitely beyond my lisp skills - but maybe easy for you guys? cheers Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 31, 2011 Share Posted August 31, 2011 I thought you could use the JOIN command to join splines as long as they don't have any gaps. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 problem is it converts them to polylines. well, i say that, they are still called splines but they no longer act the same - they are like polylines in that the nodes are no longer on the line. maybe my terminology is wrong. Quote Link to comment Share on other sites More sharing options...
Tyke Posted August 31, 2011 Share Posted August 31, 2011 ReMark is right you can use JOIN to connect splines. You can select multiple splines and they will all be joined (as ReMark said: no gaps). The only thing you will lose is the smoothness of the spline curves at the pont where the individual splines met, there you will get a "sharp" corner. Quote Link to comment Share on other sites More sharing options...
Tyke Posted August 31, 2011 Share Posted August 31, 2011 Splines have two types of nodes (control points) and you can switch between the two by first clicking the spline and them clicking the small triangle with the line above it near the beginning of the spline. You can see either the nodes on the spline or those adjacent the spline. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 ReMark is right... you will lose is the smoothness of the spline curves at the pont where the individual splines met, there you will get a "sharp" corner. yes, thanks guys ....you can switch between the two .... You can see either the nodes on the spline or those adjacent the spline. hmmmm is this after 2010 i wonder? i have no such icon Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 red one nodes are as required white, after join, they have been 'converted' Quote Link to comment Share on other sites More sharing options...
Tharwat Posted August 31, 2011 Share Posted August 31, 2011 This may help ... (defun c:test (/ ss e p1) (if (and (setq ss (car (entsel "\n Select Spline :"))) (eq (cdr (assoc 0 (setq e (entget ss)))) "SPLINE") ) (progn (setq p1 (vlax-curve-getendpoint ss)) (entupd (cdr (assoc -1 (entmod (subst (cons 11 p1) (assoc 10 e) e))) ) ) ) (princ) ) (princ) ) Tharwat Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 thanks tharwat - but i get error message "bad dxf group: (11)" Quote Link to comment Share on other sites More sharing options...
Tharwat Posted August 31, 2011 Share Posted August 31, 2011 Try it again I update the code after a few seconds of posting it . Quote Link to comment Share on other sites More sharing options...
Tyke Posted August 31, 2011 Share Posted August 31, 2011 I've not tried 2011, but in 2012 there is a system variable called "SPLMETHOD" which controls which control points are displayed. You can also change its value in the properties pane. Checked in 2010 and its not there as a sysvar and also not in the properties pane. Looks like you are out of luck old son . Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 hey thanks tyke for trying..... only just got the upgrade to 2010 and already looking fwd to next one! tharwat - sorry i think you misunderstood / i misled..... i am looking to join multiple (well, two) splines, not just close one. thanks for your help tho! Quote Link to comment Share on other sites More sharing options...
Tyke Posted August 31, 2011 Share Posted August 31, 2011 I've just checked the DXF Codes for AutoCAD 2010 and it appears that it is not implemented in 2010. The DXF Code is 70 which is a bit coded spline flag, in 2010 Code 70 has a value 0f 8. in 2012 it has a value of 8 when the control points lie off the spline and a value of 1288 when the control points lie on the line. In both spline types with control points on and off the line I can't see any difference in their DXF Codes at all. Quote Link to comment Share on other sites More sharing options...
designerstuart Posted August 31, 2011 Author Share Posted August 31, 2011 i don't really understand that - does it mean (as you said above) that there is no such parameter in 2010? still interested if someone has a lisp that would do it..... thanks! Quote Link to comment Share on other sites More sharing options...
Tyke Posted August 31, 2011 Share Posted August 31, 2011 i don't really understand that - does it mean (as you said above) that there is no such parameter in 2010? still interested if someone has a lisp that would do it..... thanks! Yup in 2010 there is no such parameter and in 2010 you can't control how the control points are displayed. But I've managed to produce both types in 2010 and cannot find any differences between them. The spline with the control points off the spline I copied and pasted from 2012, the spline with the control points on the spline I drew in 2010. It must be possible and I think perhaps the only way is by using LISP. Have our LISP experts any advice? Quote Link to comment Share on other sites More sharing options...
designerstuart Posted September 2, 2011 Author Share Posted September 2, 2011 Have our LISP experts any advice? not so far! 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.