Skip to content

Commit

Permalink
Merge pull request #1 from drunsinn/rewrite
Browse files Browse the repository at this point in the history
Rewrite of type2nc to allow new features
  • Loading branch information
drunsinn authored Apr 19, 2021
2 parents ec388e9 + fc960b7 commit ecff457
Show file tree
Hide file tree
Showing 8 changed files with 539 additions and 499 deletions.
18 changes: 11 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Reselase notes for 0.5.0

# Release notes for 0.6.0
- this release is a complete rewrite!
- much cleaner code for better readability in a more 'pythonic' way
- logging is now handled via the logging module instead of plain print commands
- move GUI-code to separate python class with main window
- remove confusing command line options
- always create both demo files
- reduce memory consumption

# Release notes for 0.5.0
- address comments from users Klartext and TobFleischi at https://de.industryarena.com/heidenhain/forum/gravieren-von-text-in-anderen-sprachen-ohne-cam--83908.html . These changes break compatibility for previous versions
- add parameter for plunging feed rate
- use active offset and add incremental changes
Expand All @@ -8,31 +18,25 @@
- fixed Warning on implicit conversion of float to integer

# Release notes for 0.4.1

- update to freetype-py version 2.0 - freetype.dll included

# Release notes for 0.4.0

- added option to remove empty characters completely or reduce the file size
by only adding them as labels

# Release notes for 0.3.2

- fixed error in path generation
- fixed spelling errors in comments and documentation

# Release notes for 0.3.2

- code cleanup
- option to remove empty characters from output

# Release notes for 0.3.1

- assign all values from the command line
- setup-script for building stand alone windows binaries

# Release notes for 0.3.0

- First public release
- converts font outline to NC code for TNC controls
- support for 21 character ranges
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import setuptools
from type2nc import __version__

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="type2nc",
version="0.5.0",
version=__version__,
author="drunsinn et al.",
author_email="[email protected]",
description="convert truetype fonts to klartext nc-code",
Expand All @@ -32,7 +33,4 @@
'freetype-py>=1.1',
'argparse>=1.4.0'],
scripts=['type2nc/type2nc.py'],
#data_files=[('', ['type2nc/demo_pgm_template.H',
# 'type2nc/pgm_foot_template.H',
# 'type2nc/pgm_head_template.H']),],
)
32 changes: 0 additions & 32 deletions setup_cxFreeze.py

This file was deleted.

1 change: 1 addition & 0 deletions type2nc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
name = "type2nc"
__version__ = "0.6.0"
12 changes: 6 additions & 6 deletions type2nc/templates/demo_pgm_template_conventional.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ BLK FORM 0.2 X+300 Y{0:+d} Z+0
TOOL CALL "GRAVIER" Z S5000 F200
;
QS10 = " ABC abc 123 !%& "
QS10 = QS10 || "(%0x0298 %0x203f %0x0298) "
QS10 = QS10 || "%0x041f%0x0440%0x0438%0x0432%0x0435%0x0442 "
QS10 = QS10 || "%0x043c%0x0438%0x0440 "
QS10 = QS10 || "%0x4f60%0x597d%0x4e16%0x754c "
QS10 = QS10 || "%0x0645%0x0631%0x062d%0x0628%0x0627 "
QS10 = QS10 || "%0x0628%0x0627%0x0644%0x0639%0x0627%0x0644%0x0645 "
;QS10 = QS10 || "(%0x0298 %0x203f %0x0298) "
;QS10 = QS10 || "%0x041f%0x0440%0x0438%0x0432%0x0435%0x0442 "
;QS10 = QS10 || "%0x043c%0x0438%0x0440 "
;QS10 = QS10 || "%0x4f60%0x597d%0x4e16%0x754c "
;QS10 = QS10 || "%0x0645%0x0631%0x062d%0x0628%0x0627 "
;QS10 = QS10 || "%0x0628%0x0627%0x0644%0x0639%0x0627%0x0644%0x0645 "
;
;
QS500= QS10 ;GRAVIERTEXT
Expand Down
12 changes: 6 additions & 6 deletions type2nc/templates/demo_pgm_template_cycle.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ BLK FORM 0.2 X+300 Y{0:+d} Z+0
TOOL CALL "GRAVIER" Z S5000 F200
;
QS10 = " ABC abc 123 !%& "
QS10 = QS10 || "(%0x0298 %0x203f %0x0298) "
QS10 = QS10 || "%0x041f%0x0440%0x0438%0x0432%0x0435%0x0442 "
QS10 = QS10 || "%0x043c%0x0438%0x0440 "
QS10 = QS10 || "%0x4f60%0x597d%0x4e16%0x754c "
QS10 = QS10 || "%0x0645%0x0631%0x062d%0x0628%0x0627 "
QS10 = QS10 || "%0x0628%0x0627%0x0644%0x0639%0x0627%0x0644%0x0645 "
;QS10 = QS10 || "(%0x0298 %0x203f %0x0298) "
;QS10 = QS10 || "%0x041f%0x0440%0x0438%0x0432%0x0435%0x0442 "
;QS10 = QS10 || "%0x043c%0x0438%0x0440 "
;QS10 = QS10 || "%0x4f60%0x597d%0x4e16%0x754c "
;QS10 = QS10 || "%0x0645%0x0631%0x062d%0x0628%0x0627 "
;QS10 = QS10 || "%0x0628%0x0627%0x0644%0x0639%0x0627%0x0644%0x0645 "
;
;
Q1600 = 0 ;surface in Z
Expand Down
2 changes: 1 addition & 1 deletion type2nc/templates/pgm_head_template.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;
;Usage: set the following Q-Parameters to the desired values
;QS500 is the text
;Q200 is the sage distance
;Q200 is the safe distance for pre positioning
;Q203 is the Z-coordinate of the surface
;Q201 is the depth
;Q204 is the safe Z-coordinate for traversing between cuts
Expand Down
Loading

0 comments on commit ecff457

Please sign in to comment.