peteroznewman
Subscriber

This a simple example, which is to take a straight stent and “bend” it into a circular arc in the XZ plane.  The X axis is horizontal along the axis of the stent, and Z is vertical. Note that X=0, Z=0 at the center of the stent.

In the ds.dat file are all the XYZ coordinates for every node in the mesh. Bring them into a spreadsheet.

I used an equation of a circle of a given radius, tangent to the origin.  Given an X coordinate, the equation computes the Z coordinate of the circle. This is called the Sag equation in Optics. I simply used that equation to add an offset to every nodal Z coordinate using that node’s X coordinate.  Copy/Paste the new XYZ coodinates back into the ds.dat file and you have a curved stent.

Note that this lateral shift is not a true “bending” of the stent, it is actually a shearing of the shape, but for small values of the Z offset, it is close enough and is really simple.  A more precise transformation would have computed the rotation of the cross-section, but that would be more complicated.

For your case of a general 3D spline, you could extend my simple lateral shearing, but in two directions: Y and Z for each axial coordinate X.