I and other Folders have experienced the problem where band_add_segment_segment(x,x+1) fails.
One is able to create such a band between adjacent segments using the GUI, but after the call the get_band_count() returns zero showing the band was not created, but no run-time Lua error is generated.
A similar thing…
Can you fix a segment to its 3D-place by band_add_segment_segment(x,x)?
So would you like to be able to add the band or have an error generated?
I would like the Lua script function to act the same way as the GUI. I am able to create a band from n to n+1 in the GUI. I seem not to be able to do this in script.
If there is some physical reason the band cannot be created, then a error should occur, but also generate the same error in the GUI.
The inconsistency between Lua scripting and GUI is, at times, mysterious and at others, frustrating.
You cannot connect the backbone of two adjacent segments in the GUI. band_add_segment_segment attaches a band between the backbones of the two given segments. Thus it would appear that the behavior is the same between the GUI and the script.
It would be helpful if the band_add_segment_segment() function returned the band number of the band that it creates. If it fails to create a band for any reason, then return 0.
This bug was discussed in several recent Feedbacks like the following:
http://fold.it/portal/node/992892
http://fold.it/portal/node/991316
There was also a recent compilation of Feedbacks about bands:
http://fold.it/portal/node/992891