Spline XYZ Points to Excel

Spline XYZ Points to Excel

caddude
Advocate Advocate
3,143 Views
24 Replies
Message 1 of 25

Spline XYZ Points to Excel

caddude
Advocate
Advocate

Hello all,

 

I'm looking for a way to pull the XYZ coordinates of a 3D spline fit points and place them in an excel file.  I found this forum post but this was for creating a txt file which I tried to adjust to creating an excel file but didn't work.   Do you know of any lisp routines that can do this?  Thank you for any assistance.

0 Likes
Accepted solutions (1)
3,144 Views
24 Replies
Replies (24)
Message 21 of 25

caddude
Advocate
Advocate

Awesome!  You all rock in this forum!  Thank you all for your time and help with this.  I hope others will be able to use this code for their future projects as well.  🤓

0 Likes
Message 22 of 25

leeminardi
Mentor
Mentor

@CADaSchtroumpf Fit points are not sufficient for precisely defining a spline in AutoCAD.  For example, in the following image both the red and green splines are degree 3 and use the same noted points as their "fit" points.  When the green spline was created a tangent condition was explicitly stated for both ends of the spline.  The list command will include tangent vectors if they we used. Your program outputs the same data for both splines.

 

It is almost always better to use control points plus knot weights (if not 1) when exporting the definition of a spline.  Fit points are very transitory and may lose their meaning (i.e., they move) if the spline's CV's are edited.

 

image.png

lee.minardi
0 Likes
Message 23 of 25

CADaSchtroumpf
Advisor
Advisor

@leeminardi 

I was responding to the initial request, but more information can be included in excel.

Here is a more fleshed out version.

0 Likes
Message 24 of 25

leeminardi
Mentor
Mentor

@CADaSchtroumpf ,  my comment was intended more for @caddude to  point out the danger of relying on Fit Points to reproduce a spline.   Your program does a nice job at exporting the Fit Points and tangent vectors to Excel.   

I didn't realize that AutoCAD's fit point method uses a degree 3 (order 4) B-spline no matter the current setting for degree. If the CV method is used then the degree setting is used if a sufficient number of CVs are specified. The user should be aware that it assumes  weights of 1.0 for all CVs and should verify the results if splinedit was used to modify the spline's CVs. 

lee.minardi
0 Likes
Message 25 of 25

M_Zubair0087
Community Visitor
Community Visitor

Xyz

0 Likes