helicalextrusion -> helical_extrusion

This commit is contained in:
looooo
2024-01-04 20:10:31 +01:00
parent b140f621ee
commit dcf5edd4f0
6 changed files with 11 additions and 11 deletions

View File

@@ -151,7 +151,7 @@ def part_arc_from_points_and_center(p_1, p_2, m):
)
def helicalextrusion(face, height, angle, double_helix=False):
def helical_extrusion(face, height, angle, double_helix=False):
"""
A helical extrusion using the BRepOffsetAPI
face -- the face to extrude (may contain holes, i.e. more then one wires)

View File

@@ -27,7 +27,7 @@ from .basegear import (
BaseGear,
points_to_wire,
insert_fillet,
helicalextrusion,
helical_extrusion,
rotate_tooth,
)
@@ -190,4 +190,4 @@ class CycloidGear(BaseGear):
twist_angle = (
fp.height.Value * np.tan(fp.beta.Value * np.pi / 180) * 2 / fp.gear.d
)
return helicalextrusion(base, fp.height.Value, twist_angle, fp.double_helix)
return helical_extrusion(base, fp.height.Value, twist_angle, fp.double_helix)

View File

@@ -28,7 +28,7 @@ from .basegear import (
BaseGear,
points_to_wire,
insert_fillet,
helicalextrusion,
helical_extrusion,
rotate_tooth,
)
@@ -239,7 +239,7 @@ class InternalInvoluteGear(BaseGear):
return base.extrude(app.Vector(0, 0, fp.height.Value))
else:
twist_angle = fp.height.Value * np.tan(fp.gear.beta) * 2 / fp.gear.d
return helicalextrusion(
return helical_extrusion(
base, fp.height.Value, twist_angle, fp.double_helix
)
else:

View File

@@ -28,7 +28,7 @@ from .basegear import (
BaseGear,
points_to_wire,
insert_fillet,
helicalextrusion,
helical_extrusion,
rotate_tooth,
)
@@ -257,7 +257,7 @@ class InvoluteGear(BaseGear):
return base.extrude(app.Vector(0, 0, obj.height.Value))
else:
twist_angle = obj.height.Value * np.tan(obj.gear.beta) * 2 / obj.gear.d
return helicalextrusion(
return helical_extrusion(
base, obj.height.Value, twist_angle, obj.double_helix
)
else:

View File

@@ -24,7 +24,7 @@ from freecad import part
from pygears.involute_tooth import InvoluteTooth
from pygears._functions import rotation
from .basegear import BaseGear, helicalextrusion, fcvec
from .basegear import BaseGear, helical_extrusion, fcvec
class WormGear(BaseGear):
@@ -148,5 +148,5 @@ class WormGear(BaseGear):
if h == 0:
return full_wire
else:
shape = helicalextrusion(part.Face(full_wire), h, h * np.tan(beta) * 2 / d)
shape = helical_extrusion(part.Face(full_wire), h, h * np.tan(beta) * 2 / d)
return shape

View File

@@ -2,7 +2,7 @@ import unittest
from freecad import app
from freecad import part
from freecad.gears.basegear import helicalextrusion
from freecad.gears.basegear import helical_extrusion
@@ -17,7 +17,7 @@ class GearTests(unittest.TestCase):
a = part.Circle(m, n, r)
face = part.Face(part.Wire(a.toShape()))
s = helicalextrusion(face, h, 1)
s = helical_extrusion(face, h, 1)
# face 0 is the cylinder
# face 1 is pointing in positive z direction