Expose outside and root diameter to freecad

The values are already calculated by pygear and this change make them
available as properties in FreeCAD.
The naming should be in line with the rest of fcgear's nomenclature,
derived from https://qtcgears.com/tools/catalogs/PDF_Q420/Tech.pdf
This commit is contained in:
Jonas Bähr
2021-06-10 21:48:07 +02:00
committed by lorenz
parent ffe86c85e8
commit 4c8d1e672b

View File

@@ -122,6 +122,10 @@ class InvoluteGear(BaseGear):
"gear", "gear_parameter", "test")
obj.addProperty("App::PropertyLength", "dw",
"computed", "pitch diameter", 1)
obj.addProperty("App::PropertyLength", "da",
"computed", "outside diameter", 1)
obj.addProperty("App::PropertyLength", "df",
"computed", "root diameter", 1)
obj.addProperty("App::PropertyLength", "transverse_pitch",
"computed", "transverse_pitch", 1)
obj.gear = self.involute_tooth
@@ -188,6 +192,8 @@ class InvoluteGear(BaseGear):
# computed properties
fp.dw = "{}mm".format(fp.gear.dw)
fp.da = "{}mm".format(fp.gear.da)
fp.df = "{}mm".format(fp.gear.df)
fp.transverse_pitch = "{}mm".format(fp.gear.pitch)
def __getstate__(self):