Skip to content

Commit bf95809

Browse files
committed
Fixed CylinderShaft initialization when optional arguments given
1 parent 0f235bc commit bf95809

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

bladex/cylinder_shaft.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ def __init__(self, radius=1.0, height=1.0, orientation=None, origin=None):
2222

2323
if orientation is None:
2424
self.orientation = [1.0, 0.0, 0.0] # default orientation along X
25+
else:
26+
self.orientation = orientation
2527

2628
if origin is None:
2729
self.origin = [0.0, 0.0, 0.0] # default origin at (0,0,0)
30+
else:
31+
self.origin = origin
2832

2933
def generate_solid(self):
3034
"""

bladex/propeller.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ class Propeller(object):
2323
:cvar OCC.Core.TopoDS.TopoDS_Shell sewed_full_body: propeller with shaft shell
2424
"""
2525

26-
def __init__(self, shaft, blade, n_blades):
26+
def __init__(self, shaft, blade, n_blades, reflect=True):
2727
self.shaft_solid = shaft.generate_solid()
2828

29-
blade.apply_transformations(reflect=True)
29+
if reflect:
30+
blade.apply_transformations(reflect=True)
3031
blade_solid = blade.generate_solid(
3132
max_deg=2, display=False, errors=None
3233
)

0 commit comments

Comments
 (0)