@@ -76,12 +76,6 @@ def construct(self):
76
76
self.add(axes, surface)
77
77
"""
78
78
79
- @deprecated_params (
80
- params = "u_min,u_max,v_min,v_max" ,
81
- since = "v0.9.0" ,
82
- until = "v0.10.0" ,
83
- message = "Use u_range and v_range instead." ,
84
- )
85
79
def __init__ (
86
80
self ,
87
81
func : Callable [[float , float ], np .ndarray ],
@@ -98,10 +92,8 @@ def __init__(
98
92
pre_function_handle_to_anchor_scale_factor : float = 0.00001 ,
99
93
** kwargs
100
94
) -> None :
101
- self .u_min = kwargs .pop ("u_min" , None ) or u_range [0 ]
102
- self .u_max = kwargs .pop ("u_max" , None ) or u_range [1 ]
103
- self .v_min = kwargs .pop ("v_min" , None ) or v_range [0 ]
104
- self .v_max = kwargs .pop ("v_max" , None ) or v_range [1 ]
95
+ self .u_range = u_range
96
+ self .v_range = v_range
105
97
super ().__init__ (** kwargs )
106
98
self .resolution = resolution
107
99
self .surface_piece_config = surface_piece_config
@@ -126,13 +118,9 @@ def get_u_values_and_v_values(self):
126
118
u_res = v_res = res [0 ]
127
119
else :
128
120
u_res , v_res = res
129
- u_min = self .u_min
130
- u_max = self .u_max
131
- v_min = self .v_min
132
- v_max = self .v_max
133
121
134
- u_values = np .linspace (u_min , u_max , u_res + 1 )
135
- v_values = np .linspace (v_min , v_max , v_res + 1 )
122
+ u_values = np .linspace (* self . u_range , u_res + 1 )
123
+ v_values = np .linspace (* self . v_range , v_res + 1 )
136
124
137
125
return u_values , v_values
138
126
@@ -634,24 +622,22 @@ def add_bases(self):
634
622
"""Adds the end caps of the cylinder."""
635
623
color = self .color if config ["renderer" ] == "opengl" else self .fill_color
636
624
opacity = self .opacity if config ["renderer" ] == "opengl" else self .fill_opacity
637
- u_min = self .u_range [0 ] if config ["renderer" ] == "opengl" else self .u_min
638
- u_max = self .u_range [1 ] if config ["renderer" ] == "opengl" else self .u_max
639
625
self .base_top = Circle (
640
626
radius = self .radius ,
641
627
color = color ,
642
628
fill_opacity = opacity ,
643
629
shade_in_3d = True ,
644
630
stroke_width = 0 ,
645
631
)
646
- self .base_top .shift (u_max * IN )
632
+ self .base_top .shift (self . u_range [ 1 ] * IN )
647
633
self .base_bottom = Circle (
648
634
radius = self .radius ,
649
635
color = color ,
650
636
fill_opacity = opacity ,
651
637
shade_in_3d = True ,
652
638
stroke_width = 0 ,
653
639
)
654
- self .base_bottom .shift (u_min * IN )
640
+ self .base_bottom .shift (self . u_range [ 0 ] * IN )
655
641
self .add (self .base_top , self .base_bottom )
656
642
657
643
def _rotate_to_direction (self ):
0 commit comments