I have a straight curve that's hooked with hooks at both ends to two objects. I'm creating the curve in python and applying the following to make it look like a cylinder in a python Bond-class (for a chemical bond between two atoms):
obj.data.dimensions = '3D' obj.data.fill_mode = 'FULL' obj.data.bevel_depth = self.bevel_depth obj.data.bevel_resolution = self.bevel_resolution
This works fine. Now I would need to be able make these into two or three "cylinders" to represent double and triple bonds as needed. These should stretch lengthwise as the atoms move closer or further apart, but they should stay otherwise unmodified. Any ideas how to do this as simply as possible in python?
Could I use a bevel object on the curve, say a curve-object consisting of two circles? If yes, how do you control which point on the bevel object follows the curve?