├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── COPYING ├── LICENSE ├── Makefile ├── OpenSCAM.desktop ├── README.md ├── SConstruct ├── config └── qt4 │ └── __init__.py ├── debian ├── changelog ├── compat └── copyright ├── doc ├── tpl │ ├── background.png │ ├── images │ │ ├── square.png │ │ ├── squares.png │ │ └── star.png │ ├── publish.sh │ ├── rainbow-custom.min.js │ ├── solarized-light.css │ ├── tpl.css │ ├── tpl.html │ └── tpl.js └── www │ ├── Makefile │ ├── build.sh │ ├── config.json │ ├── create_menu.sh │ ├── create_template.sh │ ├── css │ ├── main.css │ └── shadowbox.css │ ├── images │ ├── banner.png │ ├── bitcoin.svg │ ├── close.png │ ├── debian-128.png │ ├── donate.png │ ├── download.png │ ├── favicon.ico │ ├── help.png │ ├── install.png │ ├── linux-32bit-128.png │ ├── linux-64bit-128.png │ ├── loading.gif │ ├── logo.png │ ├── manual │ │ ├── dialog-export.png │ │ ├── dock-context-sim.png │ │ ├── dock-context-tool.png │ │ ├── dock-estimates.png │ │ ├── dock-position.png │ │ ├── dock-project.png │ │ ├── dock-status.png │ │ ├── dock-tool-path-bounds.png │ │ ├── dock-workpiece-bounds.png │ │ ├── layout-default.png │ │ ├── layout-full.png │ │ ├── layout-minimal.png │ │ ├── menu-examples.png │ │ ├── menu-file.png │ │ ├── menu-layout.png │ │ ├── menu-project.png │ │ ├── modified.png │ │ ├── overview.png │ │ ├── playback-control.png │ │ ├── playback-position.png │ │ ├── progressbar.png │ │ ├── project-units.png │ │ ├── resolution.png │ │ ├── simulation-control.png │ │ ├── thumbs │ │ │ ├── layout-default.png │ │ │ ├── layout-full.png │ │ │ ├── layout-minimal.png │ │ │ ├── overview.png │ │ │ ├── view-simulation.png │ │ │ └── view-tool.png │ │ ├── tool-settings.png │ │ ├── toolbar-perspective.png │ │ ├── toolbar-project.png │ │ ├── toolbar-view.png │ │ ├── tooltable.png │ │ ├── view-simulation.png │ │ ├── view-tool.png │ │ ├── workpiece-automatic.png │ │ ├── workpiece-manual.png │ │ ├── workpiece-view.png │ │ └── workpiece.png │ ├── mint-128.png │ ├── next.png │ ├── openscam-bitcoin-donations.gif │ ├── openscam.png │ ├── osx-128.png │ ├── pause.png │ ├── play.png │ ├── previous.png │ ├── screenshots │ │ ├── full_layout.png │ │ ├── openscam.png │ │ ├── simulation_view.png │ │ ├── thumbs │ │ │ ├── full_layout.png │ │ │ ├── openscam.png │ │ │ ├── simulation_view.png │ │ │ ├── tool_path_view.png │ │ │ ├── tool_view.png │ │ │ └── workpiece_view.png │ │ ├── tool_path_view.png │ │ ├── tool_view.png │ │ └── workpiece_view.png │ ├── subscribe.png │ ├── support_ribbon.png │ ├── ubuntu-128.png │ └── windows-128.png │ ├── jade │ ├── download │ │ ├── current.jade │ │ ├── debug.jade │ │ ├── install.jade │ │ ├── previous.jade │ │ ├── run.jade │ │ └── source.jade │ ├── footer.jade │ ├── head.jade │ ├── header.jade │ ├── main │ │ ├── about.jade │ │ ├── community.jade │ │ ├── contact.jade │ │ ├── donate.jade │ │ ├── legal.jade │ │ ├── menu.jade │ │ ├── mission.jade │ │ ├── quick-start.jade │ │ ├── screenshots.jade │ │ ├── status.jade │ │ └── template.jade │ ├── manual │ │ ├── docks.jade │ │ ├── export.jade │ │ ├── layout.jade │ │ ├── menu.jade │ │ ├── nc-files.jade │ │ ├── overview.jade │ │ ├── playback.jade │ │ ├── projects.jade │ │ ├── simulation.jade │ │ ├── template.jade │ │ ├── toolbars.jade │ │ ├── tools.jade │ │ └── workpiece.jade │ ├── mixins.jade │ ├── notfound.jade │ ├── template_head.jade │ └── template_tail.jade │ └── js │ ├── main.js │ └── shadowbox.js ├── examples ├── aztec_calendar │ ├── aztec_calendar.nc │ └── aztec_calendar.xml ├── bear │ ├── bear.nc │ └── bear.xml ├── botomata_bottom │ ├── botomata_bottom.nc │ └── botomata_bottom.xml ├── box │ ├── box.tpl │ └── box.xml ├── cameo │ ├── cameo.nc │ └── cameo.xml ├── cat │ ├── cat.xml │ ├── tiny_cat_outline.ngc │ └── tiny_cat_outline.svg ├── compass │ ├── bottom.ngc │ ├── compass.ngc │ ├── compass.tpl │ ├── compass.xml │ ├── mt_kazbegi_2013.ngc │ ├── sworn_brothers_llc.ngc │ ├── text.ngc │ ├── text.tpl │ ├── text.xml │ └── top.ngc ├── flower_mold │ ├── flower_mold.nc │ └── flower_mold.xml ├── genes-encoder │ ├── genes-encoder.jpg │ ├── genes-encoder.ngc │ └── genes-encoder.xml ├── heart │ ├── cutout.ngc │ ├── heart.ngc │ └── heart.xml ├── lamp_shade │ ├── Makefile │ ├── laser.dxf │ ├── side.dxf │ ├── side.ngc │ ├── side.ngc.in │ ├── side.xml │ ├── side_inside.dxf │ ├── side_inside.ngc │ ├── side_inside.svg │ ├── side_outside.dxf │ ├── side_outside.ngc │ ├── top.dxf │ ├── top.ngc │ ├── top.ngc.in │ ├── top.xml │ ├── top_inside.dxf │ ├── top_inside.ngc │ ├── top_inside.svg │ ├── top_outside.dxf │ ├── top_outside.ngc │ └── top_outside.svg ├── openscam │ ├── openscam.ngc │ └── openscam.xml ├── rhodonea │ ├── rhodonea.tpl │ └── rhodonea.xml ├── scorpion │ ├── scorpion.nc │ └── scorpion.xml ├── slant_test │ ├── slant_test.nc │ └── slant_test.xml ├── stretching_cat │ ├── Makefile │ ├── drawing.svg │ ├── layers.ngc │ ├── path.ngc │ ├── path_small.ngc │ ├── stretching_cat.ngc │ ├── stretching_cat.ngc.in │ └── stretching_cat.xml ├── tiger │ ├── tiger.nc │ └── tiger.xml └── vcarve │ ├── vcarve.ngc │ └── vcarve.xml ├── images ├── header.bmp ├── openscam-logo.png ├── openscam.ico └── openscam.png ├── ncpp ├── openscam.nsi ├── osx ├── QtCore.pc ├── QtGui.pc ├── QtOpenGL.pc ├── Resources │ └── en.lproj │ │ ├── Conclusion.rtf │ │ ├── License.rtf │ │ └── Welcome.rtf ├── Scripts │ └── postflight ├── distribution.xml ├── openscam.icns └── pkg.plist ├── qt ├── about_dialog.ui ├── donate_dialog.ui ├── export_dialog.ui ├── icons │ ├── about.png │ ├── add.png │ ├── axes.png │ ├── back.png │ ├── backward.png │ ├── bbox.png │ ├── bottom.png │ ├── configure.png │ ├── cut_surface.png │ ├── donate.png │ ├── end.png │ ├── export.png │ ├── faster.png │ ├── forward.png │ ├── front.png │ ├── go-left.png │ ├── go-right.png │ ├── help.png │ ├── idle.png │ ├── isometric.png │ ├── left.png │ ├── new.png │ ├── no-surface.png │ ├── open.png │ ├── openscam.png │ ├── path.png │ ├── pause.png │ ├── play.png │ ├── quit.png │ ├── remove.png │ ├── restart.png │ ├── revert.png │ ├── right.png │ ├── running.gif │ ├── save.png │ ├── save_as.png │ ├── slower.png │ ├── smooth.png │ ├── snapshot.png │ ├── start.png │ ├── stop.png │ ├── surface.png │ ├── tool.png │ ├── top.png │ └── wire.png ├── images │ ├── bitcoin.png │ ├── openscam-bitcoin-donations.png │ ├── paypal.png │ └── paypal_donate.png ├── openscam.qrc └── openscam.ui ├── src ├── clipper │ ├── clipper.cpp │ └── clipper.hpp ├── gcodetool.cpp ├── glew │ ├── glew.c │ ├── glew.h │ ├── glxew.h │ └── wglew.h ├── openscam.cpp ├── openscam │ ├── Application.cpp │ ├── Application.h │ ├── Geom.h │ ├── Real.h │ ├── Task.cpp │ ├── Task.h │ ├── contour │ │ ├── Cell.h │ │ ├── CellSlice.cpp │ │ ├── CellSlice.h │ │ ├── CompositeSurface.cpp │ │ ├── CompositeSurface.h │ │ ├── ContourGenerator.cpp │ │ ├── ContourGenerator.h │ │ ├── DualContouring.cpp │ │ ├── DualContouring.h │ │ ├── Edge.h │ │ ├── ElementSurface.cpp │ │ ├── ElementSurface.h │ │ ├── FieldFunction.cpp │ │ ├── FieldFunction.h │ │ ├── HermiteData.cpp │ │ ├── HermiteData.h │ │ ├── HermiteSlice.cpp │ │ ├── HermiteSlice.h │ │ ├── MarchingCubes.cpp │ │ ├── MarchingCubes.h │ │ ├── QEF.cpp │ │ ├── QEF.h │ │ ├── SampleSlice.cpp │ │ ├── SampleSlice.h │ │ ├── Surface.cpp │ │ └── Surface.h │ ├── cutsim │ │ ├── AABB.cpp │ │ ├── AABB.h │ │ ├── AABBTree.cpp │ │ ├── AABBTree.h │ │ ├── CompositeSweep.cpp │ │ ├── CompositeSweep.h │ │ ├── ConicSweep.cpp │ │ ├── ConicSweep.h │ │ ├── CutSim.cpp │ │ ├── CutSim.h │ │ ├── CutWorkpiece.cpp │ │ ├── CutWorkpiece.h │ │ ├── Move.cpp │ │ ├── Move.h │ │ ├── MoveType.cpp │ │ ├── MoveType.h │ │ ├── Project.cpp │ │ ├── Project.h │ │ ├── ResolutionMode.cpp │ │ ├── ResolutionMode.h │ │ ├── Simulation.cpp │ │ ├── Simulation.h │ │ ├── SpheroidSweep.cpp │ │ ├── SpheroidSweep.h │ │ ├── Sweep.cpp │ │ ├── Sweep.h │ │ ├── ToolPath.cpp │ │ ├── ToolPath.h │ │ ├── ToolSweep.cpp │ │ ├── ToolSweep.h │ │ ├── Workpiece.cpp │ │ └── Workpiece.h │ ├── dxf │ │ ├── DXFArc.h │ │ ├── DXFEntity.h │ │ ├── DXFLine.h │ │ ├── DXFPoint.h │ │ ├── DXFPolyLine.h │ │ ├── DXFReader.cpp │ │ ├── DXFReader.h │ │ ├── DXFSpline.h │ │ └── dxflib │ │ │ ├── dl_attributes.h │ │ │ ├── dl_codes.h │ │ │ ├── dl_creationadapter.h │ │ │ ├── dl_creationinterface.h │ │ │ ├── dl_dxf.cpp │ │ │ ├── dl_dxf.h │ │ │ ├── dl_entities.h │ │ │ ├── dl_exception.h │ │ │ ├── dl_extrusion.h │ │ │ ├── dl_writer.h │ │ │ ├── dl_writer_ascii.cpp │ │ │ ├── dl_writer_ascii.h │ │ │ └── dxflib_commercial_license.txt │ ├── gcode │ │ ├── Codes.cpp │ │ ├── Codes.h │ │ ├── Evaluator.cpp │ │ ├── Evaluator.h │ │ ├── GCodeInterpreter.cpp │ │ ├── GCodeInterpreter.h │ │ ├── Interpreter.cpp │ │ ├── Interpreter.h │ │ ├── ModalGroup.cpp │ │ ├── ModalGroup.h │ │ ├── OCodeInterpreter.cpp │ │ ├── OCodeInterpreter.h │ │ ├── Parser.cpp │ │ ├── Parser.h │ │ ├── Printer.cpp │ │ ├── Printer.h │ │ ├── Processor.h │ │ ├── Token.h │ │ ├── TokenType.cpp │ │ ├── TokenType.h │ │ ├── Tokenizer.cpp │ │ ├── Tokenizer.h │ │ ├── VarTypes.h │ │ └── ast │ │ │ ├── Assign.cpp │ │ │ ├── Assign.h │ │ │ ├── BinaryOp.cpp │ │ │ ├── BinaryOp.h │ │ │ ├── Block.cpp │ │ │ ├── Block.h │ │ │ ├── Comment.cpp │ │ │ ├── Comment.h │ │ │ ├── Entity.h │ │ │ ├── FunctionCall.cpp │ │ │ ├── FunctionCall.h │ │ │ ├── NamedReference.cpp │ │ │ ├── NamedReference.h │ │ │ ├── Number.cpp │ │ │ ├── Number.h │ │ │ ├── OCode.cpp │ │ │ ├── OCode.h │ │ │ ├── Operator.cpp │ │ │ ├── Operator.h │ │ │ ├── Program.cpp │ │ │ ├── Program.h │ │ │ ├── QuotedExpr.cpp │ │ │ ├── QuotedExpr.h │ │ │ ├── Reference.cpp │ │ │ ├── Reference.h │ │ │ ├── UnaryOp.cpp │ │ │ ├── UnaryOp.h │ │ │ ├── Word.cpp │ │ │ └── Word.h │ ├── opt │ │ ├── AnnealState.cpp │ │ ├── AnnealState.h │ │ ├── Group.cpp │ │ ├── Group.h │ │ ├── Opt.cpp │ │ ├── Opt.h │ │ ├── Path.cpp │ │ └── Path.h │ ├── pcb │ │ ├── Arc.cpp │ │ ├── Arc.h │ │ ├── Element.cpp │ │ ├── Element.h │ │ ├── ElementArc.cpp │ │ ├── ElementArc.h │ │ ├── ElementLine.cpp │ │ ├── ElementLine.h │ │ ├── Factory.h │ │ ├── Layer.cpp │ │ ├── Layer.h │ │ ├── Layout.cpp │ │ ├── Layout.h │ │ ├── Line.cpp │ │ ├── Line.h │ │ ├── NetList.cpp │ │ ├── NetList.h │ │ ├── Object.cpp │ │ ├── Object.h │ │ ├── PCB.h │ │ ├── Pad.cpp │ │ ├── Pad.h │ │ ├── Pin.cpp │ │ ├── Pin.h │ │ ├── Point.h │ │ ├── Polygon.cpp │ │ ├── Polygon.h │ │ ├── String.h │ │ ├── Symbol.cpp │ │ ├── Symbol.h │ │ ├── Text.cpp │ │ ├── Text.h │ │ ├── Via.cpp │ │ └── Via.h │ ├── probe │ │ ├── Probe.cpp │ │ ├── Probe.h │ │ ├── ProbeGrid.cpp │ │ ├── ProbeGrid.h │ │ └── ProbePoint.h │ ├── qt │ │ ├── AboutDialog.cpp │ │ ├── AboutDialog.h │ │ ├── ClickWidget.cpp │ │ ├── ClickWidget.h │ │ ├── CutSimThread.cpp │ │ ├── CutSimThread.h │ │ ├── DonateDialog.cpp │ │ ├── DonateDialog.h │ │ ├── ExportDialog.cpp │ │ ├── ExportDialog.h │ │ ├── GLView.cpp │ │ ├── GLView.h │ │ ├── ProjectModel.cpp │ │ ├── ProjectModel.h │ │ ├── QApplication.cpp │ │ ├── QApplication.h │ │ ├── QtApp.cpp │ │ ├── QtApp.h │ │ ├── QtWin.cpp │ │ ├── QtWin.h │ │ ├── SurfaceThread.cpp │ │ ├── SurfaceThread.h │ │ ├── ToolPathThread.cpp │ │ └── ToolPathThread.h │ ├── remote │ │ ├── Connection.cpp │ │ ├── Connection.h │ │ ├── ConnectionManager.cpp │ │ └── ConnectionManager.h │ ├── render │ │ ├── RenderJob.cpp │ │ ├── RenderJob.h │ │ ├── RenderMode.cpp │ │ ├── RenderMode.h │ │ ├── Renderer.cpp │ │ └── Renderer.h │ ├── sim │ │ ├── Addresses.h │ │ ├── Controller.cpp │ │ ├── Controller.h │ │ ├── CoordinateSystem.h │ │ ├── Machine.cpp │ │ ├── Machine.h │ │ ├── Tool.cpp │ │ ├── Tool.h │ │ ├── ToolShape.cpp │ │ ├── ToolShape.h │ │ ├── ToolTable.cpp │ │ ├── ToolTable.h │ │ ├── ToolUnits.cpp │ │ └── ToolUnits.h │ ├── stl │ │ ├── Facet.h │ │ ├── STL.cpp │ │ └── STL.h │ ├── value │ │ ├── MemberFunctorObserver.h │ │ ├── MemberFunctorValue.h │ │ ├── Observer.h │ │ ├── Value.h │ │ ├── ValueGroup.cpp │ │ ├── ValueGroup.h │ │ ├── ValueSet.cpp │ │ ├── ValueSet.h │ │ └── VarValue.h │ └── view │ │ ├── BoundsView.cpp │ │ ├── BoundsView.h │ │ ├── Color.cpp │ │ ├── Color.h │ │ ├── CuboidView.cpp │ │ ├── CuboidView.h │ │ ├── GL.cpp │ │ ├── GL.h │ │ ├── GLFreeType.cpp │ │ ├── GLFreeType.h │ │ ├── ToolPathView.cpp │ │ ├── ToolPathView.h │ │ ├── ToolView.cpp │ │ ├── ToolView.h │ │ ├── View.cpp │ │ ├── View.h │ │ ├── ViewPort.cpp │ │ ├── ViewPort.h │ │ ├── Viewer.cpp │ │ └── Viewer.h ├── oscamopt.cpp ├── oscamprobe.cpp ├── resources │ ├── Courier_New.ttf │ └── Courier_New_Bold.ttf ├── tplang.cpp └── tplang │ ├── Axes.cpp │ ├── Axes.h │ ├── ClipperLibrary.cpp │ ├── ClipperLibrary.h │ ├── DXFLibrary.cpp │ ├── DXFLibrary.h │ ├── GCodeLibrary.cpp │ ├── GCodeLibrary.h │ ├── GCodeMachine.cpp │ ├── GCodeMachine.h │ ├── Interpreter.cpp │ ├── Interpreter.h │ ├── Javascript.cpp │ ├── Javascript.h │ ├── MachineAdapter.h │ ├── MachineEnum.h │ ├── MachineInterface.h │ ├── MachineLinearizer.cpp │ ├── MachineLinearizer.h │ ├── MachineMatrix.cpp │ ├── MachineMatrix.h │ ├── MachinePipeline.cpp │ ├── MachinePipeline.h │ ├── MachineState.cpp │ ├── MachineState.h │ ├── MachineUnitAdapter.cpp │ ├── MachineUnitAdapter.h │ ├── MatrixLibrary.cpp │ ├── MatrixLibrary.h │ ├── MoveSink.cpp │ ├── MoveSink.h │ ├── MoveStream.cpp │ ├── MoveStream.h │ ├── TPLContext.cpp │ ├── TPLContext.h │ ├── TransMatrix.cpp │ └── TransMatrix.h └── tests ├── offsetTests ├── CoordinateSystem │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── Global │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout └── th.py ├── testHarness ├── th.py ├── tplTests ├── DXFTest │ ├── data │ │ ├── pattern.dxf │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── DowelTest │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── RotateTest │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── SquareTest │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── SquaresTest │ ├── data │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── StarTest │ ├── data │ │ ├── project.xml │ │ └── stdin │ └── expect │ │ ├── return │ │ ├── stderr │ │ └── stdout ├── test.ngc └── th.py └── varRefTests ├── GlobalNamed ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout ├── GlobalNumeric ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout ├── LocalNamed ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout ├── LocalNumeric ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout ├── Named ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout ├── Numeric ├── data │ └── stdin └── expect │ ├── return │ ├── stderr │ └── stdout └── th.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | 6 | # Compiled Dynamic libraries 7 | *.so 8 | *.dylib 9 | 10 | # Compiled Static libraries 11 | *.lai 12 | *.la 13 | *.a 14 | 15 | # Compiled Python 16 | *.pyc 17 | 18 | # SCons 19 | .sconf_temp 20 | .sconsign.dblite 21 | 22 | # Build byproducts 23 | build 24 | config.log 25 | package.txt 26 | 27 | # Backup files 28 | *~ 29 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/.gitmodules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | OpenSCAM is an Open-Source CAM software. 2 | Copyright (C) 2011-2014 Joseph Coffland 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | scons -C cbang 3 | scons 4 | 5 | clean: 6 | scons -C cbang -c 7 | scons -c 8 | -------------------------------------------------------------------------------- /OpenSCAM.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Type=Application 4 | Name=OpenSCAM 5 | Exec=openscam 6 | Terminal=false 7 | Categories=Science 8 | Comment=Open-Source Simulation & Computer Aided Machining 9 | Icon=openscam.png 10 | StartupNotify=true 11 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | openscam (0.0.1) unstable; urgency=low 2 | * Initial Debian package. 3 | 4 | -- Joseph Coffland Thu, 13 Jan 2011 20:38:52 -0800 5 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: OpenSCAM 3 | Upstream-Contact: Joseph Coffland 4 | Source: https://cauldrondevelopment.com/svn/openscam/trunk/openscam 5 | 6 | Files: * 7 | Copyright: 2011-2012, Cauldron Development LLC 8 | License: GPL-2+ 9 | This program is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 2 of the License, or 12 | (at your option) any later version. 13 | . 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | . 19 | You should have received a copy of the GNU General Public License 20 | along with this program. If not, see . 21 | . 22 | On Debian systems, the complete text of the GNU GPL2 licenses 23 | can be found at `/usr/share/common-licenses/GPL-2'. 24 | . 25 | A special exception to the GPL is granted for linking with openssl. 26 | -------------------------------------------------------------------------------- /doc/tpl/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/tpl/background.png -------------------------------------------------------------------------------- /doc/tpl/images/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/tpl/images/square.png -------------------------------------------------------------------------------- /doc/tpl/images/squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/tpl/images/squares.png -------------------------------------------------------------------------------- /doc/tpl/images/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/tpl/images/star.png -------------------------------------------------------------------------------- /doc/tpl/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | TARGET=root@coffland.com:/var/www/tplang.org/http/ 3 | 4 | rsync -av --exclude=.svn --exclude=publish.sh "$(dirname "$0")"/ $TARGET 5 | -------------------------------------------------------------------------------- /doc/www/Makefile: -------------------------------------------------------------------------------- 1 | all: http 2 | 3 | http: $(shell find jade) config.json 4 | ./build.sh 5 | 6 | clean: 7 | rm -rf http jade/{manual,main,download}/{template,menu}.jade 8 | 9 | publish: http 10 | rsync -Lav http/ root@openscam.org:/var/www/openscam.org/http/ 11 | -------------------------------------------------------------------------------- /doc/www/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | declare -A PAGES 4 | 5 | PAGES[main]="about quick-start mission screenshots status donate community " 6 | PAGES[main]+="legal contact" 7 | PAGES[download]="current install run source previous" 8 | PAGES[manual]="overview projects simulation layout playback nc-files tools " 9 | PAGES[manual]+="workpiece export docks toolbars" 10 | 11 | # Create Menus 12 | for PAGE in ${!PAGES[@]}; do 13 | "$(dirname "$0")"/create_menu.sh $PAGE ${PAGES[$PAGE]} \ 14 | >jade/$PAGE/menu.jade 15 | done 16 | 17 | # Create Templates 18 | for PAGE in ${!PAGES[@]}; do 19 | "$(dirname "$0")"/create_template.sh $PAGE ${PAGES[$PAGE]} \ 20 | >jade/$PAGE/template.jade 21 | done 22 | 23 | mkdir -p http 24 | 25 | for PAGE in ${!PAGES[@]}; do 26 | TEMPLATE=jade/$PAGE/template.jade 27 | TARGET=http/$PAGE.html 28 | echo Building $TARGET from $TEMPLATE... 29 | jade -P -p $TEMPLATE -O "$(cat config.json)" <$TEMPLATE >$TARGET 30 | done 31 | 32 | jade -P http/notfound.html 33 | 34 | ln -sf main.html http/index.html 35 | ln -sf ../css ../js ../images http/ 36 | 37 | touch http 38 | -------------------------------------------------------------------------------- /doc/www/config.json: -------------------------------------------------------------------------------- 1 | { 2 | pages: { 3 | main: { 4 | titleText: 5 | '
OpenSCAM
', 6 | subtext: 'Open-Source Simulation & Computer Aided Machining', 7 | }, 8 | download: { 9 | titleText: "

Downloads

", 10 | subtext: 'OpenSCAM installers and packages.', 11 | }, 12 | manual: { 13 | titleText: "

User's Manual

", 14 | subtext: 'A guide to using OpenSCAM v0.2.3 or newer.', 15 | } 16 | }, 17 | version: '0.2.3 beta', 18 | repoURL: 'https://github.com/CauldronDevelopmentLLC/OpenSCAM', 19 | releases: [ 20 | ['Windows', ['windows-128.png'], 21 | 'windows-xp-32bit', 'openscam_0.2.3_x86.exe'], 22 | ['Mac OS-X', ['osx-128.png'], 23 | 'osx-10.6.4-64bit', 'openscam_0.2.3_x86_64.pkg'], 24 | ['Debian Linux 64-bit', ['debian-128.png', 'mint-128.png'], 25 | 'debian-testing-64bit', 'openscam_0.2.3_amd64.deb'], 26 | ['Debian Linux 32-bit', ['debian-128.png', 'mint-128.png'], 27 | 'debian-testing-32bit', 'openscam_0.2.3_i386.deb'], 28 | ['Ubuntu Precise Penguin 64-bit', ['ubuntu-128.png'], 29 | 'ubuntu-precise-64bit', 'openscam_0.2.3_amd64.deb'], 30 | ['LinuxCNC 10.04', ['ubuntu-128.png'], 31 | 'linuxcnc-10.04-32bit', 'openscam_0.2.3_i386.deb'] 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /doc/www/create_menu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PAGE="$1" 4 | shift 1 5 | SECTIONS="$@" 6 | 7 | echo "ul.nav.sidenav" 8 | 9 | for i in $SECTIONS; do 10 | FILE=jade/$PAGE/$i.jade 11 | REF=$(grep "h1#" $FILE | sed 's/[[:space:]]*h1#\([^[:space:]]*\).*$/\1/') 12 | TITLE=$(grep "h1#" $FILE | sed 's/[[:space:]]*h1#[^[:space:]]* \(.*\)$/\1/') 13 | 14 | echo " li" 15 | echo " a(href='#$REF') $TITLE" 16 | 17 | # Subsections 18 | FIRST=true 19 | grep "h2#" $FILE | while read LINE; do 20 | if $FIRST; then 21 | FIRST=false 22 | echo " ul.nav" 23 | fi 24 | 25 | REF=$(echo "$LINE" | sed 's/[[:space:]]*h2#\([^[:space:]]*\).*$/\1/') 26 | TITLE=$(echo "$LINE" | sed 's/[[:space:]]*h2#[^[:space:]]* \(.*\)$/\1/') 27 | 28 | echo " li" 29 | echo " a(href='#$REF') $TITLE" 30 | done 31 | done 32 | -------------------------------------------------------------------------------- /doc/www/create_template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PAGE="$1" 4 | shift 1 5 | SECTIONS="$@" 6 | 7 | echo "- var page = '$PAGE';" 8 | cat jade/template_head.jade 9 | echo 10 | 11 | for i in $SECTIONS; do 12 | echo " .docs-section" 13 | echo " include $i" 14 | done 15 | 16 | echo 17 | cat jade/template_tail.jade 18 | -------------------------------------------------------------------------------- /doc/www/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/banner.png -------------------------------------------------------------------------------- /doc/www/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/close.png -------------------------------------------------------------------------------- /doc/www/images/debian-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/debian-128.png -------------------------------------------------------------------------------- /doc/www/images/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/donate.png -------------------------------------------------------------------------------- /doc/www/images/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/download.png -------------------------------------------------------------------------------- /doc/www/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/favicon.ico -------------------------------------------------------------------------------- /doc/www/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/help.png -------------------------------------------------------------------------------- /doc/www/images/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/install.png -------------------------------------------------------------------------------- /doc/www/images/linux-32bit-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/linux-32bit-128.png -------------------------------------------------------------------------------- /doc/www/images/linux-64bit-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/linux-64bit-128.png -------------------------------------------------------------------------------- /doc/www/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/loading.gif -------------------------------------------------------------------------------- /doc/www/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/logo.png -------------------------------------------------------------------------------- /doc/www/images/manual/dialog-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dialog-export.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-context-sim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-context-sim.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-context-tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-context-tool.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-estimates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-estimates.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-position.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-project.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-status.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-tool-path-bounds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-tool-path-bounds.png -------------------------------------------------------------------------------- /doc/www/images/manual/dock-workpiece-bounds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/dock-workpiece-bounds.png -------------------------------------------------------------------------------- /doc/www/images/manual/layout-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/layout-default.png -------------------------------------------------------------------------------- /doc/www/images/manual/layout-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/layout-full.png -------------------------------------------------------------------------------- /doc/www/images/manual/layout-minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/layout-minimal.png -------------------------------------------------------------------------------- /doc/www/images/manual/menu-examples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/menu-examples.png -------------------------------------------------------------------------------- /doc/www/images/manual/menu-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/menu-file.png -------------------------------------------------------------------------------- /doc/www/images/manual/menu-layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/menu-layout.png -------------------------------------------------------------------------------- /doc/www/images/manual/menu-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/menu-project.png -------------------------------------------------------------------------------- /doc/www/images/manual/modified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/modified.png -------------------------------------------------------------------------------- /doc/www/images/manual/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/overview.png -------------------------------------------------------------------------------- /doc/www/images/manual/playback-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/playback-control.png -------------------------------------------------------------------------------- /doc/www/images/manual/playback-position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/playback-position.png -------------------------------------------------------------------------------- /doc/www/images/manual/progressbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/progressbar.png -------------------------------------------------------------------------------- /doc/www/images/manual/project-units.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/project-units.png -------------------------------------------------------------------------------- /doc/www/images/manual/resolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/resolution.png -------------------------------------------------------------------------------- /doc/www/images/manual/simulation-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/simulation-control.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/layout-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/layout-default.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/layout-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/layout-full.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/layout-minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/layout-minimal.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/overview.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/view-simulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/view-simulation.png -------------------------------------------------------------------------------- /doc/www/images/manual/thumbs/view-tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/thumbs/view-tool.png -------------------------------------------------------------------------------- /doc/www/images/manual/tool-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/tool-settings.png -------------------------------------------------------------------------------- /doc/www/images/manual/toolbar-perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/toolbar-perspective.png -------------------------------------------------------------------------------- /doc/www/images/manual/toolbar-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/toolbar-project.png -------------------------------------------------------------------------------- /doc/www/images/manual/toolbar-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/toolbar-view.png -------------------------------------------------------------------------------- /doc/www/images/manual/tooltable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/tooltable.png -------------------------------------------------------------------------------- /doc/www/images/manual/view-simulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/view-simulation.png -------------------------------------------------------------------------------- /doc/www/images/manual/view-tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/view-tool.png -------------------------------------------------------------------------------- /doc/www/images/manual/workpiece-automatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/workpiece-automatic.png -------------------------------------------------------------------------------- /doc/www/images/manual/workpiece-manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/workpiece-manual.png -------------------------------------------------------------------------------- /doc/www/images/manual/workpiece-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/workpiece-view.png -------------------------------------------------------------------------------- /doc/www/images/manual/workpiece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/manual/workpiece.png -------------------------------------------------------------------------------- /doc/www/images/mint-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/mint-128.png -------------------------------------------------------------------------------- /doc/www/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/next.png -------------------------------------------------------------------------------- /doc/www/images/openscam-bitcoin-donations.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/openscam-bitcoin-donations.gif -------------------------------------------------------------------------------- /doc/www/images/openscam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/openscam.png -------------------------------------------------------------------------------- /doc/www/images/osx-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/osx-128.png -------------------------------------------------------------------------------- /doc/www/images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/pause.png -------------------------------------------------------------------------------- /doc/www/images/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/play.png -------------------------------------------------------------------------------- /doc/www/images/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/previous.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/full_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/full_layout.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/openscam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/openscam.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/simulation_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/simulation_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/full_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/full_layout.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/openscam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/openscam.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/simulation_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/simulation_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/tool_path_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/tool_path_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/tool_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/tool_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/thumbs/workpiece_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/thumbs/workpiece_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/tool_path_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/tool_path_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/tool_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/tool_view.png -------------------------------------------------------------------------------- /doc/www/images/screenshots/workpiece_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/screenshots/workpiece_view.png -------------------------------------------------------------------------------- /doc/www/images/subscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/subscribe.png -------------------------------------------------------------------------------- /doc/www/images/support_ribbon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/support_ribbon.png -------------------------------------------------------------------------------- /doc/www/images/ubuntu-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/ubuntu-128.png -------------------------------------------------------------------------------- /doc/www/images/windows-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/doc/www/images/windows-128.png -------------------------------------------------------------------------------- /doc/www/jade/download/current.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#current-release Current Downloads 3 | 4 | h3= 'Version ' + version 5 | p Click on the boxes below to download OpenSCAM for your platform: 6 | 7 | p 8 | +do_releases(releases, 'beta', 'release') 9 | -------------------------------------------------------------------------------- /doc/www/jade/download/debug.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#debug-release Debug Downloads 3 | 4 | h3= 'Version ' + version 5 | p 6 | | The debug builds can be used to help diagnose problems but they 7 | | are not optimized and run substantially slower than the regular 8 | | releases. 9 | 10 | p Click on the boxes below to download OpenSCAM for your platform: 11 | 12 | p 13 | +do_releases(releases, 'beta', 'debug') 14 | -------------------------------------------------------------------------------- /doc/www/jade/download/install.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#install Installation 3 | p 4 | | For Windows or Mac OS-X simply run the installer and follow the 5 | | instructions it gives you. 6 | 7 | p 8 | | To install any of the Linux .deb packages open a terminal and go to the 9 | | directory where you downloaded the package and run the following commands: 10 | pre 11 | code. 12 | sudo apt-get install gdebi 13 | sudo gdebi openscam_*.deb 14 | 15 | p Make sure you've got the right package for your system. 16 | p Alternatively, open the package in your system's package manager. 17 | -------------------------------------------------------------------------------- /doc/www/jade/download/previous.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#previous-releases Previous Releases 3 | p 4 | | You can browse previous releases here: 5 | | /releases/ 6 | 7 | p 8 | | The directory layout is as follows: 9 | strong= '/releases/////' 10 | 11 | table 12 | tr 13 | th status 14 | td - alpha, beta or public 15 | tr 16 | th mode 17 | td - release or debug 18 | tr 19 | th build 20 | td - 21 | strong= '--' 22 | tr 23 | th version 24 | td - Major and minor version 25 | -------------------------------------------------------------------------------- /doc/www/jade/download/run.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#run Starting OpenSCAM 3 | 4 | p 5 | | For more information about running OpenSCAM see 6 | | the user's manual. 7 | 8 | h3 Windows 9 | p 10 | | In Windows you will find OpenSCAM in your Start menu under 11 | | All Programs -> OpenSCAM -> OpenSCAM. 12 | 13 | h3 Mac OS-X 14 | p 15 | | On Mac OS-X OpenSCAM is installed in the Applications folder. 16 | | In Finder under PLACES you will find the Applications. 17 | | Open this folder and double click on the OpenSCAM icon. 18 | 19 | h3 Linux 20 | p 21 | | In Linux, if you've installed a package, you should find OpenSCAM in 22 | | system menu under Other. Alternatively, you can open a terminal 23 | | and run openscam. 24 | 25 | p 26 | | If you bulit OpenSCAM from source with out installing. Then you must 27 | | open a terminal, go to the directory where built OpenSCAM and run 28 | | ./openscam. 29 | -------------------------------------------------------------------------------- /doc/www/jade/download/source.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#source-code Source Code 3 | 4 | p You can build from source in Debian Linux with the following commands: 5 | pre 6 | code. 7 | # Install the prerequisites 8 | sudo apt-get install scons build-essential libbz2-dev zlib1g-dev \ 9 | libexpat1-dev libssl-dev libboost-iostreams-dev libboost-system-dev \ 10 | libboost-filesystem-dev libboost-regex-dev libsqlite3-dev libv8-dev \ 11 | qt4-dev-tools libqt4-dev libqt4-opengl-dev libcairo2-dev git 12 | 13 | # Get the source 14 | git clone https://github.com/CauldronDevelopmentLLC/cbang 15 | git clone https://github.com/CauldronDevelopmentLLC/OpenSCAM 16 | 17 | # Build C! 18 | scons -C cbang 19 | export CBANG_HOME=$PWD/cbang 20 | 21 | # Build OpenSCAM 22 | cd OpenSCAM 23 | scons 24 | 25 | # Build the package 26 | scons package 27 | 28 | # Install the package 29 | sudo dpkg -i openscam_*.deb 30 | 31 | p 32 | | Visit the  33 | a(href=repoURL + '#readme') GitHub page 34 | |  for information on building the source code. 35 | -------------------------------------------------------------------------------- /doc/www/jade/footer.jade: -------------------------------------------------------------------------------- 1 | - var ggroup = 'http://groups.google.com/group/openscam'; 2 | 3 | footer.bs-footer(role='contentinfo') 4 | .container 5 | .bs-social 6 | ul.bs-social-buttons 7 | li.github-star 8 | li.github-fork 9 | li 10 | a.footer-button(href = ggroup + '-announcements/boxsubscribe') 11 | h1 Subscribe 12 | h2 to Email Updates 13 | li 14 | a.footer-button(href = ggroup + '-users/boxsubscribe') 15 | h1 Join 16 | h2 the Users Forum 17 | 18 | p 19 | | OpenSCAM and these docs are maintained by 20 | | Cauldron Development LLC. 21 | 22 | p 23 | | Source code released under the 24 | | GLPv2+ License, 25 | | documentation under 26 | | CC BY 3.0. 27 | 28 | ul.footer-links 29 | li= 'Current version ' + version 30 | li.muted · 31 | li 32 | a(href=repoURL + '/issues?state=open') Open Issues 33 | li.muted · 34 | li 35 | a(href=repoURL + '/blob/master/CHANGELOG.md') Changelog 36 | 37 | // Placed at the end of the document so the pages load faster 38 | script(src='//code.jquery.com/jquery-1.10.2.min.js') 39 | script(src='//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js') 40 | 41 | script(src='//cdnjs.cloudflare.com/ajax/libs/holder/2.2.0/holder.min.js') 42 | 43 | script(src='js/shadowbox.js') 44 | script(src='js/main.js') 45 | -------------------------------------------------------------------------------- /doc/www/jade/head.jade: -------------------------------------------------------------------------------- 1 | meta(charset='utf-8') 2 | meta(http-equiv='X-UA-Compatible', content='IE=edge') 3 | meta(name='viewport', content='width=device-width, initial-scale=1.0') 4 | meta(name='description', content='OpenSCAM is an Open-Source software which \ 5 | simulates 3-axis CNC milling or engraving. It is a fast, flexible and user \ 6 | friendly simulation software for the DIY and Open-Source community. \ 7 | OpenSCAM works on Linux, OS-X and Windows.') 8 | meta(name='author', content='Joseph Coffland') 9 | 10 | title OpenSCAM 11 | 12 | // Main styles 13 | link(rel='stylesheet', 14 | href='//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css') 15 | link(rel='stylesheet', 16 | href='//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css') 17 | link(href='css/shadowbox.css', rel='stylesheet') 18 | link(href='css/main.css', rel='stylesheet') 19 | 20 | // Webfonts 21 | - var family = 'Open+Sans:400,600,700,300|Open+Sans+Condensed:300,700'; 22 | link(href='http://fonts.googleapis.com/css?family=' + family, rel='stylesheet', 23 | type='text/css') 24 | 25 | // HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries 26 | //if lt IE 9 27 | script(src='//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js') 28 | script(src='//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js') 29 | 30 | link(rel='shortcut icon', href='images/favicon.ico') 31 | -------------------------------------------------------------------------------- /doc/www/jade/main/about.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#about About 3 | 4 | p 5 | | OpenSCAM is an 6 | | Open-Source 7 | | software which simulates 3-axis 8 | | CNC 9 | | milling or engraving. It is a fast, flexible and user 10 | | friendly simulation software for the DIY and Open-Source 11 | | community. OpenSCAM works on Linux, OS-X and Windows. 12 | 13 | p 14 | | Being able to simulate is a critical part of creating 15 | | CNC tool paths. Programming a CNC with out a simulator 16 | | is cutting with out measuring; it's both dangerous and 17 | | expensive. With OpenSCAM you can preview the results of 18 | | your cutting operation before you fire up your 19 | | machine. This will save you time and money and open up a 20 | | world of creative possibilities by allowing you to 21 | | rapidly visualize and improve upon designs with out 22 | | wasting material or breaking tools. 23 | -------------------------------------------------------------------------------- /doc/www/jade/main/community.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#community Get Involved 3 | 4 | p There are several ways you can get involved in the OpenSCAM community. 5 | ul 6 | li 7 | | Join the Mailing List: This is a very low volume mailing list for 10 | | OpenSCAM announcements. 11 | 12 | li 13 | | Join the User's Forum: Discuss OpenSCAM with other users. 15 | 16 | li 17 | a(href=repoURL) Join the Development: 18 | |  Get involved with development on GitHub by  19 | a(href=repoURL + '/issues/new') opening an issue 20 | |  or submitting a pull request. 21 | -------------------------------------------------------------------------------- /doc/www/jade/main/contact.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#contact Contact 3 | 4 | p 5 | | For more information about OpenSCAM email 6 | | joseph@cauldrondevelopment.com. 8 | -------------------------------------------------------------------------------- /doc/www/jade/main/donate.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#donations Donations 3 | 4 | p 5 | | This project is funded through donations. If you find 6 | | OpenSCAM useful please consider donating $25 or more. 7 | | Your donations will make new features, bug fixes 8 | | and the continued development of this software possible. 9 | 10 | h3 Paypal 11 | p To donate with Paypal click the button below: 12 | 13 | p 14 | form(action='https://www.paypal.com/cgi-bin/webscr', method='post') 15 | input(name='cmd', value='_s-xclick', type='hidden') 16 | input(name='hosted_button_id', value='FDP4SVEVT68NG', type='hidden') 17 | input.donate-button(src='images/donate.png', name='submit', type='image', 18 | alt='PayPal - The safer, easier way to pay online!') 19 | 20 | h3 BitCoin 21 | p 22 | | Make a donation by sending to the address or QR 24 | | code below: 25 | 26 | p 27 | p 182aJsBrnmcWxqZ9VCACJyFYNWSH7eKS9R 28 | img(src='images/openscam-bitcoin-donations.gif') 29 | 30 | -------------------------------------------------------------------------------- /doc/www/jade/main/legal.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#legal Legal 3 | 4 | h3 License 5 | p 6 | | OpenSCAM is Open-Source 7 | | software. You may use it under the terms of the 8 | | GNU GENERAL PUBLIC 9 | | LICENSE Version 2. 10 | 11 | h3 Disclaimer 12 | p 13 | strong 14 | | Always use caution when operating any dangerous 15 | | machinery. Simulation is no substitute for carefully 16 | | checking the accuracy and safety of your CNC programs. 17 | | This or any other software could very well make 18 | | mistakes. Programs which appear correct in simulations 19 | | might be very dangerous to run on real machines. The 20 | | results of running any CNC program on a real machine are 21 | | the sole responsibility of the CNC operator. Read the 22 | | software license 23 | | for additional disclaimers. 24 | -------------------------------------------------------------------------------- /doc/www/jade/main/menu.jade: -------------------------------------------------------------------------------- 1 | ul.nav.sidenav 2 | li 3 | a(href='#about') About 4 | li 5 | a(href='#quick-start') Quick Start 6 | li 7 | a(href='#mission') Mission 8 | li 9 | a(href='#screenshots') Screenshots 10 | li 11 | a(href='#status') Status 12 | ul.nav 13 | li 14 | a(href='#features') Features 15 | li 16 | a(href='#limitations') Limitations 17 | li 18 | a(href='#missing-linuxcnc-codes') Missing G-Codes 19 | li 20 | a(href='#future-plans') Future Plans 21 | li 22 | a(href='#donations') Donations 23 | li 24 | a(href='#community') Get Involved 25 | li 26 | a(href='#legal') Legal 27 | li 28 | a(href='#contact') Contact 29 | -------------------------------------------------------------------------------- /doc/www/jade/main/mission.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#mission Mission 3 | p 4 | | At home manufacturing is one of the next big technology 5 | | revolutions. Much like the PC was 30 years ago. There 6 | | have been major advances in desktop 3D printing 7 | | (e.g. Maker Bot) 8 | | yet uptake of desktop CNCs has lagged despite the 9 | | availability of cheap 10 | | CNC machines. One of the major reasons for this is a 11 | | lack of Open-Source simulation and 12 | | CAM 13 | | (3D model to tool path conversion) software. CAM and NC machine simulation 14 | | present some very difficult, yet not insurmountable, 15 | | programming challenges, as is evidenced by 30+ years of 16 | | academic papers on these topics. Whereas, 3D printing 17 | | simulation and tool path generation are much easier. 18 | 19 | p 20 | | OpenSCAM aims to be a useful CNC simulation platform for the 21 | | DIY and Open-Source community. OpenSCAM should serve the highly 22 | | technical user but remain simple and user friendly enough to 23 | | support less techie types as well. To this end OpenSCAM will 24 | | focus on facilitating specific simulation tasks (i.e. use cases) 25 | | such as engraving and PCB board cutting as well as more advanced 26 | | simulation techniques and programming interfaces. 27 | -------------------------------------------------------------------------------- /doc/www/jade/main/quick-start.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#quick-start Quick Start 3 | 4 | p Click on the images below to get started: 5 | 6 | a(href='download.html') 7 | img(src='images/download.png') 8 | a(href='download.html#install') 9 | img(src='images/install.png') 10 | a(href='manual.html') 11 | img(src='images/help.png') 12 | -------------------------------------------------------------------------------- /doc/www/jade/main/screenshots.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#screenshots Screenshots 3 | 4 | p Click on the screenshots below to see a larger view. 5 | .gallery 6 | - var screenshots = 'openscam simulation_view tool_view tool_path_view '; 7 | - screenshots += 'workpiece_view full_layout'; 8 | each img in screenshots.split(' ') 9 | a(href='images/screenshots/' + img + '.png', rel='shadowbox[Screnshots]') 10 | img(src='images/screenshots/thumbs/' + img + '.png') 11 | -------------------------------------------------------------------------------- /doc/www/jade/main/template.jade: -------------------------------------------------------------------------------- 1 | - var page = 'main'; 2 | doctype html 3 | html(lang='en') 4 | head 5 | include ../head 6 | body(class = 'page-' + page) 7 | include ../header 8 | 9 | .container.docs-container 10 | .row 11 | .col-md-3 12 | .sidebar.hidden-print(role='complementary') 13 | #toc 14 | include menu 15 | 16 | .col-md-9(role='main') 17 | 18 | .docs-section 19 | include about 20 | .docs-section 21 | include quick-start 22 | .docs-section 23 | include mission 24 | .docs-section 25 | include screenshots 26 | .docs-section 27 | include status 28 | .docs-section 29 | include donate 30 | .docs-section 31 | include community 32 | .docs-section 33 | include legal 34 | .docs-section 35 | include contact 36 | 37 | include ../footer 38 | -------------------------------------------------------------------------------- /doc/www/jade/manual/layout.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#layout Layout 3 | p 4 | | OpenSCAM's layout can be easily configured in several ways. You can 5 | | enable or disable any of the toolbars or informational docks from the 6 | | View -> Toolbars or View -> Docks menus. 7 | p 8 | | In addition, there are several built-in layouts which can be selected 9 | | from the View menu. 10 | .gallery 11 | each img in ['default', 'minimal', 'full'] 12 | a(href='images/manual/layout-' + img + '.png', rel='shadowbox[Layouts]', \ 13 | title=img + ' layout') 14 | img(src='images/manual/thumbs/layout-' + img + '.png') 15 | 16 | h2#layout-moving Moving Docks & Toolbars 17 | p 18 | | Docks and toolbars can be dragged to different locations by holding down 19 | | the left mouse button on either the toolbar handle on the left or the 20 | | dock titlebar on the top of the dock. 21 | 22 | h2#layout-fullscreen Fullscreen 23 | p 24 | | It's possible to switch to a fullscreen view either by pressing F11 or 25 | | from the View menu. 26 | 27 | h2#layout-saving Saving the Layout 28 | p 29 | | The layout is automatically saved when you exit the program and restored 30 | | on the next run. 31 | -------------------------------------------------------------------------------- /doc/www/jade/manual/nc-files.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#nc-files NC Files 3 | p 4 | | NC files, or Numerical Control files, contain tool path information. 5 | | These may either be G-Code files or TPL (Tool Path 6 | | Language) files. G-Code files usually have a .nc, 7 | | .ngc or .gcode file extension. TPL file names should 8 | | end in .tpl. 9 | p 10 | | NC files may be added either via the Project menu 11 | | or by right clicking on the Project dock. To remove an NC file 12 | | right click on it's name in the Project dock and select 13 | | Remove File. 14 | p 15 | | If OpenSCAM detect changes to an NC file it will automatically restart 16 | | the simulation. 17 | -------------------------------------------------------------------------------- /doc/www/jade/manual/overview.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#overview Overview 3 | p 4 | | This manual describes how to use the various parts of the OpenSCAM 5 | | software GUI. The GUI 6 | | consists of a set of menus, toolbars, docks, the simulation view and 7 | | the tool view. These parts are described in detail in the later sections. 8 | | The graphic below highlights these parts. 9 | 10 | a(href='images/manual/overview.png', rel='shadowbox') 11 | img(src='images/manual/thumbs/overview.png') 12 | 13 | h3 Tooltips 14 | p 15 | | All of the parts of the GUI have tooltips which you can view by holding 16 | | the mouse pointer over component for a few seconds. Tooltips explain 17 | | the component's purpose. 18 | -------------------------------------------------------------------------------- /doc/www/jade/manual/playback.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#playback Tool Path Playback 3 | p 4 | | Although OpenSCAM is not yet able to show real-time simulations ( 5 | +issue(2) 6 | | ) it is possible to playback the tool path moves and to do 7 | | Partial Simulations. 8 | 9 | h2#playback-position Tool Path Position 10 | img(src='images/manual/playback-position.png') 11 | p 12 | | The tool path position can be set manually using the position slider 13 | | found at the bottom of the Simulation View. The 14 | | Position dock will tell you where the tool 15 | | is in 3D space. The Estimates 16 | | dock will give the current distance traveled and estimates of the time. 17 | | The Machine Status dock will tell you the 18 | | current tool, feed, spindle speed and direction as well as the current 19 | | line in the program. 20 | 21 | h2#playback-control Playback Control 22 | img(src='images/manual/playback-control.png') 23 | p 24 | | The Playback buttons allow you to start and stop playback or 25 | | jump to the end or begining of the simulation. 26 | p 27 | | The Speed buttons can increase or decrease the playback speed. 28 | | A value of 1x is real-time. 29 | p 30 | | The Direction button tells in which direction the simulation is 31 | | running and allow you to change the direction. 32 | -------------------------------------------------------------------------------- /doc/www/jade/manual/template.jade: -------------------------------------------------------------------------------- 1 | - var page = 'manual'; 2 | doctype html 3 | html(lang='en') 4 | head 5 | include ../head 6 | body(class = 'page-' + page) 7 | include ../header 8 | 9 | .container.docs-container 10 | .row 11 | .col-md-3 12 | .sidebar.hidden-print(role='complementary') 13 | #toc 14 | include menu 15 | 16 | .col-md-9(role='main') 17 | 18 | .docs-section 19 | include overview 20 | .docs-section 21 | include projects 22 | .docs-section 23 | include simulation 24 | .docs-section 25 | include layout 26 | .docs-section 27 | include playback 28 | .docs-section 29 | include nc-files 30 | .docs-section 31 | include tools 32 | .docs-section 33 | include workpiece 34 | .docs-section 35 | include export 36 | .docs-section 37 | include docks 38 | .docs-section 39 | include toolbars 40 | 41 | include ../footer 42 | -------------------------------------------------------------------------------- /doc/www/jade/manual/toolbars.jade: -------------------------------------------------------------------------------- 1 | .page-header 2 | h1#toolbars Toolbars 3 | p 4 | | The toolbars contain tool buttons which perform various functions when 5 | | clicked. Toolbars can be moved by holding down the left mouse button 6 | | on the toolbars handle (found on the left) and dragging. Toolbars 7 | | may also be enabled or disabled via the View -> Toolbars menu. 8 | 9 | h2#toolbars-project Project 10 | img(src='images/manual/toolbar-project.png') 11 | p 12 | | The Project toolbar allows quick access to 13 | | project file operations 14 | | new, open and save as well as export and snapshot. 15 | 16 | h2#toolbars-view View 17 | img(src='images/manual/toolbar-view.png') 18 | p 19 | | The View toolbar allows you to select 20 | | simulation view options to select 21 | | the surface view or enable/disable the tool path, tool, workpiece bounds, 22 | | or axes. 23 | 24 | h2#toolbars-perspective Perspective 25 | img(src='images/manual/toolbar-perspective.png') 26 | p 27 | | The Perspective toolbar allows you to quickly change the 28 | | simulation perspective to either 29 | | isometric, front, back, left, right, top or bottom. 30 | -------------------------------------------------------------------------------- /doc/www/jade/mixins.jade: -------------------------------------------------------------------------------- 1 | mixin issue(n) 2 | |   3 | a(href=repoURL + '/issues/' + n)= '#' + n 4 | 5 | 6 | mixin do_release(r, release, mode) 7 | - var url = 'http://openscam.org/releases/' + release + '/' + mode; 8 | - url += '/openscam/' + r[2] + '/v0.2/' + r[3]; 9 | .release(title='Download OpenSCAM for ' + r[0]) 10 | each img in r[1] 11 | img(src='images/' + img, alt=r[0]) 12 | h1= r[0] 13 | a(title='Download OpenSCAM for ' + r[0], href=url)= r[3] 14 | 15 | 16 | mixin do_releases(rs, release, mode) 17 | each r in rs 18 | +do_release(r, release, mode) 19 | -------------------------------------------------------------------------------- /doc/www/jade/notfound.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html(lang='en') 3 | meta(http-equiv='refresh' content='3; url=/') 4 | body 5 | h1 Sorry page not found 6 | h2 Redirecting... 7 | -------------------------------------------------------------------------------- /doc/www/jade/template_head.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html(lang='en') 3 | head 4 | include ../head 5 | body(class = 'page-' + page) 6 | include ../header 7 | 8 | .container.docs-container 9 | .row 10 | .col-md-3 11 | .sidebar.hidden-print(role='complementary') 12 | #toc 13 | include menu 14 | 15 | .col-md-9(role='main') 16 | -------------------------------------------------------------------------------- /doc/www/jade/template_tail.jade: -------------------------------------------------------------------------------- 1 | include ../footer 2 | -------------------------------------------------------------------------------- /examples/aztec_calendar/aztec_calendar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | aztec_calendar.nc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/bear/bear.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bear.nc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/botomata_bottom/botomata_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | botomata_bottom.nc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 1/4 end mill 19 | 20 | 21 | 1/8 end mill 22 | 23 | 24 | 1/16 end mill 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/box/box.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | box.tpl 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/cameo/cameo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | cameo.nc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/cat/cat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tiny_cat_outline.ngc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/compass/compass.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | compass.tpl 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/compass/text.tpl: -------------------------------------------------------------------------------- 1 | units(METRIC) 2 | feed(400); 3 | speed(1000); 4 | 5 | tool_set({number: 1, units: IMPERIAL, length: 0.25, diameter: 1/8, 6 | shape: CONICAL}); 7 | 8 | scale(0.32, 0.5); 9 | rotate(Math.PI / 2); 10 | translate(22.5, 5); 11 | gcode('sworn_brothers_llc.ngc'); 12 | translate(15, 5); 13 | gcode('mt_kazbegi_2013.ngc'); 14 | 15 | rapid({z: 5}); 16 | -------------------------------------------------------------------------------- /examples/compass/text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | text.tpl 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/flower_mold/flower_mold.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | flower_mold.nc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/genes-encoder/genes-encoder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/examples/genes-encoder/genes-encoder.jpg -------------------------------------------------------------------------------- /examples/genes-encoder/genes-encoder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | genes-encoder.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/heart/heart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | heart.ngc cutout.ngc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/lamp_shade/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=top.ngc side.ngc 2 | 3 | all: $(TARGETS) 4 | 5 | %.ngc: %.ngc.in 6 | ncpp $< > $@ 7 | 8 | clean: 9 | rm -f $(TARGETS) 10 | -------------------------------------------------------------------------------- /examples/lamp_shade/side.ngc.in: -------------------------------------------------------------------------------- 1 | G21 2 | F400 3 | M06 T1 4 | 5 | #<_safe_z> = 5 6 | 7 | o100 sub 8 | #include "side_inside.ngc" 9 | o100 endsub 10 | 11 | o200 sub 12 | #include "side_outside.ngc" 13 | o200 endsub 14 | 15 | o100 call [#<_safe_z>] [-3] 16 | o100 call [#<_safe_z>] [-6] 17 | o200 call [#<_safe_z>] [-3] 18 | o200 call [#<_safe_z>] [-6] 19 | 20 | M2 21 | -------------------------------------------------------------------------------- /examples/lamp_shade/side.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | side.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/lamp_shade/side_outside.ngc: -------------------------------------------------------------------------------- 1 | G0 Z#1 2 | X5.2000 Y-0.8000 3 | G1 Z#2 4 | X140.8000 5 | Y34.8000 6 | X134.8000 7 | Y67.2000 8 | X140.8000 9 | Y102.8000 10 | X134.8000 11 | Y135.2000 12 | X140.8000 13 | Y170.8000 14 | X119.2000 15 | Y164.8000 16 | X100.8000 17 | Y170.8000 18 | X79.2000 19 | Y164.8000 20 | X60.8000 21 | Y170.8000 22 | X39.2000 23 | Y164.8000 24 | X20.8000 25 | Y170.8000 26 | X5.2000 27 | Y136.8000 28 | X-0.8000 29 | Y101.2000 30 | X5.2000 31 | Y68.8000 32 | X-0.8000 33 | Y33.2000 34 | X5.2000 35 | Y-0.8000 36 | G0 Z#1 37 | -------------------------------------------------------------------------------- /examples/lamp_shade/top.ngc.in: -------------------------------------------------------------------------------- 1 | G21 2 | F400 3 | M06 T1 4 | 5 | o100 sub 6 | #include "top_inside.ngc" 7 | o100 endsub 8 | 9 | o200 sub 10 | #include "top_outside.ngc" 11 | o200 endsub 12 | 13 | o100 call [5] [-3.5] 14 | o100 call [5] [-7] 15 | o200 call [5] [-3.5] 16 | o200 call [5] [-7] 17 | 18 | M2 19 | -------------------------------------------------------------------------------- /examples/lamp_shade/top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | top.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/lamp_shade/top_outside.ngc: -------------------------------------------------------------------------------- 1 | G0 Z#1 2 | X5.2000 Y5.2000 3 | G1 Z#2 4 | X19.2000 5 | Y-0.8000 6 | X40.8000 7 | Y5.2000 8 | X59.2000 9 | Y-0.8000 10 | X80.8000 11 | Y5.2000 12 | X99.2000 13 | Y-0.8000 14 | X120.8000 15 | Y5.2000 16 | X134.8000 17 | Y19.2000 18 | X140.8000 19 | Y40.8000 20 | X134.8000 21 | Y59.2000 22 | X140.8000 23 | Y80.8000 24 | X134.8000 25 | Y99.2000 26 | X140.8000 27 | Y120.8000 28 | X134.8000 29 | Y134.8000 30 | X120.8000 31 | Y140.8000 32 | X99.2000 33 | Y134.8000 34 | X80.8000 35 | Y140.8000 36 | X59.2000 37 | Y134.8000 38 | X40.8000 39 | Y140.8000 40 | X19.2000 41 | Y134.8000 42 | X5.2000 43 | Y120.8000 44 | X-0.8000 45 | Y99.2000 46 | X5.2000 47 | Y80.8000 48 | X-0.8000 49 | Y59.2000 50 | X5.2000 51 | Y40.8000 52 | X-0.8000 53 | Y19.2000 54 | X5.2000 55 | Y5.2000 56 | G0 Z#1 57 | -------------------------------------------------------------------------------- /examples/openscam/openscam.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | openscam.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/rhodonea/rhodonea.tpl: -------------------------------------------------------------------------------- 1 | // See: http://en.wikipedia.org/wiki/Rose_%28mathematics%29 2 | 3 | var drawRhodonea = function (n, d, depth, scale) { 4 | var left_limit = 0; 5 | var right_limit = 4 * Math.PI; 6 | 7 | for (var theta = left_limit; theta <= right_limit; theta += 0.02) { 8 | r = Math.cos(n / d * theta); 9 | x = r * Math.cos(theta) * scale; 10 | y = r * Math.sin(theta) * scale; 11 | 12 | if (getZ() != depth) { 13 | rapid(x, y); 14 | cut({z: depth}); 15 | } 16 | 17 | cut(x, y); 18 | } 19 | } 20 | 21 | tool_set({number: 1, units: IMPERIAL, length: 1/4, diameter: 1/2, 22 | shape: CONICAL}); 23 | tool_set({number: 2, units: IMPERIAL, length: 1, diameter: 1/8, 24 | shape: CYLINDRICAL}); 25 | 26 | feed(200); 27 | speed(4000); 28 | 29 | tool(2); 30 | tool(1); 31 | rapid({z: 5}); 32 | 33 | scale(0.25, 0.25); 34 | 35 | drawRhodonea(7, 2, -6, 100); 36 | rapid({z: 5}); 37 | 38 | rotate(2 * Math.PI / 14 / 2); 39 | drawRhodonea(7, 2, -7, 90); 40 | rapid({z: 5}); 41 | 42 | // Cutout 43 | tool(2); 44 | 45 | loadIdentity(); 46 | var radius = 30; 47 | var maxStep = 4; 48 | var depth = 14; 49 | var steps = Math.ceil(depth / maxStep); 50 | var delta = depth / steps; 51 | 52 | rapid(-radius, 0); 53 | for (var i = 0; i < steps; i++) { 54 | cut({z: -delta * (i + 1)}); 55 | arc({x: radius, y: 0, z: 0, angle: 2 * Math.PI, plane: XY}); 56 | } 57 | rapid({z: 5}); 58 | 59 | speed(0); 60 | -------------------------------------------------------------------------------- /examples/rhodonea/rhodonea.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | rhodonea.tpl 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/scorpion/scorpion.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | scorpion.nc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/slant_test/slant_test.nc: -------------------------------------------------------------------------------- 1 | G21 T3 F5 2 | G0 X0 Y0 Z0 3 | G1 X5 Y5 Z-5 4 | G1 X10 Y10 Z0 5 | G0 Z1 6 | G0 X0 7 | G0 Z0 8 | G1 X5 Y5 Z-5 9 | G1 X10 Y0 Z0 10 | G0 Z1 11 | G0 X5 12 | G0 Z0 13 | G1 Y5 Z-5 14 | G1 Y10 Z0 15 | G0 Z1 16 | G0 X0 Y5 17 | G0 Z0 18 | G1 X5 Z-5 19 | G1 X10 Z0 20 | G0 Z0 21 | -------------------------------------------------------------------------------- /examples/slant_test/slant_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | slant_test.nc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/stretching_cat/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=stretching_cat.ngc 2 | 3 | all: $(TARGETS) 4 | 5 | %.ngc: %.ngc.in 6 | ncpp $< > $@ 7 | 8 | clean: 9 | rm -f $(TARGETS) 10 | -------------------------------------------------------------------------------- /examples/stretching_cat/layers.ngc: -------------------------------------------------------------------------------- 1 | ()#2 = -2.6 2 | #include "path_small.ngc" 3 | 4 | ()#2 = -5.2 5 | #include "path_small.ngc" 6 | 7 | ()#2 = -7.8 8 | #include "path_small.ngc" 9 | 10 | ()#2 = -10.4 11 | #include "path_small.ngc" 12 | -------------------------------------------------------------------------------- /examples/stretching_cat/stretching_cat.ngc.in: -------------------------------------------------------------------------------- 1 | % 2 | M3 3 | G21 (All units in mm) 4 | T1 5 | 6 | O100 sub 7 | #include "path_small.ngc" 8 | O100 endsub 9 | 10 | O200 sub 11 | g0 Z5 12 | g10 L2 P2 X#1 Y#2 13 | g55 (coorindate system 2) 14 | O100 call [-2.6] 15 | O100 call [-5.2] 16 | O100 call [-7.6] 17 | O100 call [-10.4] 18 | O200 endsub 19 | 20 | ()# = 0 21 | O101 repeat [2] 22 | ()# = 0 23 | 24 | O102 repeat [4] 25 | O200 call [#] [#] 26 | ()# = [# + 50.8] 27 | O102 endrepeat 28 | 29 | ()# = [# + 50.8] 30 | O101 endrepeat 31 | 32 | g0 Z5 33 | 34 | M5 35 | M2 36 | % 37 | -------------------------------------------------------------------------------- /examples/stretching_cat/stretching_cat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | stretching_cat.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tiger/tiger.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tiger.nc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/vcarve/vcarve.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vcarve.ngc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /images/header.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/images/header.bmp -------------------------------------------------------------------------------- /images/openscam-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/images/openscam-logo.png -------------------------------------------------------------------------------- /images/openscam.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/images/openscam.ico -------------------------------------------------------------------------------- /images/openscam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/images/openscam.png -------------------------------------------------------------------------------- /ncpp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ncpp uses the C preprocessor to process NC files. 4 | # 5 | # Author: Joseph Coffland, Cauldron Development LLC 6 | # License: GPL 2.0+ 7 | # 8 | # Some numeric and named references need to be escaped in order to pass G-Code 9 | # to the C preprocessor with out generating errors. Added escapes are removed 10 | # after processing. 11 | 12 | if [ "$1" == "" ]; then 13 | echo "NC file, a.k.a. G-Code, preprocessor." 14 | echo "Usage: $0 ..." 15 | exit 1 16 | fi 17 | 18 | for i in "$@"; do 19 | sed 's/^\([[:space:]]*\)#\([<0-9]\)/\1\\#\2/' "$i" | 20 | cpp -I$(dirname "$i") | 21 | grep -v '^#' | 22 | sed 's/^\([[:space:]]*\)\\#/\1#/' 23 | done 24 | -------------------------------------------------------------------------------- /osx/QtCore.pc: -------------------------------------------------------------------------------- 1 | package=QtCore 2 | prefix=/Library/Frameworks/${package}.framework 3 | exec_prefix=${prefix} 4 | libdir=${exec_prefix} 5 | includedir=${prefix}/Headers 6 | 7 | Name: QtCore 8 | Description: QtCore 9 | Version: 4.8.5 10 | 11 | Libs: -L${libdir} ${libdir}/${package} 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /osx/QtGui.pc: -------------------------------------------------------------------------------- 1 | package=QtGui 2 | prefix=/Library/Frameworks/${package}.framework 3 | exec_prefix=${prefix} 4 | libdir=${exec_prefix} 5 | includedir=${prefix}/Headers 6 | 7 | Name: QtGui 8 | Description: QtGui 9 | Version: 4.8.5 10 | 11 | Libs: -L${libdir} ${libdir}/${package} 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /osx/QtOpenGL.pc: -------------------------------------------------------------------------------- 1 | package=QtOpenGL 2 | prefix=/Library/Frameworks/${package}.framework 3 | exec_prefix=${prefix} 4 | libdir=${exec_prefix} 5 | includedir=${prefix}/Headers 6 | 7 | Name: QtOpenGL 8 | Description: QtOpenGL 9 | Version: 4.8.5 10 | 11 | Libs: -L${libdir} ${libdir}/${package} 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /osx/Scripts/postflight: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | open -a OpenSCAM.app 3 | -------------------------------------------------------------------------------- /osx/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Open-Source Simulation & Computer Aided Machining 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | %(package_name)s.pkg 18 | 19 | -------------------------------------------------------------------------------- /osx/openscam.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/osx/openscam.icns -------------------------------------------------------------------------------- /osx/pkg.plist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | BundleHasStrictIdentifier 8 | 9 | BundleIsRelocatable 10 | 11 | BundleIsVersionChecked 12 | 13 | BundleOverwriteAction 14 | upgrade 15 | RootRelativeBundlePath 16 | Applications/OpenSCAM.app 17 | BundlePostInstallScriptPath 18 | postflight 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /qt/icons/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/about.png -------------------------------------------------------------------------------- /qt/icons/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/add.png -------------------------------------------------------------------------------- /qt/icons/axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/axes.png -------------------------------------------------------------------------------- /qt/icons/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/back.png -------------------------------------------------------------------------------- /qt/icons/backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/backward.png -------------------------------------------------------------------------------- /qt/icons/bbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/bbox.png -------------------------------------------------------------------------------- /qt/icons/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/bottom.png -------------------------------------------------------------------------------- /qt/icons/configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/configure.png -------------------------------------------------------------------------------- /qt/icons/cut_surface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/cut_surface.png -------------------------------------------------------------------------------- /qt/icons/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/donate.png -------------------------------------------------------------------------------- /qt/icons/end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/end.png -------------------------------------------------------------------------------- /qt/icons/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/export.png -------------------------------------------------------------------------------- /qt/icons/faster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/faster.png -------------------------------------------------------------------------------- /qt/icons/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/forward.png -------------------------------------------------------------------------------- /qt/icons/front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/front.png -------------------------------------------------------------------------------- /qt/icons/go-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/go-left.png -------------------------------------------------------------------------------- /qt/icons/go-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/go-right.png -------------------------------------------------------------------------------- /qt/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/help.png -------------------------------------------------------------------------------- /qt/icons/idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/idle.png -------------------------------------------------------------------------------- /qt/icons/isometric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/isometric.png -------------------------------------------------------------------------------- /qt/icons/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/left.png -------------------------------------------------------------------------------- /qt/icons/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/new.png -------------------------------------------------------------------------------- /qt/icons/no-surface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/no-surface.png -------------------------------------------------------------------------------- /qt/icons/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/open.png -------------------------------------------------------------------------------- /qt/icons/openscam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/openscam.png -------------------------------------------------------------------------------- /qt/icons/path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/path.png -------------------------------------------------------------------------------- /qt/icons/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/pause.png -------------------------------------------------------------------------------- /qt/icons/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/play.png -------------------------------------------------------------------------------- /qt/icons/quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/quit.png -------------------------------------------------------------------------------- /qt/icons/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/remove.png -------------------------------------------------------------------------------- /qt/icons/restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/restart.png -------------------------------------------------------------------------------- /qt/icons/revert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/revert.png -------------------------------------------------------------------------------- /qt/icons/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/right.png -------------------------------------------------------------------------------- /qt/icons/running.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/running.gif -------------------------------------------------------------------------------- /qt/icons/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/save.png -------------------------------------------------------------------------------- /qt/icons/save_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/save_as.png -------------------------------------------------------------------------------- /qt/icons/slower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/slower.png -------------------------------------------------------------------------------- /qt/icons/smooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/smooth.png -------------------------------------------------------------------------------- /qt/icons/snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/snapshot.png -------------------------------------------------------------------------------- /qt/icons/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/start.png -------------------------------------------------------------------------------- /qt/icons/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/stop.png -------------------------------------------------------------------------------- /qt/icons/surface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/surface.png -------------------------------------------------------------------------------- /qt/icons/tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/tool.png -------------------------------------------------------------------------------- /qt/icons/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/top.png -------------------------------------------------------------------------------- /qt/icons/wire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/icons/wire.png -------------------------------------------------------------------------------- /qt/images/bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/images/bitcoin.png -------------------------------------------------------------------------------- /qt/images/openscam-bitcoin-donations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/images/openscam-bitcoin-donations.png -------------------------------------------------------------------------------- /qt/images/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/images/paypal.png -------------------------------------------------------------------------------- /qt/images/paypal_donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/qt/images/paypal_donate.png -------------------------------------------------------------------------------- /src/openscam/Real.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_REAL_H 22 | #define OPENSCAM_REAL_H 23 | 24 | namespace OpenSCAM { 25 | //#define REAL_IS_FLOAT 26 | 27 | #ifdef REAL_IS_FLOAT 28 | typedef float real; 29 | #else 30 | typedef double real; 31 | #endif 32 | } 33 | 34 | #endif // OPENSCAM_REAL_H 35 | 36 | -------------------------------------------------------------------------------- /src/openscam/contour/Cell.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_CELL_H 22 | #define OPENSCAM_CELL_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | namespace OpenSCAM { 29 | class Cell { 30 | public: 31 | uint8_t signs; 32 | Vector3R vertex; 33 | 34 | Cell(uint8_t signs, const Vector3R &vertex) : 35 | signs(signs), vertex(vertex) {} 36 | }; 37 | } 38 | 39 | #endif // OPENSCAM_CELL_H 40 | 41 | -------------------------------------------------------------------------------- /src/openscam/contour/ContourGenerator.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "ContourGenerator.h" 22 | 23 | #include 24 | 25 | using namespace cb; 26 | using namespace OpenSCAM; 27 | 28 | 29 | void ContourGenerator::updateProgress(double progress) { 30 | double now = Timer::now(); 31 | double tDelta = now - lastTime; 32 | 33 | if (tDelta < 0.25) return; 34 | 35 | SmartLock lock(this); 36 | 37 | // ETA 38 | double pDelta = progress - this->progress; 39 | double remain = 1.0 - progress; 40 | if (pDelta) eta = remain * tDelta / pDelta; 41 | 42 | this->progress = progress; 43 | 44 | lastTime = now; 45 | } 46 | -------------------------------------------------------------------------------- /src/openscam/contour/DualContouring.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_DUAL_CONTOURING_H 22 | #define OPENSCAM_DUAL_CONTOURING_H 23 | 24 | #include "ContourGenerator.h" 25 | #include "ElementSurface.h" 26 | 27 | #include 28 | 29 | 30 | namespace OpenSCAM { 31 | class DualContouring : public ContourGenerator { 32 | cb::SmartPointer surface; 33 | 34 | public: 35 | // From ContourGenerator 36 | cb::SmartPointer getSurface() {return surface;} 37 | void run(FieldFunction &func, const Rectangle3R &bbox, real step); 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_DUAL_CONTOURING_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/contour/Edge.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_EDGE_H 22 | #define OPENSCAM_EDGE_H 23 | 24 | #include 25 | 26 | namespace OpenSCAM { 27 | class Edge { 28 | public: 29 | Vector3R vertex; 30 | Vector3R normal; 31 | }; 32 | } 33 | 34 | #endif // OPENSCAM_EDGE_H 35 | 36 | -------------------------------------------------------------------------------- /src/openscam/contour/HermiteData.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_HERMITE_DATA_H 22 | #define OPENSCAM_HERMITE_DATA_H 23 | 24 | #include "ContourGenerator.h" 25 | #include "HermiteSlice.h" 26 | 27 | #include 28 | 29 | #include 30 | 31 | namespace OpenSCAM { 32 | class HermiteData : 33 | std::vector >, public ContourGenerator { 34 | public: 35 | // From ContourGenerator 36 | cb::SmartPointer getSurface() {return 0;} 37 | void run(FieldFunction &func, const Rectangle3R &bbox, real step); 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_HERMITE_DATA_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/cutsim/MoveType.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "MoveType.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/cutsim/MoveType.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef CBANG_ENUM_EXPAND 22 | #ifndef CBANG_MOVE_TYPE_H 23 | #define CBANG_MOVE_TYPE_H 24 | 25 | #define CBANG_ENUM_NAME MoveType 26 | #define CBANG_ENUM_NAMESPACE OpenSCAM 27 | #define CBANG_ENUM_PATH openscam/cutsim 28 | #define CBANG_ENUM_PREFIX 5 29 | #include 30 | 31 | #endif // CBANG_MOVE_TYPE_H 32 | #else // CBANG_ENUM_EXPAND 33 | 34 | CBANG_ENUM_EXPAND(MOVE_RAPID, 0) 35 | CBANG_ENUM_EXPAND(MOVE_CUTTING, 1) 36 | CBANG_ENUM_EXPAND(MOVE_PROBE, 2) 37 | CBANG_ENUM_EXPAND(MOVE_DRILL, 3) 38 | 39 | #endif // CBANG_ENUM_EXPAND 40 | -------------------------------------------------------------------------------- /src/openscam/cutsim/ResolutionMode.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "ResolutionMode.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/cutsim/Simulation.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Simulation.h" 22 | 23 | using namespace OpenSCAM; 24 | 25 | -------------------------------------------------------------------------------- /src/openscam/cutsim/Simulation.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_SIMULATION_H 22 | #define OPENSCAM_SIMULATION_H 23 | 24 | namespace OpenSCAM { 25 | class Simulation { 26 | public: 27 | }; 28 | } 29 | 30 | #endif // OPENSCAM_SIMULATION_H 31 | 32 | -------------------------------------------------------------------------------- /src/openscam/cutsim/Workpiece.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Workpiece.h" 22 | 23 | #include 24 | #include 25 | 26 | using namespace std; 27 | using namespace cb; 28 | using namespace OpenSCAM; 29 | 30 | 31 | Workpiece::Workpiece(const Rectangle3R &r) : 32 | Rectangle3R(r), center(getCenter()) { 33 | Vector3R halfDim = getDimensions() / 2; 34 | halfDim2 = halfDim * halfDim; 35 | } 36 | -------------------------------------------------------------------------------- /src/openscam/dxf/DXFPoint.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_DXFPOINT_H 22 | #define OPENSCAM_DXFPOINT_H 23 | 24 | #include "DXFEntity.h" 25 | 26 | 27 | namespace OpenSCAM { 28 | class DXFPoint : public DXFEntity, public cb::Vector3D { 29 | public: 30 | DXFPoint(const cb::Vector3D &p) : cb::Vector3D(p) {} 31 | 32 | // From DXFEntity 33 | type_t getType() const {return DXF_POINT;} 34 | }; 35 | } 36 | 37 | #endif // OPENSCAM_DXFPOINT_H 38 | 39 | -------------------------------------------------------------------------------- /src/openscam/gcode/ModalGroup.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "ModalGroup.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/gcode/Processor.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PROCESSOR_H 22 | #define OPENSCAM_PROCESSOR_H 23 | 24 | #include "ast/Block.h" 25 | 26 | #include 27 | 28 | namespace OpenSCAM { 29 | class Processor { 30 | public: 31 | virtual void operator()(const cb::SmartPointer &block) = 0; 32 | }; 33 | } 34 | 35 | #endif // OPENSCAM_PROCESSOR_H 36 | 37 | -------------------------------------------------------------------------------- /src/openscam/gcode/Token.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_TOKEN_H 22 | #define OPENSCAM_TOKEN_H 23 | 24 | #include "TokenType.h" 25 | 26 | #include 27 | 28 | namespace OpenSCAM { 29 | typedef cb::Token Token; 30 | } 31 | 32 | #endif // OPENSCAM_TOKEN_H 33 | 34 | -------------------------------------------------------------------------------- /src/openscam/gcode/TokenType.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "TokenType.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Assign.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Assign.h" 22 | 23 | #include "Reference.h" 24 | 25 | using namespace std; 26 | using namespace OpenSCAM; 27 | 28 | 29 | double Assign::eval(Evaluator &evaluator) { 30 | exprValue = expr->eval(evaluator); // Evaluate the expression first 31 | 32 | // Only eval numeric reference's number expression 33 | if (ref->instance()) 34 | ref->instance()->evalNumber(evaluator); 35 | 36 | return exprValue; 37 | } 38 | 39 | 40 | void Assign::print(ostream &stream) const { 41 | stream << *ref << " = " << *expr; 42 | } 43 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Comment.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Comment.h" 22 | 23 | using namespace std; 24 | using namespace OpenSCAM; 25 | 26 | 27 | void Comment::print(ostream &stream) const { 28 | if (paren) stream << '(' << text << ')'; 29 | else stream << ';' << text; 30 | } 31 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Comment.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_COMMENT_H 22 | #define OPENSCAM_COMMENT_H 23 | 24 | #include "Entity.h" 25 | 26 | namespace OpenSCAM { 27 | class Comment : public Entity { 28 | std::string text; 29 | bool paren; 30 | 31 | public: 32 | Comment(const std::string &text, bool paren) : text(text), paren(paren) {} 33 | 34 | const std::string &getText() const {return text;} 35 | bool getParen() const {return paren;} 36 | 37 | // From Entity 38 | void print(std::ostream &stream) const; 39 | }; 40 | } 41 | 42 | #endif // OPENSCAM_COMMENT_H 43 | 44 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/FunctionCall.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "FunctionCall.h" 22 | 23 | #include 24 | 25 | using namespace std; 26 | using namespace cb; 27 | using namespace OpenSCAM; 28 | 29 | 30 | void FunctionCall::print(ostream &stream) const { 31 | stream << String::toUpper(name) << '[' << *arg1 << ']'; 32 | if (!arg2.isNull()) stream << "/[" << *arg2 << ']'; 33 | } 34 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/NamedReference.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "NamedReference.h" 22 | 23 | using namespace std; 24 | using namespace cb; 25 | using namespace OpenSCAM; 26 | 27 | 28 | void NamedReference::print(ostream &stream) const { 29 | stream << "#<" << name << '>'; 30 | } 31 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/NamedReference.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_NAMED_REFERENCE_H 22 | #define OPENSCAM_NAMED_REFERENCE_H 23 | 24 | #include "Entity.h" 25 | 26 | namespace OpenSCAM { 27 | class NamedReference : public Entity { 28 | std::string name; 29 | 30 | public: 31 | NamedReference(const std::string &name) : name(name) {} 32 | 33 | const std::string &getName() const {return name;} 34 | 35 | // From Entity 36 | double eval(Evaluator &evaluator) {return evaluator.eval(*this);} 37 | void print(std::ostream &stream) const; 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_NAMED_REFERENCE_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Number.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Number.h" 22 | 23 | #include 24 | 25 | using namespace std; 26 | using namespace cb; 27 | using namespace OpenSCAM; 28 | 29 | 30 | void Number::print(ostream &stream) const { 31 | // TODO What about precision? The spec says upto about 17 figures 32 | stream << String(value); 33 | } 34 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Number.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_NUMBER_H 22 | #define OPENSCAM_NUMBER_H 23 | 24 | #include "Entity.h" 25 | 26 | namespace OpenSCAM { 27 | class Number : public Entity { 28 | double value; 29 | 30 | public: 31 | Number(double value) : value(value) {} 32 | 33 | double getValue() const {return value;} 34 | 35 | // From Entity 36 | bool isConstant() {return true;} 37 | double eval(Evaluator &evaluator) {return evaluator.eval(*this);} 38 | void print(std::ostream &stream) const; 39 | }; 40 | } 41 | 42 | #endif // OPENSCAM_NUMBER_H 43 | 44 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/OCode.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "OCode.h" 22 | 23 | using namespace OpenSCAM; 24 | 25 | 26 | double OCode::eval(Evaluator &evaluator) { 27 | return numExpr.isNull() ? 0 : (number = numExpr->eval(evaluator)); 28 | } 29 | 30 | 31 | void OCode::print(std::ostream &stream) const { 32 | stream << 'O'; 33 | 34 | if (numExpr.isNull()) stream << filename; 35 | else stream << *numExpr; 36 | 37 | stream << ' ' << keyword; 38 | 39 | for (unsigned i = 0; i < expressions.size(); i++) 40 | stream << ' ' << *expressions[i]; 41 | } 42 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Operator.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "Operator.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/QuotedExpr.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "QuotedExpr.h" 22 | 23 | using namespace std; 24 | using namespace OpenSCAM; 25 | 26 | 27 | void QuotedExpr::print(ostream &stream) const { 28 | stream << '[' << *expr << ']'; 29 | } 30 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/Reference.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Reference.h" 22 | 23 | using namespace std; 24 | using namespace OpenSCAM; 25 | 26 | 27 | double Reference::evalNumber(Evaluator &evaluator) { 28 | return number = expr->eval(evaluator); 29 | // TODO warn if ref value is not an integer 30 | } 31 | 32 | 33 | double Reference::eval(Evaluator &evaluator) { 34 | evalNumber(evaluator); 35 | return evaluator.eval(*this); 36 | } 37 | 38 | 39 | void Reference::print(ostream &stream) const { 40 | stream << '#' << *expr; 41 | } 42 | -------------------------------------------------------------------------------- /src/openscam/gcode/ast/UnaryOp.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "UnaryOp.h" 22 | 23 | #include 24 | 25 | using namespace std; 26 | using namespace cb; 27 | using namespace OpenSCAM; 28 | 29 | UnaryOp::UnaryOp(Operator type, const SmartPointer &expr) : 30 | type(type), expr(expr) { 31 | location = expr->getLocation(); 32 | } 33 | 34 | 35 | void UnaryOp::print(ostream &stream) const { 36 | switch (type) { 37 | case Operator::ADD_OP: stream << '+'; break; 38 | case Operator::SUB_OP: stream << '-'; break; 39 | default: THROW("Invalid unary operator"); 40 | } 41 | 42 | stream << *expr; 43 | } 44 | -------------------------------------------------------------------------------- /src/openscam/opt/Group.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Group.h" 22 | 23 | using namespace std; 24 | using namespace cb; 25 | using namespace OpenSCAM; 26 | 27 | 28 | double Group::computeCost() const { 29 | double cost = 0; 30 | 31 | Path *last = 0; 32 | for (const_iterator it = begin(); it != end(); it++) { 33 | Path *current = it->get(); 34 | if (last) cost += last->costTo(*current); 35 | last = current; 36 | } 37 | 38 | return cost; 39 | } 40 | -------------------------------------------------------------------------------- /src/openscam/opt/Group.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_GROUP_H 22 | #define OPENSCAM_GROUP_H 23 | 24 | #include "Path.h" 25 | 26 | #include 27 | 28 | #include 29 | 30 | #include 31 | 32 | namespace OpenSCAM { 33 | class Group : public std::vector > { 34 | public: 35 | std::vector > setup; 36 | 37 | double computeCost() const; 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_GROUP_H 42 | -------------------------------------------------------------------------------- /src/openscam/opt/Path.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Path.h" 22 | 23 | using namespace std; 24 | using namespace OpenSCAM; 25 | 26 | void Path::reverse() { 27 | list::reverse(); 28 | for (iterator it = begin(); it != end(); it++) it->reverse(); 29 | } 30 | -------------------------------------------------------------------------------- /src/openscam/opt/Path.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PATH_H 22 | #define OPENSCAM_PATH_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include 29 | 30 | namespace OpenSCAM { 31 | class Path : public std::list { 32 | public: 33 | 34 | const Vector3R &startPoint() const {return front()[0];} 35 | const Vector3R &endPoint() const {return back()[1];} 36 | void reverse(); 37 | double costTo(const Path &o) const 38 | {return endPoint().distance(o.startPoint());} 39 | }; 40 | } 41 | 42 | #endif // OPENSCAM_PATH_H 43 | 44 | -------------------------------------------------------------------------------- /src/openscam/pcb/Factory.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PCB_FACTORY_H 22 | #define OPENSCAM_PCB_FACTORY_H 23 | 24 | #include "Object.h" 25 | 26 | namespace OpenSCAM { 27 | namespace PCB { 28 | struct FactoryBase { 29 | virtual Object *create() = 0; 30 | }; 31 | 32 | 33 | template 34 | struct Factory : public FactoryBase { 35 | Object *create() {return new T;} 36 | }; 37 | } 38 | } 39 | 40 | #endif // OPENSCAM_PCB_FACTORY_H 41 | -------------------------------------------------------------------------------- /src/openscam/pcb/Layer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PCB_LAYER_H 22 | #define OPENSCAM_PCB_LAYER_H 23 | 24 | #include "Layout.h" 25 | #include "Point.h" 26 | 27 | namespace OpenSCAM { 28 | namespace PCB { 29 | class Layer : public Layout { 30 | public: 31 | int number; 32 | std::string name; 33 | 34 | // From Object 35 | const char *getName() const {return "Layer";} 36 | void write(std::ostream &stream) const; 37 | void read(std::istream &stream); 38 | 39 | void merge(const Layer &layer); 40 | }; 41 | } 42 | } 43 | 44 | #endif // OPENSCAM_PCB_LAYER_H 45 | 46 | -------------------------------------------------------------------------------- /src/openscam/pcb/NetList.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PCB_NETLIST_H 22 | #define OPENSCAM_PCB_NETLIST_H 23 | 24 | #include "Layout.h" 25 | #include "Point.h" 26 | 27 | namespace OpenSCAM { 28 | namespace PCB { 29 | class NetList : public Layout { 30 | public: 31 | // From Object 32 | const char *getName() const {return "NetList";} 33 | void write(std::ostream &stream) const; 34 | void read(std::istream &stream); 35 | 36 | void merge(const NetList &netlist); 37 | }; 38 | } 39 | } 40 | 41 | #endif // OPENSCAM_PCB_NETLIST_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/pcb/PCB.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PCB_PCB_H 22 | #define OPENSCAM_PCB_PCB_H 23 | 24 | #include "Arc.h" 25 | #include "ElementArc.h" 26 | #include "Element.h" 27 | #include "ElementLine.h" 28 | #include "Layer.h" 29 | #include "Layout.h" 30 | #include "Line.h" 31 | #include "NetList.h" 32 | #include "Pad.h" 33 | #include "Pin.h" 34 | #include "Point.h" 35 | #include "Polygon.h" 36 | #include "Symbol.h" 37 | #include "Text.h" 38 | #include "Via.h" 39 | 40 | #endif // OPENSCAM_PCB_PCB_H 41 | -------------------------------------------------------------------------------- /src/openscam/pcb/Symbol.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PCB_SYMBOL_H 22 | #define OPENSCAM_PCB_SYMBOL_H 23 | 24 | #include "Layout.h" 25 | #include "Point.h" 26 | 27 | namespace OpenSCAM { 28 | namespace PCB { 29 | class Symbol : public Layout { 30 | public: 31 | char c; 32 | int delta; 33 | 34 | // From Object 35 | const char *getName() const {return "Symbol";} 36 | void write(std::ostream &stream) const; 37 | void read(std::istream &stream); 38 | }; 39 | } 40 | } 41 | 42 | #endif // OPENSCAM_PCB_SYMBOL_H 43 | 44 | -------------------------------------------------------------------------------- /src/openscam/probe/ProbePoint.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_PROBE_POINT_H 22 | #define OPENSCAM_PROBE_POINT_H 23 | 24 | #include 25 | 26 | namespace OpenSCAM { 27 | class ProbePoint : public cb::Vector2D { 28 | public: 29 | bool probe; 30 | unsigned address; 31 | 32 | ProbePoint() : probe(false), address(0) {} 33 | }; 34 | } 35 | 36 | #endif // OPENSCAM_PROBE_POINT_H 37 | 38 | -------------------------------------------------------------------------------- /src/openscam/qt/AboutDialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_ABOUT_DIALOG_H 22 | #define OPENSCAM_ABOUT_DIALOG_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | 29 | namespace Ui {class AboutDialog;} 30 | 31 | 32 | namespace OpenSCAM { 33 | class AboutDialog : public QDialog { 34 | Q_OBJECT; 35 | 36 | cb::SmartPointer ui; 37 | 38 | public: 39 | AboutDialog(); 40 | 41 | protected slots: 42 | void on_creditsPushButton_clicked(); 43 | void on_licensePushButton_clicked(); 44 | }; 45 | } 46 | 47 | #endif // OPENSCAM_ABOUT_DIALOG_H 48 | 49 | -------------------------------------------------------------------------------- /src/openscam/qt/ClickWidget.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "ClickWidget.h" 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | using namespace OpenSCAM; 29 | 30 | 31 | void ClickWidget::mousePressEvent(QMouseEvent *event) { 32 | QString url = statusTip(); 33 | 34 | LOG_INFO(1, "Opening URL " << url.toAscii().data()); 35 | 36 | QDesktopServices::openUrl(url); 37 | } 38 | -------------------------------------------------------------------------------- /src/openscam/qt/ClickWidget.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_CLICK_WIDGET_H 22 | #define OPENSCAM_CLICK_WIDGET_H 23 | 24 | #include 25 | 26 | 27 | namespace OpenSCAM { 28 | class ClickWidget : public QWidget { 29 | public: 30 | ClickWidget(QWidget *parent = 0) : QWidget(parent) {} 31 | 32 | // From QWidget 33 | void mousePressEvent(QMouseEvent *event); 34 | }; 35 | } 36 | 37 | #endif // OPENSCAM_CLICK_WIDGET_H 38 | 39 | -------------------------------------------------------------------------------- /src/openscam/qt/CutSimThread.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "CutSimThread.h" 22 | 23 | #include 24 | 25 | using namespace cb; 26 | using namespace OpenSCAM; 27 | 28 | 29 | void CutSimThread::done() { 30 | if (!cutSim->shouldQuit()) 31 | QCoreApplication::postEvent(parent, new QEvent((QEvent::Type)event)); 32 | } 33 | 34 | 35 | void CutSimThread::stop() { 36 | cutSim->interrupt(); 37 | Thread::stop(); 38 | } 39 | -------------------------------------------------------------------------------- /src/openscam/qt/DonateDialog.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "DonateDialog.h" 22 | 23 | #include "ui_donate_dialog.h" 24 | 25 | using namespace OpenSCAM; 26 | 27 | 28 | DonateDialog::DonateDialog() : ui(new Ui::DonateDialog) { 29 | ui->setupUi(this); 30 | } 31 | -------------------------------------------------------------------------------- /src/openscam/qt/DonateDialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_DONATE_DIALOG_H 22 | #define OPENSCAM_DONATE_DIALOG_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | 29 | namespace Ui {class DonateDialog;} 30 | 31 | 32 | namespace OpenSCAM { 33 | class DonateDialog : public QDialog { 34 | Q_OBJECT; 35 | 36 | cb::SmartPointer ui; 37 | 38 | public: 39 | DonateDialog(); 40 | 41 | protected slots: 42 | }; 43 | } 44 | 45 | #endif // OPENSCAM_DONATE_DIALOG_H 46 | 47 | -------------------------------------------------------------------------------- /src/openscam/qt/QApplication.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "QApplication.h" 22 | 23 | #include 24 | 25 | using namespace cb; 26 | 27 | 28 | OpenSCAM::QApplication::QApplication(int &argc, char *argv[]) : 29 | ::QApplication(argc, argv) {} 30 | 31 | 32 | bool OpenSCAM::QApplication::notify(QObject *receiver, QEvent *e) { 33 | try { 34 | return ::QApplication::notify(receiver, e); 35 | } CATCH_ERROR; 36 | 37 | return false; 38 | } 39 | -------------------------------------------------------------------------------- /src/openscam/qt/QApplication.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_QAPPLICATION_H 22 | #define OPENSCAM_QAPPLICATION_H 23 | 24 | #include 25 | 26 | namespace OpenSCAM { 27 | class QApplication : public ::QApplication { 28 | public: 29 | QApplication(int &argc, char *argv[]); 30 | 31 | // From QApplication 32 | bool notify(QObject *receiver, QEvent *e); 33 | }; 34 | } 35 | 36 | #endif // OPENSCAM_QAPPLICATION_H 37 | 38 | -------------------------------------------------------------------------------- /src/openscam/qt/SurfaceThread.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "SurfaceThread.h" 22 | 23 | #include 24 | 25 | using namespace OpenSCAM; 26 | 27 | 28 | void SurfaceThread::run() { 29 | try { 30 | surface = cutSim->computeSurface(path, bounds, resolution, time, smooth); 31 | } CATCH_ERROR; 32 | done(); 33 | } 34 | -------------------------------------------------------------------------------- /src/openscam/qt/ToolPathThread.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "ToolPathThread.h" 22 | 23 | #include 24 | #include 25 | 26 | using namespace OpenSCAM; 27 | 28 | 29 | void ToolPathThread::run() { 30 | v8::Locker locker; 31 | try { 32 | path = cutSim->computeToolPath(tools, files); 33 | } CATCH_ERROR; 34 | done(); 35 | } 36 | -------------------------------------------------------------------------------- /src/openscam/render/RenderMode.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "RenderMode.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/render/RenderMode.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef CBANG_ENUM_EXPAND 22 | #ifndef OPENSCAM_RENDER_MODE_H 23 | #define OPENSCAM_RENDER_MODE_H 24 | 25 | #define CBANG_ENUM_NAME RenderMode 26 | #define CBANG_ENUM_NAMESPACE OpenSCAM 27 | #define CBANG_ENUM_PATH openscam/render 28 | #include 29 | 30 | #endif // OPENSCAM_RENDER_MODE_H 31 | #else // CBANG_ENUM_EXPAND 32 | 33 | // EDX Register 34 | CBANG_ENUM_EXPAND(MCUBES_MODE, 1) 35 | CBANG_ENUM_EXPAND(MTETRA_MODE, 2) 36 | CBANG_ENUM_EXPAND(DC_MODE, 3) 37 | CBANG_ENUM_EXPAND(HERMITE_MODE, 4) 38 | 39 | #endif // CBANG_ENUM_EXPAND 40 | -------------------------------------------------------------------------------- /src/openscam/sim/CoordinateSystem.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_COORDINATE_SYSTEM_H 22 | #define OPENSCAM_COORDINATE_SYSTEM_H 23 | 24 | namespace OpenSCAM { 25 | class CoordinateSystem { 26 | public: 27 | unsigned number; 28 | double rotation; // TODO should this be an address? 29 | 30 | CoordinateSystem(unsigned number = 0) : number(number) {reset();} 31 | void reset() {rotation = 0;} 32 | }; 33 | } 34 | 35 | #endif // OPENSCAM_COORDINATE_SYSTEM_H 36 | 37 | -------------------------------------------------------------------------------- /src/openscam/sim/ToolShape.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "ToolShape.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/sim/ToolUnits.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #define CBANG_ENUM_IMPL 22 | #include "ToolUnits.h" 23 | #include 24 | -------------------------------------------------------------------------------- /src/openscam/sim/ToolUnits.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef CBANG_ENUM_EXPAND 22 | #ifndef CBANG_TOOL_UNITS_H 23 | #define CBANG_TOOL_UNITS_H 24 | 25 | #define CBANG_ENUM_NAME ToolUnits 26 | #define CBANG_ENUM_NAMESPACE OpenSCAM 27 | #define CBANG_ENUM_PATH openscam/sim 28 | #define CBANG_ENUM_PREFIX 6 29 | #include 30 | 31 | #endif // CBANG_TOOL_UNITS_H 32 | #else // CBANG_ENUM_EXPAND 33 | 34 | CBANG_ENUM_EXPAND(UNITS_MM, 0) 35 | CBANG_ENUM_EXPAND(UNITS_INCH, 1) 36 | 37 | #endif // CBANG_ENUM_EXPAND 38 | -------------------------------------------------------------------------------- /src/openscam/value/ValueGroup.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "ValueGroup.h" 22 | 23 | using namespace OpenSCAM; 24 | 25 | 26 | void ValueGroup::updated() { 27 | for (unsigned i = 0; i < size(); i++) at(i)->updated(); 28 | } 29 | -------------------------------------------------------------------------------- /src/openscam/value/ValueSet.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "ValueSet.h" 22 | 23 | #include 24 | 25 | using namespace std; 26 | using namespace cb; 27 | using namespace OpenSCAM; 28 | 29 | 30 | const SmartPointer &ValueSet::get(const string &name) const { 31 | iterator it = find(name); 32 | if (it == end()) THROWS("Value '" << name << "' not found"); 33 | return it->second; 34 | } 35 | 36 | 37 | void ValueSet::updated() { 38 | for (iterator it = begin(); it != end(); it++) it->second->updated(); 39 | } 40 | -------------------------------------------------------------------------------- /src/openscam/value/VarValue.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_VAR_VALUE_H 22 | #define OPENSCAM_VAR_VALUE_H 23 | 24 | #include "Value.h" 25 | 26 | 27 | namespace OpenSCAM { 28 | template 29 | class VarValue : public Value { 30 | T &var; 31 | 32 | public: 33 | VarValue(const std::string name, T &var) : 34 | Value(name), var(var) {} 35 | 36 | // From Value 37 | void updated() {set(var);} 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_VAR_VALUE_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/view/BoundsView.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_BOUNDS_VIEW_H 22 | #define OPENSCAM_BOUNDS_VIEW_H 23 | 24 | #include 25 | 26 | namespace OpenSCAM { 27 | class BoundsView : Rectangle3R { 28 | public: 29 | BoundsView(const Rectangle3R &r) : Rectangle3R(r) {} 30 | BoundsView(const Vector3R &p1, const Vector3R &p2) : Rectangle3R(p1, p2) {} 31 | 32 | void draw(); 33 | }; 34 | } 35 | 36 | #endif // OPENSCAM_BOUNDS_VIEW_H 37 | 38 | -------------------------------------------------------------------------------- /src/openscam/view/Color.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Color.h" 22 | 23 | using namespace OpenSCAM; 24 | 25 | const Color Color::RED(1, 0, 0); 26 | const Color Color::GREEN(0, 1, 0); 27 | const Color Color::BLUE(0, 0, 1); 28 | const Color Color::CYAN(0, 1, 1); 29 | const Color Color::YELLOW(1, 1, 0); 30 | const Color Color::PURPLE(1, 0, 1); 31 | -------------------------------------------------------------------------------- /src/openscam/view/Color.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_COLOR_H 22 | #define OPENSCAM_COLOR_H 23 | 24 | #include 25 | 26 | namespace OpenSCAM { 27 | class Color : public cb::Vector<4, float> { 28 | public: 29 | Color(float r = 0, float g = 0, float b = 0, float a = 1) : 30 | cb::Vector<4, float>(r, g, b, a) {} 31 | 32 | static const Color RED; 33 | static const Color GREEN; 34 | static const Color BLUE; 35 | static const Color CYAN; 36 | static const Color YELLOW; 37 | static const Color PURPLE; 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_COLOR_H 42 | 43 | -------------------------------------------------------------------------------- /src/openscam/view/GL.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "GL.h" 22 | 23 | #include 24 | #include 25 | 26 | using namespace std; 27 | using namespace cb; 28 | using namespace OpenSCAM; 29 | 30 | 31 | namespace OpenSCAM { 32 | void checkGLError(const string &message) { 33 | GLenum err = glGetError(); 34 | if (err != GL_NO_ERROR) 35 | LOG_ERROR(message << "GL error: " << err << ": " << gluErrorString(err)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/openscam/view/GL.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_GL_H 22 | #define OPENSCAM_GL_H 23 | 24 | #include // Must be first 25 | 26 | #include 27 | 28 | #include 29 | 30 | #ifdef REAL_IS_FLOAT 31 | #define GL_REAL GL_FLOAT 32 | #else 33 | #define GL_REAL GL_DOUBLE 34 | #endif 35 | 36 | namespace OpenSCAM { 37 | void checkGLError(const std::string &message = std::string()); 38 | } 39 | 40 | #ifdef __DEBUG 41 | #define CHECK_GL_ERROR(msg) checkGLError(SSTR(__FUNCTION__ << "() " << msg)) 42 | #else 43 | #define CHECK_GL_ERROR(msg) 44 | #endif 45 | 46 | #endif // OPENSCAM_GL_H 47 | -------------------------------------------------------------------------------- /src/openscam/view/Viewer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef OPENSCAM_VIEWER_H 22 | #define OPENSCAM_VIEWER_H 23 | 24 | namespace OpenSCAM { 25 | class View; 26 | class Machine; 27 | class GLFreeType; 28 | 29 | class Viewer { 30 | GLFreeType *font; 31 | void *toolQuad; 32 | 33 | public: 34 | Viewer() : font(0), toolQuad(0) {} 35 | 36 | void init(); 37 | void draw(const View &view); 38 | }; 39 | } 40 | 41 | #endif // OPENSCAM_VIEWER_H 42 | 43 | -------------------------------------------------------------------------------- /src/resources/Courier_New.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/src/resources/Courier_New.ttf -------------------------------------------------------------------------------- /src/resources/Courier_New_Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/src/resources/Courier_New_Bold.ttf -------------------------------------------------------------------------------- /src/tplang/ClipperLibrary.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef TPLANG_CLIPPER_LIBRARY_H 22 | #define TPLANG_CLIPPER_LIBRARY_H 23 | 24 | #include "TPLContext.h" 25 | 26 | #include 27 | 28 | 29 | namespace tplang { 30 | class ClipperLibrary : public cb::js::Library { 31 | public: 32 | ClipperLibrary(TPLContext &ctx) : cb::js::Library(ctx) {} 33 | 34 | void add(cb::js::ObjectTemplate &tmpl); 35 | 36 | // Javascript call backs 37 | cb::js::Value offsetCB(const cb::js::Arguments &args); 38 | }; 39 | } 40 | 41 | #endif // TPLANG_CLIPPER_LIBRARY_H 42 | 43 | -------------------------------------------------------------------------------- /src/tplang/Javascript.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "Javascript.h" 22 | 23 | using namespace tplang; 24 | 25 | -------------------------------------------------------------------------------- /src/tplang/Javascript.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef TPLANG_JAVASCRIPT_H 22 | #define TPLANG_JAVASCRIPT_H 23 | 24 | namespace tplang { 25 | class Javascript { 26 | public: 27 | }; 28 | } 29 | 30 | #endif // TPLANG_JAVASCRIPT_H 31 | 32 | -------------------------------------------------------------------------------- /src/tplang/MachineLinearizer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef MACHINE_LINEARIZER_H 22 | #define MACHINE_LINEARIZER_H 23 | 24 | #include "MachineAdapter.h" 25 | 26 | 27 | namespace tplang { 28 | class MachineLinearizer : public MachineAdapter { 29 | double arcPrecision; 30 | 31 | public: 32 | MachineLinearizer(double arcPrecision = 360) : arcPrecision(arcPrecision) {} 33 | 34 | // From tplang::MachineInterface 35 | void arc(const cb::Vector3D &offset, double degrees, plane_t plane); 36 | }; 37 | } 38 | 39 | #endif // MACHINE_LINEARIZER_H 40 | 41 | -------------------------------------------------------------------------------- /src/tplang/MachinePipeline.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef TPLANG_MACHINE_PIPELINE_H 22 | #define TPLANG_MACHINE_PIPELINE_H 23 | 24 | #include "MachineAdapter.h" 25 | 26 | #include 27 | 28 | #include 29 | 30 | 31 | namespace tplang { 32 | class MachinePipeline : public MachineAdapter { 33 | std::vector > pipeline; 34 | 35 | public: 36 | MachinePipeline() {} 37 | 38 | void add(const cb::SmartPointer &m); 39 | }; 40 | } 41 | 42 | #endif // TPLANG_MACHINE_PIPELINE_H 43 | 44 | -------------------------------------------------------------------------------- /src/tplang/MoveStream.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #include "MoveStream.h" 22 | 23 | using namespace tplang; 24 | 25 | -------------------------------------------------------------------------------- /src/tplang/MoveStream.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************\ 2 | 3 | OpenSCAM is an Open-Source CAM software. 4 | Copyright (C) 2011-2014 Joseph Coffland 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | \******************************************************************************/ 20 | 21 | #ifndef TPLANG_MOVE_STREAM_H 22 | #define TPLANG_MOVE_STREAM_H 23 | 24 | #include 25 | 26 | 27 | namespace tplang { 28 | class MoveStream { 29 | public: 30 | virtual void move(const OpenSCAM::Move &move) = 0; 31 | }; 32 | } 33 | 34 | #endif // TPLANG_MOVE_STREAM_H 35 | 36 | -------------------------------------------------------------------------------- /tests/offsetTests/CoordinateSystem/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | g0 X10 Y10 3 | g10 L2 P2 X10 Y10 4 | g55 5 | g0 X10 Y10 6 | g0 X15 Y15 7 | -------------------------------------------------------------------------------- /tests/offsetTests/CoordinateSystem/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/offsetTests/CoordinateSystem/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/offsetTests/CoordinateSystem/expect/stderr -------------------------------------------------------------------------------- /tests/offsetTests/CoordinateSystem/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y10 2 | G0 X20 Y20 3 | G0 X25 Y25 4 | -------------------------------------------------------------------------------- /tests/offsetTests/Global/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | G0 X10 Y10 3 | G92 X0 Y0 4 | G0 X10 Y10 5 | G0 X15 Y15 6 | G0 X0 Y0 7 | G92.2 8 | G0 X0 Y0 9 | G92.3 10 | G0 X0 Y0 11 | G92.1 12 | G92.3 13 | G0 X0 Y0 14 | -------------------------------------------------------------------------------- /tests/offsetTests/Global/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/offsetTests/Global/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/offsetTests/Global/expect/stderr -------------------------------------------------------------------------------- /tests/offsetTests/Global/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y10 2 | G0 X20 Y20 3 | G0 X25 Y25 4 | G0 X10 Y10 5 | G0 X0 Y0 6 | G0 X10 Y10 7 | G0 X0 Y0 8 | -------------------------------------------------------------------------------- /tests/offsetTests/th.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | class Suite: 4 | def __init__(self, th): 5 | cmd = os.path.abspath(th.path + '/../../oscameval') 6 | 7 | th.Test('CoordinateSystem', command = cmd) 8 | th.Test('Global', command = cmd) 9 | -------------------------------------------------------------------------------- /tests/th.py: -------------------------------------------------------------------------------- 1 | class Suite: 2 | def __init__(self, th): 3 | pass 4 | -------------------------------------------------------------------------------- /tests/tplTests/DXFTest/data/stdin: -------------------------------------------------------------------------------- 1 | zSafe = 5; 2 | zCut = -5; 3 | feed(50); 4 | 5 | 6 | function samePos(x, y) { 7 | small = 0.0001; 8 | return getX() - small < x && x < getX() + small && 9 | getY() - small < y && y < getY() + small; 10 | } 11 | 12 | 13 | function cut_layer(layer) { 14 | for (entity in layer) { 15 | entity = layer[entity]; 16 | 17 | switch (entity.type) { 18 | case POINT: print('point\n'); break; 19 | 20 | case LINE: 21 | print('(line)\n'); 22 | if (samePos(entity.x2, entity.y2)) 23 | cut(entity.x1, entity.y1); 24 | 25 | else { 26 | if (!samePos(entity.x1, entity.y1)) { 27 | rapid({z: zSafe}); 28 | rapid(entity.x1, entity.y1); 29 | cut({z: zCut}); 30 | } 31 | 32 | cut(entity.x2, entity.y2); 33 | } 34 | break; 35 | 36 | case ARC: print('(arc)\n'); break; 37 | 38 | case POLYLINE: 39 | if (!entity.vertices.length) break; 40 | print('(polyline)\n'); 41 | v = entity.vertices[0]; 42 | 43 | if (!samePos(v.x, v.y)) { 44 | rapid({z: zSafe}); 45 | rapid(v.x, v.y); 46 | cut({z: zCut}); 47 | } 48 | 49 | for (i = 1; i < entity.vertices.length; i++) { 50 | v = entity.vertices[i]; 51 | cut(v.x, v.y); 52 | } 53 | 54 | break; 55 | 56 | case SPLINE: print('(spline)\n'); break; 57 | } 58 | } 59 | } 60 | 61 | 62 | dxf = open('pattern.dxf'); 63 | 64 | for (name in dxf) { 65 | print('(Layer: ', name, ')\n'); 66 | cut_layer(dxf[name]); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /tests/tplTests/DXFTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/DXFTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/DXFTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/DowelTest/data/stdin: -------------------------------------------------------------------------------- 1 | feed(80); 2 | 3 | rapid({z: 1}); 4 | rapid(-5); 5 | cut({z: 0}); 6 | arc({x: 5, z: -14, angle: PI * 16}); 7 | -------------------------------------------------------------------------------- /tests/tplTests/DowelTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/DowelTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/DowelTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/RotateTest/data/stdin: -------------------------------------------------------------------------------- 1 | feed(400); 2 | rapid(0, 0, 0); 3 | 4 | for (i = 1; i <= 40; i++) { 5 | loadIdentity(); 6 | var angle = PI / 20.0 * i; 7 | rotate(angle, 1, 1, 1); 8 | 9 | print("(angle=" + angle + ")\n"); 10 | rapid(10, 10); 11 | cut({z: -1}); 12 | cut(10, -10); 13 | cut(-10, -10); 14 | cut(-10, 10); 15 | cut(10, 10); 16 | rapid({z: 0}); 17 | } 18 | -------------------------------------------------------------------------------- /tests/tplTests/RotateTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/RotateTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/RotateTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/SquareTest/data/stdin: -------------------------------------------------------------------------------- 1 | feed(400); // Set the feed rate to 400 millimeters per minute 2 | tool(1); // Select tool 1 3 | 4 | rapid({z: 5}); // Move to a safe height of 5mm 5 | rapid({x: 1, y: 1}); // Go to start position 6 | speed(2000); // Spin at 2000 RPM in the clockwise direction 7 | 8 | cut({z: -3}); // Cut down to depth 9 | cut({x: 11}); // Cut to second corner 10 | cut({y: 11}); // Cut to third corner 11 | cut({x: 1}); // Cut to forth corner 12 | cut({y: 1}); // Cut back to begining 13 | 14 | rapid({z: 5}); // Move back to safe position 15 | speed(0); // Stop spinning 16 | -------------------------------------------------------------------------------- /tests/tplTests/SquareTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/SquareTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/SquareTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/SquareTest/expect/stdout: -------------------------------------------------------------------------------- 1 | G21 2 | F400 3 | G0 Z5 4 | G0 X1 Y1 5 | M3 S2000 6 | G1 Z-3 7 | G1 X11 8 | G1 Y11 9 | G1 X1 10 | G1 Y1 11 | G0 Z5 12 | M5 13 | % 14 | -------------------------------------------------------------------------------- /tests/tplTests/SquaresTest/data/stdin: -------------------------------------------------------------------------------- 1 | function square(size, depth, safe) { 2 | cut({z: depth}); // Cut down to depth 3 | icut({x: size}); // Cut to second corner 4 | icut({y: size}); // Cut to third corner 5 | icut({x: -size}); // Cut to forth corner 6 | icut({y: -size}); // Cut back to begining 7 | rapid({z: safe}); // Move back to safe position 8 | } 9 | 10 | feed(40); // Set the feed rate to 40 millimeters per second 11 | tool(1); // Select tool 1 12 | 13 | rapid({z: 5}); // Move to a safe height of 5mm 14 | rapid({x: 0, y: 0}); // Go to center position 15 | speed(2000); // Spin at 2000 RPM in the clockwise direction 16 | 17 | for (i = 1; i <= 10; i++) { 18 | rapid({x: -5 * i, y: -5 * i}); 19 | square(i * 10, -3, 5); 20 | } 21 | 22 | speed(0); // Stop spinning 23 | -------------------------------------------------------------------------------- /tests/tplTests/SquaresTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/SquaresTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/SquaresTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/SquaresTest/expect/stdout: -------------------------------------------------------------------------------- 1 | G21 2 | F40 3 | G0 Z5 4 | G0 5 | M3 S2000 6 | G0 X-5 Y-5 7 | G1 Z-3 8 | G1 X5 9 | G1 Y5 10 | G1 X-5 11 | G1 Y-5 12 | G0 Z5 13 | G0 X-10 Y-10 14 | G1 Z-3 15 | G1 X10 16 | G1 Y10 17 | G1 X-10 18 | G1 Y-10 19 | G0 Z5 20 | G0 X-15 Y-15 21 | G1 Z-3 22 | G1 X15 23 | G1 Y15 24 | G1 X-15 25 | G1 Y-15 26 | G0 Z5 27 | G0 X-20 Y-20 28 | G1 Z-3 29 | G1 X20 30 | G1 Y20 31 | G1 X-20 32 | G1 Y-20 33 | G0 Z5 34 | G0 X-25 Y-25 35 | G1 Z-3 36 | G1 X25 37 | G1 Y25 38 | G1 X-25 39 | G1 Y-25 40 | G0 Z5 41 | G0 X-30 Y-30 42 | G1 Z-3 43 | G1 X30 44 | G1 Y30 45 | G1 X-30 46 | G1 Y-30 47 | G0 Z5 48 | G0 X-35 Y-35 49 | G1 Z-3 50 | G1 X35 51 | G1 Y35 52 | G1 X-35 53 | G1 Y-35 54 | G0 Z5 55 | G0 X-40 Y-40 56 | G1 Z-3 57 | G1 X40 58 | G1 Y40 59 | G1 X-40 60 | G1 Y-40 61 | G0 Z5 62 | G0 X-45 Y-45 63 | G1 Z-3 64 | G1 X45 65 | G1 Y45 66 | G1 X-45 67 | G1 Y-45 68 | G0 Z5 69 | G0 X-50 Y-50 70 | G1 Z-3 71 | G1 X50 72 | G1 Y50 73 | G1 X-50 74 | G1 Y-50 75 | G0 Z5 76 | M5 77 | % 78 | -------------------------------------------------------------------------------- /tests/tplTests/StarTest/data/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ../expect/stdout 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/tplTests/StarTest/data/stdin: -------------------------------------------------------------------------------- 1 | function square(size, depth, safe) { 2 | cut({z: depth}); // Cut down to depth 3 | icut({x: size}); // Cut to second corner 4 | icut({y: size}); // Cut to third corner 5 | icut({x: -size}); // Cut to forth corner 6 | icut({y: -size}); // Cut back to begining 7 | rapid({z: safe}); // Move back to safe position 8 | } 9 | 10 | 11 | function squares(count, space, depth, safe) { 12 | for (var i = 1; i <= count; i++) { 13 | rapid({x: -space * i, y: -space * i}); 14 | square(i * 2 * space, depth, safe); 15 | } 16 | } 17 | 18 | 19 | feed(400); // Set the feed rate to 40 millimeters per second 20 | tool(1); // Select tool 1 21 | 22 | rapid({z: 5}); // Move to a safe height of 5mm 23 | rapid({x: 0, y: 0}); // Go to center position 24 | speed(2000); // Spin at 2000 RPM in the clockwise direction 25 | 26 | for (var i = 0; i < 4; i++) { 27 | squares(10, 5, -3, 5); 28 | rotate(PI / 8); 29 | } 30 | 31 | speed(0); // Stop spinning 32 | -------------------------------------------------------------------------------- /tests/tplTests/StarTest/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/tplTests/StarTest/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/tplTests/StarTest/expect/stderr -------------------------------------------------------------------------------- /tests/tplTests/th.py: -------------------------------------------------------------------------------- 1 | import os 2 | import glob 3 | 4 | 5 | class Suite: 6 | def __init__(self, th): 7 | cmd = os.path.abspath(th.path + '/../../tplang') 8 | 9 | for test in glob.glob('*Test'): 10 | th.Test(test, command = cmd) 11 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNamed/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | o100 sub 4 | #<_x> = #1 5 | # = 15 6 | G0 X#<_x> Y# 7 | o100 endsub 8 | 9 | o100 call [10] 10 | 11 | G0 X#<_x> 12 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNamed/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNamed/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/GlobalNamed/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNamed/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNumeric/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | o100 sub 4 | G0 X#31 Y#32 5 | o100 endsub 6 | 7 | #31=10 8 | #32=15 9 | o100 call [1] [1.5] 10 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNumeric/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNumeric/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/GlobalNumeric/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/GlobalNumeric/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNamed/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | o100 sub 4 | # = #1 5 | # = 15 6 | G0 X# Y# 7 | o100 endsub 8 | 9 | o100 call [10] 10 | 11 | G0 Z# 12 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNamed/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNamed/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/LocalNamed/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/LocalNamed/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNumeric/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | o100 sub 4 | G0 X#1 Y#2 5 | o100 endsub 6 | 7 | o100 call [10] [15] 8 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNumeric/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/LocalNumeric/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/LocalNumeric/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/LocalNumeric/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/Named/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | #=10 4 | #=15 5 | 6 | G0 X# Y# 7 | -------------------------------------------------------------------------------- /tests/varRefTests/Named/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/Named/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/Named/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/Named/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/Numeric/data/stdin: -------------------------------------------------------------------------------- 1 | G21 2 | 3 | #1=10 4 | #2=15 5 | 6 | G0 X#1 Y#2 7 | -------------------------------------------------------------------------------- /tests/varRefTests/Numeric/expect/return: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/varRefTests/Numeric/expect/stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwatte/OpenSCAM/e291c18432d4103c6fe563296048e9ac83f113dc/tests/varRefTests/Numeric/expect/stderr -------------------------------------------------------------------------------- /tests/varRefTests/Numeric/expect/stdout: -------------------------------------------------------------------------------- 1 | G0 X10 Y15 2 | -------------------------------------------------------------------------------- /tests/varRefTests/th.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | class Suite: 4 | def __init__(self, th): 5 | cmd = os.path.abspath(th.path + '/../../oscameval') 6 | 7 | th.Test('Numeric', command = cmd) 8 | th.Test('Named', command = cmd) 9 | th.Test('LocalNumeric', command = cmd) 10 | th.Test('GlobalNumeric', command = cmd) 11 | th.Test('LocalNamed', command = cmd) 12 | th.Test('GlobalNamed', command = cmd) 13 | --------------------------------------------------------------------------------