turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Close

AutoCAD 2010/2011/2012

- Autodesk Community
- >
- AutoCAD
- >
- AutoCAD 2010/2011/2012
- >
- Re: Find the inflection point of a spline

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

7043 Views, 9 Replies

03-11-2012 04:42 PM

Hi All,

Just wondering if anyone knows how to find the inflection point of a spline???

I create a spline from a list of points and want to know where the curve of the spline changes to be able to dimension this point, it is not necessarily a point that is entered.

TIA

Cheers

Steve :-)

Steve :-)

Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2012 05:53 PM in reply to:
Prac_Slip_Kerm

Have you tried the CVSHOW command?

Displays the control vertices for specified NURBS surfaces or curves.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2012 06:30 PM in reply to:
gjrcmb

Also if you use the LIST command and select the spline, the control vertices displayed with CVSHOW command will be listed on the Text Screen.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-12-2012 07:55 PM in reply to:
gjrcmb

Thanks Guys,

I thought this was the only way - might need to do a LISP to get control points then draw a line and find intersection point with spline. Would be nice to be able to snap to the CV points.... and the intersection of the CV line with the spline as this is the point I am after.

Cheers

Steve :-)

Steve :-)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-12-2012 09:59 PM in reply to:
Prac_Slip_Kerm

Try turning on your 3D Object Snap with Vertex selected to snap to the Control Vertices. Then you could use the OSNAP Intersection snap to find the points you are after.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-13-2012 01:14 AM in reply to:
Prac_Slip_Kerm

Maybe something like the attached lisp program could get you started. Something I just put together fairly quickly that prints out the control vertex points of a spline and draws a polyline through the points. Does not address how you would go about calculating or finding the intersection of the polyline and spline, which maybe more difficult to do.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-13-2012 12:46 PM in reply to:
gjrcmb

OK, I couldn't resist. See following lisp program that places polyline through control vertices and points at the intersection of the spline and polyline. It also prints out the coordinates of the control vertices, the number of vertices, the number of spline-polyline intersection points, and the coordinates of the intersection points. Notice that the points at the intersections at the beginning and ending of the spline do not necessarily coincide exactly with the control vertices at the beginning and ending of the spline.

The application does not automatically change the point display type. So recommend using DDPTYPE to change the display of your points prior to running application. As said before this is something I just put together fairly quickly, so make sure you test it out throughly. Also could be modified to eliminate polyline, or the beginning and end points if not needed.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-14-2012 03:12 AM in reply to:
gjrcmb

Thanks Gavin!

That LISP works well! I am making a few changes to it and when I finish I will post it back here for others - just wondering if the intersection is always the inflection piont though? Particulary when there are several cv points on the same side of the line before the change of curve?

The 3D snap works very well too thank you, I have lots to do though hence the LISP which is excellent!!!

Thanks again for the help guys!!!

Cheers

Steve :-)

Steve :-)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-14-2012 10:28 AM in reply to:
Prac_Slip_Kerm

I am not an expert on splines, so can't really shine any light on what might be considered an inflection point and how they relate to a definition of a spline. Apparently there are different types and different parameters that can be set to determine the ultimate spline geometry, so it seems that there may be a lot to consider.

Glad that the Lisp routine is of help, and would definitely like to see what you come up with after its modification. Also curious to know what you are drawing with the splines. As a roadway design engineer, never really have the need to use splines, but apparently they do have their practicable applications.

You're welcome,

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-14-2012 01:30 PM in reply to:
gjrcmb

Here is my slightly modified code. It deletes the polyline and draws a vertical line instead of a point.

;;;========================================================================= ;;; Spline Inflection ;;;=============================================== ========================== ;;Application to place lines at the intersection of spline and polyline drawn through Spline Control Vertices (defun c:SI (/ esel sobj elst ptlst nvrt pt pobj npts nintn pt2 yoffset) (vl-load-com) (while (null (setq esel (entsel "\nSelect Spline: "))) (princ "\nNothing Selected.") ) (setq sobj (vlax-ename->vla-object (car esel))) (setq elst (entget (car esel))) (setq ptlst '()) (setq nvrt 0) (setq yoffset 10) (if (= (cdr (assoc 0 elst)) "SPLINE") (progn (while (assoc 10 elst) (setq pt (cdr (assoc 10 elst))) (princ "\nCoordinates of Control Vertex: ") (princ pt) (setq ptlst (append ptlst (list pt))) (setq elst (cdr (member (assoc 10 elst) elst))) (setq nvrt (+ nvrt 1)) ) (princ (strcat "\nNumber of Spline Control Vertices: " (itoa nvrt))) (entmake '((0 . "POLYLINE"))) (repeat nvrt (entmake (list '(0 . "VERTEX") (cons 10 (car ptlst)))) (setq ptlst (cdr ptlst)) ) (entmake '((0 . "SEQEND"))) (setq pobj (vlax-ename->vla-object (ssname (ssget "L") 0))) (setq ptlst (vl-catch-all-apply 'vlax-safearray->list (list (vlax-variant-value (vla-intersectwith sobj pobj acextendnone))))) (vla-delete pobj) (setq npts (/ (length ptlst) 3)) (princ (strcat "\n\nNumber of Intersection Points: " (itoa (- npts 2)))) (setq ptlst (cdddr ptlst));Remove 1st points xyz (repeat npts (while (> (length ptlst) 3) (progn (setq pt (list (car ptlst) (cadr ptlst) (caddr ptlst))) (setq pt2 (list (car ptlst) (- (cadr ptlst) yoffset) (caddr ptlst))) (princ "\nCoordinates of Intersection Points: ") (princ pt) (entmake (list '(0 . "LINE") (cons 8 "BASE") (cons 10 pt) (cons 11 pt2))) (setq ptlst (cdddr ptlst)) );End Progn );End While );End Repeat ) (princ "\nSelected Object is Not a Spline.") ) (princ) )

I use this for Kerb Returns as at the moment we do these by hand using a french curve then draft them using vanilla CAD. So I use a spline to fit between the points to get a smooth transition but want to be able to get the Kerb Return chainage of the inflection point to label the change of Vertical Curve.

I assume that C3D makes KR's much simpler! We are looking at updating design software and I am hoping to get C3D, will have to wait and see.

Thanks Again, Hope this might help others too!

Cheers

Steve :-)

Steve :-)

Search This Board

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Announcements

The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.

- Privacy | Legal Notices & Trademarks | Report Noncompliance | Site map | © Copyright 2014 Autodesk Inc. All rights reserved

Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Please see the Autodesk Creative Commons FAQ for more information.