ProteinRibbons - twisting

I have an interest in understanding more about ProteinRibbons.

I came across this example.

https://examples.vtk.org/site/Cxx/Visualization/ProteinRibbons/

I built the example and started looking at the generated ribbon geometries.

I noticed that for some of the ribbons, some section of the ribbon appears to be twisted.

I’d like to dive deeper into the method/algorithm that was use to generate those ribbon geometries, I am specifically interested in the inputs to the engine/algorithm where those geometries are being created to understand what is going on.

Can someone with a knowledge of ProteinRibbons be able to point me in the right direction to dive deeper (in the C++ source code) ?

@mwestphal Do you know who I may contact to investigate further ?

I think I have found a location to dive deeper

vtkProteinRibbonFilter::CreateThinStrip

https://gitlab.kitware.com/vtk/vtk/-/blob/master/Domains/Chemistry/vtkProteinRibbonFilter.cxx?ref_type=heads#L312

I guess it might be ‘simulated’ with the vtkRuledSurfaceFilter, by which a twist surface can be extruded from, say, two line-segments-connected splines.

maybe @Joachim_P has some inputs