Jump to content

Recommended Posts

Posted

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

Posted

I thought you could use the JOIN command to join splines as long as they don't have any gaps.

Posted

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.

Posted

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.

Posted

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.

Posted
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 :(

Posted

red one nodes are as required

white, after join, they have been 'converted'

 

spl.jpg

Posted

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

Posted

thanks tharwat - but i get error message "bad dxf group: (11)"

Posted

Try it again I update the code after a few seconds of posting it . :)

Posted

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

Posted

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!

Posted

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.

Posted

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!

Posted
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?

Posted
Have our LISP experts any advice?

 

not so far!

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