@@ -77,7 +77,7 @@ def Exit():
7777# attrs are X in {'a': '23X....'}
7878__attrs = {'pos' :'a' , 'up' :'b' , 'color' :'c' , 'trail_color' :'d' , # don't use single and double quotes; available: comma, but maybe that would cause trouble
7979 'ambient' :'e' , 'axis' :'f' , 'size' :'g' , 'origin' :'h' ,
80- 'direction' :'j' , 'linecolor' :'k' , 'bumpaxis' :'l' ,
80+ 'direction' :'j' , 'linecolor' :'k' , 'bumpaxis' :'l' ,
8181 'foreground' :'n' , 'background' :'o' , 'ray' :'p' , 'center' :'E' , 'forward' :'#' , 'resizable' :'+' ,
8282
8383 # scalar attributes
@@ -109,7 +109,7 @@ def Exit():
109109 'logx' :'u' , 'logy' :'v' , 'dot' :'w' , 'dot_radius' :'x' ,
110110 'markers' :'y' , 'legend' :'z' , 'label' :'A' , 'delta' :'B' , 'marker_color' :'C' ,
111111 'size_units' :'D' , 'userpan' :'E' , 'scroll' :'F' , 'choices' :'G' , 'depth' :'H' ,
112- 'round' :'I' , 'name' :'J' , 'offset' :'K' , 'attach_idx' :'L' }
112+ 'round' :'I' , 'name' :'J' , 'offset' :'K' , 'attach_idx' :'L' , 'ccw' : 'M' }
113113
114114# methods are X in {'m': '23X....'}
115115# pos is normally updated as an attribute, but for interval-based trails, it is updated (multiply) as a method
@@ -529,7 +529,7 @@ class standardAttributes(baseObj):
529529 'helix' :[['pos' , 'color' , 'trail_color' ],
530530 ['axis' , 'size' , 'up' ],
531531 ['visible' , 'opacity' ,'shininess' , 'emissive' ,
532- 'make_trail' , 'trail_type' , 'interval' ,
532+ 'make_trail' , 'trail_type' , 'interval' , 'ccw' ,
533533 'retain' , 'trail_color' , 'trail_radius' , 'coils' , 'thickness' , 'pickable' ],
534534 ['red' , 'green' , 'blue' ,'length' , 'width' , 'height' , 'radius' ]],
535535 'curve' :[['origin' , 'color' ],
@@ -1137,7 +1137,7 @@ def clone(self, **args):
11371137 'visible' :True , 'pickable' :self ._pickable }
11381138 elif objName == 'helix' :
11391139 oldargs = {'pos' :self .pos , 'color' :self ._color ,
1140- 'thickness' :self ._thickness , 'coils' :self ._coils ,
1140+ 'thickness' :self ._thickness , 'coils' :self ._coils , 'ccw' : self . _ccw ,
11411141 'size' :self ._size , 'axis' :self ._axis , 'up' :self ._up ,
11421142 'shininess' :self ._shininess , 'emissive' :self ._emissive ,
11431143 'visible' :True , 'pickable' :self ._pickable }
@@ -1503,6 +1503,7 @@ def __init__(self,**args):
15031503 args ['_objName' ] = 'helix'
15041504 args ['_default_size' ] = vector (1 ,2 ,2 )
15051505 self ._coils = 5
1506+ self ._ccw = True
15061507 self ._thickness = 1 / 20 ## radius/20
15071508
15081509 super (helix , self ).setup (args )
@@ -1525,6 +1526,15 @@ def coils(self,value):
15251526 if not self ._constructing :
15261527 self .addattr ('coils' )
15271528
1529+ @property
1530+ def ccw (self ):
1531+ return self ._ccw
1532+ @ccw .setter
1533+ def ccw (self ,value ):
1534+ self ._ccw = value
1535+ if not self ._constructing :
1536+ self .addattr ('ccw' )
1537+
15281538 @property
15291539 def radius (self ):
15301540 return self ._size .y / 2
0 commit comments