Skip to content

Commit 3668892

Browse files
committed
cycloidgearrack additions
1 parent 8b8f8e0 commit 3668892

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

freecad/gears/features.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ def __init__(self, obj):
596596
obj.addProperty(
597597
"App::PropertyBool", "simplified", "precision", "if enabled the rack is drawn with a constant number of \
598598
teeth to avoid topologic renaming.")
599+
obj.addProperty("App::PropertyInteger", "numpoints", "accuracy", "number of points for spline")
599600
obj.addProperty("App::PropertyPythonObject", "rack", "base", "test")
600601

601602
self.add_helical_properties(obj)
@@ -604,15 +605,16 @@ def __init__(self, obj):
604605
self.add_cycloid_properties(obj)
605606
obj.teeth = 15
606607
obj.module = '1. mm'
607-
obj.inner_diameter = 15
608-
obj.outer_diameter= 15
608+
obj.inner_diameter = 7.5
609+
obj.outer_diameter= 7.5
609610
obj.height = '5. mm'
610611
obj.thickness = '5 mm'
611612
obj.beta = '0. deg'
612613
obj.clearance = 0.25
613614
obj.head = 0.
614615
obj.add_endings = True
615616
obj.simplified = False
617+
obj.numpoints = 15
616618
self.obj = obj
617619
obj.Proxy = self
618620

@@ -639,7 +641,7 @@ def add_cycloid_properties(self, obj):
639641
obj.addProperty("App::PropertyFloat", "outer_diameter", "cycloid", "outer_diameter divided by module (epicycloid)")
640642

641643
def generate_gear_shape(self, obj):
642-
numpoints = 15
644+
numpoints = obj.numpoints
643645
m = obj.module.Value
644646
t = obj.thickness.Value
645647
r_i = obj.inner_diameter / 2 * m
@@ -849,7 +851,7 @@ def __init__(self, obj):
849851
obj.addProperty(
850852
"App::PropertyLength", "height", "base", "height")
851853

852-
obj.addProperty("App::PropertyInteger", "numpoints", "precision", "number of points for spline")
854+
obj.addProperty("App::PropertyInteger", "numpoints", "accuracy", "number of points for spline")
853855
obj.addProperty("App::PropertyPythonObject", "gear",
854856
"base", "the python object")
855857

0 commit comments

Comments
 (0)