Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/cycloid_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# from shapely.ops import unary_union
import imageio
from datetime import datetime
import os

class CycloidGeometry:
def __init__(self):
Expand Down Expand Up @@ -305,8 +306,11 @@ def __init__(self, cycloid):
self.createTextFile()

def createTextFile(self):
self._eqn_file = open(r"text/equations.txt", "w")
self._par_eqn_file = open(r"text/parametric_equations.txt", "w")
os.makedirs('./text', exist_ok=True)
self.eqn_file_path = os.path.join('./text', 'equations.txt')
self._eqn_file = open(self.eqn_file_path, "w")
self._par_eqn_file_path = os.path.join('./text', 'parametric_equations.txt')
self._par_eqn_file = open(self._par_eqn_file_path, "w")

def writeParametricEquations(self):
self.createParametricEqns()
Expand Down Expand Up @@ -373,4 +377,4 @@ def createParameterList(self):
cycloid_sldwks.writeParameters()
cycloid_sldwks.writeParametricEquations()