@@ -571,7 +571,8 @@ class standardAttributes(baseObj):
571
571
[],
572
572
['location' , 'text' ],
573
573
[]],
574
- 'extrusion' :[ ['pos' , 'color' , 'start_face_color' , 'end_face_color' , 'start_normal' , 'end_normal' ],
574
+ 'extrusion' :[ ['pos' , 'color' , 'start_face_color' , 'end_face_color' ,
575
+ 'start_normal' , 'end_normal' ],
575
576
[ 'axis' , 'size' , 'up' ],
576
577
['path' , 'shape' , 'visible' , 'opacity' ,'shininess' , 'emissive' ,
577
578
'show_start_face' , 'show_end_face' , 'smooth' , 'smooth_joints' , 'sharp_joints' ,
@@ -2092,6 +2093,8 @@ def setup(self, args):
2092
2093
self ._label = ''
2093
2094
self ._legend = False
2094
2095
self ._interval = - 1
2096
+ self ._iterations = 0
2097
+ self ._firstplot = True
2095
2098
self ._graph = None
2096
2099
self ._data = []
2097
2100
self ._visible = True
@@ -2134,6 +2137,7 @@ def setup(self, args):
2134
2137
cmd = {"cmd" : objName , "idx" : self .idx }
2135
2138
2136
2139
for a in argsToSend :
2140
+ if a == 'interval' : continue # do not send to browser; handle here instead
2137
2141
aval = getattr (self ,a )
2138
2142
if isinstance (aval , vector ):
2139
2143
aval = aval .value
@@ -2205,7 +2209,7 @@ def interval(self): return self._interval
2205
2209
@interval .setter
2206
2210
def interval (self ,val ):
2207
2211
self ._interval = val
2208
- self .addattr ( 'interval' )
2212
+ self ._iterations = 0
2209
2213
2210
2214
def __del__ (self ):
2211
2215
cmd = {"cmd" : "delete" , "idx" : self .idx }
@@ -2247,15 +2251,26 @@ def preresolve2(self, args):
2247
2251
raise AttributeError ("Must be plot(x,y) or plot(pos=[x,y]) or plot([x,y]) or plot([x,y], ...) or plot([ [x,y], ... ])" )
2248
2252
2249
2253
def plot (self , * args1 , ** args2 ):
2254
+ if self ._interval == 0 :
2255
+ return
2256
+ if self ._interval > 0 :
2257
+ self ._iterations += 1
2258
+ if self ._firstplot :
2259
+ self ._firstplot = False
2260
+ elif self ._iterations < self ._interval :
2261
+ return
2262
+ self ._iterations = 0
2250
2263
if len (args1 ) > 0 :
2251
2264
p = self .preresolve1 (args1 )
2252
2265
else :
2253
2266
p = self .preresolve2 (args2 )
2254
2267
self ._data = self ._data + p
2255
2268
self .addmethod ('plot' , p )
2256
-
2269
+
2257
2270
def delete (self ):
2258
2271
self .addmethod ('delete' , 'None' )
2272
+ self ._firstplot = True
2273
+ self ._iterations = 0
2259
2274
2260
2275
@property
2261
2276
def label (self ): return self ._label
0 commit comments