Export spline as txt or xls file with x y z coordinates

Export spline as txt or xls file with x y z coordinates

Anonymous
Not applicable
4,197 Views
12 Replies
Message 1 of 13

Export spline as txt or xls file with x y z coordinates

Anonymous
Not applicable

I have a spline or series of splines that I would like to export as a series of coordinates in x y z. Is there a way to do this? Can I control the step size (ds) between coordinate points?

0 Likes
4,198 Views
12 Replies
Replies (12)
Message 2 of 13

jameschowe
Participant
Participant

Hi Spencer

I have never personally done this myself, however, there is a tutorial on the knowledge network, for importing XYZ data from excel into fusion which looks like the airfoil addin from the store.

 

I am not sure if this helps

 

https://knowledge.autodesk.com/support/fusion-360/getting-started/caas/screencast/Main/Details/c1d0d...

 

James

 

 

 

0 Likes
Message 3 of 13

Anonymous
Not applicable

Hi Spencer, I am having the same question you have. I know that Solidworks allows you to do so through its API, but not sure about Fusion 360. Just wonder if you have found a way to export the spline into XYZ coordinates in Fusion360?

 

Thanks.

0 Likes
Message 4 of 13

Anonymous
Not applicable
Hi,

No, I have not figured it out yet. I tried using a program called Dxf2xyz,
but I kept getting errors when trying to convert the files.
0 Likes
Message 5 of 13

TrippyLighting
Consultant
Consultant

In general, this makes very little sense.

In order to understand what, you need to understand that the fit-point splines in Fusion 360 are 5-degree multi span splines.

Even if you export them into a text file, the chance that another software uses exactly Fusion 360's implementation and representation of splines the data you have is pretty useless.


EESignature

0 Likes
Message 6 of 13

Anonymous
Not applicable

Hi there, I am trying to achieve the same goal as Spencer. I have a spline in Fusion 360 (that I created by tracing an image I imported as a canvas) and would like to export the xyz coordinates, and ideally be able to choose the distance between points.

 

This should be a relatively simple task... do you have any suggestions as to how I can go about this?

0 Likes
Message 7 of 13

TrippyLighting
Consultant
Consultant

What would you do with these points?


EESignature

0 Likes
Message 8 of 13

Anonymous
Not applicable

The end goal is to use them for a NEURON model, so being able to export them to any MATLAB-readable file (even an Excel file) should do.

0 Likes
Message 9 of 13

TrippyLighting
Consultant
Consultant

And what is a NEURON model?


EESignature

0 Likes
Message 10 of 13

Anonymous
Not applicable

A Python-based software for modeling neurons.

 

I just need a list of xyz coordinates in order.

0 Likes
Message 11 of 13

TrippyLighting
Consultant
Consultant

So the next question is: How would a list of fit-spline control points for a 5-degree multi-plan spline help you model that?

It is very unlikely that ant other software is going to implement fit-point splines the same way Fusion 360 does.

You have a much better chance with control point splines (CV splines).

 

Anyway, there is an API section for this forum where you might have better luck with such questions.


EESignature

0 Likes
Message 12 of 13

OceanHydroAU
Collaborator
Collaborator

This is the snippet to get the control points of splines:

foil=[]
for i in spline.entity.geometry.controlPoints.iterator():
    foil.append([ i.x, i.y, i.z ])

You could theoretically do that as a one-liner in the "command window" from fusion360 itself if you can figure out how to select and reference the spline you want.

 

I don't know what algorithm Fusion360 uses for fit-point-splines.

 

Control-point-splines (and probably higher degree too) are standard cubic b-splines, and match pixel-for-pixel.  In perl, I used Math::Jspline.  I translated that to python in my Airfoil Tools add-in.

 

My addin exports splines to files (.dat and .csv) - it's built for airfoils, but if you turn off the normalization etc it should work for any spline: https://apps.autodesk.com/FUSION/en/List/Search?isAppSearch=True&searchboxstore=FUSION&facet=&collec...

 

If your splines *are* airfoils, you can export and re-import - the latter gives you options to re-spline and select the number of control points you want etc.  (but if you're just wanting the best airfoil for your specific use case, use what's already built-in - they outperform most other foils be a wide margin).

Message 13 of 13

jfsandvl
Community Visitor
Community Visitor

Spencer. Thank you very much. It Airfoiltools worked perfectly. my best regards...

0 Likes