@@ -362,8 +362,6 @@ def add_limiting_diameter_properties(self, obj):
362
362
363
363
def add_computed_properties (self , obj ):
364
364
obj .addProperty ("App::PropertyLength" , "dw" , "computed" , "The pitch diameter." )
365
- obj .setExpression ('dw' , 'teeth * module' ) # calculate via expression to ease usage for placement
366
- obj .setEditorMode ('dw' , 1 ) # set read-only after setting the expression, else it won't be visible. bug?
367
365
obj .addProperty ("App::PropertyAngle" , "angular_backlash" , "computed" ,
368
366
"The angle by which this gear can turn without moving the mating gear." )
369
367
obj .setExpression ('angular_backlash' , 'backlash / dw * 360° / pi' ) # calculate via expression to ease usage for placement
@@ -405,11 +403,11 @@ def generate_gear_shape(self, fp):
405
403
fp .gear .backlash = fp .backlash .Value * \
406
404
(fp .reversed_backlash - 0.5 ) * 2. # negate "reversed_backslash", for "internal"
407
405
fp .gear .head = fp .clearance # swap head and clearance to become "internal"
408
- # checksbackwardcompatibility:
409
- if "properties_from_tool" in fp .PropertiesList :
410
- fp .gear .properties_from_tool = fp .properties_from_tool
406
+ fp .gear .properties_from_tool = fp .properties_from_tool
411
407
fp .gear ._update ()
412
408
409
+ fp .dw = "{}mm" .format (fp .gear .dw )
410
+
413
411
# computed properties
414
412
fp .transverse_pitch = "{}mm" .format (fp .gear .pitch )
415
413
fp .outside_diameter = fp .dw + 2 * fp .thickness
0 commit comments