Skip to content

Commit

Permalink
Revert "Merge branch 'bleeding_edge' into nozzle_separation_warning"
Browse files Browse the repository at this point in the history
This reverts commit 2224c79, reversing
changes made to c9d70b2.
  • Loading branch information
AstroChuck committed May 9, 2023
1 parent 2224c79 commit d2691ef
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 81 deletions.
46 changes: 0 additions & 46 deletions motorlib/case.py

This file was deleted.

16 changes: 0 additions & 16 deletions motorlib/materials.py

This file was deleted.

6 changes: 0 additions & 6 deletions motorlib/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ def dispFormat(self, unit):
return '{} {}'.format(self.value, unit)


class BooleanProperty(Property):
""" A property that handles boolean values. It forces the value to be either True or False"""
def __init__(self, dispName):
super().__init__(dispName, None, bool)
self.value = False

class FloatProperty(Property):
"""A property that handles floats. It forces the value to be in a certain range."""
def __init__(self, dispName, unit, minValue, maxValue):
Expand Down
13 changes: 1 addition & 12 deletions uilib/converters/burnsimImporter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import xml.etree.ElementTree as ET

import motorlib
from numpy import pi, cos

from ..converter import Importer

Expand All @@ -10,14 +9,14 @@
'1': motorlib.grains.BatesGrain,
'2': motorlib.grains.DGrain,
'3': motorlib.grains.MoonBurner,
'4': motorlib.grains.StarGrain,
'5': motorlib.grains.CGrain,
'6': motorlib.grains.XCore,
'7': motorlib.grains.Finocyl
}

# BS type -> label for grains we know about but can't import
UNSUPPORTED_GRAINS = {
'4': 'Star',
'8': 'Tablet',
'9': 'Pie Segment'
}
Expand Down Expand Up @@ -94,16 +93,6 @@ def doConversion(self, path):

elif grainType == '3': # Moonburner specific properties
motor.grains[-1].setProperty('coreOffset', inToM(child.attrib['CoreOffset']))

elif grainType == '4': #Star Grain:
numPoints = int(child.attrib['Points'])
minorRadius = float(child.attrib['MinorWidth'])/2
majorRadius = float(child.attrib['MajorWidth'])/2
base_length = minorRadius * (2-(2*cos((2*pi)/numPoints)))**.5
point_height = majorRadius - (minorRadius*cos(pi/numPoints))
motor.grains[-1].setProperty('numPoints', numPoints)
motor.grains[-1].setProperty('pointLength', inToM(point_height))
motor.grains[-1].setProperty('pointWidth', inToM(base_length))

elif grainType == '5': # C grain specific properties
motor.grains[-1].setProperty('slotWidth', inToM(child.attrib['SlotWidth']))
Expand Down
2 changes: 1 addition & 1 deletion uilib/widgets/grainPreviewGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def cleanup(self):
self.image = None
if self.numContours > 0:
for _ in range(0, self.numContours):
self.plot.lines[0].remove()
self.plot.lines.pop(0)
self.numContours = 0
self.draw()

Expand Down

0 comments on commit d2691ef

Please sign in to comment.