From a6ef5314b7fade0898ebf9cfbe8d7c65f67dcba4 Mon Sep 17 00:00:00 2001 From: Jakob Flierl Date: Sat, 7 Jun 2025 21:22:11 +0200 Subject: [PATCH 1/2] Initial release --- .github/FUNDING.yml | 2 + .github/workflows/label.yml | 22 ++ .github/workflows/main.yml | 92 +++++++ .gitignore | 47 ++++ LICENSE | 339 +++++++++++++++++++++++++ README.md | 44 ++++ debian/compat | 1 + debian/control | 16 ++ debian/rules | 90 +++++++ doc/qgcoder-001.png | Bin 0 -> 62242 bytes doc/qgcoder-002.png | Bin 0 -> 27453 bytes g2m/CMakeLists.txt | 65 +++++ g2m/calc_tolerance.hpp | 1 + g2m/canonLine.cpp | 162 ++++++++++++ g2m/canonLine.hpp | 100 ++++++++ g2m/canonMotion.cpp | 61 +++++ g2m/canonMotion.hpp | 80 ++++++ g2m/canonMotionless.cpp | 157 ++++++++++++ g2m/canonMotionless.hpp | 63 +++++ g2m/g2m.cpp | 356 ++++++++++++++++++++++++++ g2m/g2m.h | 0 g2m/g2m.hpp | 128 ++++++++++ g2m/gplayer.hpp | 209 ++++++++++++++++ g2m/helicalMotion.cpp | 394 +++++++++++++++++++++++++++++ g2m/helicalMotion.hpp | 78 ++++++ g2m/linearMotion.cpp | 103 ++++++++ g2m/linearMotion.hpp | 60 +++++ g2m/machineStatus.cpp | 129 ++++++++++ g2m/machineStatus.hpp | 151 +++++++++++ g2m/nanotimer.cpp | 82 ++++++ g2m/nanotimer.hpp | 47 ++++ g2m/point.hpp | 94 +++++++ icons/qgcoder.png | Bin 0 -> 11521 bytes lex_analyzer.cpp | 105 ++++++++ lex_analyzer.hpp | 73 ++++++ main.cpp | 65 +++++ mainwin.cpp | 418 +++++++++++++++++++++++++++++++ mainwin.h | 90 +++++++ mainwin.ui | 482 ++++++++++++++++++++++++++++++++++++ qgcoder.desktop | 13 + qgcoder.pro | 101 ++++++++ res.qrc | 5 + settings.ui | 210 ++++++++++++++++ settings_dlg.cpp | 73 ++++++ settings_dlg.h | 39 +++ tests/ngc-urandom.sh | 3 + view.cpp | 330 ++++++++++++++++++++++++ view.h | 76 ++++++ 48 files changed, 5256 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/label.yml create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 debian/compat create mode 100644 debian/control create mode 100755 debian/rules create mode 100644 doc/qgcoder-001.png create mode 100644 doc/qgcoder-002.png create mode 100644 g2m/CMakeLists.txt create mode 100644 g2m/calc_tolerance.hpp create mode 100644 g2m/canonLine.cpp create mode 100644 g2m/canonLine.hpp create mode 100644 g2m/canonMotion.cpp create mode 100644 g2m/canonMotion.hpp create mode 100644 g2m/canonMotionless.cpp create mode 100644 g2m/canonMotionless.hpp create mode 100644 g2m/g2m.cpp create mode 100644 g2m/g2m.h create mode 100644 g2m/g2m.hpp create mode 100644 g2m/gplayer.hpp create mode 100644 g2m/helicalMotion.cpp create mode 100644 g2m/helicalMotion.hpp create mode 100644 g2m/linearMotion.cpp create mode 100644 g2m/linearMotion.hpp create mode 100644 g2m/machineStatus.cpp create mode 100644 g2m/machineStatus.hpp create mode 100644 g2m/nanotimer.cpp create mode 100644 g2m/nanotimer.hpp create mode 100644 g2m/point.hpp create mode 100644 icons/qgcoder.png create mode 100644 lex_analyzer.cpp create mode 100644 lex_analyzer.hpp create mode 100644 main.cpp create mode 100644 mainwin.cpp create mode 100644 mainwin.h create mode 100644 mainwin.ui create mode 100644 qgcoder.desktop create mode 100644 qgcoder.pro create mode 100644 res.qrc create mode 100644 settings.ui create mode 100644 settings_dlg.cpp create mode 100644 settings_dlg.h create mode 100755 tests/ngc-urandom.sh create mode 100644 view.cpp create mode 100644 view.h diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9b3fda3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: koppi +custom: 'https://koppi.github.io' diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..5cdc45e --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,22 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler + +name: Labeler +on: [pull_request] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d0f1b97 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,92 @@ +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: ${{ matrix.target }} + strategy: + fail-fast: false + matrix: + target: + - ubuntu-latest + runs-on: ${{ matrix.target }} + steps: + - uses: actions/checkout@v3 + + - name: install devscripts + run: | + sudo apt update -qq + sudo apt full-upgrade -y + sudo DEBIAN_FRONTEND=noninteractive apt -qq -y install devscripts equivs lintian + mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends" + + - name: build source package + env: + DEBFULLNAME: "Github Actions" + DEBEMAIL: "jakob.flierl@gmail.com" + run: | + export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME) + git fetch --unshallow + git fetch --tags + VERSION="$(git describe --tags --always | sed -e "s/^v//" -e "s/-/+git/")" + dch --create \ + --distribution ${TARGET} \ + --package qgcoder \ + --newversion ${VERSION}~${TARGET}1 \ + "Automatic build from Github" + debuild -S -sa -us -uc -d + + - name: Build and install libqgcodeeditor + env: + DEBFULLNAME: "Jakob Flierl" + DEBEMAIL: "jakob.flierl@gmail.com" + run: | + git clone https://github.com/QGCoder/libqgcodeeditor + pushd libqgcodeeditor + export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME) + VERSION="$(git describe --tags | sed -e "s/^v//" -e "s/-/+git/")" + dch --create \ + --distribution ${TARGET} \ + --package libqgcodeeditor \ + --newversion ${VERSION}~${TARGET}1 \ + "Automatic build from Github" + debuild -S -sa -us -uc -d + mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends" + dpkg-buildpackage -b -rfakeroot -us -uc + sudo dpkg -i ../libqgcodeeditor*deb + sudo apt -y -f install + popd + + - name: build binary package + run: dpkg-buildpackage -b -rfakeroot -us -uc + + - name: install binary package + run: sudo dpkg -i ../qgcoder*deb + + - name: install binary package dependencies + run: sudo apt -f install + + - name: run lintian + run: lintian ../qgcoder*deb | lintian-info + + - name: upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + if-no-files-found: error + path: | + *.buildinfo + *.changes + *.dsc + *.tar.* + *.deb + ~/**/*/*.buildinfo + ~/**/*/*.changes + ~/**/*/*.dsc + ~/**/*/*.tar.* + ~/**/*/*.deb + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d048a5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +**.exe + +debug +release + +Makefile.Debug +Makefile.Release +lib + +gcoder.pro.user* + +Makefile + +.moc +.ui +.obj +.rcc + +**.swp + +*.o + +.qglviewer.xml + +bin +gen +target + +qgcoder + +build-stamp +debian/qgcoder.debhelper.log +debian/qgcoder.substvars +debian/qgcoder/ +debian/files + +.qmake.stash +gcoder-build-deps_0.0.0-ubuntu1_all.deb +gcoder-build-deps_0.0.0-ubuntu1_amd64.buildinfo +gcoder-build-deps_0.0.0-ubuntu1_amd64.changes +x + +qgcoder.pro.user + +*.deb +*.buildinfo +*.changes diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b50016 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ + + +An interactive G-code editing GUI. + +## Installation + +* First install [https://github.com/QGCoder/libqgcodeeditor](https://github.com/QGCoder/libqgcodeeditor), a Qt5 designer widget plugin for editing G-code. + +* Next: clone, build and run ```qgcoder``` as follows: +```bash +gh repo clone QGCoder/qgcoder && qgcoder +qmake && make -j$(nproc) +./qgcoder +``` +or build and install a Debian package as follows: +```bash +gh repo clone QGCoder/qgcoder && cd qgcoder +mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends" +dpkg-buildpackage -b -rfakeroot -us -uc +sudo dpkg -i ../qgcoder*.deb +sudo apt -f install +``` + +– Tested to run on Ubuntu 22.04. - [![CI](https://github.com/QGCoder/qgcoder/actions/workflows/main.yml/badge.svg)](https://github.com/QGCoder/qgcoder/actions/workflows/main.yml) + +## Overview + +When started first, you have to provide ```qgcoder``` three filenames, as seen in the following screenshot: + + + + +A short [YouTube video](https://www.youtube.com/watch?v=9D3hMXP5-QM) shows, how you can interact inside ```qgcoder```. + +## Author + +* **Jakob Flierl** - [koppi](https://github.com/koppi) + +## Contributors + +* **ArcEye** - [ArcEye](https://github.com/ArcEye) +* **Mark Pictor** +* **Kazuyasu Hamada** +* **Anders Wallin** - [aewallin](https://github.com/aewallin) diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..51751c5 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: qgcoder +Section: misc +Priority: optional +Maintainer: Jakob Flierl +Uploaders: Jakob Flierl +Build-Depends: debhelper (>= 7.0.50~), automake, libtool, qt5-qmake, qtbase5-dev, libqglviewer-dev-qt5, freeglut3-dev, libglew-dev +Standards-Version: 3.9.1 +Homepage: https://github.com/QGCoder +Vcs-Git: git://github.com/QGCoder/qgcoder +Vcs-Browser: https://github.com/QGCoder/qgcoder + +Package: qgcoder +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: qgcoder + G-code editor with 3D preview. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0631066 --- /dev/null +++ b/debian/rules @@ -0,0 +1,90 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +CXXFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CXXFLAGS += -O0 +else + CXXFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +QMAKE_AFTER = -after \ + 'QMAKE_CXXFLAGS_RELEASE = $(CXXFLAGS)' \ + 'QMAKE_POST_LINK ~= s/strip/:' + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh_testdir + + qmake $(QMAKE_AFTER) qgcoder.pro && $(MAKE) + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f Makefile ] || $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/qgcoder install + +# install -d -v -m 0755 $(CURDIR)/debian/qgcoder/usr/share/applications +# chmod 664 $(CURDIR)/debian/qgcoder/usr/share/applications/qgcoder.desktop + +# install -d -v -m 0755 $(CURDIR)/debian/qgcoder/usr/share/icons/hicolor/scalable/apps +# chmod 664 $(CURDIR)/debian/qgcoder/usr/share/icons/hicolor/scalable/apps/qgcoder.svg + + install -d -v -m 0755 $(CURDIR)/debian/qgcoder/usr/bin + install -m 755 -p qgcoder $(CURDIR)/debian/qgcoder/usr/bin/qgcoder + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot +# dh_installchangelogs ChangeLog + dh_installdocs -i + dh_install -i + dh_installman -i + dh_compress -i --exclude=.cpp --exclude=.pri + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installchangelogs ChangeLog + dh_installdocs -s README.md + dh_install -s --sourcedir=$(CURDIR)/debian/tmp +# dh_installman qgcoder.1 + dh_installmime + dh_installmenu + dh_link + dh_strip + dh_compress -s + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/doc/qgcoder-001.png b/doc/qgcoder-001.png new file mode 100644 index 0000000000000000000000000000000000000000..01b7dccb5a2c052663d5cbe1a0be80abde3748d7 GIT binary patch literal 62242 zcmb5Wbx>SQ&^HRff(J-&4}swBu!P{Q!QI{6CAhmoun^qc-62ST#ogUy7w*FIzV&_o z+*@_KidvgN^-incCP|8`C=)Iv5+pPj-+K?)nTN^_Oo0GCIlL{Mqkg_mA-Y~QAuyXORvycjjC<`mY^FTq7LP-bs1k%#TM?um}f#st#-Ke{XR{FM2YqQaooRrKwzc|Ko>weTm4)w8jrl+i-l5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$(9HH+Unk?_i_@&Vqg9KACIAoDgXcg literal 0 HcmV?d00001 diff --git a/g2m/CMakeLists.txt b/g2m/CMakeLists.txt new file mode 100644 index 0000000..926f4c5 --- /dev/null +++ b/g2m/CMakeLists.txt @@ -0,0 +1,65 @@ +project( g2m ) +cmake_minimum_required( VERSION 2.6 ) +set ( CMAKE_BUILD_TYPE Debug ) +add_definitions ( -Wall ) + +find_package ( Qt4 REQUIRED ) + +include ( ${QT_USE_FILE} ) +include_directories ( + ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} +) + +set ( g2m_HDRS + g2m.hpp + canonLine.hpp + canonMotionless.hpp + canonMotion.hpp + linearMotion.hpp + helicalMotion.hpp + machineStatus.hpp + nanotimer.hpp + point.hpp + gplayer.hpp +) + +set ( g2m_SRCS + g2m.cpp + canonLine.cpp + canonMotionless.cpp + canonMotion.cpp + linearMotion.cpp + helicalMotion.cpp + machineStatus.cpp + nanotimer.cpp +) + +# run qt MOC on these +set( g2m_MOCS + g2m.hpp + gplayer.hpp +) + +QT4_WRAP_CPP(MOCS ${g2m_MOCS}) + +add_library ( + g2m + SHARED + ${g2m_SRCS} + ${MOCS} +) +target_link_libraries ( g2m ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ) + +# install the shared library +install( + TARGETS g2m + DESTINATION lib/g2m +) + +# this installs the c++ include headers +install( + FILES ${g2m_HDRS} + DESTINATION include/g2m + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ +) diff --git a/g2m/calc_tolerance.hpp b/g2m/calc_tolerance.hpp new file mode 100644 index 0000000..ca0ac7a --- /dev/null +++ b/g2m/calc_tolerance.hpp @@ -0,0 +1 @@ +#define CALC_TOLERANCE (1e-6) diff --git a/g2m/canonLine.cpp b/g2m/canonLine.cpp new file mode 100644 index 0000000..afdde18 --- /dev/null +++ b/g2m/canonLine.cpp @@ -0,0 +1,162 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include +#include +#include +#include + +#include + +#include "canonLine.hpp" + +#include "machineStatus.hpp" +#include "canonMotionless.hpp" +#include "linearMotion.hpp" +#include "helicalMotion.hpp" + +namespace g2m { + +/// note, the constructor is protected! +canonLine::canonLine(std::string canonL, machineStatus prevStatus): myLine(canonL), status(prevStatus) { + tokenize(myLine,canonTokens); +} + +///returns the number after N on the line, -1 if none +int canonLine::getN() { + if ( (cantok(1).compare("N.....") == 0)) + return -1; + else + return tok2i(1,1); +} + +/** converts canonTokens[n] to double +\param n this is the token to convert +\returns token n, converted to double +*/ +double canonLine::tok2d(uint n) { + if (canonTokens.size() < n+1 ) + return NAN; + char* end; + double d = strtod( canonTokens[n].c_str(), &end ); +// assert ( *end == 0 ); + return d; +} + +/** converts canonTokens[n] to int +\param n this is the token to convert +\param offset skip this many chars at the beginning of the token +\returns token n, converted to integer +*/ +int canonLine::tok2i(uint n,uint offset) { + if (canonTokens.size() < n+1 ) + return INT_MIN; + char * end; + int i = strtol( &canonTokens[n].c_str()[offset], &end, 10 ); + //assert ( *end != 0 ); + return i; +} + +/// return the n:th canon-token +std::string canonLine::cantok(unsigned int n) { + if (n < canonTokens.size()) { + return canonTokens[n]; + } else { + std::cout << "malformed input line " << myLine << std::endl; + std::string s = ""; + return s; + } +} + +///return true if the canonical command for this line matches 'm' +bool canonLine::cmdMatch(std::string m) { + if (canonTokens.size() < 3) + return false; + return (m.compare(canonTokens[2]) == 0); //compare returns zero for a match +} + +/// return canonTokens[2] +const std::string canonLine::getCanonicalCommand() { + if (canonTokens.size() < 3 ) + return "BAD_LINE_NO_CMD"; + return canonTokens[2]; +} + +///return a line identifier as string: getN() if !=-1, else getLineNum() +const std::string canonLine::getLnum() { + return ((getN()==-1) ? (cantok(0)) : (cantok(1))); +} + +//from http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html +//0 is canon line +//1 is gcode Nnnnnn line +//2 is canonical command +/** Splits a string using delimiters. +\param str the string to be split +\param tokenV a vector of strings, each of which is a piece of str +\param delimiters defaults to: both parenthesis, comma, space +\sa tokenize() +*/ +void canonLine::tokenize( std::string str, + std::vector& tokenV, + const std::string& delimiters ) { + // Skip delimiters at beginning. + std::string::size_type lastPos = str.find_first_not_of(delimiters, 0); + // Find first "non-delimiter". + std::string::size_type pos = str.find_first_of(delimiters, lastPos); + + while (std::string::npos != pos || std::string::npos != lastPos) + { + // Found a token, add it to the vector. + tokenV.push_back(str.substr(lastPos, pos - lastPos)); + // Skip delimiters. Note the "not_of" + lastPos = str.find_first_not_of(delimiters, pos); + // Find next "non-delimiter" + pos = str.find_first_of(delimiters, lastPos); + } +} + +/**Create objects that inherit from canonLine. It determines which type + * of object to create, and returns a pointer to that new object +*/ +canonLine * canonLine::canonLineFactory (std::string l , machineStatus s) { + //check if canonical command is motion or something else + //motion commands: STRAIGHT_TRAVERSE STRAIGHT_FEED ARC_FEED + size_t lin,af,cmnt,msg; + cmnt = l.find("COMMENT"); + msg = l.find("MESSAGE"); + lin = l.find("STRAIGHT_"); + af = l.find("ARC_FEED"); + /* + ** check for comments first because it is not impossible + ** for one to contain the text "STRAIGHT" or "ARC_FEED" + */ + std::cout << l; // print the line + if ( (cmnt!=std::string::npos) || (msg!=std::string::npos) ) { + return new canonMotionless(l,s); // comment or message, no motion + } else if (lin!=std::string::npos) { + return new linearMotion(l,s); // straight traverse or straight feed + } else if (af!=std::string::npos) { + return new helicalMotion(l,s); // arc or helix + } else { + return new canonMotionless(l,s); //canonical command is not a motion command + } +} + +} // end namespace diff --git a/g2m/canonLine.hpp b/g2m/canonLine.hpp new file mode 100644 index 0000000..f545231 --- /dev/null +++ b/g2m/canonLine.hpp @@ -0,0 +1,100 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef CANONLINE_HH +#define CANONLINE_HH + +#include +#include +#include +#include +#include +#include +#include + +#include "machineStatus.hpp" +#include "point.hpp" + +namespace g2m { +/** +\class canonLine +\brief A canonLine object represents one canonical command. +Each gcode line produces one or more canonical commands. It can either be a +* motion command (one of LINEAR_TRAVERSE LINEAR_FEED ARC_FEED), or a motionless +* command (anything else) +You cannot create objects of this class - instead, create an object of a class +* that inherits from this class via canonLineFactory() +*/ +class canonLine { + + public: + /// return the canon-line as a string + const std::string getLine() { return myLine; }; + /// return Pose at start of this move + const Pose getStart() { return status.getStartPose(); }; + /// return the Pose at end of this move + const Pose getEnd() { return status.getEndPose(); }; + int getN(); + ///returns the canon line number + int getLineNum() { return tok2i(0); } + //const std::string getCanonType(); + /// returns the machine's status after execution of this canon line + const machineStatus* getStatus() { return &status; } + /// return type of motion + virtual MOTION_TYPE getMotionType() { return NOT_DEFINED; } //= 0; + /// return false for motion + virtual bool isMotion() { return false; } + /// return true if this is the end of the nc-program + virtual bool isNCend() { return false; } + /// return length of the motion + virtual double length() { assert(0); return -1; } + +#define UNUSED(x) (void)(x) + + /// return interpolated point at position t along the motion + virtual Point point(double t) { UNUSED(t); assert(0); return Point(); } +#ifdef MULTI_AXIS + virtual Point angle(double t) { UNUSED(t); assert(0); return Point(); } +#endif + // produce a canonLine based on string l, and previous machineStatus s + static canonLine* canonLineFactory (std::string l, machineStatus s); + + std::string cantok(unsigned int n); + const std::string getLnum(); + + protected: + // protected ctor, create through factory + canonLine(std::string canonL, machineStatus prevStatus); + double tok2d(unsigned int n); + int tok2i(unsigned int n, unsigned int offset=0); + void tokenize(std::string str, std::vector& tokenV, const std::string& delimiters = "(), "); + const std::string getCanonicalCommand(); + bool cmdMatch(std::string m); +// DATA + /// the canon-line as a string + std::string myLine; + /// the machine's status *after* execution of this canon line + machineStatus status; + /// the tokens in this canonLine, set after tokenizing myLine + std::vector canonTokens; +}; + +} // end namespace + +#endif //CANONLINE_HH diff --git a/g2m/canonMotion.cpp b/g2m/canonMotion.cpp new file mode 100644 index 0000000..e2c16eb --- /dev/null +++ b/g2m/canonMotion.cpp @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include + +#include "canonMotion.hpp" +#include "canonLine.hpp" +#include "point.hpp" + +namespace g2m { + +canonMotion::canonMotion(std::string canonL, machineStatus prevStatus): canonLine(canonL,prevStatus) { + +} + +/// for STRAIGHT_* and ARC_FEED, first 3 are always xyz and last 3 always abc +Pose canonMotion::getPoseFromCmd() { + double x,y,z; + + //need 3,4,5,and -3,-2,-1 + x = tok2d(3); + y = tok2d(4); + z = tok2d(5); + Point p(x,y,z); + +/* FIXME */ + double a,b,c; + int s = canonTokens.size(); //a,b,c are last 3 numbers + c = tok2d(s-1); + b = tok2d(s-2); + a = tok2d(s-3); +// assert (a+b+c < 3.0 * Precision::Confusion()); + //now how to convert those angles to a unit vector (i.e. gp_Dir)? + + //for now we take the easy way out + +// Point d(0,0,1); //vertical, NO ROTATION! + Point d(a,b,c); + return Pose(p,d); +} + +} // end namespace diff --git a/g2m/canonMotion.hpp b/g2m/canonMotion.hpp new file mode 100644 index 0000000..608c613 --- /dev/null +++ b/g2m/canonMotion.hpp @@ -0,0 +1,80 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef CANONMOTION_HH +#define CANONMOTION_HH + +#include +#include +#include +#include + +#include "machineStatus.hpp" +#include "canonLine.hpp" + +namespace g2m { + +/** +\class canonMotion +\brief This class is for the canonical commands STRAIGHT_TRAVERSE, STRAIGHT_FEED, and ARC_FEED. +canonMotion is an ABC. Its children should only be instantiated via +* canonLine::canonLineFactory(), which creates +* linearMotion objects for STRAIGHT_TRAVERSE and STRAIGHT_FEED commands, +* and helicalMotion objects for ARC_FEED commands. + +Note, you may find variations in the terminology I use - I misremembered some of +* the canonical commands issued by the interpreter. For example, I thought it +* issued LINEAR_FEED but it's actually STRAIGHT_FEED. So the class +* linearMotion could have been named straightMotion. + +Also, rapid and traverse are used interchangeably, at least in my comments... +*/ + +class canonMotion: protected canonLine { + + public: + /// return type of motion + virtual MOTION_TYPE getMotionType() {return NOT_DEFINED;} + /// return true + bool isMotion() {return true;}; + /// return start + Point getStart() const {return start;} + /// return end + Point getEnd() const {return end;} + + protected: + /// create canonMotion + canonMotion(std::string canonL, machineStatus prevStatus); + Pose getPoseFromCmd(); + /// start of this move + Point start; + /// end of this move + Point end; +#ifdef MULTI_AXIS + /// the direction in which the current move starts + Point startDir; + /// the direction in which the current move ends + Point endDir; +#endif +}; + +} // end namespace + +#endif //CANONMOTION_HH diff --git a/g2m/canonMotionless.cpp b/g2m/canonMotionless.cpp new file mode 100644 index 0000000..af05109 --- /dev/null +++ b/g2m/canonMotionless.cpp @@ -0,0 +1,157 @@ +/*************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include "canonMotionless.hpp" +#include "machineStatus.hpp" + +#include + +namespace g2m { + +canonMotionless::canonMotionless(std::string canonL, machineStatus prevStatus):canonLine(canonL, prevStatus) { + match = true; + handled = true; + ncEnd = false; + status.setMotionType(MOTIONLESS); + status.setEndPose(status.getStartPose()); + + //match canonical commands. the string MUST be the complete command name + //NOTE: cmdMatch ONLY looks at the command part of the line, canonTokens[2]. + if (cmdMatch("COMMENT")) { + //do nothing + } else if (cmdMatch("MESSAGE")) { + + /*size_t a,b; + a = myLine.find_first_of("\"") + 1; + b = myLine.find_last_of("\""); + */ + } else if (cmdMatch("STOP_SPINDLE_TURNING")) { + status.setSpindleStatus(SPINDLE_STATUS(OFF)); + } else if (cmdMatch("START_SPINDLE_CLOCKWISE")) { + status.setSpindleStatus(SPINDLE_STATUS(CW)); + } else if (cmdMatch("START_SPINDLE_COUNTERCLOCKWISE")) { + status.setSpindleStatus(SPINDLE_STATUS(CCW)); + } else if (cmdMatch("SET_SPINDLE_SPEED")) { + status.setSpindleSpeed(tok2d(3)); + } else if (cmdMatch("MIST_ON")) { + coolantStruct c = status.getCoolant(); + c.mist = true; + status.setCoolant(c); + } else if (cmdMatch("MIST_OFF")) { + coolantStruct c = status.getCoolant(); + c.mist = false; + status.setCoolant(c); + } else if (cmdMatch("FLOOD_ON")) { + coolantStruct c = status.getCoolant(); + c.flood = true; + status.setCoolant(c); + } else if (cmdMatch("FLOOD_OFF")) { + coolantStruct c = status.getCoolant(); + c.flood = false; + status.setCoolant(c); + } else if (cmdMatch("DWELL")) { + } else if (cmdMatch("SET_FEED_MODE")) { // do nothing? + } else if (cmdMatch("SET_SPINDLE_MODE")) { // do nothing? + } else if (cmdMatch("PALLET_SHUTTLE")) { // do nothing? + } else if (cmdMatch("SET_FEED_RATE")) { + status.setFeed(tok2d(3)); + } else if (cmdMatch("SET_FEED_REFERENCE")) { + if (cantok(3).compare("CANON_XYZ") == 0) {//this is the standard feed reference, do nothing + } else if (cantok(3).compare("CANON_WORKPIECE")) { // do nothing? + } else handled = false; + } else if (cmdMatch("SELECT_TOOL")) { + //this only tells the machine to reposition the tool carousel, correct? if so it can be ignored + } else if (cmdMatch("CHANGE_TOOL")) { + status.setTool(tok2i(3)); + } else if (cmdMatch("USE_TOOL_LENGTH_OFFSET")) { //don't need to do anything, unless the toolholder/spindle is modeled + } else if ( (cmdMatch("SET_ORIGIN_OFFSETS")) || cmdMatch("SET_G5X_OFFSET")) { + unsigned int i = 3; + if (cmdMatch("SET_G5X_OFFSET")) { + i=4; + } + // else if (uio::debuggingOn()) { + // std::cout << "Using old version of interpreter!"; + //} + if (cantok(i).compare("0.0000") == 0) { + /* + ** this is a common canon statement. we are going to hijack it to produce a warning, + ** because the data we're getting was produced with a format of %.4f or so. The + ** reduced precision may give OCC indigestion. + */ + //if (uio::debuggingOn()) + // uio::infoMsg("Warning, input has reduced precision - expected more zeros: \n" + myLine +"\nModel may fail!"); + } else if (canonTokens.size() == (i+6) ) { //6 axes, tokens 3-8 (old interp) or 4-9 (new) + if ((tok2d(i++)==0) && (tok2d(i++)==0) && (tok2d(i++)==0) && (tok2d(i++)==0) && (tok2d(i++)==0) && (tok2d(i)==0)) { + //do nothing if all zeros, interp issues this when it starts up and it has no effect + } else { + handled = false; //because I still don't know what to do with the correct data... + } + } else { + handled = false; //not 9 tokens - so not 6 axes! + } + } else if (cmdMatch("USE_LENGTH_UNITS")) { +// handled = false; + handled = true; + } else if (cmdMatch("ENABLE_FEED_OVERRIDE")) { + handled = true; + } else if (cmdMatch("ENABLE_SPEED_OVERRIDE")) { + handled = true; + } else if (cmdMatch("SET_MOTION_CONTROL_MODE")) { + handled = false; + } else if (cmdMatch("SET_XY_ROTATION")) { + if (canonTokens.size() == 6) { + if ((tok2d(3)==0) && (tok2d(4)==0) && (tok2d(5)==0) ) { + //no rotation. interp issues this when starting up + } else { + handled = false; + } + } + } else if (cmdMatch("SET_NAIVECAM_TOLERANCE")) { + handled = false; + } else if (cmdMatch("PROGRAM_END")) { + ncEnd = true; + } else if (cmdMatch("PROGRAM_STOP")) { + ncEnd = true; + } else if (cmdMatch("SELECT_PLANE" )) { + if (cantok(3).compare("CANON_PLANE_XZ")==0) { + status.setPlane(CANON_PLANE_XZ); + } else if (cantok(3).compare("CANON_PLANE_YZ")==0) { + status.setPlane(CANON_PLANE_YZ); + } else if (cantok(3).compare("CANON_PLANE_XY")==0) { + status.setPlane(CANON_PLANE_XY); + } else {// sanity check + std::cout << "Error: Failed to detect CANON_PLANE in _ "; // +cantok(3)+"_:\n" + myLine); + } + } else match = false; + + //if ( (uio::debuggingOn()) && (!match || !handled) ) { + if ( (!match || !handled) ) { + std::string m; + if (!handled) { + m = "Unhandled canonical command ("+cantok(2)+")\n"; + } else { + //m = "Unknown canonical command ("+cantok(2)+") at " + cantok(0) + " " + cantok(1); + m = "No match for " + canonL; + } + std::cout << m; + } +} + + +} // end namespace diff --git a/g2m/canonMotionless.hpp b/g2m/canonMotionless.hpp new file mode 100644 index 0000000..4a4420e --- /dev/null +++ b/g2m/canonMotionless.hpp @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef CANONMOTIONLESS_HH +#define CANONMOTIONLESS_HH + +#include +#include + +#include +#include + +#include "canonLine.hpp" +#include "machineStatus.hpp" + +namespace g2m { + +/** +\class canonMotionless +\brief A canonical command that (generally) does not cause or alter axis motion +This class is for anything other than STRAIGHT_FEED, STRAIGHT_TRAVERSE, and ARC_FEED - +* including changes in feedrate, spindle speed, tool, coolant, ending the program, etc +*/ + +class canonMotionless: protected canonLine { + friend canonLine* canonLine::canonLineFactory(std::string l, machineStatus s); + public: + /// create motionless canon-line + canonMotionless(std::string canonL, machineStatus prevStatus); + /// return false + bool isMotion() {return false;}; + /// return type of motion + MOTION_TYPE getMotionType() {return MOTIONLESS;}; + ///returns true if this command is a valid terminator for the NC file (i.e. + bool isNCend() {return ncEnd;}; + protected: + /// flag(?) + bool match; + /// flag indicating that this canon-line is handled + bool handled; + /// flag indicating end of g-code program + bool ncEnd; +}; + +} // end namespace + +#endif //CANONMOTIONLESS_HH diff --git a/g2m/g2m.cpp b/g2m/g2m.cpp new file mode 100644 index 0000000..60eeba8 --- /dev/null +++ b/g2m/g2m.cpp @@ -0,0 +1,356 @@ +/*************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* modified by Anders Wallin 2011, anders.e.e.wallin@gmail.com * +* modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "g2m.hpp" +#include "nanotimer.hpp" +#include "machineStatus.hpp" + +namespace g2m { + +void g2m::interpret_file() { + lineVector.clear(); + nanotimer timer; + timer.start(); + gcode_lines = 0; + + if ( file.endsWith(".ngc") ) { + // push g-code lines to ui: + QFile fileHandle( file ); + QString gline; + QString glinebuffer; + QString tempFile = "/tmp/cutsim.temp"; + QFile tempFileHandle( tempFile ); + if ( !tempFileHandle.open(QIODevice::ReadWrite | QIODevice::Text)) + return; + + if ( fileHandle.open( QIODevice::ReadOnly | QIODevice::Text) ) { + // file opened successfully + QTextStream t( &fileHandle ); // use a text stream + QTextStream out( &tempFileHandle ); + // until end of file... + while ( !t.atEnd() ) { + // read and parse the command line + gline = t.readLine(); // line of text excluding '\n' + glinebuffer += gline + '\n'; + out << "(Gcode Line No." << gcode_lines << ")\n"; + out << gline + '\n'; + gcode_lines++; + } + fileHandle.close(); + tempFileHandle.close(); + } + + while (glinebuffer.right(1) == "\n") + glinebuffer.remove(glinebuffer.length() - 1, 1); // remove last '\n' s + + emit gcodeLineMessage(glinebuffer); + + emit debugMessage( tr("g2m: interpreting %1").arg(file) ); + //interpret(); // reads from file + interpret2(tempFileHandle.fileName()); + } else if (file.endsWith(".canon")) { //just process each line + if (!chooseToolTable()) { + infoMsg("Can't find tool table. Aborting."); + emit debugMessage("Can't find tool table. Aborting."); + return; + } + + std::ifstream inFile(file.toLatin1()); + std::string sLine; + QString sLinebuffer; + + while(std::getline(inFile, sLine)) { + if (sLine.length() > 1) { //helps to prevent segfault in canonLine::cmdMatch() + sLinebuffer += sLine.c_str() + QString("\n"); + processCanonLine(sLine); // requires no interpret() + } + } + emit canonLineMessage(sLinebuffer); + } else { + emit debugMessage( tr("File name must end with .ngc or .canon!") ); + return; + } + + double e = timer.getElapsedS(); + emit debugMessage( tr("g2m: Total time to process that file: ") + timer.humanreadable(e) ) ; + //std::cout << "Total time to process that file: " << timer.humanreadable(e).toStdString() << std::endl; + lineVector.clear(); +} + +///ask for a tool table, even if one is configured - user may wish to change it +bool g2m::chooseToolTable() { + if (!QFileInfo(tooltable).exists()){ + infoMsg(" cannot find tooltable! "); + emit debugMessage(" cannot find tooltable! "); + return false; + } + return true; +} + +/// set the tooltable and start interpreting input from stdin. called from interpret() +bool g2m::startInterp(QProcess &tc) { + if (!chooseToolTable()) + return false; + // run: rs274 file.ngc + tc.start( interp , QStringList(file) ); + tc.write("3\n"); // "read tool file" command to rs274 + tc.write(tooltable.toLatin1()); + tc.write("\n"); // "enter" + tc.write("1\n"); // "start interpreting" command to rs274 + return true; +} + +/// called after "file" set in constructor +void g2m::interpret() { + //success = false; + QProcess toCanon; + bool foundEOF = false; // checked at the end + + if (!startInterp(toCanon)) // finds rs274, reads tooltable, start interpreter + return; + + if (!toCanon.waitForReadyRead(1000) ) { + if ( toCanon.state() == QProcess::NotRunning ){ + infoMsg("Interpreter died. Bad tool table?"); + } else + infoMsg("Interpreter timed out for an unknown reason."); + std::cout << "stderr: " << (const char*)toCanon.readAllStandardError() << std::endl; + std::cout << "stdout: " << (const char*)toCanon.readAllStandardOutput() << std::endl; + toCanon.close(); + return; + } + + // rs274 has now started correctly, and is ready to read ngc-file + qint64 lineLength; + char line[260]; + int fails = 0; + QString l; + + do { + if (toCanon.canReadLine()) { + lineLength = toCanon.readLine(line, sizeof(line)); // read one output line from rs274 + if (lineLength != -1 ) { + l += line; + foundEOF = processCanonLine(line); // line is a canon-line + } else { //shouldn't get here! + std::cout << " ERROR: lineLength= " << lineLength << " fails="<< fails << "\n"; + fails++; + } + } else { + std::cout << " ERROR: toCanon.canReadLine() fails="<< fails << "\n"; + fails++; + } + toCanon.waitForReadyRead(); + } while ( (fails < 1000) && + ( (toCanon.canReadLine()) || + ( toCanon.state() != QProcess::NotRunning ) ) ); + + emit canonLineMessage( l.left(l.size()-1) ); + + if (fails > 1) { + if (fails < 1000) { + infoMsg("Waited for interpreter over 1000 times."); + } else { + infoMsg("Waited 1000 seconds for interpreter. Giving up."); + toCanon.close(); + return; + } + } + + std::string s = (const char *)toCanon.readAllStandardError(); + s.erase(0,s.find("executing")); + if (s.size() > 10) { + emit signalError(QString("Interpreter exited with error:\n" + + QString::fromUtf8(s.substr(10).c_str()))); + infoMsg("Interpreter exited with error:\n"+s.substr(10)); + return; + } + + if (!foundEOF) { + infoMsg("Warning: file data not terminated correctly. If the file is terminated correctly, this indicates a problem interpreting the file."); + } + + emit debugMessage( tr("g2m: read %1 lines of g-code which produced %2 canon-lines.").arg(gcode_lines).arg(lineVector.size()) ); + + toCanon.close(); + return; +} + +/// process a canon-line input string. this is a canon-string from rs274. +/// call canonLineFactory to produce a canonLine and save it to lineVector +bool g2m::processCanonLine(std::string l) { + canonLine* cl; + if (lineVector.size() == 0) { + // no status exists, so make one up. + cl = canonLine::canonLineFactory(l, machineStatus( initialPos, userOrigin )); + } else { + // use the last element status + cl = canonLine::canonLineFactory(l, *(lineVector.back())->getStatus()); + } + emit signalCanonLine(cl); + lineVector.push_back(cl); + + //if ( debug ) + // std::cout << "Line " << cl->getLineNum() << "/N" << cl->getN() << std::endl; + + // return true when we reach end-of-program + if (!cl->isMotion()) { + if (cl->isNCend()) { + emit signalNCend(); + } + return cl->isNCend(); + } + + return false; +} + +/// output information to std::cout +void g2m::infoMsg(std::string s) { + std::cout << s << std::endl; +} + +/// set the tooltable and start interpreting input from stdin. called from interpret() +bool g2m::startInterp2(QProcess &tc, QString tempFile) { + if (!chooseToolTable()) + return false; + // run: rs274 file.ngc + + // qDebug() << QStringList(tempFile); + + tc.start( interp , QStringList(tempFile) ); + + tc.write("3\n"); // "read tool file" command to rs274 + + // qDebug() << tooltable.toLatin1(); + + tc.write(tooltable.toLatin1()); + tc.write("\n"); // "enter" + tc.write("1\n"); // "start interpreting" command to rs274 + return true; +} + +/// called after "file" set in constructor +void g2m::interpret2(QString tempFile) { + //success = false; + QProcess toCanon; + bool foundEOF = false; // checked at the end + + if (!startInterp2(toCanon, tempFile)) // finds rs274, reads tooltable, start interpreter + return; + + if (!toCanon.waitForReadyRead(1000) ) { + if ( toCanon.state() == QProcess::NotRunning ){ + infoMsg("Interpreter died. Bad tool table?"); + emit debugMessage("Interpreter died. Bad tool table?"); + } else { + infoMsg("Interpreter timed out for an unknown reason."); + emit debugMessage("Interpreter timed out for an unknown reason."); + } + //std::cout << "stderr: " << (const char*)toCanon.readAllStandardError() << std::endl; + //std::cout << "stdout: " << (const char*)toCanon.readAllStandardOutput() << std::endl; + toCanon.close(); + return; + } + + // rs274 has now started correctly, and is ready to read ngc-file + qint64 lineLength; + char line[260]; + int fails = 0; + QString l; + QString cmt; + + do { + if (toCanon.canReadLine()) { + lineLength = toCanon.readLine(line, sizeof(line)); // read one output line from rs274 + if (lineLength != -1 ) { + cmt = line; + if (cmt.contains("COMMENT(\"Gcode Line No.")) + total_gcode_lines++; + else { + l += line; + foundEOF = processCanonLine(line); // line is a canon-line + //lineTable.push_back(total_gcode_lines); + } + } else { //shouldn't get here! + //std::cout << " ERROR: lineLength= " << lineLength << " fails="<< fails << "\n"; + fails++; + } + } else { + //std::cout << " ERROR: toCanon.canReadLine() fails="<< fails << "\n"; + fails++; + } + toCanon.waitForReadyRead(); + } while ( (fails < 1000) && + ( (toCanon.canReadLine()) || + ( toCanon.state() != QProcess::NotRunning ) ) ); + + emit canonLineMessage( l.left(l.size()-1) ); + + if (fails > 1) { + if (fails < 1000) { + infoMsg("Waited for interpreter over 1000 times."); + emit debugMessage("Waited for interpreter over 1000 times."); + } else { + infoMsg("Waited 1000 seconds for interpreter. Giving up."); + emit debugMessage("Waited 1000 seconds for interpreter. Giving up."); + toCanon.close(); + return; + } + } + + std::string s = (const char *)toCanon.readAllStandardError(); + s.erase(0,s.find("executing")); + if (s.size() > 10) { + infoMsg("Interpreter exited with error:\n"+s.substr(10)); + emit debugMessage(("Interpreter exited with error:\n"+s.substr(10)).c_str()); + return; + } + + if (!foundEOF) { + infoMsg("Warning: file data not terminated correctly. If the file is terminated correctly, this indicates a problem interpreting the file."); + emit debugMessage("Warning: file data not terminated correctly. If the file is terminated correctly, this indicates a problem interpreting the file."); + } + + emit debugMessage( tr("g2m: read %1 lines of g-code which produced %2 canon-lines.").arg(gcode_lines).arg(lineVector.size()) ); + return; +} + +} // end namespace diff --git a/g2m/g2m.h b/g2m/g2m.h new file mode 100644 index 0000000..e69de29 diff --git a/g2m/g2m.hpp b/g2m/g2m.hpp new file mode 100644 index 0000000..9691327 --- /dev/null +++ b/g2m/g2m.hpp @@ -0,0 +1,128 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modifications Copyright (C) 2011 by Anders Wallin * + * anders.e.e.wallin@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef GTOM_HH +#define GTOM_HH + +#include +#include +#include +#include + +#include +#include +#include + +#include "canonLine.hpp" + +namespace g2m { + +/// \brief This class runs the interpreter ("rs274"), and creates a canonLine object for each canonical +/// command generated by the interpreter. +class g2m : public QObject { + Q_OBJECT; + + public: + g2m() { debug = false; initialPos = Pose( Point(0,0,0), Point(0,0,0) ); userOrigin = Pose( Point(0,0,0), Point(0,0,0) ); total_gcode_lines = 0; } + /// return vector of canonLines + std::vector getCanonLines() { return lineVector; } + void setInitialPos(Pose init) { initialPos = init; } + void setOrigin(Pose origin) { userOrigin = origin; } + Pose getOrigin() { return userOrigin; } + + /* + int toGcodeLineNo(int canonLineNo) { + if ((unsigned)canonLineNo + 1 >= lineTable.size()) + return ++canonLineNo; + else + return lineTable[canonLineNo]; + } + */ + + public slots: + /// run the interpreter + void interpret_file(); + /// set the path to the .ngc g-code file + void setFile(QString infile) { + emit debugMessage( tr("g2m: setting file %1").arg(infile) ); + file = infile; + } + /// set the path to the tootable + void setToolTable(QString tbl_file) { + emit debugMessage( tr("g2m: setting tooltable %1").arg(tbl_file) ); + tooltable = tbl_file; + } + /// set the path to the rs274 binary + void setInterp(QString interp_binary) { + emit debugMessage( tr("g2m: setting rs274 path: %1").arg(interp_binary) ); + interp = interp_binary; + } + + /// set debug mode on/off + void setDebug(bool d) {debug = d;} + + signals: + /// debug messages + void debugMessage(QString s); + /// emitted while .ngc g-code file is read. the g-code line read. + void gcodeLineMessage(QString s); + /// emitted during interpret(), the canon line as a string + void canonLineMessage(QString s); + /// emitted during interpret(), the current canonLine object + void signalCanonLine(canonLine* line); + // emitted when M2 is reached + void signalNCend(); + // emitted when interpreter errored + void signalError(QString s); + + protected: + bool chooseToolTable(); + bool startInterp(QProcess &tc); + void interpret(); + bool processCanonLine(std::string l); + void infoMsg(std::string s); +bool startInterp2(QProcess &tc, QString tempFile); +void interpret2(QString tempFile); + /// the canonLines produced when interpreting g-code + std::vector lineVector; + /// path to .ngc g-code file + QString file; + /// path to tooltable + QString tooltable; + /// path to rs274 executable + QString interp; + /// flag for debug mode + bool debug; + /// number of lines in the .ngc g-code file + int gcode_lines; + + private: + Pose initialPos; + Pose userOrigin; + + int total_gcode_lines; + //std::vector lineTable; not used for now +}; + +} // end namespace +#endif //GTOM_HH diff --git a/g2m/gplayer.hpp b/g2m/gplayer.hpp new file mode 100644 index 0000000..0c74818 --- /dev/null +++ b/g2m/gplayer.hpp @@ -0,0 +1,209 @@ +/* + * Modification & Copyright 2015 Kazuyasu Hamada (k-hamada@gifu-u.ac.jp) +*/ + +#ifndef GPLAYER_HH +#define GPLAYER_HH + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "canonLine.hpp" +#include "nanotimer.hpp" + +#define DEFAULT_STEP_SIZE (0.1) +#define DEFAULT_FEED_RATE (200.0) +#define DEFAULT_TRAVERSE_FEED_RATE (1000.0) +#define TOLERANCE (1e-2) +#define DEFAULT_ANIMATE_INTERVAL (3) + +namespace g2m { + +enum PLUNGE_STATUS { NO_PLUNGE = 0x0, POSITIVE_PLUNGE = 0x10000, NEGATIVE_PLUNGE = 0x20000, }; + +/** +\class GPlayer +\brief This class loops through the list of canonLine objects produced by g2m. +*/ +class GPlayer : public QObject { + Q_OBJECT; + + public: + GPlayer() { + first = true; + current_line = 0; + inv_ds = 1.0 / DEFAULT_STEP_SIZE; + m = 0; + play_flag = false; + feed_rate = DEFAULT_FEED_RATE; + traverse_feed_rate = DEFAULT_TRAVERSE_FEED_RATE; + total_length = 0.0; + total_time = 0.0; + } + + void setStepSize(double ds) { + if (ds > 0.0) + inv_ds = 1.0 / ds; + } + + void setTraverseFeedRate(double rate) { + if (rate > 0.0) + traverse_feed_rate = rate; + } + + canonLine* getCanonLine(unsigned int line) { return lines[line]; } + + public slots: + /// start or resume executing the program + void play() { + if (play_flag == false) { + play_flag = true; + qDebug() << " gplayer::play() "; + emit debugMessage( tr("GPlayer: play") ); + slotRequestMove(); + } + } + /// signal the next move + void slotRequestMove() { + if (!(lines.size() > 0)) { play_flag = false; return; } + if (current_line >= (lines.size()-1)) { play_flag = false; return; } + if (play_flag == false) { + if (lines.size() - 1) + emit signalProgress( (int)(100*current_line/(lines.size()-1)) , current_line, total_time, true); // report progress to ui + + return; + } + // UI request that we signal the next signalToolPosition() + canonLine* cl = lines[current_line]; + + if (first) {// first ever call here + current_tool = cl->getStatus()->getTool(); + first = false; + } + if (cl->isMotion() ) { + // divide motion into sampled points. signal motion along path. + if (m == 0) { + move_length = cl->length(); + n_samples = std::max( (int)( move_length * inv_ds ) , 2 ); // want at least two points: start-end + interval_size = move_length /(double)(n_samples-1); + motionStatus = cl->getStatus()->getSpindleMotionStatus(); + feed_rate = cl->getStatus()->getFeed(); + if (feed_rate <= 0.0) feed_rate = DEFAULT_FEED_RATE; + double diff_z = cl->point((n_samples-1)*interval_size).z - cl->point(0.0).z; + plunge = (diff_z > TOLERANCE) ? POSITIVE_PLUNGE : (diff_z < -TOLERANCE) ? NEGATIVE_PLUNGE : NO_PLUNGE; + motionStatus |= plunge; + } + // FIXME: handle first and last moves differently? + Point pos = cl->point( (double)(m) * interval_size ); +#ifdef MULTI_AXIS + Point angle = cl->angle( (double)(m) * interval_size ); +#endif + if (m == (n_samples-1) ) + move_done = true; +#ifdef MULTI_AXIS + emit signalToolPosition( pos.x, pos.y, pos.z, angle.x, angle.y, angle.z, current_line, motionStatus, feed_rate ); +#else + emit signalToolPosition( pos.x, pos.y, pos.z, current_line, motionStatus, feed_rate); +#endif + m++; // advance along the move + } else { + // not motion, check for toolchange + if ( current_tool != cl->getStatus()->getTool() ) { + emit signalToolChange( cl->getStatus()->getTool() ); + current_tool = cl->getStatus()->getTool(); + } + current_line++; + slotRequestMove(); // call myself! + } + + if (move_done) { + if (cl->isMotion()) { + total_length += move_length; + if (cl->getMotionType() == TRAVERSE) + total_time += move_length / traverse_feed_rate; + else + total_time += move_length / feed_rate; + } + current_line++; + move_done = false; + m = 0; + } + if (lines.size() - 1) + if (m == 0 || (m & DEFAULT_ANIMATE_INTERVAL) == 0x0) { + emit signalProgress( (int)(100*current_line/(lines.size()-1)) , current_line, total_time, current_line == (lines.size()-1)); // report progress to ui + } + } + /// pause program + void pause() { + play_flag = false; + emit debugMessage( tr("GPlayer: pause") ); + } + /// stop the execution of the g-code program + void stop() { + if (play_flag == false) + emit signalProgress(0, 0, 0.0, true); + play_flag = false; + first = true; + current_line = 0; + m = 0; + total_time = 0; + emit debugMessage( tr("GPlayer: stop") ); + } + /// add a canonLine to the vector of lines to be processed + /// \param l the new canonLine to be added + void appendCanonLine( canonLine* l) { + lines.push_back(l); + } + + signals: + /// signal a new tool position +#ifdef MULTI_AXIS + void signalToolPosition( double x, double y, double z, double a, double b, double c, int line, int mstatus, double feedrate ); // 5-axis for now.. +#else + void signalToolPosition( double x, double y, double z, int line, int mstatus, double feedrate ); // 3-axis. +#endif + /// signal a tool change to new tool \param t + void signalToolChange( int t ); + /// signal the UI how far along the g-code program we are + void signalProgress( int p, int line, double time, bool force ); + /// signal a debug message + void debugMessage(QString s); + + protected: + /// flag for first move of g-code + bool first; + /// index of current tool + int current_tool; + /// the current canonLine being processed + unsigned int current_line; + /// loop variable + int m; + double move_length; + int n_samples; + double interval_size; + /// flag indicating when current move done + bool move_done; + /// vector of canonLines to process + std::vector lines; + + bool play_flag; + + private: + int plunge; + int motionStatus; + double inv_ds; + double feed_rate; + double traverse_feed_rate; + double total_length; + double total_time; +}; + +} // end namespace +#endif // GPlayer_HH diff --git a/g2m/helicalMotion.cpp b/g2m/helicalMotion.cpp new file mode 100644 index 0000000..f46ca1a --- /dev/null +++ b/g2m/helicalMotion.cpp @@ -0,0 +1,394 @@ +/*************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include +#include +#include +#include + +#include "calc_tolerance.hpp" + +#include "helicalMotion.hpp" +#include "machineStatus.hpp" + +namespace g2m { + +#define CIRCLE_FUZZ (0.000001) // from libnml/posemath/posemath.h + +// example from cds.ngc: +// 231 N2250 ARC_FEED(3.5884, 1.9116, 3.5000, 2.0000, -1, 1.8437, 0.0000, 0.0000, 0.0000) +//tok: 0 1 2 3 4 5 6 7 8 9 10 11 +helicalMotion::helicalMotion(std::string canonL, machineStatus prevStatus): canonMotion(canonL,prevStatus) { + // ( comments relate to XY-plane ) + // see the rs274 spec, www.isd.mel.nist.gov/documents/kramer/RS274NGC_22.pdf or similar + // If rotation is positive, the arc is traversed counterclockwise as viewed from the positive end of + // the coordinate axis perpendicular to the currently selected plane. If rotation is negative, the + // arc is traversed clockwise. + + x1 = tok2d(3); // first_end (x-coord of endpoint) + y1 = tok2d(4); // second_end (y-coord of endpoint + cx = tok2d(5); // first_axis (x-coord of centerpoint) + cy = tok2d(6); // second_axis (y-coord of centerpoint) + rot = tok2d(7); //rotation (ccw if rotation==1,cw if rotation==-1), for multipple turns we can have -2, +2, etc. + z1 = tok2d(8); // z-coord of endpoint + a = tok2d(9); // a + b = tok2d(10); // b + c = tok2d(11); // c + start = status.getStartPose().loc + status.getOrigin().loc; +#ifdef MULTI_AXIS +// startDir = (status.getStartPose().dir + status.getOrigin().dir) * (SIGN * M_PI/180.0); + startDir.x = (status.getStartPose().dir.x + status.getOrigin().dir.x) * (SIGN_A * M_PI/180.0); + startDir.y = (status.getStartPose().dir.y + status.getOrigin().dir.y) * (SIGN_B * M_PI/180.0); + startDir.z = (status.getStartPose().dir.z + status.getOrigin().dir.z) * (SIGN_C * M_PI/180.0); +#endif + + /* + switch (status.getPlane()) { + case CANON_PLANE_XZ: + status.setEndPose(Point(y1,z1,x1)); + break; + case CANON_PLANE_YZ: + status.setEndPose(Point(z1,x1,y1)); + break; + case CANON_PLANE_XY: + default: + + }*/ + + status.setMotionType(HELICAL); + + + + // code adapted from emc2: src/emc/rs274ngc/gcodemodule.cc + // function rs274_arc_to_segments() + double n[6]; // n=endpoint, + //double o[6]; // o=origin/start-point + // numbering of axes, depending on plane + if ( status.getPlane() == CANON_PLANE_XY) { // XY-plane + X=0; Y=1; Z=2; + } else if (status.getPlane() == CANON_PLANE_YZ) { // YZ-plane + X=2; Y=0; Z=1; + } else if (status.getPlane() == CANON_PLANE_XZ) { + X=1; Y=2; Z=0; // XZ-plane + } + n[X] = x1 + status.getOrigin().loc.x; // end-point, first-coord + n[Y] = y1 + status.getOrigin().loc.y; // end-point, second-coord + n[Z] = z1 + status.getOrigin().loc.z; // end-point, third-coord, i.e helix translation +#ifdef MULTI_AXIS + n[3] = (a + status.getOrigin().dir.x) * (SIGN_A * M_PI/180.0); + n[4] = (b + status.getOrigin().dir.y) * (SIGN_B * M_PI/180.0); + n[5] = (c + status.getOrigin().dir.z) * (SIGN_C * M_PI/180.0); +#else + n[3] = a; + n[4] = b; + n[5] = c; +#endif + +#ifdef MULTI_AXIS + status.setEndPose( Pose( Point( n[X], n[Y], n[Z]) - status.getOrigin().loc, Point( a, b, c ) ) ); + endDir = Point( n[3], n[4], n[5] ); +#else + status.setEndPose( Point( n[X], n[Y], n[Z]) ); +#endif + end = status.getEndPose().loc; + + o[0] = start.x; + o[1] = start.y; + o[2] = start.z; +#ifdef MULTI_AXIS + o[3] = startDir.x; + o[4] = startDir.y; + o[5] = startDir.z; +#else + o[3] = 0; //FIXME + o[4] = 0; //FIXME + o[5] = 0; //FIXME +#endif + double theta1 = atan2( o[Y]-cy, o[X]-cx); // angle of vector from center to start + double theta2 = atan2( n[Y]-cy, n[X]-cx); // angle of vector from center to end + if(rot < 0) { + while(theta2 - theta1 > -CIRCLE_FUZZ) + theta2 -= 2 * M_PI; + } else { + while(theta2 - theta1 < CIRCLE_FUZZ) + theta2 += 2 * M_PI; + } + // if multi-turn, add the right number of full circles + if(rot < -1) + theta2 += 2 * M_PI * (rot+1); + if(rot > 1) + theta2 += 2 * M_PI * (rot-1); + // number of steps + //int steps = std::max( 3, int(max_segments * fabs(theta1 - theta2) / M_PI) ); // max_segments per PI of rotation + //double rsteps = 1. / steps; + + dtheta = theta2 - theta1; // the rotation angle for this helix + + // n is endpoint + // o is startpoint + // d is diff. x,y,z,a,b,c + d[0]=0; d[1]=0; d[2]=0; + d[3]=n[3]-o[3]; + d[4]=n[4]-o[4]; + d[5]=n[5]-o[5]; + d[Z] = n[Z] - o[Z]; // helix-translation diff + tx = o[X] - cx; // center to start + ty = o[Y] - cy; // center to start + radius = sqrt( tx*tx + ty*ty ); + //double dc = cos(dtheta*rsteps); // delta-cos + //double ds = sin(dtheta*rsteps); // delta-sin + + /* + std::vector output; + for(int i=0; i ledir) ? lsdir : ledir) * langle; + return lhelical > langle ? lhelical : langle; +#else + // helix: x= a*cos(t) y=a*sin(t) z=c*t + + // d[Z] is rise during dtheta radians + // so d[Z]/dtheta is rise/radian + // and (d[Z]/dtheta) + double c = d[Z]/dtheta; + // c= rise in one turn divided by 2pi + // t in [0,T] + // helix length L =T*sqrt(a^2 + c^2) + return fabs(dtheta)*sqrt(radius*radius + c*c); +#endif +} + +Point helicalMotion::point(double s) { + // 0) relate s to t=[0...1] and theta=[0...dtheta] + double t= s/this->length(); + //XXX assert( t >= 0.0); assert( t <= 1.0 + CALC_TOLERANCE ); + double theta = t*dtheta; + // 1) rotate center-start vector + double cos_t = cos(theta); + double sin_t = sin(theta); + double txr(tx), tyr(ty); + rotate(txr,tyr,cos_t,sin_t); + // 2) center + center-start + double p[6]; // the output-point + p[X] = cx + txr; + p[Y] = cy + tyr; + p[Z] = o[Z] + t*d[Z]; + p[3] = o[3] + d[3] * t; + p[4] = o[4] + d[4] * t; + p[5] = o[5] + d[5] * t; + return Point( p[0], p[1], p[2] ); +} + +// rotate by cos/sin. from emc2 gcodemodule.cc +void helicalMotion::rotate(double &x, double &y, double c, double s) { + double tx = x * c - y * s; + y = x * s + y * c; + x = tx; +} + +#ifdef MULTI_AXIS +Point helicalMotion::angle(double s) { + double t= s/this->length(); + assert( t >= 0.0); assert( t <= 1.0 + CALC_TOLERANCE ); + double p[6]; // the output-point + p[3] = o[3] + d[3] * t; + p[4] = o[4] + d[4] * t; + p[5] = o[5] + d[5] * t; + return Point( p[3], p[4], p[5] );; +} +#endif + +} // end namespace + + + + +#ifdef EMC2_GCODEMODULE_RS274ARC_CODE +static PyObject *rs274_arc_to_segments(PyObject *self, PyObject *args) { + //PyObject *canon; + double x1, y1, cx, cy, z1, a, b, c, u, v, w; + double o[9], n[9], g5xoffset[9], g92offset[9]; + int rot, plane; + int X, Y, Z; + double rotation_cos, rotation_sin; + int max_segments = 128; + + + + + if(!get_attr(canon, "plane", &plane)) return NULL; + if(!get_attr(canon, "rotation_cos", &rotation_cos)) return NULL; // rotation-offsets + if(!get_attr(canon, "rotation_sin", &rotation_sin)) return NULL; // rotation-offset + + + if(!get_attr(canon, "g5x_offset_x", &g5xoffset[0])) return NULL; + if(!get_attr(canon, "g5x_offset_y", &g5xoffset[1])) return NULL; + if(!get_attr(canon, "g5x_offset_z", &g5xoffset[2])) return NULL; + if(!get_attr(canon, "g5x_offset_a", &g5xoffset[3])) return NULL; + if(!get_attr(canon, "g5x_offset_b", &g5xoffset[4])) return NULL; + if(!get_attr(canon, "g5x_offset_c", &g5xoffset[5])) return NULL; + if(!get_attr(canon, "g5x_offset_u", &g5xoffset[6])) return NULL; + if(!get_attr(canon, "g5x_offset_v", &g5xoffset[7])) return NULL; + if(!get_attr(canon, "g5x_offset_w", &g5xoffset[8])) return NULL; + if(!get_attr(canon, "g92_offset_x", &g92offset[0])) return NULL; + if(!get_attr(canon, "g92_offset_y", &g92offset[1])) return NULL; + if(!get_attr(canon, "g92_offset_z", &g92offset[2])) return NULL; + if(!get_attr(canon, "g92_offset_a", &g92offset[3])) return NULL; + if(!get_attr(canon, "g92_offset_b", &g92offset[4])) return NULL; + if(!get_attr(canon, "g92_offset_c", &g92offset[5])) return NULL; + if(!get_attr(canon, "g92_offset_u", &g92offset[6])) return NULL; + if(!get_attr(canon, "g92_offset_v", &g92offset[7])) return NULL; + if(!get_attr(canon, "g92_offset_w", &g92offset[8])) return NULL; + */ + + // numbering of axes, depending on plane + if(plane == 1) { // XY-plane + X=0; Y=1; Z=2; + } else if(plane == 3) { // YZ-plane + X=2; Y=0; Z=1; + } else { + X=1; Y=2; Z=0; // XZ-plane + } + n[X] = x1; // end-point, first-coord + n[Y] = y1; // end-point, second-coord + n[Z] = z1; // end-point, third-coord, i.e helix translation + + n[3] = a; + n[4] = b; + n[5] = c; + + n[6] = u; + n[7] = v; + n[8] = w; + + for(int ax=0; ax<9; ax++) + o[ax] -= g5xoffset[ax]; // offset + + unrotate(o[0], o[1], rotation_cos, rotation_sin); // only rotates in XY (?) + + for(int ax=0; ax<9; ax++) + o[ax] -= g92offset[ax]; // offset + + double theta1 = atan2( o[Y]-cy, o[X]-cx); // vector from center to start + + double theta2 = atan2( n[Y]-cy, n[X]-cx); // vector from center to end + + // "unwind" theta2 ? + if(rot < 0) { // rot = -1 + while(theta2 - theta1 > -CIRCLE_FUZZ) + theta2 -= 2 * M_PI; + } else { // rot = 1 + while(theta2 - theta1 < CIRCLE_FUZZ) + theta2 += 2 * M_PI; + } + + // if multi-turn, add the right number of full circles + if(rot < -1) + theta2 += 2 * M_PI * (rot+1); + if(rot > 1) + theta2 += 2 * M_PI * (rot-1); + + // number of steps + int steps = std::max( 3, int(max_segments * fabs(theta1 - theta2) / M_PI) ); // max_segments per PI of rotation + double rsteps = 1. / steps; + double dtheta = theta2 - theta1; // the rotation angle for this helix + // n is endpoint + // o is startpoint + + // d is diff. x,y,z,a,b,c,u,v,w + // 0 1 2 3 4 5 6 7 + double d[9] = {0, 0, 0, n[4]-o[4], n[5]-o[5], n[6]-o[6], n[7]-o[7], n[8]-o[8]}; + d[Z] = n[Z] - o[Z]; // helix-translation diff + + double tx = o[X] - cx; // center to start + double ty = o[Y] - cy; // center to start + double dc = cos(dtheta*rsteps); + double ds = sin(dtheta*rsteps); + + PyObject *segs = PyList_New(steps); // list of output segments + // generate segments: + for(int i=0; i +#include +#include +#include + +#include "point.hpp" +#include "canonMotion.hpp" +#include "canonLine.hpp" +#include "machineStatus.hpp" + +namespace g2m { + +/** +\class helicalMotion +\brief For the canonical command ARC_FEED. +This class handles both planar arcs and helical arcs. Inherits from canonMotion. +*/ + +class helicalMotion: protected canonMotion { + friend canonLine* canonLine::canonLineFactory(std::string l, machineStatus s); + + public: + /// create helical motion + helicalMotion(std::string canonL, machineStatus prevStatus); + MOTION_TYPE getMotionType() {return HELICAL;}; + /// return interpolated point along helix, a distance s from the start + Point point(double s); +#ifdef MULTI_AXIS + Point angle(double s); +#endif + /// return the length of this helix move + double length(); + + private: + void rotate(double &x, double &y, double c, double s); + +// DATA, this corresponds to the "tokens" on the ARC_FEED canon-line + double x1,y1,z1; // endpoint for this move + double a,b,c; // abc axis endpoints + double rot; // rotation for this move + double cx,cy; // center-point for this move + +// these are the parameters calculated from the canon-params x1,y1,z1,a,b,c,rot,cx,cy + unsigned int X, Y, Z; // for shuffling around coordinate-indexes + double d[6]; // 6-axis delta for this move, applies to linear interpolation + double o[6]; // o=origin/start-point + double dtheta; // change in angle for this move + double tx,ty; // vector from start to center + double radius; +}; + +} // end namespace + +#endif //HELICALMOTION_HH diff --git a/g2m/linearMotion.cpp b/g2m/linearMotion.cpp new file mode 100644 index 0000000..fcc1038 --- /dev/null +++ b/g2m/linearMotion.cpp @@ -0,0 +1,103 @@ +/*************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include "calc_tolerance.hpp" + +#include "linearMotion.hpp" + +#include +#include + +#include "machineStatus.hpp" +#include "canonMotion.hpp" +#include "canonLine.hpp" + +namespace g2m { + +linearMotion::linearMotion(std::string canonL, machineStatus prevStatus): canonMotion(canonL,prevStatus) { + status.setMotionType(getMotionType()); + status.setEndPose(getPoseFromCmd()); + //Point start, end; + start = status.getStartPose().loc + status.getOrigin().loc; + end = status.getEndPose().loc + status.getOrigin().loc; +#ifdef MULTI_AXIS + //Point startDir, endDir; +// startDir = (status.getStartPose().dir + status.getOrigin().dir) * (SIGN * M_PI/180.0); + startDir.x = (status.getStartPose().dir.x + status.getOrigin().dir.x) * (SIGN_A * M_PI/180.0); + startDir.y = (status.getStartPose().dir.y + status.getOrigin().dir.y) * (SIGN_B * M_PI/180.0); + startDir.z = (status.getStartPose().dir.z + status.getOrigin().dir.z) * (SIGN_C * M_PI/180.0); +// endDir = (status.getEndPose().dir + status.getOrigin().dir) * (SIGN * M_PI/180.0); + endDir.x = (status.getEndPose().dir.x + status.getOrigin().dir.x) * (SIGN_A * M_PI/180.0); + endDir.y = (status.getEndPose().dir.y + status.getOrigin().dir.y) * (SIGN_B * M_PI/180.0); + endDir.z = (status.getEndPose().dir.z + status.getOrigin().dir.z) * (SIGN_C * M_PI/180.0); +#endif +} + +Point linearMotion::point(double s) { + if ( length() == 0.0 ) { + return start; + } else { + double t = s/this->length(); + //if ( !(t >= 0.0) || !(t <= 1.0 + CALC_TOLERANCE) ) + // std::cerr << "linearMotion::point() ERROR at s= " << s << " length= " << length() << " t evaluates to t= " << t << "\n"; +// assert( t >= 0.0); assert( t <= 1.0 + CALC_TOLERANCE ); + return start + (end-start)*t; + } +} + +double linearMotion::length() { +#ifdef MULTI_AXIS + double llinear = start.Distance(end); + double lsdir = start.Distance(Point(0.0, 0.0, 0.0)); + double ledir = end.Distance(Point(0.0, 0.0, 0.0)); + double langle = startDir.Distance(endDir); + + langle = ((lsdir > ledir) ? lsdir : ledir) * langle; + return llinear > langle ? llinear : langle; +#else + return start.Distance(end); +#endif +} + +#ifdef MULTI_AXIS +Point linearMotion::angle(double s) { + if ( length() == 0.0 ) { + return startDir; + } else { + double t = s/this->length(); + if ( !(t >= 0.0) || !(t <= 1.0 + CALC_TOLERANCE) ) + std::cout << "linearMotion::angle() ERROR at s= " << s << " length= " << length() << " t evaluates to t= " << t << "\n"; + assert( t >= 0.0); assert( t <= 1.0 + CALC_TOLERANCE ); + return startDir + (endDir-startDir)*t; + } +} +#endif + +//need to return RAPID for rapids... +MOTION_TYPE linearMotion::getMotionType() { + bool traverse = cmdMatch("STRAIGHT_TRAVERSE"); + if (traverse) { + return TRAVERSE; + } else { + return STRAIGHT_FEED; + } +} + +} // end namespace diff --git a/g2m/linearMotion.hpp b/g2m/linearMotion.hpp new file mode 100644 index 0000000..d5105ee --- /dev/null +++ b/g2m/linearMotion.hpp @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LINEARMOTION_HH +#define LINEARMOTION_HH + +#include +#include +#include +#include + +#include "canonMotion.hpp" +#include "machineStatus.hpp" + +namespace g2m { + +/** +\class linearMotion +\brief For the canonical commands STRAIGHT_FEED and STRAIGHT_TRAVERSE. +This class inherits from canonMotion. +*/ + +class linearMotion: protected canonMotion { + friend canonLine* canonLine::canonLineFactory(std::string l, machineStatus s); + public: + /// create linear motion + linearMotion(std::string canonL, machineStatus prevStatus); + MOTION_TYPE getMotionType(); + //std::vector points(); // points sampled along the motion + /// return interpolated point along this move, a distance s from the start of the move + Point point(double s); + // std::cout << " linear feed: " << start.str() << " to " << end.str() << "\n"; + Point end; +#ifdef MULTI_AXIS + Point angle(double s); +#endif + /// return length of this move + double length(); +}; + +} // end namespace + +#endif //LINEARMOTION_HH diff --git a/g2m/machineStatus.cpp b/g2m/machineStatus.cpp new file mode 100644 index 0000000..cbc229a --- /dev/null +++ b/g2m/machineStatus.cpp @@ -0,0 +1,129 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include + +#include "machineStatus.hpp" + +namespace g2m { + +/// copy-constructor +machineStatus::machineStatus(const machineStatus& oldStatus) { + spindleStat = oldStatus.spindleStat; + F = oldStatus.F; + S = oldStatus.S; + coolant = oldStatus.coolant; + plane = oldStatus.plane; + origin = oldStatus.origin; + endPose = startPose = oldStatus.endPose; + myTool = oldStatus.myTool; + endDir = Point(0,0,-1); + prevEndDir = oldStatus.endDir; + first = oldStatus.first; + motionType = NOT_DEFINED; + /// lastMotionWasTraverse gets copied from the previous machine status, + /// and only gets changed if the prev status was motion at feedrate + /// (this way, motionless cmds don't mess things up) + lastMotionWasTraverse = oldStatus.lastMotionWasTraverse; + if ( oldStatus.motionType == STRAIGHT_FEED || oldStatus.motionType == HELICAL) { + lastMotionWasTraverse = false; + } +} + +/** +This constructor is only to be used when initializing the simulation; it would not be useful elsewhere. +\param initial is the initial pose of the machine, as determined by the interp from the variable file. +\sa machineStatus(machineStatus const& oldStatus) +*/ +machineStatus::machineStatus(Pose initial) { + clearAll(); + startPose = endPose = initial; + first = true; + setTool(0); +} + +machineStatus::machineStatus(Pose initial, Pose userOrigin) { + clearAll(); + startPose = endPose = initial; + origin = userOrigin; + first = true; + setTool(0); +} + +/// reset machineStatus to reasonable defaults +void machineStatus::clearAll() { + F=S=0.0; + plane = CANON_PLANE_XY; + origin = Pose( Point(0,0,0), Point(0,0,0)); + coolant.flood = false; + coolant.mist = false; + coolant.spindle = false; + endPose = startPose = Pose( Point(0,0,0), Point(0,0,1)); + endDir = prevEndDir = Point(0,0,-1); + spindleStat = OFF; + myTool = -1; + motionType = NOT_DEFINED; + lastMotionWasTraverse = false; +} + +///sets motion type, and checks whether this is the second (or later) motion command. +void machineStatus::setMotionType(MOTION_TYPE m) { + motionType = m; + if (motionType == NOT_DEFINED) { + std::cout << "motion type undef!! \n"; + } else if (motionType == TRAVERSE) { + lastMotionWasTraverse = true; + } + static int count = 0; + if ((first) && ((m == STRAIGHT_FEED) || (m == TRAVERSE) || (m == HELICAL)) ) { + if (count == 0) + count++; + else + first = false; + } +} + + +/// setEndPose +void machineStatus::setEndPose( Point p) { +#ifdef MULTI_AXIS + endPose = Pose( p, Point(0,0,0) ); +#else + endPose = Pose( p, Point(0,0,1) ); +#endif +} + +/// setEndPose +void machineStatus::setEndPose( Pose newPose) { + endPose = newPose; +} + +/// set the current tool index +void machineStatus::setTool(int n) { + //std::cout << "adding tool " << n << ".\n"; + myTool = n; + //canon::addTool(n); +} + + +} + + diff --git a/g2m/machineStatus.hpp b/g2m/machineStatus.hpp new file mode 100644 index 0000000..116e4ec --- /dev/null +++ b/g2m/machineStatus.hpp @@ -0,0 +1,151 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef MACHINESTATUS_HH +#define MACHINESTATUS_HH + +#include +#include //to fix "error: INT_MIN was not declared in this scope" +#include "point.hpp" + +namespace g2m { + +/// the current plane, XY, YZ, or XZ +enum CANON_PLANE { CANON_PLANE_XY, CANON_PLANE_YZ, CANON_PLANE_XZ }; +/// the status of the spindle +enum SPINDLE_STATUS { OFF = 0x100, CW = 0x200, CCW = 0x400, BRAKE = 0x800 }; +/// motion type +enum MOTION_TYPE { NOT_DEFINED = 0x0, MOTIONLESS = 0x1, HELICAL = 0x2, STRAIGHT_FEED = 0x4, TRAVERSE = 0x8 }; + + +/// coolant-status +struct coolantStruct { + /// is flood on? + bool flood; + /// is mist on? + bool mist; + /// is the spindle on? + bool spindle; +}; + +/** +\class machineStatus +\brief This class contains the machine's state for one canonical command. +The information stored includes the +* coolant state, spindle speed and direction, feedrate, start and end pose, tool in use + +Important: 'pose' refers to how the machine's axes are positioned, +* while 'direction' refers to the direction of motion +*/ +class machineStatus { + public: + machineStatus(machineStatus const& oldStatus); + machineStatus(Pose initial); + machineStatus(Pose initial, Pose userOrigin); + void setMotionType(MOTION_TYPE m); + void setEndPose(Pose newPose); + /// set endPose + void setEndPose(Point p); + /// set current feedrate + void setFeed(const double f) { F = f; }; + /// set spindle speed + void setSpindleSpeed(const double s) { S = s; }; + /// set spindle status + void setSpindleStatus(const SPINDLE_STATUS s) { spindleStat = s; }; + /// set coolant status + void setCoolant(coolantStruct c) { coolant = c; }; + /// set the current plane + void setPlane(CANON_PLANE p) { plane = p; }; + /// set the current origin + void setOrigin(Pose newOrigin) { origin = newOrigin; }; + /// return the current feedrate + double getFeed() const { return F; }; + /// return spindle speed + double getSpindleSpeed() const { return S; }; + /// return the spindle-status structure + SPINDLE_STATUS getSpindleStatus() const { return spindleStat; }; + /// return the coolant structure + const coolantStruct getCoolant() { return coolant; }; + /// return startPose + const Pose getStartPose() { return startPose; }; + /// return endPose + const Pose getEndPose() { return endPose; }; + /// return the current plane + CANON_PLANE getPlane() const { return plane; }; + /// return the current origin + Pose getOrigin() const { return origin; }; + /// set startDir + void setStartDir( Point d) { startDir = d; }; + /// return startDir + const Point getStartDir() const { return startDir; }; + /// set endDir + void setEndDir( Point d) { endDir = d; }; + /// return endDir + const Point getEndDir() const { return endDir; }; + /// return prevEndDir + const Point getPrevEndDir() const { return prevEndDir; }; + void clearAll(void); + /// return first + bool isFirst() { return first; }; + /// set the tool index + void setTool(int n); //n is the ID of the tool to be used. + /// return the current tool index + int getTool() const { return myTool; }; + /// return the current spindle status & motion type + int getSpindleMotionStatus() const { return (spindleStat | motionType); } + + protected: + /// machine Pose at start of this move + Pose startPose; + /// machine Pose at end of this move + Pose endPose; + /// feed-rate + double F; + /// spindle speed + double S; + /// coolant status + coolantStruct coolant; + /// the direction in which the current move starts + Point startDir; + /// the direction in which the current move ends + Point endDir; + /// endDir of the previous move + Point prevEndDir; + /// flag indicating very first move of g-code program(?) + bool first; + /// misc flag(?) + bool lastMotionWasTraverse; + /// index of current tool + int myTool; + /// the current motion type + MOTION_TYPE motionType; + /// the status of the spindle + SPINDLE_STATUS spindleStat; + /// the current plane (used e.g. for G2 and G3 moves), either XY, XZ, or YZ + CANON_PLANE plane; + /// the current origin + Pose origin; + + private: + machineStatus(); //prevent use of this ctor by making it private +}; + +} // end namespace + +#endif //MACHINESTATUS_HH diff --git a/g2m/nanotimer.cpp b/g2m/nanotimer.cpp new file mode 100644 index 0000000..87d55a6 --- /dev/null +++ b/g2m/nanotimer.cpp @@ -0,0 +1,82 @@ +// adapted from http://allmybrain.com/2008/06/10/timing-cc-code-on-linux/ + +/************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +**************************************************************************/ + +#include +#include + +#include "nanotimer.hpp" + +//clock_gettime requires librt +//CLOCK_MONOTONIC_RAW requires kernel 2.6.28 and libc6 >> 2.11.2 +//with earlier kernels use CLOCK_MONOTONIC or CLOCK_REALTIME + +namespace g2m { + +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + + + +void nanotimer::start() { + clock_gettime(CLOCK_MONOTONIC_RAW, &begin); +} + +long nanotimer::getElapsed(){ + timespec now,delta; + clock_gettime(CLOCK_MONOTONIC_RAW, &now); + delta.tv_sec = now.tv_sec - begin.tv_sec; + delta.tv_nsec = now.tv_nsec - begin.tv_nsec; + return delta.tv_sec*1000000000 + delta.tv_nsec; +} + +double nanotimer::getElapsedS(){ + timespec now,delta; + clock_gettime(CLOCK_MONOTONIC_RAW, &now); + delta.tv_sec = now.tv_sec - begin.tv_sec; + delta.tv_nsec = now.tv_nsec - begin.tv_nsec; + return delta.tv_sec + delta.tv_nsec/1000000000.0; +} + +QString nanotimer::humanreadable(double s) { + QString out; + if (s > 60) { + int m; + m = s/60; + s = s-(double)(m*60); + out = QString::number(m) + QString("m, "); + } + if (s > .5) { + out += QString::number(s); + out += QString(" s"); + } else if (s> 0.0005) { + out = QString::number(s*1000); + out += QString(" ms"); + } else { + out = QString::number(s*1000000); + out += QString(" us"); + } + return out; +} + + +} // end namespace diff --git a/g2m/nanotimer.hpp b/g2m/nanotimer.hpp new file mode 100644 index 0000000..fa2adbd --- /dev/null +++ b/g2m/nanotimer.hpp @@ -0,0 +1,47 @@ +// adapted from http://allmybrain.com/2008/06/10/timing-cc-code-on-linux/ +/************************************************************************** +* Copyright (C) 2010 by Mark Pictor * +* mpictor@gmail.com * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +**************************************************************************/ +#ifndef NANOTIMER_HH +#define NANOTIMER_HH + +#include +#include + +namespace g2m { + +/// a timing class for benchmarking and debugging. +class nanotimer { + private: + /// time-stamp when start() was called + timespec begin; + public: + nanotimer() {} + /// start the timer() + void start(); + /// return nanoseconds since start() + long getElapsed(); + /// return seconds since start() + double getElapsedS(); + /// return a QString with seconds, milliseconds, microseconds + static QString humanreadable(double s); +}; + +} +#endif //NANOTIMER_HH diff --git a/g2m/point.hpp b/g2m/point.hpp new file mode 100644 index 0000000..d4c16ef --- /dev/null +++ b/g2m/point.hpp @@ -0,0 +1,94 @@ + +#include +#include + +#ifndef POINT_HPP +#define POINT_HPP + +//#include + +namespace g2m { + +/// a point in 3D space +struct Point { + /// Create point at (0,0,0) + Point():x(0),y(0),z(0) {} + /// Create point at given coordinates + Point(double a, double b, double c):x(a),y(b),z(c) {} + /// copy-constructor + Point(const Point& other): x(other.x),y(other.y),z(other.z) {} + /// distance to given other Point + double Distance( Point other ) { + return sqrt( (other.x-x)*(other.x-x) + (other.y-y)*(other.y-y) + (other.z-z)*(other.z-z) ); + } + /// string representation + std::string str() const { + std::ostringstream o; + o << "(" << x << ", " << y << ", " << z << ")"; + return o.str(); + } + /// multiply Point with scalar + Point& operator*=(const double &a) { + x*=a; + y*=a; + z*=a; + return *this; + } + /// multiply Point with scalar + Point operator*(const double &a) const { + return Point(*this) *= a; + } + /// vector addition + Point& operator+=( const Point& p) { + x+=p.x; + y+=p.y; + z+=p.z; + return *this; + } + + /// vector addition + const Point operator+( const Point &p) const { + return Point(*this) += p; + } + + /// vector subtraction + Point& operator-=( const Point& p) { + x-=p.x; + y-=p.y; + z-=p.z; + return *this; + } + /// vector subtraction + const Point operator-( const Point &p) const { + return Point(*this) -= p; + } + +// DATA + /// x-coordinate + double x; + /// y-coordinate + double y; + /// z-coordinate + double z; +}; + +/// a pose is a complete 6-dimensional description of the position and rotation +/// of an object in 3D space (e.g. a tool). This includes the position of the origin +/// of the tool (loc) and the direction of the tool axis (dir) +struct Pose { + Pose() {} + /// Create Pose with given location and direction + /// \param a location + /// \param b direction + Pose( Point a, Point b ) { + loc = a; + dir = b; + } + /// location + Point loc; + /// direction -> angle + Point dir; +}; + +} // end namespace +#endif diff --git a/icons/qgcoder.png b/icons/qgcoder.png new file mode 100644 index 0000000000000000000000000000000000000000..db773e88895afe6b44d849e6d9371f04d7480353 GIT binary patch literal 11521 zcmeHsby$?$*7wjLA|(wnG?K%R0}P0SAl=do!_eK`-Gb67AR^rkNTY&)s7NU#jf6Bv zem6ePdCqgb_x6|qkL?wKp>y5TUkb4tY{*+EA$Qi zP=1mnx04>&Y-q;M_{vntiyf6g$18)emqQ;c1eCxeq>7Pe$(=?gbkf4M#JY_wpA47E zlEn9xO5RP31k7qzj-0(y_v;LHhX>?aB}F2A13!K{Gh&<=6&>vpf~85Td^tV~KitAA z?npuhi)scj#MShVjQBs>&3~~pfwvCt4shgd{&bjZ^yt`Al96t!W^UfODY$Ku@v=tl zC;stW*j(zvrS>Psm~mGt8tfcfz9TnPb4t@M^AkeOdDIG|!zr@(n=U;*@}o8u zc>)Tmvgc&qd&@W#yelvzR_Zt_44CD(+WpWJ+_RLkk^2oVsUx=IDm%|y<7n&fwZ|+y!7#Bd)z8TBlbH#3jMGm$-RwVd(qxa<5L#S6G|&Rqxb&GQ@27_ z@0Pm%VHrIczw+37_gpuaZO~8wR+=_=QPQ4%j!r+A_UdEEZ}Z#^Ad_{ss9$<@@`F3z zkkHEX#@#oUG~DA)8}M>aJ}c*W2us!}i5Gj=CyR#{$*WB%!n>UQu{SZ>OtpEGt}Md# zSX&_)VjXsnbzk*+F|V3xGj;kw2FmhU%9`%uPw*`{WYS7kwf32@lvo)lv+VCCP9JQx ztZ--N7a2e^uqK!Up-eitsX3bL121*ElE-gFJ-=Pf{8_GaFlFjtg{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analyzer.cpp @@ -0,0 +1,105 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include +#include + +#include + +#include "lex_analyzer.hpp" + +namespace lex_analyzer { + +/** converts tokens[n] to double +\param n this is the token to convert +\returns token n, converted to double +*/ +double LexAnalyzer::token2d(uint n) { + if (tokens.size() < n+1 ) + return NAN; + char* end; + double d = strtod( tokens[n].c_str(), &end ); +// assert ( *end == 0 ); + return d; +} + +/** converts tokens[n] to int +\param n this is the token to convert +\param offset skip this many chars at the beginning of the token +\returns token n, converted to integer +*/ +int LexAnalyzer::token2i(unsigned int n, unsigned int offset) { + if (tokens.size() < n+1 ) + return INT_MIN; + char * end; + int i = strtol( &tokens[n].c_str()[offset], &end, 10 ); + //assert ( *end != 0 ); + return i; +} + +/// return the n:th token +std::string LexAnalyzer::getToken(unsigned int n) { + if (n < tokens.size()) { + return tokens[n]; + } else { + std::cout << "malformed input line " << myLine << std::endl; + std::string s = ""; + return s; + } +} + +///return true if the n:th token matches 'm' +bool LexAnalyzer::wordMatch(std::string m, unsigned int n) { + if (tokens.size() < n+1) + return false; + return (m.compare(tokens[n]) == 0); //compare returns zero for a match +} + +//from http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html +/** Splits a string using delimiters. +\param str the string to be split +\param tokenV a vector of strings, each of which is a piece of str +\param delimiters defaults to: both parenthesis, comma, space +\sa tokenize() +*/ +void LexAnalyzer::tokenize( std::string str, + std::vector& tokenV, + const std::string& delimiters ) { + // Skip delimiters at beginning. + std::string::size_type lastPos = str.find_first_not_of(delimiters, 0); + // Find first "non-delimiter". + std::string::size_type pos = str.find_first_of(delimiters, lastPos); + + while (std::string::npos != pos || std::string::npos != lastPos) + { + // Found a token, add it to the vector. + tokenV.push_back(str.substr(lastPos, pos - lastPos)); + // Skip delimiters. Note the "not_of" + lastPos = str.find_first_not_of(delimiters, pos); + // Find next "non-delimiter" + pos = str.find_first_of(delimiters, lastPos); + } +} + +} // end namespace + diff --git a/lex_analyzer.hpp b/lex_analyzer.hpp new file mode 100644 index 0000000..41b1ed3 --- /dev/null +++ b/lex_analyzer.hpp @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) 2010 by Mark Pictor * + * mpictor@gmail.com * + * modified by Kazuyasu Hamada 2015, k-hamada@gifu-u.ac.jp * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LEX_ANALIZER_HH +#define LEX_ANALIZER_HH + +#include +#include +#include +#include +#include +#include +#include + +namespace lex_analyzer { +/** +\class LexAnalyzer +\brief A canonLine object represents one canonical command. +Each gcode line produces one or more canonical commands. It can either be a +* motion command (one of LINEAR_TRAVERSE LINEAR_FEED ARC_FEED), or a motionless +* command (anything else) +You cannot create objects of this class - instead, create an object of a class +* that inherits from this class via canonLineFactory() +*/ +class LexAnalyzer { + + public: + LexAnalyzer(std::string line): myLine(line) { + tokenize(myLine, tokens); + } + /// return the line as a string + const std::string getLine() { return myLine; }; + /// return the n:th token + std::string getToken(unsigned int n); + + // keyword matching + bool wordMatch(std::string word, unsigned int n = 0); + // get double number + double token2d(unsigned int n); + // get integer number + int token2i(unsigned int n, unsigned int offset = 0); + + protected: + // tokenizer + void tokenize(std::string str, std::vector& tokenV, const std::string& delimiters = "(), \t"); + +// DATA + /// the line as a string + std::string myLine; + /// the tokens in this line, set after tokenizing myLine + std::vector tokens; +}; + +} // end namespace + +#endif //LEX_ANALIZER_HH diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..e25bc79 --- /dev/null +++ b/main.cpp @@ -0,0 +1,65 @@ +#include + +#include "mainwin.h" + +#define APP_VERSION QString("2016") +#define APP_NAME QString("gcoder") +#define APP_NAME_FULL QString("GCoder") +#define APP_ORGANIZATION QString("gcoder.koppi.github.com") + +int main(int argv, char **args) +{ + QSharedPointer app; + + // workaround for https://forum.qt.io/topic/53298/qcommandlineparser-to-select-gui-or-non-gui-mode + + // On Linux: enable printing of version and help without DISPLAY variable set + + bool runCore = false; + for (int i = 0; i < argv; i++) { + if (QString(args[i]) == "-h" || + QString(args[i]) == "--help" || + QString(args[i]) == "-v" || + QString(args[i]) == "--version" ) { + runCore = true; + break; + } + } + + if (runCore) { + app = QSharedPointer(new QCoreApplication(argv, args)); + } else { + app = QSharedPointer(new QApplication(argv, args)); + } + + // end workaround + + setlocale(LC_NUMERIC,"C"); + + //XXX app->setStyleSheet("QPlainTextEdit{ selection-background-color: darkblue } QWidget { font-size: 12pt; font-family: \"Courier\"; background-color: #00003B; color: #FFA700; font: bold }"); + + QCoreApplication::setOrganizationName(APP_ORGANIZATION); + QCoreApplication::setApplicationName(APP_NAME); + QCoreApplication::setApplicationVersion(APP_VERSION); + QCommandLineParser parser; + + parser.setApplicationDescription(QCoreApplication::applicationName()); + parser.addHelpOption(); + parser.addVersionOption(); + parser.addPositionalArgument("file", "The G-code file to open."); + + parser.process(*app); + + MainWindow *win; + + if (!parser.positionalArguments().isEmpty()) { + win = new MainWindow(NULL, !parser.positionalArguments().isEmpty(), parser.positionalArguments().first()); + } else { + win = new MainWindow(); + } + + win->show(); + + return app->exec(); +} + diff --git a/mainwin.cpp b/mainwin.cpp new file mode 100644 index 0000000..54174ef --- /dev/null +++ b/mainwin.cpp @@ -0,0 +1,418 @@ +#include "mainwin.h" +#include "ui_mainwin.h" + +#include +#include +#include +#include +#include +#include + +MainWindow::MainWindow(QWidget *parent, bool fileMode, QString fileName) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + bFileMode = fileMode; + + setAttribute(Qt::WA_QuitOnClose); + + ui->setupUi(this); + + settings = new QSettings(); + + view = new View(this); + + setCentralWidget(view); + + g2m = new g2m::g2m(); // g-code interpreter + + connect( this, SIGNAL( setGcodeFile(QString) ), g2m, SLOT( setFile(QString)) ); + connect( this, SIGNAL( setRS274(QString) ), g2m, SLOT( setInterp(QString)) ); + connect( this, SIGNAL( setToolTable(QString) ), g2m, SLOT( setToolTable(QString)) ); + connect( this, SIGNAL( interpret() ), g2m, SLOT( interpret_file() ) ); + + //connect( g2m, SIGNAL( debugMessage(QString) ), this, SLOT( debugMessage(QString) ) ); + //connect( g2m, SIGNAL( gcodeLineMessage(QString) ), this, SLOT( appendGcodeLine(QString) ) ); + //connect( g2m, SIGNAL( canonLineMessage(QString) ), this, SLOT( appendCanonLine(QString) ) ); + + connect( g2m, SIGNAL( signalCanonLine(canonLine*) ), view, SLOT( appendCanonLine(canonLine*) )); + connect( g2m, SIGNAL( signalNCend() ), view, SLOT( update() ) ); + connect( g2m, SIGNAL( signalError(QString) ), view, SLOT( update() ) ); + + connect( g2m, SIGNAL( signalError(QString) ), ui->stderror, SLOT( setPlainText(QString) ) ); + + connect(ui->gcode, SIGNAL(textChanged()), this, SLOT(changedGcode())); + + connect(ui->action_AutoZoom, SIGNAL(triggered()), this, SLOT(toggleAutoZoom())); + connect(ui->actionZoom_In, SIGNAL(triggered()), this, SLOT(zoomIn())); + connect(ui->actionZoom_out, SIGNAL(triggered()), this, SLOT(zoomOut())); + + //connect(ui->command, SIGNAL(keyPressed(QKeyEvent *)), view, SLOT(keyPressEvent(QKeyEvent *))); + + connect(ui->action_Issues, SIGNAL(triggered(bool)), this, SLOT(helpIssues())); + connect(ui->action_Chat, SIGNAL(triggered(bool)), this, SLOT(helpChat())); + + home_dir = QStandardPaths::locate(QStandardPaths::HomeLocation, QString(), QStandardPaths::LocateDirectory); + openFile = fileName; + + loadSettings(); + + setStyle(); + + if (bFileMode == false) { + connect(ui->command, SIGNAL(textChanged()), this, SLOT(changedCommand())); + QTimer::singleShot(0, this, SLOT(loadSettingsCommand())); + ui->dockWidget->setHidden(false); + ui->dockWidget_2->setHidden(false); + } else { + QTimer::singleShot(0, this, SLOT(loadGCodeFile())); + ui->dockWidget->setHidden(true); + ui->dockWidget_2->setHidden(true); + } +} + +MainWindow::~MainWindow() +{ + +} + +void MainWindow::loadGCodeFile() { + if(openFile.length()) + { + if(openInViewer(openFile) == 0) { + openInBrowser(openFile); + } + } +} + +void MainWindow::toggleAutoZoom() { + view->setAutoZoom(ui->action_AutoZoom->isChecked()); +} + +void MainWindow::showFullScreen() +{ + if( ui->action_showFullScreen->isChecked() ) + showMaximized(); + else + showNormal(); +} + +void MainWindow::zoomIn() { + fontSize += 1; + setStyle(); +} + +void MainWindow::zoomOut() { + fontSize -= 1; if (fontSize <1) fontSize = 1; + setStyle(); +} + +void MainWindow::setStyle() { + setStyleSheet(QString("QWidget { font-size: %1pt; font-family: \"Courier\"; background-color: #00003B; color: #FFA700; font: bold }").arg(fontSize)); +} + +void MainWindow::changedCommand() +{ +QString str; + + openFile = ""; + bFileMode = false; + connect(ui->gcode, SIGNAL(textChanged()), this, SLOT(changedGcode())); + str = "QGCoder :- "; + setWindowTitle(str); + parseCommand(); +} + +void MainWindow::changedGcode() { + + if(bFileMode) + return; + + if (ui->gcode->toPlainText().isEmpty()) + { + view->clear(); + ui->stderror->setPlainText(""); + return; + } + + QFile f(gcodefile); + if ( f.open( QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text) ) + { + QTextStream out(&f); + out << ui->gcode->toPlainText(); + f.close(); + + view->clear(); + + emit setRS274(rs274); + emit setToolTable(tooltable); + emit setGcodeFile(gcodefile); + + emit interpret(); + } +} + +void MainWindow::appendCanonLine(g2m::canonLine* l) { + view->appendCanonLine(l); +} + +void MainWindow::parseCommand() { + QProcess sh; + //sh.setProcessChannelMode(QProcess::MergedChannels); + sh.setProcessChannelMode(QProcess::SeparateChannels); + + QFile f( "/tmp/gcoder.sh" ); + if ( f.open( QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text) ) { + QTextStream out(&f); + out << ui->command->toPlainText(); + f.close(); + } + + if (!f.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ExeOwner|QFile::ReadGroup|QFile::ExeGroup|QFile::ReadOther|QFile::ExeOther)) { + qDebug("XXX"); + } + + sh.start("bash", QStringList() << "-c" << "timeout 1 /tmp/gcoder.sh"); + + if (!sh.waitForStarted()) { + sh.close(); + //sh.kill(); + sh.waitForFinished(-1); + return; // report error + } + + if (!sh.waitForFinished(-1)) { + // XXX http://stackoverflow.com/questions/10777147/terminate-an-ongoing-qprocess-that-is-running-inside-a-qthread + } + + ui->gcode->setPlainText(sh.readAllStandardOutput()); + ui->stderror->setPlainText(sh.readAllStandardError()); + + sh.close(); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////// + +void MainWindow::loadSettings() +{ + + settings->beginGroup("gui"); + + restoreGeometry(settings->value("geometry", saveGeometry() ).toByteArray()); + restoreState(settings->value("state", saveState() ).toByteArray()); + move(settings->value("pos", pos()).toPoint()); + resize(settings->value("size", size()).toSize()); + + if (settings->value("maximized", isMaximized() ).toBool()) + showMaximized(); + ui->action_showFullScreen->setChecked(settings->value("maximized", isMaximized() ).toBool()); + + view->setAutoZoom(settings->value("autoZoom", view->autoZoom()).toBool()); + ui->action_AutoZoom->setChecked(settings->value("autoZoom", view->autoZoom()).toBool()); + + fontSize = settings->value("fontsize", 12).toInt(); + + rs274 = settings->value("rs274", "").toString(); + tooltable = settings->value("tooltable", "").toString(); + gcodefile = settings->value("gcodefile", "").toString(); + + settings->endGroup(); + // if any of these paths is not known, cannot work properly, so insist + if(rs274.isEmpty() || tooltable.isEmpty() || gcodefile.isEmpty()) + { + int ret = 1; + while(ret) + ret = onSettings(); + } +} + +void MainWindow::loadSettingsCommand() { + QString command("/bin/echo -en 'Hello, World!' | hf2gcode"); + settings->beginGroup("gui"); + ui->command->document()->setPlainText(settings->value("command", command).toString()); + settings->endGroup(); +} + +void MainWindow::saveSettings() { + settings->beginGroup("gui"); + + settings->setValue("geometry", saveGeometry()); + settings->setValue("state", saveState()); + settings->setValue("maximized", isMaximized()); + + if ( !isMaximized() ) { + settings->setValue("pos", pos()); + settings->setValue("size", size()); + } + + settings->setValue("command", ui->command->toPlainText()); + + settings->setValue("autoZoom", ui->action_AutoZoom->isChecked()); + settings->setValue("fontsize", fontSize); + + settings->setValue("rs274", rs274); + settings->setValue("tooltable", tooltable); + settings->setValue("gcodefile", gcodefile); + + settings->endGroup(); +} + +///////////////////////////////////////////////////////////////////////////////////////////////// + +void MainWindow::closeEvent(QCloseEvent * event) +{ +// qDebug() << "MainWindow::closeEvent"; + saveSettings(); +// ui.viewer->close(); + + // we are leaving it to QMainwindow to decide if to accept +// event->accept(); + + QMainWindow::closeEvent(event); +} + +//////////////////////////////////////////////////////////////////////////////////////////////// + +void MainWindow::onOpenFile() +{ +QString filename; +QString path = home_dir + "machinekit"; + + filename = QFileDialog::getOpenFileName(this, tr("Open G-code"), path, tr("GCode Files (*.ngc *.nc);; All files (*.*)")); + if(filename.length()) + { + if(openInViewer(filename) == 0) + openInBrowser(filename); + } +} + +int MainWindow::openInViewer(QString filename) +{ +QFile fin(filename); +QFile fout(gcodefile); +QString str; + + if (fin.open(QFile::ReadOnly | QFile::Text) && ( fout.open( QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text) ) ) + { + QTextStream ints(&fin); + QTextStream outts(&fout); + while(!ints.atEnd()) + outts << ints.readLine() << "\n"; + fin.close(); + fout.close(); + + view->clear(); + bFileMode = true; + + emit setRS274(rs274); + emit setToolTable(tooltable); + emit setGcodeFile(gcodefile); + + emit interpret(); + return 0; + } + else + return -1; +} + +void MainWindow::openInBrowser(QString filename) +{ +QFile file(filename); +QString str; + + if (file.open(QFile::ReadOnly | QFile::Text)) + { + str = "Loading file " + filename; + ui->statusbar->showMessage(str, 5000); + ui->gcode->clear(); + + QTextStream ts(&file); + + while( !ts.atEnd()) + { + str = ts.readLine(); + ui->gcode->appendNewPlainText(str); + } + file.close(); + + str = "QGCoder :- " + filename; + setWindowTitle(str); + + // ui->gcode->highlightLine(1); + + openFile = filename; + bFileMode = true; + } + else + { + str = "Error loading file " + filename ; + ui->statusbar->showMessage(str, 5000); + } +} + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +void MainWindow::onSaveAs() +{ + QString fileName = QFileDialog::getSaveFileName(this, tr("Save G-code (As)"), openFile, tr("G-code Files (*.ngc *.nc);; All files (*.*)")); + saveInBrowser(fileName); +} + + + +int MainWindow::saveInBrowser(QString& filename) +{ +QFile file(filename); +QString str; + + if (file.open(QIODevice::ReadWrite | QIODevice::Text)) + { + QTextStream out(&file); + out << ui->gcode->toPlainText(); + file.close(); + + str = "QGCoder:- " + filename; + setWindowTitle(str); + return 0; + } + else + { + str = "Error saving file " + filename ; + ui->statusbar->showMessage(str, 5000); + return -1; + } +} +///////////////////////////////////////////////////////////////////////////////////////////////////// + +int MainWindow::onSettings() +{ + + SettingsDialog *dlg = new SettingsDialog(this, home_dir); + + dlg->setValues(rs274, tooltable, gcodefile); + + dlg->exec(); + + if(dlg->result()) + { + rs274 = dlg->rs274; + tooltable = dlg->tooltable; + gcodefile = dlg->gcodefile; + } + + if(rs274.isEmpty() || tooltable.isEmpty() || gcodefile.isEmpty()) + return 1; + else + return 0; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void MainWindow::helpIssues() { + QDesktopServices::openUrl(QUrl("https://github.com/QGCoder/qgcoder/issues")); +} + +void MainWindow::helpChat() { + QDesktopServices::openUrl(QUrl("https://gitter.im/QGCoder/qgcoder")); +} diff --git a/mainwin.h b/mainwin.h new file mode 100644 index 0000000..fcd0044 --- /dev/null +++ b/mainwin.h @@ -0,0 +1,90 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include + +#include + +#include "view.h" +#include "g2m.hpp" +#include "settings_dlg.h" + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0, bool fileMode = false, QString fileName = ""); + ~MainWindow(); + + void parseGcode(); + void parseCommand(); + +signals: + void setRS274(QString s); + void setToolTable(QString s); + void setGcodeFile(QString f); + void interpret(); + +public slots: + // load the last command string from the settings + // used during startup + virtual void loadSettingsCommand(); + virtual void loadGCodeFile(); + + virtual void changedGcode(); + virtual void changedCommand(); + + virtual void onOpenFile(); + virtual void onSaveAs(); + virtual int onSettings(); + + virtual void appendCanonLine(g2m::canonLine*); + + virtual void toggleAutoZoom(); + virtual void showFullScreen(); + virtual void zoomIn(); + virtual void zoomOut(); + + virtual void helpIssues(); + virtual void helpChat(); + +protected: + void loadSettings(); + void saveSettings(); + +private: // functions + int openInViewer(QString filename); + void openInBrowser(QString filename); + int saveInBrowser(QString& filename); + + void closeEvent(QCloseEvent *) Q_DECL_OVERRIDE; + + void setStyle(); + +private: // data + QString home_dir, openFile; + bool bFileMode = false; + + QString rs274; + QString tooltable; + QString gcodefile; + + Ui::MainWindow *ui; + + View *view; + + g2m::g2m *g2m; + + int fontSize; + + QSettings *settings; +}; + +#endif // MAINWINDOW_H diff --git a/mainwin.ui b/mainwin.ui new file mode 100644 index 0000000..3ac8b40 --- /dev/null +++ b/mainwin.ui @@ -0,0 +1,482 @@ + + + MainWindow + + + + 0 + 0 + 1146 + 626 + + + + + 0 + 0 + + + + qgcoder + + + + :/icons/qgcoder.png:/icons/qgcoder.png + + + QTabWidget::Rounded + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + 0 + 0 + 1146 + 22 + + + + + &File + + + + + + + + + + + &View + + + + + + + + + &Help + + + + + + + + + &Edit + + + + + + + + + + + + false + + + G-code + + + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + true + + + + 524287 + 524287 + + + + false + + + Bash + + + 8 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + echo "Hello, World!" | hf2gcode + + + + + + + + + toolBar + + + TopToolBarArea + + + false + + + + + + + + + + + + + Standard error + + + 8 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + .. + + + &Quit + + + Ctrl+Q + + + Qt::ApplicationShortcut + + + QAction::HighPriority + + + + + true + + + + .. + + + &Fullscreen + + + Switch fullscreen on/off. + + + F11 + + + Qt::ApplicationShortcut + + + + + &About + + + + + true + + + + .. + + + Auto zoom (fit best) + + + Automatic zoom (fit best) on/off. + + + F11 + + + + + &Issues + + + + + &Wiki + + + + + &Chat + + + + + + .. + + + Open G-code file... + + + Open G-code (*.ngc) file. + + + Ctrl+O + + + + + &Settings.. + + + F9 + + + + + + .. + + + &Save "%1" &As... + + + Save G-code file as.. + + + Ctrl+Shift+S + + + + + + .. + + + &Save "%1" + + + Save G-code. + + + Ctrl+S + + + + + Zoom in + + + Ctrl++ + + + + + Zoom out + + + Ctrl+- + + + + + + QGCodeEditor + QPlainTextEdit +
QGCodeEditor/QGCodeEditor.h
+
+
+ + + + + + action_Quit + triggered() + MainWindow + close() + + + -1 + -1 + + + 399 + 299 + + + + + action_showFullScreen + triggered() + MainWindow + showFullScreen() + + + -1 + -1 + + + 399 + 299 + + + + + action_Open + triggered() + MainWindow + onOpenFile() + + + -1 + -1 + + + 285 + 299 + + + + + action_Settings + triggered() + MainWindow + onSettings() + + + -1 + -1 + + + 285 + 299 + + + + + action_Save_As + triggered() + MainWindow + onSaveAs() + + + -1 + -1 + + + 285 + 299 + + + + + + onOpenFile() + onSettings() + onSaveAs() + +
diff --git a/qgcoder.desktop b/qgcoder.desktop new file mode 100644 index 0000000..86df049 --- /dev/null +++ b/qgcoder.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=qgcoder +GenericName=qgcoder +Comment=G-code editor with 3D preview +Icon=/usr/share/icons/hicolor/256x256/apps/qgcoder.png + +Type=Application +Categories=Engineering; +MimeType=text/x.gcode +Exec=qgcoder %f +Terminal=false diff --git a/qgcoder.pro b/qgcoder.pro new file mode 100644 index 0000000..6380f66 --- /dev/null +++ b/qgcoder.pro @@ -0,0 +1,101 @@ +TARGET = qgcoder + +TEMPLATE = app + +CONFIG += link_pkgconfig + +QMAKE_CXXFLAGS_RELEASE += -O2 +QMAKE_CXXFLAGS_DEBUG += -O0 + +QMAKE_CXXFLAGS += -Wno-deprecated-copy + +MOC_DIR = .moc +#OBJECTS_DIR = .obj +UI_DIR = .ui +RCC_DIR = .rcc + +CONFIG += qgcodeeditor +CONFIG += qglviewer + +INCLUDEPATH += g2m +INCLUDEPATH += /usr/include/QGCodeEditor + +HEADERS = \ + mainwin.h \ + view.h \ + g2m/canonLine.hpp g2m/canonMotionless.hpp g2m/gplayer.hpp g2m/linearMotion.hpp g2m/nanotimer.hpp \ + g2m/canonMotion.hpp g2m/g2m.hpp g2m/helicalMotion.hpp g2m/machineStatus.hpp g2m/point.hpp \ + lex_analyzer.hpp settings_dlg.h + + +SOURCES = \ + main.cpp \ + mainwin.cpp \ + view.cpp \ + g2m/canonLine.cpp g2m/canonMotionless.cpp g2m/helicalMotion.cpp g2m/machineStatus.cpp \ + g2m/canonMotion.cpp g2m/g2m.cpp g2m/linearMotion.cpp g2m/nanotimer.cpp \ + lex_analyzer.cpp settings_dlg.cpp + +target.path = /usr/bin + +INSTALLS += target + +FORMS += \ + mainwin.ui settings.ui + +link_pkgconfig { +# message("Using pkg-config "$$system(pkg-config --version)".") + + LSB_RELEASE_ID = $$system(. /etc/os-release; echo "$NAME") + LSB_RELEASE_REL = $$system(. /etc/os-release; echo "$VERSION_ID") + + message(This is $$LSB_RELEASE_ID $$LSB_RELEASE_REL) + + contains(LSB_RELEASE_ID, Ubuntu): { + contains(LSB_RELEASE_REL, 21.04) : { + LIBS += -lQGLViewer-qt5 -lGLEW -lGLU -lGL -lglut + } + contains(LSB_RELEASE_REL, 22.04) : { + LIBS += -lQGLViewer-qt5 -lGLEW -lGLU -lGL -lglut + } + contains(LSB_RELEASE_REL, 22.10) : { + LIBS += -lQGLViewer-qt5 -lGLEW -lGLU -lGL -lglut + } + contains(LSB_RELEASE_REL, 24.04) : { + LIBS += -lQGLViewer-qt5 -lGLEW -lGLU -lGL -lglut + } + } else { + LIBS += -lQGLViewer-qt5 -lGLEW -lGLU -lGL -lglut + } +} + +CONFIG *= debug_and_release +CONFIG *= qt opengl +CONFIG += warn_on +CONFIG += thread + +QT *= opengl xml gui core + +OTHER_FILES += README.md + +unix { + qgcoder-deskop.path = /usr/share/applications + qgcoder-deskop.files = qgcoder.desktop + qgcoder-icon.path = /usr/share/icons/hicolor/256x256/apps + qgcoder-icon.files = icons/qgcoder.png + + INSTALLS += qgcoder-deskop + INSTALLS += qgcoder-icon +} + +DIRS_DC = object_script.* .ui .moc .rcc .obj *.pro.user $$TARGET + +unix:QMAKE_DISTCLEAN += -r $$DIRS_DC +win32:QMAKE_DISTCLEAN += /s /f /q $$DIRS_DC && rd /s /q $$DIRS_DC + +DISTFILES += \ + icons/qgcoder.png + +RESOURCES += \ + res.qrc + diff --git a/res.qrc b/res.qrc new file mode 100644 index 0000000..24246f3 --- /dev/null +++ b/res.qrc @@ -0,0 +1,5 @@ + + + icons/qgcoder.png + + diff --git a/settings.ui b/settings.ui new file mode 100644 index 0000000..9c3a935 --- /dev/null +++ b/settings.ui @@ -0,0 +1,210 @@ + + + Settings + + + + 0 + 0 + 607 + 282 + + + + Settings + + + + + + rs274ngc interpreter: + + + + + + rs274 will be in the /bin dir +of your machinekit installation + + + + + + + Browse + + + + + + + + + + Tool table (*.tbl) file: + + + + + + A xxx.tbl file will be in your +machinekit machine config dir + + + + + + + Browse + + + + + + + + + + Temporary G-code file: + + + + + + Only change this if you wish to start with a specific file +Beware it could be overwritten. + + + /tmp/gcode.ngc + + + + + + + Browse + + + + + + + + + + Qt::Horizontal + + + + 269 + 20 + + + + + + + + Cancel + + + + + + + OK + + + + + + + + + pb_browse1 + clicked() + Settings + onFileBrowse1() + + + 362 + 50 + + + 389 + 80 + + + + + pb_browse2 + clicked() + Settings + onFileBrowse2() + + + 357 + 130 + + + 382 + 167 + + + + + pb_browse3 + clicked() + Settings + onFileBrowse3() + + + 352 + 210 + + + 389 + 237 + + + + + pushButton_2 + clicked() + Settings + onAccept() + + + 345 + 263 + + + 327 + 280 + + + + + pushButton + clicked() + Settings + reject() + + + 217 + 265 + + + 137 + 267 + + + + + + onFileBrowse1() + onFileBrowse2() + onFileBrowse3() + onAccept() + + diff --git a/settings_dlg.cpp b/settings_dlg.cpp new file mode 100644 index 0000000..38ef6ba --- /dev/null +++ b/settings_dlg.cpp @@ -0,0 +1,73 @@ +#include "settings_dlg.h" +#include + +SettingsDialog::SettingsDialog(QWidget *parent, QString& homedir) +:QDialog(parent) +{ +QString str; + + // build the dialog from ui + setupUi(this); + home_dir = homedir; + +} + +void SettingsDialog::setValues(QString& rs, QString& tbl, QString& gcode) +{ + le_path1->setText(rs274 = rs); + le_path2->setText(tooltable = tbl); + le_path3->setText(gcodefile = gcode); +} + +void SettingsDialog::onFileBrowse(int buttonNumber) +{ +QString pathStr; +QString filename; +QDir dir; + + if( buttonNumber == 1) + { + if(rs274.isEmpty()) + pathStr = "/usr/bin"; + else + pathStr = dir.absoluteFilePath(rs274); + } + else if(buttonNumber == 2) + { + if(tooltable.isEmpty()) + pathStr = home_dir + "machinekit/configs"; + else + pathStr = dir.absoluteFilePath(tooltable); + } + else + { + if(gcodefile.isEmpty()) + pathStr = "/tmp"; + else + pathStr = dir.absoluteFilePath(gcodefile); + } + + filename = QFileDialog::getOpenFileName(this, tr("Settings Paths"), pathStr, tr("All files (*)")); + if(filename.length()) + { + if( buttonNumber == 1) + le_path1->setText(filename); + else if(buttonNumber == 2) + le_path2->setText(filename); + else + le_path3->setText(filename); + } +} + +void SettingsDialog::onAccept() +{ + rs274 = le_path1->text(); + tooltable = le_path2->text(); + gcodefile = le_path3->text(); + + QDialog::accept(); +} + + + + diff --git a/settings_dlg.h b/settings_dlg.h new file mode 100644 index 0000000..539663f --- /dev/null +++ b/settings_dlg.h @@ -0,0 +1,39 @@ + +#ifndef SETTINGS_DLG_H +#define SETTINGS_DLG_H + +#include +#include +#include +#include +#include + +#include "ui_settings.h" + + +class SettingsDialog : public QDialog , private Ui_Settings +{ + Q_OBJECT +public: + + SettingsDialog(QWidget* parent, QString& homedir); + + void setValues(QString& rs, QString& tbl, QString& gcode); + QString rs274; + QString tooltable; + QString gcodefile; + +private: + void onFileBrowse(int buttonNumber); + QString home_dir; + +private slots: + virtual void onFileBrowse1() {onFileBrowse(1);} + virtual void onFileBrowse2() {onFileBrowse(2);} + virtual void onFileBrowse3() {onFileBrowse(3);} + + virtual void onAccept(); +}; + + +#endif diff --git a/tests/ngc-urandom.sh b/tests/ngc-urandom.sh new file mode 100755 index 0000000..06c5ace --- /dev/null +++ b/tests/ngc-urandom.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +N=$1; echo "F100"; cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | paste - - - | awk '{ print "G1 X"$1" Y"$2" Z"$3 }'|head -n $N; echo "M30" diff --git a/view.cpp b/view.cpp new file mode 100644 index 0000000..f6a5d9a --- /dev/null +++ b/view.cpp @@ -0,0 +1,330 @@ +#include "view.h" + +#include + +#ifdef WIN32 +#include +#endif + +#include + +#include +#include +#include + +#include "canonMotion.hpp" + +void View::keyPressEvent(QKeyEvent *e) { + int keyInt = e->key(); + Qt::Key key = static_cast(keyInt); + + if (key == Qt::Key_unknown) { + qDebug() << "Unknown key from a macro probably"; + return; + } + + // the user have clicked just and only the special keys Ctrl, Shift, Alt, Meta. + if (key == Qt::Key_Control || + key == Qt::Key_Shift || + key == Qt::Key_Alt || + key == Qt::Key_Meta) + { + // qDebug() << "Single click of special key: Ctrl, Shift, Alt or Meta"; + // qDebug() << "New KeySequence:" << QKeySequence(keyInt).toString(QKeySequence::NativeText); + // return; + } + + // check for a combination of user clicks + Qt::KeyboardModifiers modifiers = e->modifiers(); + QString keyText = e->text(); + // if the keyText is empty than it's a special key like F1, F5, ... + // qDebug() << "Pressed Key:" << keyText; + + QList modifiersList; + if (modifiers & Qt::ShiftModifier) + keyInt += Qt::SHIFT; + if (modifiers & Qt::ControlModifier) + keyInt += Qt::CTRL; + if (modifiers & Qt::AltModifier) + keyInt += Qt::ALT; + if (modifiers & Qt::MetaModifier) + keyInt += Qt::META; + + QString seq = QKeySequence(keyInt).toString(QKeySequence::NativeText); + // qDebug() << "KeySequence:" << seq; + + return; // skip built in command if overridden by shortcut + +/* + switch (e->key()) { + case Qt::Key_S : + break; + case Qt::Key_P : + break; + case Qt::Key_C : + resetCamView(); + break; + default: + QGLViewer::keyPressEvent(e); +} +*/ + QGLViewer::keyPressEvent(e); +} + +View::View(QWidget *parent) : QGLViewer(parent) { + setAttribute(Qt::WA_DeleteOnClose); + + lines.reserve(20000); +} + +View::~View() { + // qDebug() << "View::~View()"; +} + +void View::close() { + // qDebug() << "View::close()"; + // savePrefs(); + QGLViewer::close(); +} + +void View::clear() { + //QMutexLocker locker(&mutex); + + // reset bounding box + aabb[0] = std::numeric_limits::max(); + aabb[1] = std::numeric_limits::max(); + aabb[2] = std::numeric_limits::max(); + + aabb[3] = std::numeric_limits::min(); + aabb[4] = std::numeric_limits::min(); + aabb[5] = std::numeric_limits::min(); + + //setSceneRadius(1); + + lines.clear(); + dirty = false; + updateGLViewer(); +} + +void View::resetCamView() { + camera()->setPosition(initialCameraPosition); + camera()->setOrientation(initialCameraOrientation); + updateGLViewer(); +} + +void View::init() { + setShortcut(DISPLAY_FPS, Qt::CTRL+Qt::Key_F); + setShortcut(DRAW_GRID, 0); + + setManipulatedFrame(new ManipulatedFrame()); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glEnable(GL_DEPTH_TEST); + glDrawBuffer(GL_BACK); + //glDisable(GL_CULL_FACE); + //glLineStipple(2, 0xFFFF); + glDisable(GL_LIGHTING); + glClearColor(0.0,0.0,0.25,0); + //glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + //glLineWidth(3); + + setGridIsDrawn(); + setFPSIsDisplayed(); + setAxisIsDrawn(); + + setMouseBinding(Qt::AltModifier, Qt::RightButton, SHOW_ENTIRE_SCENE, true, Qt::MidButton); + + clear(); + + //startAnimation(); +} + +void View::initializeGL() { + QGLViewer::initializeGL(); + //camera()->setZNearCoefficient(0.000001); + //camera()->setZClippingCoefficient(1000.0); +} + +void View::appendCanonLine(canonLine *l) { + //QMutexLocker locker(&mutex); + lines.push_back(l); + dirty = true; // for updateGLViewer() + + if (l->isMotion()) { + Point pos1 = l->point(0); + Point pos2 = l->point(1); + + double oaabbmin[3], oaabbmax[3]; + + oaabbmin[0] = qMin(pos1.x, pos2.x); + oaabbmin[1] = qMin(pos1.y, pos2.y); + oaabbmin[2] = qMin(pos1.z, pos2.z); + + oaabbmax[0] = qMax(pos1.x, pos2.x); + oaabbmax[1] = qMax(pos1.y, pos2.y); + oaabbmax[2] = qMax(pos1.z, pos2.z); + + for (int i = 0; i < 3; ++i) { + aabb[ i] = qMin(aabb[ i], oaabbmin[i]); + aabb[3+i] = qMax(aabb[3+i], oaabbmax[i]); + } + + //qDebug() << "getAABB()" << aabb[0] << aabb[1] << aabb[2] << aabb[3] << aabb[4] << aabb[5]; + } +} + +void View::drawObjects(bool simplified = false) { + Q_UNUSED(simplified); + + if (lines.size() == 0) + return; + + //int nbSteps = 600; + //int nbSub = 50; + +// QMutexLocker locker(&mutex); + + /* + if (simplified) { + nbSteps = 60; + nbSub = 2; + }*/ + +// qDebug() << "lines.size: " << lines.size(); + + double step_size = 0.1; + + if (simplified) + step_size = 0.75; + + double inv_ds = 1.0 / step_size; + + int skip_dyn = 1; + double line_width = 3.0; + + if (lines.size() > 10000) { // skip some segments in big gcode files + skip_dyn = 2; + line_width = 2.0; // thinner lines + } + + if (lines.size() > 100000) { + skip_dyn = 4; + line_width = 1.0; + } + + int skip = (simplified) ? skip_dyn * 2 : skip_dyn; + + //glEnable(GL_MULTISAMPLE); + //glEnable(GL_LINE_SMOOTH); + //glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); + //glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); + + /* + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); + */ + + for (unsigned long i = 0; i < lines.size(); i+=skip) { + g2m::canonLine *l = lines[i]; + if (l->isMotion()) { + double move_length = l->length(); + int n_samples = std::max((int)(move_length * inv_ds ), 2); + double interval_size = move_length /(double)(n_samples-1); + + if (l->getMotionType() == TRAVERSE) { + glColor3f(0.0, 128.0/255.0 , 0.0/255.0); + glLineWidth(2); + } else { + glColor3f(255.0/255.0, 215.0/255.0, 94.0/255.0); + glLineWidth(line_width); + } + + glBegin(GL_LINES); + for (double m = 0; m <= n_samples-1; m+=0.5) { + Point pos1 = l->point( (double)(m) * interval_size); + glVertex3f(pos1.x, pos1.y, pos1.z); + Point pos2 = l->point( std::min(1.0, (double)(m+0.5) * interval_size)); + glVertex3f(pos2.x, pos2.y, pos2.z); + } + glEnd(); + } + + //glDisable(GL_BLEND); + } + + glLineWidth(2); + glColor3f(255.0, 0.0/255.0 , 0.0/255.0); + glBegin(GL_LINES); + + // Top + glVertex3f(aabb[0], aabb[1], aabb[2]); + glVertex3f(aabb[3], aabb[1], aabb[2]); + glVertex3f(aabb[3], aabb[1], aabb[2]); + glVertex3f(aabb[3], aabb[1], aabb[5]); + glVertex3f(aabb[3], aabb[1], aabb[5]); + glVertex3f(aabb[0], aabb[1], aabb[5]); + glVertex3f(aabb[0], aabb[1], aabb[5]); + glVertex3f(aabb[0], aabb[1], aabb[2]); + + // Bottom + glVertex3f(aabb[0], aabb[4], aabb[2]); + glVertex3f(aabb[3], aabb[4], aabb[2]); + glVertex3f(aabb[3], aabb[4], aabb[2]); + glVertex3f(aabb[3], aabb[4], aabb[5]); + glVertex3f(aabb[3], aabb[4], aabb[5]); + glVertex3f(aabb[0], aabb[4], aabb[5]); + glVertex3f(aabb[0], aabb[4], aabb[5]); + glVertex3f(aabb[0], aabb[4], aabb[2]); + + // Sides + glVertex3f(aabb[0], aabb[1], aabb[2]); + glVertex3f(aabb[0], aabb[4], aabb[2]); + glVertex3f(aabb[3], aabb[1], aabb[2]); + glVertex3f(aabb[3], aabb[4], aabb[2]); + glVertex3f(aabb[3], aabb[1], aabb[5]); + glVertex3f(aabb[3], aabb[4], aabb[5]); + glVertex3f(aabb[0], aabb[1], aabb[5]); + glVertex3f(aabb[0], aabb[4], aabb[5]); + + glEnd(); + + Vec qmin, qmax; + qmin.x = aabb[0]; + qmin.y = aabb[1]; + qmin.z = aabb[2]; + + qmax.x = aabb[3]; + qmax.y = aabb[4]; + qmax.z = aabb[5]; + setSceneBoundingBox(qmin, qmax); + + Vec c((aabb[0] + aabb[3])/2, (aabb[1] + aabb[4])/2, (aabb[2] + aabb[5])/2); + setSceneCenter(c); +} + +void View::draw() { + drawObjects(); +} + +void View::fastDraw() { + drawObjects(true); +} + +void View::postDraw() { + QGLViewer::postDraw(); +} + +void View::update() { + // qDebug() << "View::update"; + + if (_autoZoom) + showEntireScene(); + + if (dirty) { + dirty = false; + updateGLViewer(); + } +} diff --git a/view.h b/view.h new file mode 100644 index 0000000..75a9f71 --- /dev/null +++ b/view.h @@ -0,0 +1,76 @@ +#ifndef VIEW_H +#define VIEW_H + +#include +#include + +#include +#include + +#include "g2m.hpp" + +using namespace qglviewer; +using namespace g2m; + +class View : public QGLViewer +{ + Q_OBJECT; + Q_PROPERTY(bool autoZoom READ autoZoom WRITE setAutoZoom RESET unsetAutoZoom); + + public: + View(QWidget *parent = NULL); + ~View(); + + void resetCamView(); + + void updateGLViewer() { +#if QGLVIEWER_VERSION < 0x020700 + this->updateGL(); +#else + this->update(); +#endif + }; + + bool autoZoom()const{ return _autoZoom; }; + void setAutoZoom(bool autoZoom){ _autoZoom = autoZoom; update(); }; + void unsetAutoZoom(){ _autoZoom = true; update(); }; + + public slots: + void close(); + + void appendCanonLine(canonLine *l); + void clear(); + + void update(); + + void keyPressEvent(QKeyEvent *e); + + protected: + void init(); + void initializeGL(); + + virtual void draw(); + virtual void fastDraw(); + virtual void postDraw(); + + void drawObjects(bool simplified); + + private: + Vec initialCameraPosition; + Quaternion initialCameraOrientation; + + QMutex mutex; + + QSettings * settings; + + std::vector lines; + + bool dirty; + + double aabb[6]; + + bool _autoZoom; +}; + +#endif // VIEW_H + From a80efc927cf1c742d639ddab2c31e941c39f1afa Mon Sep 17 00:00:00 2001 From: Jakob Flierl Date: Sat, 7 Jun 2025 21:29:25 +0200 Subject: [PATCH 2/2] Tidy --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d0f1b97..573d797 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,14 +16,14 @@ jobs: steps: - uses: actions/checkout@v3 - - name: install devscripts + - name: Install devscripts run: | sudo apt update -qq sudo apt full-upgrade -y sudo DEBIAN_FRONTEND=noninteractive apt -qq -y install devscripts equivs lintian mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends" - - name: build source package + - name: Build source package env: DEBFULLNAME: "Github Actions" DEBEMAIL: "jakob.flierl@gmail.com" @@ -60,19 +60,19 @@ jobs: sudo apt -y -f install popd - - name: build binary package + - name: Build binary package run: dpkg-buildpackage -b -rfakeroot -us -uc - - name: install binary package + - name: Install binary package run: sudo dpkg -i ../qgcoder*deb - - name: install binary package dependencies + - name: Install binary package dependencies run: sudo apt -f install - - name: run lintian + - name: Run lintian run: lintian ../qgcoder*deb | lintian-info - - name: upload artifacts + - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }}