Skip to content

Commit

Permalink
v0.41
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhouser committed Dec 9, 2019
1 parent 41f7479 commit bb3996a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 17 deletions.
10 changes: 10 additions & 0 deletions Change_Log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,13 @@ Version 0.38:
- Improved time estimates for raster engraving (Now uses actual laser path data.)
- Added option to control timeout time for Inkscape subprocess execution
- Added command line option for smaller display (-p or --pi)

Version 0.39:
- Fixed problem that prevented the main screen from being disabled while the laser is running or calculations are being performed.

Version 0.40:
- Fixed problem reading some style data from SVG files.

Version 0.41:
- Fixed more minor issues reading certain SVG files.

15 changes: 10 additions & 5 deletions k40_whisperer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
version = '0.38'
version = '0.41'
title_text = "K40 Whisperer V"+version

import sys
Expand Down Expand Up @@ -1941,6 +1941,8 @@ def Open_SVG(self,filemname):
self.input_dpi = 1000
svg_reader.image_dpi = self.input_dpi
svg_reader.timout = int(float( self.ink_timeout.get())*60.0)
dialog_pxpi = None
dialog_viewbox = None
try:
try:
try:
Expand All @@ -1958,9 +1960,9 @@ def Open_SVG(self,filemname):
if pxpi_dialog.result == None:
return

pxpi,viewbox = pxpi_dialog.result
dialog_pxpi,dialog_viewbox = pxpi_dialog.result
svg_reader.parse_svg(self.SVG_FILE)
svg_reader.set_size(pxpi,viewbox)
svg_reader.set_size(dialog_pxpi,dialog_viewbox)
svg_reader.make_paths()

except SVG_TEXT_EXCEPTION as e:
Expand All @@ -1969,6 +1971,8 @@ def Open_SVG(self,filemname):
self.statusMessage.set("Converting TEXT to PATHS.")
self.master.update()
svg_reader.parse_svg(self.SVG_FILE)
if dialog_pxpi != None and dialog_viewbox != None:
svg_reader.set_size(dialog_pxpi,dialog_viewbox)
svg_reader.make_paths(txt2paths=True)

except Exception as e:
Expand Down Expand Up @@ -2821,7 +2825,7 @@ def set_gui(self,new_state="normal"):
try:
self.menuBar.entryconfigure("File" , state=new_state)
self.menuBar.entryconfigure("View" , state=new_state)
self.menuBar.entryconfigure("USB" , state=new_state)
self.menuBar.entryconfigure("Tools" , state=new_state)
self.menuBar.entryconfigure("Settings", state=new_state)
self.menuBar.entryconfigure("Help" , state=new_state)
self.PreviewCanvas.configure(state=new_state)
Expand All @@ -2835,7 +2839,8 @@ def set_gui(self,new_state="normal"):
self.statusbar.configure(state="normal")
self.master.update()
except:
pass
if DEBUG:
debug_message(traceback.format_exc())

def Vector_Cut(self, output_filename=None):
self.stop[0]=False
Expand Down
18 changes: 9 additions & 9 deletions macOS.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- K40_Whisperer-0.38_src/k40_whisperer.py 2019-11-10 08:47:50.000000000 -0500
+++ k40_whisperer.py 2019-11-24 13:48:18.000000000 -0500
--- K40_Whisperer-0.41_src/k40_whisperer.py 2019-12-06 19:54:12.000000000 -0500
+++ k40_whisperer.py 2019-12-09 18:54:44.000000000 -0500
@@ -102,7 +102,35 @@
PYCLIPPER = False

Expand Down Expand Up @@ -52,7 +52,7 @@
###########################################################################
# End Left Column #

@@ -3737,7 +3773,10 @@
@@ -3742,7 +3778,10 @@
U_display))

self.statusbar.configure( bg = 'white' )
Expand All @@ -64,7 +64,7 @@
def menu_Inside_First_Callback(self, varName, index, mode):
if self.GcodeData.ecoords != []:
if self.VcutData.sorted == True:
@@ -4641,7 +4680,8 @@
@@ -4646,7 +4685,8 @@
xd_label_L = 12

w_label=150
Expand All @@ -74,7 +74,7 @@
w_units=45
xd_entry_L=xd_label_L+w_label+10
xd_units_L=xd_entry_L+w_entry+5
@@ -4871,6 +4911,9 @@
@@ -4876,6 +4916,9 @@
xd_entry_L=xd_label_L+w_label+10
xd_units_L=xd_entry_L+w_entry+5

Expand All @@ -84,7 +84,7 @@


D_Yloc=D_Yloc+D_dY
@@ -5195,7 +5238,8 @@
@@ -5200,7 +5243,8 @@
xd_label_L = 12

w_label=150
Expand All @@ -94,7 +94,7 @@
w_units=35
xd_entry_L=xd_label_L+w_label+10
xd_units_L=xd_entry_L+w_entry+5
@@ -5241,6 +5285,9 @@
@@ -5246,6 +5290,9 @@

self.EGV_Send = Button(egv_send,text="Send EGV Data",command=Close_and_Send_Click)
self.EGV_Send.place(x=Xbut, y=Ybut, width=130, height=30, anchor="w")
Expand All @@ -104,7 +104,7 @@
################################################################################


@@ -5338,6 +5385,8 @@
@@ -5343,6 +5390,8 @@

def apply(self):
self.result = self.uom.get()
Expand All @@ -113,7 +113,7 @@
return


@@ -5665,4 +5714,7 @@
@@ -5670,4 +5719,7 @@
app.master.geometry("480x320")


Expand Down
2 changes: 1 addition & 1 deletion py2app_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from setuptools import setup

app_name = 'K40 Whisperer'
app_version = "0.38"
app_version = "0.41"
app_copyright = u'Copyright © 2017-2019, Scorch Works, GNU General Public License'
main_script = 'k40_whisperer.py'
url = 'https://github.com/stephenhouser/k40-whisperer'
Expand Down
18 changes: 16 additions & 2 deletions svg_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_css_value(self,tag_type,class_val):
for entry in self.CSS_value_list:
if entry.object_type == "":
if entry.value_name == class_val:
value = entry.data_string
value = value + entry.data_string
if entry.object_type == tag_type:
if entry.value_name == class_val:
value = entry.data_string
Expand Down Expand Up @@ -581,6 +581,13 @@ def parse_css(self,css_string):
i=0
while i < len(css_string):
c=css_string[i]
if c==",":
i=i+1
name_list.append(name)
value_list.append(value)
name=""
value=""
continue
if c=="{":
i=i+1
while i < len(css_string):
Expand All @@ -590,6 +597,13 @@ def parse_css(self,css_string):
break
else:
value = value+c

if len(value_list)>0:
len_value_list = len(value_list)
k=-1
while abs(k) <= len_value_list and value_list[k]=="":
value_list[k]=value
k=k-1
name_list.append(name)
value_list.append(value)
name=""
Expand Down Expand Up @@ -787,7 +801,7 @@ def make_paths(self, txt2paths=False ):

if h_mm==None or w_mm==None or self.SVG_ViewBox==None:
line1 = "Cannot determine SVG size. Viewbox missing or Units not set."
raise SVG_PXPI_EXCEPTION("%s\n" %(line1))
raise SVG_PXPI_EXCEPTION("%s" %(line1))

scale_h = h_mm/Hpix
scale_w = w_mm/Wpix
Expand Down

0 comments on commit bb3996a

Please sign in to comment.