├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── CuraEngine3 ├── CuraEngine3.pro ├── json-file │ ├── 101Hero.def.json │ ├── 3dator.def.json │ ├── abax_pri3.def.json │ ├── abax_pri5.def.json │ ├── abax_titan.def.json │ ├── alya3dp.def.json │ ├── anycubic_i3_mega.def.json │ ├── bfb.def.json │ ├── bq_hephestos.def.json │ ├── bq_hephestos_2.def.json │ ├── bq_hephestos_xl.def.json │ ├── bq_witbox.def.json │ ├── bq_witbox_2.def.json │ ├── builder_premium_large.def.json │ ├── builder_premium_medium.def.json │ ├── builder_premium_small.def.json │ ├── cartesio.def.json │ ├── creality_cr10.def.json │ ├── creality_cr10s.def.json │ ├── creality_cr10s4.def.json │ ├── creality_cr10s5.def.json │ ├── custom.def.json │ ├── dagoma_discoeasy200.def.json │ ├── dagoma_neva.def.json │ ├── dagoma_neva_magis.def.json │ ├── delta_go.def.json │ ├── deltabot.def.json │ ├── deltacomb.def.json │ ├── easyarts_ares.def.json │ ├── fabtotum.def.json │ ├── fdmextruder.def.json │ ├── fdmprinter.def.json │ ├── felixtec4dual.def.json │ ├── folgertech_FT-5.def.json │ ├── gmax15plus.def.json │ ├── gmax15plus_dual.def.json │ ├── grr_neo.def.json │ ├── helloBEEprusa.def.json │ ├── imade3d_jellybox.def.json │ ├── innovo_inventor.def.json │ ├── julia.def.json │ ├── kemiq_q2_beta.def.json │ ├── kemiq_q2_gama.def.json │ ├── kossel_mini.def.json │ ├── kossel_pro.def.json │ ├── kupido.def.json │ ├── makeR_pegasus.def.json │ ├── makeR_prusa_tairona_i3.def.json │ ├── makeit_pro_l.def.json │ ├── makeit_pro_m.def.json │ ├── maker_starter.def.json │ ├── makerbotreplicator.def.json │ ├── malyan_m180.def.json │ ├── malyan_m200.def.json │ ├── mankati_fullscale_xt_plus.def.json │ ├── mendel90.def.json │ ├── monoprice_select_mini_v1.def.json │ ├── monoprice_select_mini_v2.def.json │ ├── ord.def.json │ ├── peopoly_moai.def.json │ ├── printrbot_play.def.json │ ├── printrbot_play_heated.def.json │ ├── printrbot_simple.def.json │ ├── printrbot_simple_extended.def.json │ ├── printrbot_simple_makers_kit.def.json │ ├── prusa_i3.def.json │ ├── prusa_i3_mk2.def.json │ ├── prusa_i3_xl.def.json │ ├── punchtec_connect_xl.def.json │ ├── raise3D_N2_dual.def.json │ ├── raise3D_N2_plus_dual.def.json │ ├── raise3D_N2_plus_single.def.json │ ├── raise3D_N2_single.def.json │ ├── renkforce_rf100.def.json │ ├── rigid3d.def.json │ ├── rigid3d_3rdgen.def.json │ ├── rigid3d_hobby.def.json │ ├── rigid3d_mucit.def.json │ ├── rigid3d_zero.def.json │ ├── rigid3d_zero2.def.json │ ├── rigidbot.def.json │ ├── rigidbot_big.def.json │ ├── robo_3d_r1.def.json │ ├── seemecnc_artemis.def.json │ ├── seemecnc_v32.def.json │ ├── tam.def.json │ ├── tevo_blackwidow.def.json │ ├── tevo_tarantula.def.json │ ├── tevo_tornado.def.json │ ├── tizyx_k25.def.json │ ├── ubuild-3d_mr_bot_280.def.json │ ├── ultimaker.def.json │ ├── ultimaker2.def.json │ ├── ultimaker2_extended.def.json │ ├── ultimaker2_extended_plus.def.json │ ├── ultimaker2_go.def.json │ ├── ultimaker2_plus.def.json │ ├── ultimaker3.def.json │ ├── ultimaker3_extended.def.json │ ├── ultimaker_original.def.json │ ├── ultimaker_original_dual.def.json │ ├── ultimaker_original_plus.def.json │ ├── ultimaker_s5.def.json │ ├── uni_print_3d.def.json │ ├── uniqbot_one.def.json │ ├── vertex_delta_k8800.def.json │ ├── vertex_k8400.def.json │ ├── vertex_k8400_dual.def.json │ ├── wanhao_d4s.def.json │ ├── wanhao_d6.def.json │ ├── wanhao_d6_plus.def.json │ ├── wanhao_duplicator5S.def.json │ ├── wanhao_duplicator5Smini.def.json │ ├── wanhao_i3.def.json │ ├── wanhao_i3mini.def.json │ ├── wanhao_i3plus.def.json │ ├── winbo_dragonl4.def.json │ ├── winbo_mini2.def.json │ ├── winbo_superhelper105.def.json │ ├── winbo_superhelper155.def.json │ ├── zone3d_printer.def.json │ └── zyyx_agile.def.json ├── libs │ ├── DO_NOT_CHANGE_THESE │ ├── clipper │ │ ├── License.txt │ │ ├── README │ │ ├── clipper.cpp │ │ └── clipper.hpp │ └── rapidjson │ │ ├── allocators.h │ │ ├── document.h │ │ ├── encodedstream.h │ │ ├── encodings.h │ │ ├── error │ │ ├── en.h │ │ └── error.h │ │ ├── filereadstream.h │ │ ├── filewritestream.h │ │ ├── internal │ │ ├── biginteger.h │ │ ├── diyfp.h │ │ ├── dtoa.h │ │ ├── ieee754.h │ │ ├── itoa.h │ │ ├── meta.h │ │ ├── pow10.h │ │ ├── stack.h │ │ ├── strfunc.h │ │ └── strtod.h │ │ ├── license.txt │ │ ├── memorybuffer.h │ │ ├── memorystream.h │ │ ├── msinttypes │ │ ├── inttypes.h │ │ └── stdint.h │ │ ├── prettywriter.h │ │ ├── rapidjson.h │ │ ├── reader.h │ │ ├── stringbuffer.h │ │ └── writer.h ├── main.cpp └── src │ ├── ConicalOverhang.cpp │ ├── ConicalOverhang.h │ ├── ExtruderTrain.cpp │ ├── ExtruderTrain.h │ ├── FanSpeedLayerTime.h │ ├── FffGcodeWriter.cpp │ ├── FffGcodeWriter.h │ ├── FffPolygonGenerator.cpp │ ├── FffPolygonGenerator.h │ ├── FffProcessor.cpp │ ├── FffProcessor.h │ ├── FlowTempGraph.h │ ├── GCodePathConfig.cpp │ ├── GCodePathConfig.h │ ├── GcodeLayerThreader.h │ ├── InsetOrderOptimizer.cpp │ ├── InsetOrderOptimizer.h │ ├── LayerPlan.cpp │ ├── LayerPlan.h │ ├── LayerPlanBuffer.cpp │ ├── LayerPlanBuffer.h │ ├── MergeInfillLines.cpp │ ├── MergeInfillLines.h │ ├── MeshGroup.cpp │ ├── MeshGroup.h │ ├── Mold.cpp │ ├── Mold.h │ ├── Preheat.cpp │ ├── Preheat.h │ ├── PrimeTower.cpp │ ├── PrimeTower.h │ ├── PrintFeature.h │ ├── RetractionConfig.h │ ├── SkirtBrim.cpp │ ├── SkirtBrim.h │ ├── SpaceFillType.h │ ├── SupportInfillPart.cpp │ ├── SupportInfillPart.h │ ├── TopSurface.cpp │ ├── TopSurface.h │ ├── TreeSupport.cpp │ ├── TreeSupport.h │ ├── WallsComputation.cpp │ ├── WallsComputation.h │ ├── Weaver.cpp │ ├── Weaver.h │ ├── Wireframe2gcode.cpp │ ├── Wireframe2gcode.h │ ├── bridge.cpp │ ├── bridge.h │ ├── commandSocket.cpp │ ├── commandSocket.h │ ├── gcodeExport.cpp │ ├── gcodeExport.h │ ├── infill.cpp │ ├── infill.h │ ├── infill │ ├── DensityProvider.h │ ├── ImageBasedDensityProvider.cpp │ ├── ImageBasedDensityProvider.h │ ├── NoZigZagConnectorProcessor.cpp │ ├── NoZigZagConnectorProcessor.h │ ├── SierpinskiFill.cpp │ ├── SierpinskiFill.h │ ├── SierpinskiFillProvider.cpp │ ├── SierpinskiFillProvider.h │ ├── SpaghettiInfill.cpp │ ├── SpaghettiInfill.h │ ├── SpaghettiInfillPathGenerator.cpp │ ├── SpaghettiInfillPathGenerator.h │ ├── SubDivCube.cpp │ ├── SubDivCube.h │ ├── UniformDensityProvider.h │ ├── ZigzagConnectorProcessor.cpp │ ├── ZigzagConnectorProcessor.h │ └── stb_image.h │ ├── layerPart.cpp │ ├── layerPart.h │ ├── mesh.cpp │ ├── mesh.h │ ├── multiVolumes.cpp │ ├── multiVolumes.h │ ├── pathOrderOptimizer.cpp │ ├── pathOrderOptimizer.h │ ├── pathPlanning │ ├── Comb.cpp │ ├── Comb.h │ ├── CombPath.h │ ├── CombPaths.h │ ├── GCodePath.cpp │ ├── GCodePath.h │ ├── LinePolygonsCrossings.cpp │ ├── LinePolygonsCrossings.h │ ├── NozzleTempInsert.cpp │ ├── NozzleTempInsert.h │ ├── TimeMaterialEstimates.cpp │ └── TimeMaterialEstimates.h │ ├── progress │ ├── Progress.cpp │ ├── Progress.h │ ├── ProgressEstimator.h │ ├── ProgressEstimatorLinear.h │ ├── ProgressStageEstimator.cpp │ └── ProgressStageEstimator.h │ ├── raft.cpp │ ├── raft.h │ ├── settings │ ├── AdaptiveLayerHeights.cpp │ ├── AdaptiveLayerHeights.h │ ├── PathConfigStorage.cpp │ ├── PathConfigStorage.h │ ├── SettingConfig.cpp │ ├── SettingConfig.h │ ├── SettingContainer.cpp │ ├── SettingContainer.h │ ├── SettingRegistry.cpp │ ├── SettingRegistry.h │ ├── SettingsToGV.h │ ├── settings.cpp │ └── settings.h │ ├── skin.cpp │ ├── skin.h │ ├── sliceDataStorage.cpp │ ├── sliceDataStorage.h │ ├── slicer.cpp │ ├── slicer.h │ ├── support.cpp │ ├── support.h │ ├── timeEstimate.cpp │ ├── timeEstimate.h │ ├── utils │ ├── AABB.cpp │ ├── AABB.h │ ├── AABB3D.cpp │ ├── AABB3D.h │ ├── Coord_t.h │ ├── Date.cpp │ ├── Date.h │ ├── IntPoint.h │ ├── LazyInitialization.h │ ├── LinearAlg2D.cpp │ ├── ListPolyIt.cpp │ ├── ListPolyIt.h │ ├── Lock.h │ ├── MinimumSpanningTree.cpp │ ├── MinimumSpanningTree.h │ ├── NoCopy.h │ ├── Point3.cpp │ ├── Point3.h │ ├── PolygonConnector.cpp │ ├── PolygonConnector.h │ ├── PolygonProximityLinker.cpp │ ├── PolygonProximityLinker.h │ ├── PolygonsPointIndex.cpp │ ├── PolygonsPointIndex.h │ ├── ProximityPointLink.cpp │ ├── ProximityPointLink.h │ ├── SVG.cpp │ ├── SVG.h │ ├── SparseGrid.h │ ├── SparseLineGrid.h │ ├── SparsePointGrid.h │ ├── SparsePointGridInclusive.h │ ├── SymmetricPair.h │ ├── UnionFind.h │ ├── algorithm.h │ ├── floatpoint.h │ ├── gettime.cpp │ ├── gettime.h │ ├── linearAlg2D.h │ ├── logoutput.cpp │ ├── logoutput.h │ ├── macros.h │ ├── math.h │ ├── optional.h │ ├── orderOptimizer.h │ ├── polygon.cpp │ ├── polygon.h │ ├── polygonUtils.cpp │ ├── polygonUtils.h │ ├── socket.cpp │ ├── socket.h │ └── string.h │ ├── wallOverlap.cpp │ ├── wallOverlap.h │ └── weaveDataStorage.h ├── Magic3D ├── COM-test │ ├── GetCOM │ │ ├── GetCOM.pro │ │ ├── GetCOM.pro.user │ │ ├── main.cpp │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ └── mainwindow.ui │ └── build-GetCOM-unknown-Debug │ │ ├── Makefile │ │ ├── Makefile.Debug │ │ ├── Makefile.Release │ │ ├── debug │ │ ├── GetCOM.exe │ │ ├── main.o │ │ ├── mainwindow.o │ │ ├── moc_mainwindow.cpp │ │ └── moc_mainwindow.o │ │ └── ui_mainwindow.h ├── Interface │ ├── cilent.h │ ├── configset.cpp │ ├── configset.h │ ├── configset.ui │ ├── controlPanel │ │ ├── Plot │ │ │ ├── qcustomplot.cpp │ │ │ └── qcustomplot.h │ │ ├── controlpanel.cpp │ │ ├── controlpanel.h │ │ ├── controlpanel.ui │ │ ├── printthread.cpp │ │ ├── printthread.h │ │ ├── readgcode.cpp │ │ ├── readgcode.h │ │ ├── settingdialog.cpp │ │ ├── settingdialog.h │ │ └── settingdialog.ui │ ├── graph.cpp │ ├── graph.h │ ├── greentech.cpp │ ├── greentech.h │ ├── greentech.ui │ ├── imageviewwidget.cpp │ ├── imageviewwidget.h │ ├── imageviewwidget.ui │ ├── loadingbar.cpp │ ├── loadingbar.h │ ├── mainbutton.cpp │ ├── mainbutton.h │ ├── mainbutton.ui │ ├── modeledit.cpp │ ├── modeledit.h │ ├── modeledit.ui │ ├── painter.cpp │ ├── painter.h │ ├── painter.ui │ ├── printedit.cpp │ ├── printedit.h │ ├── printedit.ui │ ├── worldview.cpp │ └── worldview.h ├── ModelData │ ├── layoutprojectdata.cpp │ ├── layoutprojectdata.h │ ├── modeldata.cpp │ ├── modeldata.h │ ├── modelinstance.cpp │ ├── modelinstance.h │ ├── modelloader.cpp │ ├── modelloader.h │ ├── modelwriter.cpp │ ├── modelwriter.h │ ├── triangle3d.cpp │ ├── triangle3d.h │ ├── verticaltricontainer.cpp │ └── verticaltricontainer.h ├── OS_Function.cpp ├── OS_Function.h ├── OS_GL.h ├── SliceEngine │ ├── README.md │ ├── bridge.cpp │ ├── bridge.h │ ├── clipper │ │ ├── License.txt │ │ ├── README │ │ ├── clipper.cpp │ │ └── clipper.hpp │ ├── comb.cpp │ ├── comb.h │ ├── fffProcessor.h │ ├── gcodeExport.cpp │ ├── gcodeExport.h │ ├── includes.h │ ├── infill.cpp │ ├── infill.h │ ├── inset.cpp │ ├── inset.h │ ├── layerPart.cpp │ ├── layerPart.h │ ├── modelFile │ │ ├── modelFile.cpp │ │ └── modelFile.h │ ├── multiVolumes.h │ ├── optimizedModel.cpp │ ├── optimizedModel.h │ ├── pathOrderOptimizer.cpp │ ├── pathOrderOptimizer.h │ ├── polygonOptimizer.cpp │ ├── polygonOptimizer.h │ ├── raft.cpp │ ├── raft.h │ ├── settings.cpp │ ├── settings.h │ ├── skin.cpp │ ├── skin.h │ ├── skirt.cpp │ ├── skirt.h │ ├── sliceDataStorage.h │ ├── slicer.cpp │ ├── slicer.h │ ├── support.cpp │ ├── support.h │ ├── timeEstimate.cpp │ ├── timeEstimate.h │ └── utils │ │ ├── floatpoint.h │ │ ├── gettime.cpp │ │ ├── gettime.h │ │ ├── intpoint.h │ │ ├── logoutput.cpp │ │ ├── logoutput.h │ │ ├── polygon.h │ │ ├── polygondebug.h │ │ ├── socket.cpp │ │ └── socket.h ├── SupportEngine │ ├── supportstructure.cpp │ └── supportstructure.h ├── Uart │ ├── qextserialbase.cpp │ ├── qextserialbase.h │ ├── qextserialenumerator.cpp │ ├── qextserialenumerator.h │ ├── qextserialport.cpp │ ├── qextserialport.h │ ├── win_qextserialport.cpp │ └── win_qextserialport.h ├── build │ ├── Makefile │ ├── Makefile.Debug │ ├── Makefile.Release │ ├── debug │ │ ├── OS_Function.o │ │ ├── bridge.o │ │ ├── clipper.o │ │ ├── comb.o │ │ ├── configset.o │ │ ├── gcodeExport.o │ │ ├── geometric.o │ │ ├── gettime.o │ │ ├── graph.o │ │ ├── greentech.o │ │ ├── imageviewwidget.o │ │ ├── infill.o │ │ ├── inset.o │ │ ├── layerPart.o │ │ ├── layoutprojectdata.o │ │ ├── loadingbar.o │ │ ├── logoutput.o │ │ ├── main.o │ │ ├── mainbutton.o │ │ ├── moc_configset.cpp │ │ ├── moc_configset.o │ │ ├── moc_greentech.cpp │ │ ├── moc_greentech.o │ │ ├── moc_imageviewwidget.cpp │ │ ├── moc_imageviewwidget.o │ │ ├── moc_layoutprojectdata.cpp │ │ ├── moc_layoutprojectdata.o │ │ ├── moc_loadingbar.cpp │ │ ├── moc_loadingbar.o │ │ ├── moc_mainbutton.cpp │ │ ├── moc_mainbutton.o │ │ ├── moc_modeledit.cpp │ │ ├── moc_modeledit.o │ │ ├── moc_modelloader.cpp │ │ ├── moc_modelloader.o │ │ ├── moc_modelwriter.cpp │ │ ├── moc_modelwriter.o │ │ ├── moc_painter.cpp │ │ ├── moc_painter.o │ │ ├── moc_printedit.cpp │ │ ├── moc_printedit.o │ │ ├── moc_qextserialbase.cpp │ │ ├── moc_qextserialbase.o │ │ ├── moc_qextserialport.cpp │ │ ├── moc_qextserialport.o │ │ ├── moc_win_qextserialport.cpp │ │ ├── moc_win_qextserialport.o │ │ ├── moc_worldview.cpp │ │ ├── moc_worldview.o │ │ ├── modelFile.o │ │ ├── modeldata.o │ │ ├── modeledit.o │ │ ├── modelinstance.o │ │ ├── modelloader.o │ │ ├── modelwriter.o │ │ ├── optimizedModel.o │ │ ├── painter.o │ │ ├── pathOrderOptimizer.o │ │ ├── polygonOptimizer.o │ │ ├── printedit.o │ │ ├── pudding-gitlocal.exe │ │ ├── pynxl_res.o │ │ ├── qextserialbase.o │ │ ├── qextserialenumerator.o │ │ ├── qextserialport.o │ │ ├── qrc_img.cpp │ │ ├── qrc_img.o │ │ ├── raft.o │ │ ├── settings.o │ │ ├── skin.o │ │ ├── skirt.o │ │ ├── slicer.o │ │ ├── socket.o │ │ ├── support.o │ │ ├── supportstructure.o │ │ ├── timeEstimate.o │ │ ├── triangle3d.o │ │ ├── verticaltricontainer.o │ │ ├── win_qextserialport.o │ │ └── worldview.o │ ├── object_script.pudding-gitlocal.Debug │ ├── object_script.pudding-gitlocal.Release │ ├── print.stl │ ├── ui_configset.h │ ├── ui_greentech.h │ ├── ui_imageviewwidget.h │ ├── ui_mainbutton.h │ ├── ui_modeledit.h │ ├── ui_painter.h │ └── ui_printedit.h ├── geometric.cpp ├── geometric.h ├── image │ ├── bitbug_favicon.ico │ ├── dowm2.ico │ ├── down.ico │ ├── logo1.ico │ ├── logo2.PNG │ ├── logo2.ico │ ├── logo3.ico │ └── splash.PNG ├── img.qrc ├── log.ico ├── main.cpp ├── pudding-gitlocal.pro └── pynxl.rc ├── README.md └── build ├── ui_configset.h ├── ui_greentech.h ├── ui_imageviewwidget.h ├── ui_mainbutton.h ├── ui_modeledit.h ├── ui_painter.h └── ui_printedit.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | *version** 27 | - marlin version: 28 | - mother bord 29 | - slicer version 30 | 31 | 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | .o 45 | 46 | 47 | *.user 48 | *.user.* -------------------------------------------------------------------------------- /CuraEngine3/json-file/bfb.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BFB", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "BFB", 9 | "file_formats": "text/x-gcode", 10 | "platform_offset": [ 0, 0, 0], 11 | "machine_extruder_trains": 12 | { 13 | "0": "bfb_extruder_0" 14 | } 15 | }, 16 | 17 | "overrides": { 18 | "speed_topbottom": { "default_value": 40 }, 19 | "speed_print": { "default_value": 40 }, 20 | "machine_extruder_count": { "default_value": 1 }, 21 | "prime_tower_size": { "default_value": 7.745966692414834 }, 22 | "machine_name": { "default_value": "BFB_Test" }, 23 | "machine_heated_bed": { "default_value": false }, 24 | "speed_layer_0": { "default_value": 25 }, 25 | "machine_width": { "default_value": 275 }, 26 | "machine_gcode_flavor": { "default_value": "BFB" }, 27 | "machine_depth": { "default_value": 265 }, 28 | "speed_infill": { "default_value": 30 }, 29 | "machine_center_is_zero": { "default_value": true }, 30 | "machine_height": { "default_value": 240 }, 31 | "layer_height": { "default_value": 0.25 }, 32 | "material_print_temperature": { "default_value": 200 }, 33 | "retraction_amount": { "default_value": 0.05 }, 34 | "speed_wall_0": { "default_value": 25 }, 35 | "speed_travel": { "default_value": 50 }, 36 | "infill_sparse_density": { "default_value": 10 }, 37 | "layer_height_0": { "default_value": 0.5 }, 38 | "speed_wall_x": { "default_value": 20 } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/creality_cr10s.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Creality CR-10S", 3 | "version": 2, 4 | "inherits": "creality_cr10" 5 | } -------------------------------------------------------------------------------- /CuraEngine3/json-file/creality_cr10s4.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Creality CR-10 S4", 3 | "version": 2, 4 | "inherits": "creality_cr10", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Michael Wildermuth", 8 | "manufacturer": "Creality3D", 9 | "file_formats": "text/x-gcode", 10 | "machine_extruder_trains": 11 | { 12 | "0": "creality_cr10s4_extruder_0" 13 | } 14 | }, 15 | "overrides": { 16 | "machine_width": { 17 | "default_value": 400 18 | }, 19 | "machine_height": { 20 | "default_value": 400 21 | }, 22 | "machine_depth": { 23 | "default_value": 400 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /CuraEngine3/json-file/creality_cr10s5.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Creality CR-10 S5", 3 | "version": 2, 4 | "inherits": "creality_cr10", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Michael Wildermuth", 8 | "manufacturer": "Creality3D", 9 | "file_formats": "text/x-gcode", 10 | "machine_extruder_trains": 11 | { 12 | "0": "creality_cr10s5_extruder_0" 13 | } 14 | }, 15 | "overrides": { 16 | "machine_width": { 17 | "default_value": 500 18 | }, 19 | "machine_height": { 20 | "default_value": 500 21 | }, 22 | "machine_depth": { 23 | "default_value": 500 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /CuraEngine3/json-file/custom.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Custom FFF printer", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "Custom", 9 | "category": "Custom", 10 | "file_formats": "text/x-gcode", 11 | "has_materials": true, 12 | "machine_extruder_trains": 13 | { 14 | "0": "custom_extruder_1", 15 | "1": "custom_extruder_2", 16 | "2": "custom_extruder_3", 17 | "3": "custom_extruder_4", 18 | "4": "custom_extruder_5", 19 | "5": "custom_extruder_6", 20 | "6": "custom_extruder_7", 21 | "7": "custom_extruder_8" 22 | }, 23 | "first_start_actions": ["MachineSettingsAction"] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/deltabot.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DeltaBot", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "Danny Lu", 9 | "file_formats": "text/x-gcode", 10 | "platform_offset": [ 0, 0, 0], 11 | "machine_extruder_trains": 12 | { 13 | "0": "deltabot_extruder_0" 14 | } 15 | }, 16 | 17 | "overrides": { 18 | "speed_travel": { "default_value": 150 }, 19 | "prime_tower_size": { "default_value": 8.660254037844387 }, 20 | "infill_sparse_density": { "default_value": 10 }, 21 | "speed_wall_x": { "default_value": 30 }, 22 | "speed_wall_0": { "default_value": 30 }, 23 | "speed_topbottom": { "default_value": 30 }, 24 | "layer_height": { "default_value": 0.2 }, 25 | "speed_print": { "default_value": 30 }, 26 | "speed_infill": { "default_value": 30 }, 27 | "machine_extruder_count": { "default_value": 1 }, 28 | "machine_heated_bed": { "default_value": true }, 29 | "machine_center_is_zero": { "default_value": true }, 30 | "machine_height": { "default_value": 150 }, 31 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 32 | "machine_depth": { "default_value": 150 }, 33 | "machine_width": { "default_value": 150 }, 34 | "machine_name": { "default_value": "DeltaBot style" }, 35 | "machine_shape": { "default_value": "elliptic"} 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/folgertech_FT-5.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Folger Tech FT-5", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Jaime van Kessel & Paul Bussiere", 8 | "manufacturer": "Folger Tech", 9 | "file_formats": "text/x-gcode", 10 | "platform": "FT-5_build_plate.stl", 11 | "machine_extruder_trains": 12 | { 13 | "0": "folgertech_FT-5_extruder_0" 14 | } 15 | }, 16 | "overrides": { 17 | "machine_heated_bed": { "default_value": true }, 18 | "machine_width": { "default_value": 300 }, 19 | "machine_height": { "default_value": 400 }, 20 | "machine_depth": { "default_value": 300 }, 21 | "gantry_height": { "default_value": 55 }, 22 | 23 | "machine_start_gcode": { 24 | "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." 25 | }, 26 | "machine_end_gcode": { 27 | "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/kemiq_q2_beta.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Kemiq Q2 Beta", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "KEMIQ", 8 | "manufacturer": "KEMIQ", 9 | "file_formats": "text/x-gcode", 10 | "platform": "kemiq_q2.stl", 11 | "has_machine_quality": true, 12 | "has_materials": true, 13 | "machine_extruder_trains": 14 | { 15 | "0": "kemiq_q2_beta_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_name": { "default_value": "Kemiq Q2 Beta" }, 21 | 22 | "machine_width": { 23 | "default_value": 190 24 | }, 25 | "machine_depth": { 26 | "default_value": 200 27 | }, 28 | "machine_height": { 29 | "default_value": 273 30 | }, 31 | "machine_heated_bed": { 32 | "default_value": true 33 | }, 34 | "machine_center_is_zero": { 35 | "default_value": false 36 | }, 37 | "machine_nozzle_heat_up_speed": { 38 | "default_value": 2 39 | }, 40 | "machine_nozzle_cool_down_speed": { 41 | "default_value": 2 42 | }, 43 | "gantry_height": { 44 | "default_value": 0 45 | }, 46 | "machine_gcode_flavor": { 47 | "default_value": "RepRap (Marlin/Sprinter)" 48 | }, 49 | "machine_start_gcode": { 50 | "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\nG92 E0\nG1 F200 E3\nG92 E0\nM80 ;Lights On" 51 | }, 52 | "machine_end_gcode": { 53 | "default_value": "M104 S0\nM140 S0\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84\nM80 ;Lights Off" 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/kemiq_q2_gama.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Kemiq Q2 Gama", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "KEMIQ", 8 | "manufacturer": "KEMIQ", 9 | "file_formats": "text/x-gcode", 10 | "platform": "kemiq_q2.stl", 11 | "has_machine_quality": true, 12 | "has_materials": true, 13 | "machine_extruder_trains": 14 | { 15 | "0": "kemiq_q2_gama_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_name": { 21 | "default_value": "Kemiq Q2 Gama" 22 | }, 23 | "machine_width": { 24 | "default_value": 190 25 | }, 26 | "machine_depth": { 27 | "default_value": 200 28 | }, 29 | "machine_height": { 30 | "default_value": 273 31 | }, 32 | "machine_heated_bed": { 33 | "default_value": false 34 | }, 35 | "machine_center_is_zero": { 36 | "default_value": false 37 | }, 38 | "machine_nozzle_heat_up_speed": { 39 | "default_value": 2 40 | }, 41 | "machine_nozzle_cool_down_speed": { 42 | "default_value": 2 43 | }, 44 | "gantry_height": { 45 | "default_value": 0 46 | }, 47 | "machine_gcode_flavor": { 48 | "default_value": "RepRap (Marlin/Sprinter)" 49 | }, 50 | "machine_start_gcode": { 51 | "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\nG92 E0\nG1 F200 E3\nG92 E0\nM80 ;Lights On" 52 | }, 53 | "machine_end_gcode": { 54 | "default_value": "M104 S0\nM140 S0\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84\nM80 ;Lights Off" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/kossel_mini.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Kossel Mini", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Claudio Sampaio (Patola)", 8 | "manufacturer": "Other", 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker2", 11 | "platform": "kossel_platform.stl", 12 | "platform_offset": [0, -0.25, 0], 13 | "machine_extruder_trains": 14 | { 15 | "0": "kossel_mini_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_heated_bed": { 21 | "default_value": true 22 | }, 23 | "machine_width": { 24 | "default_value": 170 25 | }, 26 | "machine_height": { 27 | "default_value": 200 28 | }, 29 | "machine_depth": { 30 | "default_value": 170 31 | }, 32 | "machine_center_is_zero": { 33 | "default_value": true 34 | }, 35 | "machine_gcode_flavor": { 36 | "default_value": "RepRap (Marlin/Sprinter)" 37 | }, 38 | "machine_start_gcode": { 39 | "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 ;Home all axes (max endstops)\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." 40 | }, 41 | "machine_end_gcode": { 42 | "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG28 ;Home all axes (max endstops)\nM84 ;steppers off\nG90 ;absolute positioning" 43 | }, 44 | "machine_shape": { 45 | "default_value": "elliptic" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/makeR_pegasus.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "makeR Pegasus", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "makeR", 8 | "manufacturer": "makeR", 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker2", 11 | "platform": "makeR_pegasus_platform.stl", 12 | "platform_offset": [-200, -10, 200], 13 | "machine_extruder_trains": 14 | { 15 | "0": "makeR_pegasus_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_name": { "default_value": "makeR Pegasus" }, 21 | "machine_heated_bed": { 22 | "default_value": true 23 | }, 24 | "machine_width": { 25 | "default_value": 400 26 | }, 27 | "machine_height": { 28 | "default_value": 400 29 | }, 30 | "machine_depth": { 31 | "default_value": 400 32 | }, 33 | "machine_center_is_zero": { 34 | "default_value": false 35 | }, 36 | "machine_head_polygon": { 37 | "default_value": [ 38 | [-75, -18], 39 | [-75, 35], 40 | [18, 35], 41 | [18, -18] 42 | ] 43 | }, 44 | "gantry_height": { 45 | "default_value": -25 46 | }, 47 | "machine_gcode_flavor": { 48 | "default_value": "RepRap (Marlin/Sprinter)" 49 | }, 50 | "machine_start_gcode": { 51 | "default_value": "G1 Z15;\nG28;Home\nG29;Auto Level\nG1 Z5 F5000;Move the platform down 15mm" 52 | }, 53 | "machine_end_gcode": { 54 | "default_value": "M104 S0;Turn off temperature\nG28 X0; Home X\nM84; Disable Motors" 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /CuraEngine3/json-file/makeR_prusa_tairona_i3.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "makeR Prusa Tairona i3", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "makeR", 8 | "manufacturer": "makeR", 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker2", 11 | "platform": "makeR_prusa_tairona_i3_platform.stl", 12 | "platform_offset": [-2, 0, 0], 13 | "machine_extruder_trains": 14 | { 15 | "0": "makeR_prusa_tairona_i3_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_name": { "default_value": "makeR Prusa Tairona I3" }, 21 | "machine_heated_bed": { 22 | "default_value": true 23 | }, 24 | "machine_width": { 25 | "default_value": 200 26 | }, 27 | "machine_height": { 28 | "default_value": 200 29 | }, 30 | "machine_depth": { 31 | "default_value": 200 32 | }, 33 | "machine_center_is_zero": { 34 | "default_value": false 35 | }, 36 | "machine_head_polygon": { 37 | "default_value": [ 38 | [-75, -18], 39 | [-75, 35], 40 | [18, 35], 41 | [18, -18] 42 | ] 43 | }, 44 | "gantry_height": { 45 | "default_value": 55 46 | }, 47 | "machine_gcode_flavor": { 48 | "default_value": "RepRap (Marlin/Sprinter)" 49 | }, 50 | "machine_start_gcode": { 51 | "default_value": "G1 Z15;\nG28;Home\nG29;Auto Level\nG1 Z5 F5000;Move the platform down 15mm" 52 | }, 53 | "machine_end_gcode": { 54 | "default_value": "M104 S0;Turn off temperature\nG28 X0; Home X\nM84; Disable Motors" 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /CuraEngine3/json-file/makerbotreplicator.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MakerBotReplicator", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "MakerBot", 9 | "file_formats": "application/x3g", 10 | "platform_offset": [ 0, 0, 0], 11 | "machine_extruder_trains": 12 | { 13 | "0": "makerbotreplicator_extruder_0" 14 | } 15 | }, 16 | 17 | "overrides": { 18 | "prime_tower_size": { "default_value": 10.0 }, 19 | "infill_sparse_density": { "default_value": 10 }, 20 | "speed_travel": { "default_value": 150 }, 21 | "layer_height": { "default_value": 0.15 }, 22 | "material_print_temperature": { "default_value": 220 }, 23 | "machine_extruder_count": { "default_value": 1 }, 24 | "machine_heated_bed": { "default_value": true }, 25 | "machine_center_is_zero": { "default_value": false }, 26 | "machine_height": { "default_value": 150 }, 27 | "machine_gcode_flavor": { "default_value": "MakerBot" }, 28 | "machine_depth": { "default_value": 145 }, 29 | "machine_width": { "default_value": 225 }, 30 | "machine_name": { "default_value": "MakerBot Replicator" } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/monoprice_select_mini_v1.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "monoprice_select_mini_v1", 3 | "version": 2, 4 | "name": "Monoprice Select Mini V1", 5 | "inherits": "malyan_m200", 6 | "metadata": { 7 | "author": "Brian Corbino, Tyler Gibson", 8 | "manufacturer": "Monoprice", 9 | "category": "Other", 10 | "file_formats": "text/x-gcode", 11 | "quality_definition": "malyan_m200", 12 | "visible": true, 13 | "machine_extruder_trains": 14 | { 15 | "0": "monoprice_select_mini_v1_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "machine_name": { "default_value": "Monoprice Select Mini V1" } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/monoprice_select_mini_v2.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "monoprice_select_mini_v2", 3 | "version": 2, 4 | "name": "Monoprice Select Mini V2 (E3D)", 5 | "inherits": "malyan_m200", 6 | "metadata": { 7 | "author": "Tyler Gibson", 8 | "manufacturer": "Monoprice", 9 | "category": "Other", 10 | "file_formats": "text/x-gcode", 11 | "has_machine_quality": true, 12 | "has_materials": true, 13 | "preferred_quality_type": "normal", 14 | "visible": true, 15 | "machine_extruder_trains": 16 | { 17 | "0": "monoprice_select_mini_v2_extruder_0" 18 | } 19 | }, 20 | 21 | "overrides": { 22 | "machine_name": { "default_value": "Monoprice Select Mini V2" }, 23 | "machine_end_gcode": 24 | { 25 | "default_value": "G0 X0 Y120;(Stick out the part)\nM190 S0;(Turn off heat bed, don't wait.)\nG92 E10;(Set extruder to 10)\nG1 E7 F200;(retract 3mm)\nM104 S0;(Turn off nozzle, don't wait)\nG4 S300;(Delay 5 minutes)\nM107;(Turn off part fan)\nM84;(Turn off stepper motors.)" 26 | }, 27 | "adhesion_type": { "default_value": "brim" }, 28 | "retraction_combing": { "default_value": "noskin" }, 29 | "retraction_amount" : { "default_value": 2.5}, 30 | "retraction_speed" : { "default_value": 40}, 31 | "material_print_temperature_layer_0": { "value": "material_print_temperature + 5" } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ord.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RoVa3D", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "ORD Solutions", 9 | "file_formats": "text/x-gcode", 10 | "machine_extruder_trains": 11 | { 12 | "0": "ord_extruder_0", 13 | "1": "ord_extruder_1", 14 | "2": "ord_extruder_2", 15 | "3": "ord_extruder_3", 16 | "4": "ord_extruder_4" 17 | }, 18 | "platform_offset": [ 0, 0, 0] 19 | }, 20 | 21 | "overrides": { 22 | "material_bed_temperature": { "default_value": 60 }, 23 | "prime_tower_size": { "default_value": 7.0710678118654755 }, 24 | "infill_sparse_density": { "default_value": 15 }, 25 | "speed_travel": { "default_value": 150 }, 26 | "layer_height": { "default_value": 0.3 }, 27 | "material_print_temperature": { "default_value": 240 }, 28 | "machine_extruder_count": { "default_value": 5 }, 29 | "machine_heated_bed": { "default_value": true }, 30 | "machine_center_is_zero": { "default_value": false }, 31 | "machine_height": { "default_value": 200 }, 32 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 33 | "machine_depth": { "default_value": 250 }, 34 | "machine_width": { "default_value": 215 }, 35 | "machine_name": { "default_value": "RoVa3D" } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/printrbot_play_heated.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Printrbot Play (Heated Bed)", 4 | "inherits": "printrbot_play", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Chris Pearson", 8 | "manufacturer": "Printrbot", 9 | "file_formats": "text/x-gcode", 10 | "platform": "", 11 | "machine_extruder_trains": 12 | { 13 | "0": "printrbot_play_heated_extruder_0" 14 | } 15 | }, 16 | 17 | "overrides": { 18 | "machine_name": { "default_value": "Printrbot Play (Heated Bed)" }, 19 | "machine_heated_bed": { "default_value": true }, 20 | "machine_depth": { "default_value": 203 } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/printrbot_simple.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Printrbot Simple", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Calvindog717", 8 | "manufacturer": "PrintrBot", 9 | "platform": "printrbot_simple_metal_platform.stl", 10 | "platform_offset": [0, -3.45, 0], 11 | "file_formats": "text/x-gcode", 12 | "machine_extruder_trains": 13 | { 14 | "0": "printrbot_simple_extruder_0" 15 | } 16 | }, 17 | 18 | "overrides": { 19 | "machine_name": { "default_value": "Printrbot Simple" }, 20 | "machine_heated_bed": { "default_value": false }, 21 | "machine_width": { "default_value": 150 }, 22 | "machine_height": { "default_value": 150 }, 23 | "machine_depth": { "default_value": 140 }, 24 | "machine_center_is_zero": { "default_value": false }, 25 | "machine_head_with_fans_polygon": { 26 | "default_value": [ 27 | [-49, 20], 28 | [-49, -99999], 29 | [55, 20], 30 | [55, -99999] 31 | ] 32 | }, 33 | "gantry_height": { "default_value": 99999 }, 34 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 35 | 36 | "machine_start_gcode": { 37 | "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;home X/Y\nG28 Z0 ;home Z\nG92 E0 ;zero the extruded length\nG29 ;initiate auto bed leveling sequence" 38 | }, 39 | "machine_end_gcode": { 40 | "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nM106 S0 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit\nG1 Z+1 E-5 F9000 ;move Z up a bit and retract even more\nG28 X0 Y0 ;home X/Y, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/printrbot_simple_makers_kit.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Printrbot Simple Maker's Kit (1405)", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Timur Tabi", 8 | "manufacturer": "Printrbot", 9 | "file_formats": "text/x-gcode", 10 | "machine_extruder_trains": 11 | { 12 | "0": "printrbot_simple_makers_kit_extruder_0" 13 | } 14 | }, 15 | 16 | "overrides": { 17 | "machine_name": { "default_value": "Printrbot Simple Maker's Kit (1405)" }, 18 | "machine_heated_bed": { "default_value": false }, 19 | "machine_width": { "default_value": 100 }, 20 | "machine_depth": { "default_value": 100 }, 21 | "machine_height": { "default_value": 115 }, 22 | "machine_head_with_fans_polygon": { 23 | "default_value": [ 24 | [-40, 1000], 25 | [-40, -10], 26 | [60, 1000], 27 | [60, -10] 28 | ] 29 | }, 30 | "gantry_height": { "default_value": 1000 }, 31 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 32 | 33 | "machine_start_gcode": { 34 | "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;home X/Y\nG28 Z0 ;home Z\nG92 E0 ;zero the extruded length\nG29 ;initiate auto bed leveling sequence" 35 | }, 36 | "machine_end_gcode": { 37 | "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nM106 S0 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit\nG1 Z+1 E-5 F9000 ;move Z up a bit and retract even more\nG28 X0 Y0 ;home X/Y, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/punchtec_connect_xl.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Punchtec Connect XL", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "Punchtec", 9 | "file_formats": "text/x-gcode", 10 | "machine_extruder_trains": 11 | { 12 | "0": "punchtec_connect_xl_extruder_0", 13 | "1": "punchtec_connect_xl_extruder_1" 14 | }, 15 | "platform_offset": [ 0, 0, 0] 16 | }, 17 | 18 | "overrides": { 19 | "machine_head_polygon": { "default_value": [[ 0, 0], [ 0, 0], [ 0, 0], [ 0, 0]] }, 20 | "speed_travel": { "default_value": 150 }, 21 | "prime_tower_size": { "default_value": 8.660254037844387 }, 22 | "speed_wall_x": { "default_value": 40 }, 23 | "speed_wall_0": { "default_value": 40 }, 24 | "speed_topbottom": { "default_value": 40 }, 25 | "layer_height": { "default_value": 0.2 }, 26 | "material_print_temperature": { "default_value": 195 }, 27 | "speed_print": { "default_value": 40 }, 28 | "speed_infill": { "default_value": 40 }, 29 | "machine_extruder_count": { "default_value": 2 }, 30 | "machine_heated_bed": { "default_value": true }, 31 | "machine_center_is_zero": { "default_value": false }, 32 | "machine_height": { "default_value": 200 }, 33 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 34 | "machine_depth": { "default_value": 304 }, 35 | "machine_width": { "default_value": 304 }, 36 | "machine_name": { "default_value": "Punchtec Connect XL" } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/seemecnc_artemis.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "SeeMeCNC Artemis", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "PouncingIguana, JJ", 8 | "manufacturer": "SeeMeCNC", 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker2", 11 | "platform": "artemis_platform.stl", 12 | "has_materials": true, 13 | "machine_extruder_trains": 14 | { 15 | "0": "seemecnc_artemis_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "layer_height": { "default_value": 0.1618 }, 21 | "layer_height_0": { "default_value": 0.2 }, 22 | "machine_center_is_zero": { "default_value": true }, 23 | "machine_depth": { "default_value": 290 }, 24 | "machine_gcode_flavor": { "default_value": "RepRap (RepRap)" }, 25 | "machine_heated_bed": { "default_value": true }, 26 | "machine_height": { "default_value": 530 }, 27 | "machine_max_feedrate_z": { "default_value": 400 }, 28 | "machine_name": { "default_value": "Artemis" }, 29 | "machine_shape": { "default_value": "elliptic" }, 30 | "machine_width": { "default_value": 290 }, 31 | "relative_extrusion": { "default_value": false }, 32 | "retraction_amount": { "default_value": 3.2 }, 33 | "retraction_combing": { "default_value": "off" }, 34 | "retraction_hop_enabled": { "default_value": true }, 35 | "retraction_hop_only_when_collides": { "default_value": false }, 36 | "retraction_prime_speed": { "default_value": 45 }, 37 | "retraction_retract_speed": { "default_value": 45 }, 38 | "retraction_speed": { "default_value": 45 }, 39 | "machine_start_gcode": { 40 | "default_value": "G28\nG1 Z15.0 F10000\nG92 E0" 41 | }, 42 | "machine_end_gcode": { 43 | "default_value": "M203 Z24000\nM104 S0\nM140 S0\nM107\nG28\nM84" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/seemecnc_v32.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "SeeMeCNC Rostock Max V3.2", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "PouncingIguana, JJ", 8 | "manufacturer": "SeeMeCNC", 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker2", 11 | "platform": "rostock_platform.stl", 12 | "has_materials": true, 13 | "machine_extruder_trains": 14 | { 15 | "0": "seemecnc_v32_extruder_0" 16 | } 17 | }, 18 | 19 | "overrides": { 20 | "layer_height": { "default_value": 0.1618 }, 21 | "layer_height_0": { "default_value": 0.2 }, 22 | "machine_center_is_zero": { "default_value": true }, 23 | "machine_depth": { "default_value": 265 }, 24 | "machine_gcode_flavor": { "default_value": "RepRap (RepRap)" }, 25 | "machine_heated_bed": { "default_value": true }, 26 | "machine_height": { "default_value": 395 }, 27 | "machine_max_feedrate_z": { "default_value": 300 }, 28 | "machine_name": { "default_value": "Rostock Max V3.2" }, 29 | "machine_shape": { "default_value": "elliptic" }, 30 | "machine_width": { "default_value": 265 }, 31 | "relative_extrusion": { "default_value": false }, 32 | "retraction_amount": { "default_value": 3.2 }, 33 | "retraction_combing": { "default_value": "off" }, 34 | "retraction_hop_enabled": { "default_value": true }, 35 | "retraction_hop_only_when_collides": { "default_value": false }, 36 | "retraction_prime_speed": { "default_value": 45 }, 37 | "retraction_retract_speed": { "default_value": 45 }, 38 | "retraction_speed": { "default_value": 45 }, 39 | "machine_start_gcode": { 40 | "default_value": "G28\nG1 Z15.0 F10000\nG92 E0" 41 | }, 42 | "machine_end_gcode": { 43 | "default_value": "M203 Z24000\nM104 S0\nM140 S0\nM107\nG28\nM84" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "category": "Ultimaker", 9 | "visible": false, 10 | "exclude_materials": [ "generic_hips", "generic_petg" ] 11 | }, 12 | "overrides": { 13 | "machine_max_feedrate_e": { 14 | "default_value": 45 15 | }, 16 | "material_print_temperature": { 17 | "minimum_value": "0" 18 | }, 19 | "material_bed_temperature": { 20 | "minimum_value": "0" 21 | }, 22 | "material_standby_temperature": { 23 | "minimum_value": "0" 24 | }, 25 | "extruder_prime_pos_y": 26 | { 27 | "minimum_value": "0", 28 | "maximum_value": "machine_depth" 29 | }, 30 | "extruder_prime_pos_x": 31 | { 32 | "minimum_value": "0", 33 | "maximum_value": "machine_width" 34 | }, 35 | "relative_extrusion": 36 | { 37 | "value": false, 38 | "enabled": false 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker2_extended.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker 2 Extended", 4 | "inherits": "ultimaker2", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "quality_definition": "ultimaker2", 9 | "weight": 3, 10 | "file_formats": "text/x-gcode", 11 | "icon": "icon_ultimaker2.png", 12 | "platform": "ultimaker2_platform.obj", 13 | "platform_texture": "Ultimaker2Extendedbackplate.png", 14 | "machine_extruder_trains": 15 | { 16 | "0": "ultimaker2_extended_extruder_0" 17 | } 18 | }, 19 | 20 | "overrides": { 21 | "machine_name": { "default_value": "Ultimaker 2 Extended" }, 22 | "machine_height": { 23 | "default_value": 305 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker2_extended_plus.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker 2 Extended+", 4 | "inherits": "ultimaker2_plus", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "quality_definition": "ultimaker2_plus", 9 | "weight": 2, 10 | "file_formats": "text/x-gcode", 11 | "platform": "ultimaker2_platform.obj", 12 | "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", 13 | "supported_actions": ["UpgradeFirmware"], 14 | "machine_extruder_trains": 15 | { 16 | "0": "ultimaker2_extended_plus_extruder_0" 17 | } 18 | }, 19 | 20 | "overrides": { 21 | "machine_name": { "default_value": "Ultimaker 2 Extended+" }, 22 | "machine_height": { 23 | "default_value": 305 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker2_go.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker 2 Go", 4 | "inherits": "ultimaker2", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "quality_definition": "ultimaker2", 9 | "weight": 3, 10 | "file_formats": "text/x-gcode", 11 | "icon": "icon_ultimaker2.png", 12 | "platform": "ultimaker2go_platform.obj", 13 | "platform_texture": "Ultimaker2Gobackplate.png", 14 | "platform_offset": [0, 0, 0], 15 | "first_start_actions": [], 16 | "supported_actions": ["UpgradeFirmware"], 17 | "machine_extruder_trains": 18 | { 19 | "0": "ultimaker2_go_extruder_0" 20 | } 21 | }, 22 | 23 | "overrides": { 24 | "machine_name": { "default_value": "Ultimaker 2 Go" }, 25 | "machine_width": { 26 | "default_value": 120 27 | }, 28 | "machine_depth": { 29 | "default_value": 120 30 | }, 31 | "machine_height": { 32 | "default_value": 115 33 | }, 34 | "machine_heated_bed": { 35 | "default_value": false 36 | }, 37 | "machine_disallowed_areas": { 38 | "default_value": [ 39 | [[-60, 60], [-33, 60], [-35, 52], [-60, 52]], 40 | [[ 60, 60], [ 60, 52], [ 35, 52], [ 33, 60]], 41 | [[-60, -60], [-60, -52], [-35, -52], [-33, -60]], 42 | [[ 60, -60], [ 33, -60], [ 35, -52], [ 60, -52]] 43 | ] 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker3_extended.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker 3 Extended", 4 | "inherits": "ultimaker3", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "quality_definition": "ultimaker3", 9 | "visible": true, 10 | "file_formats": "application/gzip;text/x-gcode", 11 | "platform": "ultimaker3_platform.obj", 12 | "platform_texture": "Ultimaker3Extendedbackplate.png", 13 | "platform_offset": [0, 0, 0], 14 | "has_machine_quality": true, 15 | "has_machine_materials": true, 16 | "has_variant_materials": true, 17 | "has_materials": true, 18 | "has_variants": true, 19 | "preferred_variant_name": "AA 0.4", 20 | "variants_name": "Print core", 21 | "machine_extruder_trains": 22 | { 23 | "0": "ultimaker3_extended_extruder_left", 24 | "1": "ultimaker3_extended_extruder_right" 25 | }, 26 | "first_start_actions": [ "DiscoverUM3Action" ], 27 | "supported_actions": [ "DiscoverUM3Action" ] 28 | }, 29 | 30 | "overrides": { 31 | "machine_name": { "default_value": "Ultimaker 3 Extended" }, 32 | "machine_height": { "default_value": 300 } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/ultimaker_original_plus.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Ultimaker Original+", 4 | "inherits": "ultimaker_original", 5 | "metadata": { 6 | "author": "Ultimaker", 7 | "manufacturer": "Ultimaker B.V.", 8 | "weight": 4, 9 | "file_formats": "text/x-gcode", 10 | "icon": "icon_ultimaker.png", 11 | "platform": "ultimaker2_platform.obj", 12 | "platform_texture": "UltimakerPlusbackplate.png", 13 | "quality_definition": "ultimaker_original", 14 | "first_start_actions": ["UMOCheckup", "BedLevel"], 15 | "supported_actions": ["UMOCheckup", "BedLevel", "UpgradeFirmware"], 16 | "machine_extruder_trains": 17 | { 18 | "0": "ultimaker_original_plus_extruder_0" 19 | } 20 | }, 21 | 22 | "overrides": { 23 | "machine_name": { "default_value": "Ultimaker Original+" }, 24 | "machine_heated_bed": { 25 | "default_value": true 26 | }, 27 | "machine_max_feedrate_z": { 28 | "default_value": 30 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/uni_print_3d.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni_print_3d", 3 | "name": "UNI-PRINT-3D", 4 | "version": 2, 5 | "inherits": "fdmprinter", 6 | "metadata": 7 | { 8 | "visible": true, 9 | "author": "Alexander Rössler", 10 | "category": "Other", 11 | "manufacturer": "TheCoolTool", 12 | "file_formats": "text/x-ngc;text/x-gcode", 13 | "platform": "uni_print_3d_platform.stl", 14 | "platform_offset": [0, 0, 0], 15 | "machine_extruder_trains": { 16 | "0": "uni_print_3d_extruder_0" 17 | } 18 | }, 19 | 20 | "overrides": { 21 | "machine_name": { "default_value": "UNI-PRINT-3D" }, 22 | "machine_heated_bed": { "default_value": true }, 23 | "machine_width": { "default_value": 186 }, 24 | "machine_height": { "default_value": 230 }, 25 | "machine_depth": { "default_value": 220 }, 26 | "machine_center_is_zero": { "default_value": true }, 27 | "machine_nozzle_heat_up_speed": { "default_value": 2.0 }, 28 | "machine_nozzle_cool_down_speed": { "default_value": 2.0 }, 29 | "machine_head_shape_min_x": { "default_value": 75 }, 30 | "machine_head_shape_min_y": { "default_value": 18 }, 31 | "machine_head_shape_max_x": { "default_value": 18 }, 32 | "machine_head_shape_max_y": { "default_value": 35 }, 33 | "machine_nozzle_gantry_distance": { "default_value": 55 }, 34 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 35 | 36 | "machine_start_gcode": { 37 | "default_value": "M53; enable feed-hold\nG0 Z2.0; always start from the same height to compensate backlash\nG28; move extruder to 0\nM420 R0.0 E0.0 D0.0 P0.1 ; turn the lights on\nM107; turn off fan\nG64 P0.05 Q0.05; path blending settings\nG23; unretract" 38 | }, 39 | "machine_end_gcode": { 40 | "default_value": "M104 P0 ; turn off hotend\nG0 X-80 Y100; move the extruder out of the way\nM420 R0.0 E0.1 D0.0 P0.6 ; signalize end of print\nM140 P0 ; turn off heatbed\nM65 P16 ; turn off external fan\nM65 P15 ; turn off power" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/uniqbot_one.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Uniqbot", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "author": "Unimatech", 7 | "manufacturer": "Unimatech", 8 | "file_formats": "text/x-gcode", 9 | "icon": "icon_ultimaker2.png", 10 | "machine_extruder_trains": 11 | { 12 | "0": "uniqbot_one_extruder_0" 13 | } 14 | }, 15 | 16 | "overrides": { 17 | "machine_name": { "default_value": "Uniqbot" }, 18 | "machine_heated_bed": { 19 | "default_value": false 20 | }, 21 | "machine_width": { 22 | "default_value": 140 23 | }, 24 | "machine_height": { 25 | "default_value": 120 26 | }, 27 | "machine_depth": { 28 | "default_value": 160 29 | }, 30 | "machine_center_is_zero": { 31 | "default_value": false 32 | }, 33 | "gantry_height": { 34 | "default_value": 55 35 | }, 36 | "machine_gcode_flavor": { 37 | "default_value": "RepRap (Marlin/Sprinter)" 38 | }, 39 | "machine_start_gcode": { 40 | "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..." 41 | }, 42 | "machine_end_gcode": { 43 | "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_d4s.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator 4S", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_225_145_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_d4s_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 5 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator 4S" 26 | }, 27 | "machine_width": { 28 | "default_value": 225 29 | }, 30 | "machine_height": { 31 | "default_value": 150 32 | }, 33 | "machine_depth": { 34 | "default_value": 150 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": true 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_d6.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator 6", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_200_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_d6_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ], 22 | "supported_actions": [ 23 | "UpgradeFirmware" 24 | ] 25 | }, 26 | "overrides": { 27 | "machine_name": { 28 | "default_value": "Wanhao Duplicator 6" 29 | }, 30 | "machine_width": { 31 | "default_value": 200 32 | }, 33 | "machine_height": { 34 | "default_value": 180 35 | }, 36 | "machine_depth": { 37 | "default_value": 200 38 | }, 39 | "machine_heated_bed": { 40 | "default_value": true 41 | }, 42 | "gantry_height": { 43 | "default_value": 55 44 | }, 45 | "machine_gcode_flavor": { 46 | "default_value": "RepRap (Marlin/Sprinter)" 47 | }, 48 | "machine_start_gcode": { 49 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 50 | }, 51 | "machine_end_gcode": { 52 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_d6_plus.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator 6 Plus", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_200_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_d6_plus_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator 6 Plus" 26 | }, 27 | "machine_width": { 28 | "default_value": 200 29 | }, 30 | "machine_height": { 31 | "default_value": 180 32 | }, 33 | "machine_depth": { 34 | "default_value": 200 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": true 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_duplicator5S.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator 5S", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_300_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_duplicator5S_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator 5S" 26 | }, 27 | "machine_width": { 28 | "default_value": 300 29 | }, 30 | "machine_height": { 31 | "default_value": 600 32 | }, 33 | "machine_depth": { 34 | "default_value": 200 35 | }, 36 | "machine_center_is_zero": { 37 | "default_value": false 38 | }, 39 | "machine_heated_bed": { 40 | "default_value": false 41 | }, 42 | "machine_gcode_flavor": { 43 | "default_value": "RepRap (Marlin/Sprinter)" 44 | }, 45 | "machine_start_gcode": { 46 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 47 | }, 48 | "machine_end_gcode": { 49 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_duplicator5Smini.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator 5S Mini", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_300_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_duplicator5Smini_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator 5S Mini" 26 | }, 27 | "machine_width": { 28 | "default_value": 300 29 | }, 30 | "machine_height": { 31 | "default_value": 180 32 | }, 33 | "machine_depth": { 34 | "default_value": 200 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": false 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_i3.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator i3", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_200_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_i3_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator i3" 26 | }, 27 | "machine_width": { 28 | "default_value": 200 29 | }, 30 | "machine_height": { 31 | "default_value": 180 32 | }, 33 | "machine_depth": { 34 | "default_value": 200 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": true 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_i3mini.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator i3 Mini", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_110_110_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_i3mini_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -15, 20 | 7 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator i3 Mini" 26 | }, 27 | "machine_width": { 28 | "default_value": 110 29 | }, 30 | "machine_height": { 31 | "default_value": 110 32 | }, 33 | "machine_depth": { 34 | "default_value": 110 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": false 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/wanhao_i3plus.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Wanhao Duplicator i3 Plus", 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ricardo Snoek", 8 | "manufacturer": "Wanhao", 9 | "file_formats": "text/x-gcode", 10 | "icon": "wanhao-icon.png", 11 | "has_materials": true, 12 | "platform": "wanhao_200_200_platform.obj", 13 | "platform_texture": "Wanhaobackplate.png", 14 | "machine_extruder_trains": { 15 | "0": "wanhao_i3plus_extruder_0" 16 | }, 17 | "platform_offset": [ 18 | 0, 19 | -28, 20 | 0 21 | ] 22 | }, 23 | "overrides": { 24 | "machine_name": { 25 | "default_value": "Wanhao Duplicator i3 Plus" 26 | }, 27 | "machine_width": { 28 | "default_value": 200 29 | }, 30 | "machine_depth": { 31 | "default_value": 200 32 | }, 33 | "machine_height": { 34 | "default_value": 180 35 | }, 36 | "machine_heated_bed": { 37 | "default_value": true 38 | }, 39 | "machine_gcode_flavor": { 40 | "default_value": "RepRap (Marlin/Sprinter)" 41 | }, 42 | "machine_start_gcode": { 43 | "default_value": "G21 ;metric values\n G90 ;absolute positioning\n M82 ;set extruder to absolute mode\n M107 ;start with the fan off\n G28 X0 Y0 ;move X/Y to min endstops\n G28 Z0 ;move Z to min endstops\n G1 Z15.0 F{travel_speed} ;move the platform down 15mm\n G92 E0 ;zero the extruded length\n G1 F200 E6 ;extrude 6 mm of feed stock\n G92 E0 ;zero the extruded length again\n G1 F{travel_speed} \n ;Put printing message on LCD screen\n M117 Printing..." 44 | }, 45 | "machine_end_gcode": { 46 | "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/winbo_superhelper155.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "Winbo Super Helper 155", 4 | "inherits": "winbo_superhelper105", 5 | "metadata": { 6 | "author": "Winbo", 7 | "manufacturer": "Winbo Smart Tech Co., Ltd.", 8 | "category": "Other", 9 | "visible": true, 10 | "file_formats": "text/x-gcode", 11 | "supports_usb_connection": true, 12 | "machine_extruder_trains": 13 | { 14 | "0": "winbo_superhelper155_extruder" 15 | } 16 | }, 17 | "overrides": { 18 | "machine_name": { "default_value": "Winbo Super Helper 155" }, 19 | "machine_width": { "default_value": 158 }, 20 | "machine_depth": { "default_value": 158 }, 21 | "machine_height": { "default_value": 208 }, 22 | "machine_head_with_fans_polygon": 23 | { 24 | "default_value": 25 | [ 26 | [ -160, 50 ],[ -160, -30 ],[ 160, -30 ],[ 160, 50 ] 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /CuraEngine3/json-file/zone3d_printer.def.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Zone3d Printer", 3 | "version": 2, 4 | "inherits": "fdmprinter", 5 | "metadata": { 6 | "visible": true, 7 | "author": "Ultimaker", 8 | "manufacturer": "Unknown", 9 | "file_formats": "text/x-gcode", 10 | "platform_offset": [ 0, 0, 0], 11 | "machine_extruder_trains": 12 | { 13 | "0": "zone3d_printer_extruder_0" 14 | } 15 | }, 16 | 17 | "overrides": { 18 | "prime_tower_size": { "default_value": 10.350983390135314 }, 19 | "material_print_temperature": { "default_value": 260 }, 20 | "layer_height": { "default_value": 0.14 }, 21 | "speed_travel": { "default_value": 150 }, 22 | "machine_extruder_count": { "default_value": 1 }, 23 | "machine_heated_bed": { "default_value": true }, 24 | "machine_center_is_zero": { "default_value": false }, 25 | "machine_height": { "default_value": 210 }, 26 | "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, 27 | "machine_depth": { "default_value": 220 }, 28 | "machine_width": { "default_value": 240 }, 29 | "machine_name": { "default_value": "Zone3D Printer" } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /CuraEngine3/libs/DO_NOT_CHANGE_THESE: -------------------------------------------------------------------------------- 1 | These libraries are extern, and while they're utilized by this project, 2 | they are in fact not actually developed on this repository. 3 | If changes are desired for these projects, please refer to their official repositories. 4 | -------------------------------------------------------------------------------- /CuraEngine3/libs/clipper/License.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | http://www.boost.org/LICENSE_1_0.txt 3 | 4 | Permission is hereby granted, free of charge, to any person or organization 5 | obtaining a copy of the software and accompanying documentation covered by 6 | this license (the "Software") to use, reproduce, display, distribute, 7 | execute, and transmit the Software, and to prepare derivative works of the 8 | Software, and to permit third-parties to whom the Software is furnished to 9 | do so, all subject to the following: 10 | 11 | The copyright notices in the Software and this entire statement, including 12 | the above license grant, this restriction and the following disclaimer, 13 | must be included in all copies of the Software, in whole or in part, and 14 | all derivative works of the Software, unless such copies or derivative 15 | works are solely in the form of machine-executable object code generated by 16 | a source language processor. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /CuraEngine3/libs/clipper/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/CuraEngine3/libs/clipper/README -------------------------------------------------------------------------------- /CuraEngine3/libs/clipper/clipper.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/CuraEngine3/libs/clipper/clipper.cpp -------------------------------------------------------------------------------- /CuraEngine3/libs/rapidjson/internal/strfunc.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ 16 | #define RAPIDJSON_INTERNAL_STRFUNC_H_ 17 | 18 | RAPIDJSON_NAMESPACE_BEGIN 19 | namespace internal { 20 | 21 | //! Custom strlen() which works on different character types. 22 | /*! \tparam Ch Character type (e.g. char, wchar_t, short) 23 | \param s Null-terminated input string. 24 | \return Number of characters in the string. 25 | \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. 26 | */ 27 | template 28 | inline SizeType StrLen(const Ch* s) { 29 | const Ch* p = s; 30 | while (*p) ++p; 31 | return SizeType(p - s); 32 | } 33 | 34 | } // namespace internal 35 | RAPIDJSON_NAMESPACE_END 36 | 37 | #endif // RAPIDJSON_INTERNAL_STRFUNC_H_ 38 | -------------------------------------------------------------------------------- /CuraEngine3/src/ConicalOverhang.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Tim Kuipers - Released under terms of the AGPLv3 License */ 2 | #include "ConicalOverhang.h" 3 | 4 | 5 | namespace cura { 6 | 7 | 8 | void ConicalOverhang::apply(Slicer* slicer, double angle, int layer_thickness) 9 | { 10 | double tanAngle = tan(angle); // the XY-component of the angle 11 | int max_dist_from_lower_layer = tanAngle * layer_thickness; // max dist which can be bridged 12 | 13 | for (unsigned int layer_nr = slicer->layers.size() - 2; static_cast(layer_nr) >= 0; layer_nr--) 14 | { 15 | SlicerLayer& layer = slicer->layers[layer_nr]; 16 | SlicerLayer& layer_above = slicer->layers[layer_nr + 1]; 17 | if (std::abs(max_dist_from_lower_layer) < 5) 18 | { // magically nothing happens when max_dist_from_lower_layer == 0 19 | // below magic code solves that 20 | int safe_dist = 20; 21 | Polygons diff = layer_above.polygons.difference(layer.polygons.offset(-safe_dist)); 22 | layer.polygons = layer.polygons.unionPolygons(diff); 23 | layer.polygons = layer.polygons.smooth(safe_dist); 24 | layer.polygons.simplify(safe_dist, safe_dist * safe_dist / 4); 25 | // somehow layer.polygons get really jagged lines with a lot of vertices 26 | // without the above steps slicing goes really slow 27 | } 28 | else 29 | { 30 | layer.polygons = layer.polygons.unionPolygons(layer_above.polygons.offset(-max_dist_from_lower_layer)); 31 | } 32 | } 33 | } 34 | 35 | }//namespace cura 36 | -------------------------------------------------------------------------------- /CuraEngine3/src/ConicalOverhang.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Tim Kuipers - Released under terms of the AGPLv3 License */ 2 | #ifndef CONICAL_OVERHANG_H 3 | #define CONICAL_OVERHANG_H 4 | 5 | #include "slicer.h" 6 | 7 | 8 | namespace cura { 9 | 10 | 11 | /*! 12 | * A class for changing the geometry of a model such that it is printable without support - 13 | * Or at least with at least support as possible 14 | */ 15 | class ConicalOverhang 16 | { 17 | public: 18 | /*! 19 | * Change the slice data such that the model becomes more printable 20 | * 21 | * \param[in,out] slicer The slice data 22 | * \param angle The maximum angle which can be printed without generating support (or at least generating least support) 23 | * \param layer_thickness The general layer thickness 24 | */ 25 | static void apply(Slicer* slicer, double angle, int layer_thickness); 26 | }; 27 | 28 | }//namespace cura 29 | 30 | #endif // CONICAL_OVERHANG_H 31 | -------------------------------------------------------------------------------- /CuraEngine3/src/ExtruderTrain.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "ExtruderTrain.h" 3 | 4 | namespace cura 5 | { 6 | int ExtruderTrain::getExtruderNr() 7 | { 8 | return extruder_nr; 9 | } 10 | ExtruderTrain::ExtruderTrain(SettingsBaseVirtual* settings, int extruder_nr) 11 | : SettingsBase(settings) 12 | , extruder_nr(extruder_nr) 13 | { 14 | } 15 | 16 | }//namespace cura -------------------------------------------------------------------------------- /CuraEngine3/src/ExtruderTrain.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef EXTRUDER_TRAIN_H 3 | #define EXTRUDER_TRAIN_H 4 | 5 | #include "settings/settings.h" 6 | 7 | namespace cura 8 | { 9 | 10 | class ExtruderTrain : public SettingsBase 11 | { 12 | int extruder_nr; 13 | public: 14 | int getExtruderNr(); 15 | 16 | ExtruderTrain(SettingsBaseVirtual* settings, int extruder_nr); 17 | 18 | }; 19 | 20 | }//namespace cura 21 | #endif // EXTRUDER_TRAIN_H 22 | -------------------------------------------------------------------------------- /CuraEngine3/src/FanSpeedLayerTime.h: -------------------------------------------------------------------------------- 1 | #ifndef FAN_SPEED_LAYER_TIME_H 2 | #define FAN_SPEED_LAYER_TIME_H 3 | 4 | #include "settings/settings.h" 5 | 6 | namespace cura 7 | { 8 | 9 | struct FanSpeedLayerTimeSettings 10 | { 11 | public: 12 | double cool_min_layer_time; 13 | double cool_min_layer_time_fan_speed_max; 14 | double cool_fan_speed_0; 15 | double cool_fan_speed_min; 16 | double cool_fan_speed_max; 17 | double cool_min_speed; 18 | int cool_fan_full_layer; 19 | }; 20 | 21 | } // namespace cura 22 | 23 | #endif // FAN_SPEED_LAYER_TIME_H -------------------------------------------------------------------------------- /CuraEngine3/src/MeshGroup.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef MESH_GROUP_H 3 | #define MESH_GROUP_H 4 | 5 | #include "utils/NoCopy.h" 6 | #include "mesh.h" 7 | #include "ExtruderTrain.h" 8 | 9 | namespace cura 10 | { 11 | 12 | /*! 13 | * A MeshGroup is a collection with 1 or more 3D meshes. 14 | * 15 | * One MeshGroup is a whole which is printed at once. 16 | * Generally there is one single MeshGroup, though when using one-at-a-time printing, multiple MeshGroups are processed consecutively. 17 | */ 18 | class MeshGroup : public SettingsBase, NoCopy 19 | { 20 | ExtruderTrain* extruders[MAX_EXTRUDERS] = {nullptr}; 21 | mutable int extruder_count; //!< The number of extruders. (mutable because of lazy evaluation) 22 | public: 23 | unsigned int getExtruderCount() const; 24 | 25 | MeshGroup(SettingsBaseVirtual* settings_base); 26 | 27 | ~MeshGroup(); 28 | 29 | /*! 30 | * Create a new extruder train for the @p extruder_nr, or return the one which already exists. 31 | */ 32 | ExtruderTrain* createExtruderTrain(unsigned int extruder_nr); 33 | 34 | ExtruderTrain* getExtruderTrain(unsigned int extruder_nr); 35 | 36 | const ExtruderTrain* getExtruderTrain(unsigned int extruder_nr) const; 37 | 38 | std::vector meshes; 39 | 40 | Point3 min() const; //! minimal corner of bounding box 41 | Point3 max() const; //! maximal corner of bounding box 42 | 43 | void clear(); 44 | 45 | void finalize(); 46 | }; 47 | 48 | /*! 49 | * Load a Mesh from file and store it in the \p meshgroup. 50 | * 51 | * \param meshgroup The meshgroup where to store the mesh 52 | * \param filename The filename of the mesh file 53 | * \param transformation The transformation applied to all vertices 54 | * \param object_parent_settings (optional) The parent settings object of the new mesh. Defaults to \p meshgroup if none is given. 55 | * \return whether the file could be loaded 56 | */ 57 | bool loadMeshIntoMeshGroup(MeshGroup* meshgroup, const char* filename, const FMatrix3x3& transformation, SettingsBaseVirtual* object_parent_settings = nullptr); 58 | 59 | }//namespace cura 60 | #endif//MESH_GROUP_H 61 | -------------------------------------------------------------------------------- /CuraEngine3/src/Mold.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2018 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #ifndef MOLD_H 5 | #define MOLD_H 6 | 7 | #include "slicer.h" 8 | #include "utils/IntPoint.h" 9 | 10 | namespace cura 11 | { 12 | 13 | class SliceDataStorage; 14 | 15 | /*! 16 | * Class for transforming the outlines of a model into a mold into which the model can be cast. 17 | */ 18 | class Mold 19 | { 20 | public: 21 | /*! 22 | * Convert the polygons (and open polylines) of each mold mesh in \p storage 23 | * in order to make a mold with a cutout in the shape of the outlines. 24 | * 25 | * The open polylines of the model are also used to cut out the shape inside the mold. 26 | * 27 | * First the new outlines of all meshes on a layer are computed and then all mold meshes are cut out. 28 | * This prevents molds reaching through each others casting cutout space. 29 | * 30 | * \param storage Where to get mesh settings from 31 | * \param slicer_list The container for the sliced polygons (and open polylines) of all meshes 32 | * \param layer_height The overall layer height used (used to compute an offset from the mold angle) 33 | */ 34 | static void process(SliceDataStorage& storage, std::vector& slicer_list, coord_t layer_height); 35 | private: 36 | }; 37 | 38 | }//namespace cura 39 | 40 | #endif//MOLD_H 41 | -------------------------------------------------------------------------------- /CuraEngine3/src/PrintFeature.h: -------------------------------------------------------------------------------- 1 | #ifndef PRINT_FEATURE 2 | #define PRINT_FEATURE 3 | 4 | namespace cura 5 | { 6 | 7 | enum class PrintFeatureType: unsigned char 8 | { 9 | NoneType = 0, // used to mark unspecified jumps in polygons. libArcus depends on it 10 | OuterWall = 1, 11 | InnerWall = 2, 12 | Skin = 3, 13 | Support = 4, 14 | SkirtBrim = 5, 15 | Infill = 6, 16 | SupportInfill = 7, 17 | MoveCombing = 8, 18 | MoveRetraction = 9, 19 | SupportInterface = 10, 20 | NumPrintFeatureTypes = 11 // this number MUST be the last one because other modules will 21 | // use this symbol to get the total number of types, which can 22 | // be used to create an array or so 23 | }; 24 | 25 | 26 | 27 | 28 | } // namespace cura 29 | 30 | #endif // PRINT_FEATURE 31 | -------------------------------------------------------------------------------- /CuraEngine3/src/RetractionConfig.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef RETRACTION_CONFIG_H 3 | #define RETRACTION_CONFIG_H 4 | 5 | 6 | namespace cura 7 | { 8 | 9 | /*! 10 | * The retraction configuration used in the GCodePathConfig of each feature (and the travel config) 11 | */ 12 | class RetractionConfig 13 | { 14 | public: 15 | double distance; //!< The distance retracted (in mm) 16 | double speed; //!< The speed with which to retract (in mm/s) 17 | double primeSpeed; //!< the speed with which to unretract (in mm/s) 18 | double prime_volume; //!< the amount of material primed after unretracting (in mm^3) 19 | int zHop; //!< the amount with which to lift the head during a retraction-travel 20 | int retraction_min_travel_distance; //!< Minimal distance traversed to even consider retracting (in micron) 21 | double retraction_extrusion_window; //!< Window of mm extruded filament in which to limit the amount of retractions 22 | int retraction_count_max; //!< The maximum amount of retractions allowed to occur in the RetractionConfig::retraction_extrusion_window 23 | }; 24 | 25 | 26 | }//namespace cura 27 | 28 | #endif // RETRACTION_CONFIG_H 29 | -------------------------------------------------------------------------------- /CuraEngine3/src/SpaceFillType.h: -------------------------------------------------------------------------------- 1 | #ifndef SPACE_FILL_TYPE 2 | #define SPACE_FILL_TYPE 3 | 4 | 5 | namespace cura 6 | { 7 | 8 | /*! 9 | * Enum class enumerating the strategies with which an area can be occupied with filament 10 | * 11 | * The walls/perimeters are Polygons 12 | * ZigZag infill is PolyLines, and so is following mesh surface mode for non-polygon surfaces 13 | * Grid, Triangles and lines infill is Lines 14 | */ 15 | enum class SpaceFillType 16 | { 17 | None, 18 | Polygons, 19 | PolyLines, 20 | Lines 21 | }; 22 | 23 | } // namespace cura 24 | 25 | #endif // SPACE_FILL_TYPE -------------------------------------------------------------------------------- /CuraEngine3/src/SupportInfillPart.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Ultimaker B.V. 2 | // CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #include "SupportInfillPart.h" 5 | #include "support.h" 6 | 7 | using namespace cura; 8 | 9 | 10 | SupportInfillPart::SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, int inset_count_to_generate) 11 | : outline(outline) 12 | , outline_boundary_box(outline) 13 | , support_line_width(support_line_width) 14 | , inset_count_to_generate(inset_count_to_generate) 15 | { 16 | insets.clear(); 17 | infill_area.clear(); 18 | infill_area_per_combine_per_density.clear(); 19 | } 20 | 21 | 22 | SupportInfillPart::~SupportInfillPart() 23 | { 24 | support_line_width = 0; 25 | inset_count_to_generate = 0; 26 | outline.clear(); 27 | insets.clear(); 28 | infill_area.clear(); 29 | infill_area_per_combine_per_density.clear(); 30 | } 31 | 32 | 33 | bool SupportInfillPart::generateInsetsAndInfillAreas() 34 | { 35 | // generate insets, use the first inset as the wall line, and the second as the infill area 36 | AreaSupport::generateOutlineInsets( 37 | this->insets, 38 | this->outline, 39 | this->inset_count_to_generate, 40 | this->support_line_width); 41 | if (this->inset_count_to_generate > 0 && this->insets.empty()) 42 | { 43 | return false; 44 | } 45 | 46 | // calculate infill area if there are insets 47 | if (this->inset_count_to_generate > 0) 48 | { 49 | // if there are walls, we use the inner area as the infill area 50 | this->infill_area = this->insets.back().offset(-support_line_width / 2); 51 | // optimize polygons: remove unnecessary verts 52 | this->infill_area.simplify(); 53 | } 54 | 55 | return true; 56 | } 57 | -------------------------------------------------------------------------------- /CuraEngine3/src/TopSurface.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #ifndef TOPSURFACE_H 5 | #define TOPSURFACE_H 6 | 7 | #include "utils/polygon.h" //For the polygon areas. 8 | #include "sliceDataStorage.h" //For the input mesh. 9 | 10 | namespace cura 11 | { 12 | 13 | class SliceMeshStorage; 14 | 15 | class TopSurface 16 | { 17 | public: 18 | /*! 19 | * Create an empty top surface area. 20 | */ 21 | TopSurface(); 22 | 23 | /*! 24 | * \brief Sets the areas for this TopSurface to process from the given 25 | * mesh and layer number. 26 | * 27 | * The surface will be generated by subtracting the layer above from the 28 | * current layer. Anything that is leftover is then part of the top surface 29 | * (since there is nothing above it). 30 | * 31 | * \param mesh The mesh to generate the top surface area for. 32 | * \param layer_number The layer to generate the top surface area for. 33 | */ 34 | void setAreasFromMeshAndLayerNumber(SliceMeshStorage& mesh, size_t layer_number); 35 | 36 | /*! 37 | * \brief Generate paths for ironing over the top surface. 38 | * 39 | * This generates an infill pattern over the top surface that is supposed to 40 | * strike the surface smooth by melting it with the hot nozzle and filling 41 | * crevices with a minute amount of material. 42 | * 43 | * \param mesh The settings base to get our ironing settings and skin angles 44 | * from. 45 | * \param line_config The configuration of the ironing lines to use. Note 46 | * that the flow might still get adjusted by the ironing settings. 47 | * \param[out] layer The output g-code layer to put the resulting lines in. 48 | */ 49 | bool ironing(const SliceMeshStorage& mesh, const GCodePathConfig& line_config, LayerPlan& layer) const; 50 | 51 | public: 52 | /*! 53 | * \brief The areas of top surface, for each layer. 54 | */ 55 | Polygons areas; 56 | }; 57 | 58 | } 59 | 60 | #endif /* TOPSURFACE_H */ 61 | -------------------------------------------------------------------------------- /CuraEngine3/src/bridge.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef BRIDGE_H 3 | #define BRIDGE_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | namespace cura { 8 | class Polygons; 9 | class SliceLayer; 10 | 11 | int bridgeAngle(const Polygons& skin_outline, const SliceDataStorage& storage, const unsigned layer_nr, const SupportLayer* support_layer, Polygons& supported_regions, const double support_threshold); 12 | 13 | }//namespace cura 14 | 15 | #endif//BRIDGE_H 16 | -------------------------------------------------------------------------------- /CuraEngine3/src/infill/DensityProvider.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 Tim Kuipers 2 | //Copyright (c) 2018 Ultimaker B.V. 3 | //CuraEngine is released under the terms of the AGPLv3 or higher. 4 | 5 | #ifndef INFILL_DENSITY_PROVIDER_H 6 | #define INFILL_DENSITY_PROVIDER_H 7 | 8 | #include "../utils/IntPoint.h" 9 | #include "../utils/AABB3D.h" 10 | 11 | namespace cura 12 | { 13 | 14 | /*! 15 | * Parent class of function objects which return the density required for a given region. 16 | * 17 | * This density requirement can be based on user input, distance to the 3d model shell, Z distance to top skin, etc. 18 | */ 19 | class DensityProvider 20 | { 21 | public: 22 | /*! 23 | * \return the approximate required density of a cube 24 | */ 25 | virtual float operator()(const AABB3D& aabb) const = 0; 26 | virtual ~DensityProvider() 27 | { 28 | }; 29 | }; 30 | 31 | } // namespace cura 32 | 33 | 34 | #endif // INFILL_DENSITY_PROVIDER_H 35 | -------------------------------------------------------------------------------- /CuraEngine3/src/infill/ImageBasedDensityProvider.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 Tim Kuipers 2 | //Copyright (c) 2018 Ultimaker B.V. 3 | //CuraEngine is released under the terms of the AGPLv3 or higher. 4 | 5 | #ifndef INFILL_IMAGE_BASED_DENSITY_PROVIDER_H 6 | #define INFILL_IMAGE_BASED_DENSITY_PROVIDER_H 7 | 8 | #include "../utils/IntPoint.h" 9 | #include "../utils/AABB.h" 10 | #include "../utils/AABB3D.h" 11 | 12 | #include "DensityProvider.h" 13 | 14 | namespace cura 15 | { 16 | 17 | class ImageBasedDensityProvider : public DensityProvider 18 | { 19 | public: 20 | ImageBasedDensityProvider(const std::string filename, const AABB aabb); 21 | 22 | virtual ~ImageBasedDensityProvider(); 23 | 24 | virtual float operator()(const AABB3D& aabb) const; 25 | 26 | protected: 27 | Point3 image_size; //!< dimensions of the image. Third dimension is the amount of channels. 28 | unsigned char* image = nullptr; //!< image data: rows of channel data per pixel. 29 | 30 | AABB print_aabb; //!< bounding box of print coordinates in which to apply the image 31 | }; 32 | 33 | } // namespace cura 34 | 35 | 36 | #endif // INFILL_IMAGE_BASED_DENSITY_PROVIDER_H 37 | -------------------------------------------------------------------------------- /CuraEngine3/src/infill/NoZigZagConnectorProcessor.cpp: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #include "../utils/macros.h" 5 | 6 | #include "NoZigZagConnectorProcessor.h" 7 | 8 | 9 | namespace cura 10 | { 11 | 12 | void NoZigZagConnectorProcessor::registerVertex(const Point&) 13 | { 14 | //No need to add anything. 15 | } 16 | 17 | void NoZigZagConnectorProcessor::registerScanlineSegmentIntersection(const Point&, int) 18 | { 19 | //No need to add anything. 20 | } 21 | 22 | void NoZigZagConnectorProcessor::registerPolyFinished() 23 | { 24 | //No need to add anything. 25 | } 26 | 27 | } // namespace cura 28 | -------------------------------------------------------------------------------- /CuraEngine3/src/infill/NoZigZagConnectorProcessor.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H 3 | #define INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H 4 | 5 | #include "../utils/polygon.h" 6 | #include "ZigzagConnectorProcessor.h" 7 | 8 | namespace cura 9 | { 10 | 11 | /*! 12 | * This processor adds no connection. This is for line infill pattern. 13 | */ 14 | class NoZigZagConnectorProcessor : public ZigzagConnectorProcessor 15 | { 16 | public: 17 | NoZigZagConnectorProcessor(const PointMatrix& rotation_matrix, Polygons& result) 18 | : ZigzagConnectorProcessor(rotation_matrix, result, 19 | false, false, // settings for zig-zag end pieces, no use here 20 | false, 0) // settings for skipping some zags, no use here 21 | { 22 | } 23 | 24 | void registerVertex(const Point& vertex); 25 | void registerScanlineSegmentIntersection(const Point& intersection, int scanline_index); 26 | void registerPolyFinished(); 27 | }; 28 | 29 | 30 | } // namespace cura 31 | 32 | 33 | #endif // INFILL_NO_ZIGZAG_CONNECTOR_PROCESSOR_H 34 | -------------------------------------------------------------------------------- /CuraEngine3/src/infill/UniformDensityProvider.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2018 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #ifndef INFILL_UNIFORM_DENSITY_PROVIDER_H 5 | #define INFILL_UNIFORM_DENSITY_PROVIDER_H 6 | 7 | #include "../utils/IntPoint.h" 8 | #include "../utils/AABB.h" 9 | #include "../utils/AABB3D.h" 10 | 11 | #include "DensityProvider.h" 12 | 13 | namespace cura 14 | { 15 | 16 | class UniformDensityProvider : public DensityProvider 17 | { 18 | public: 19 | UniformDensityProvider(float density) 20 | : density(density) 21 | { 22 | }; 23 | 24 | virtual ~UniformDensityProvider() 25 | { 26 | }; 27 | 28 | virtual float operator()(const AABB3D&) const 29 | { 30 | return density; 31 | }; 32 | protected: 33 | float density; 34 | }; 35 | 36 | } // namespace cura 37 | 38 | 39 | #endif // INFILL_UNIFORM_DENSITY_PROVIDER_H 40 | -------------------------------------------------------------------------------- /CuraEngine3/src/layerPart.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef LAYERPART_H 3 | #define LAYERPART_H 4 | 5 | #include "sliceDataStorage.h" 6 | #include "slicer.h" 7 | #include "commandSocket.h" 8 | 9 | /* 10 | The layer-part creation step is the first step in creating actual useful data for 3D printing. 11 | It takes the result of the Slice step, which is an unordered list of polygons, and makes groups of polygons, 12 | each of these groups is called a "part", which sometimes are also known as "islands". These parts represent 13 | isolated areas in the 2D layer with possible holes. 14 | 15 | Creating "parts" is an important step, as all elements in a single part should be printed before going to another part. 16 | And all every bit inside a single part can be printed without the nozzle leaving the boundary of this part. 17 | 18 | It's also the first step that stores the result in the "data storage" so all other steps can access it. 19 | */ 20 | 21 | namespace cura { 22 | 23 | void createLayerWithParts(SliceLayer& storageLayer, SlicerLayer* layer, bool union_layers, bool union_all_remove_holes); 24 | 25 | void createLayerParts(SliceMeshStorage& mesh, Slicer* slicer, bool union_layers, bool union_all_remove_holes); 26 | 27 | void layerparts2HTML(SliceDataStorage& mesh, const char* filename, bool all_layers = true, int layer_nr = -1); 28 | 29 | }//namespace cura 30 | 31 | #endif//LAYERPART_H 32 | -------------------------------------------------------------------------------- /CuraEngine3/src/multiVolumes.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTIVOLUMES_H 2 | #define MULTIVOLUMES_H 3 | 4 | #include "sliceDataStorage.h" 5 | #include "slicer.h" 6 | 7 | /* This file contains code to help fixing up and changing layers that are build from multiple volumes. */ 8 | namespace cura { 9 | 10 | /*! 11 | * 12 | * \param alternate_carve_order Whether to switch which model carves out of which with every layer 13 | */ 14 | void carveMultipleVolumes(std::vector &meshes, bool alternate_carve_order); 15 | 16 | /*! 17 | * Expand each layer a bit and then keep the extra overlapping parts that overlap with other volumes. 18 | * This generates some overlap in dual extrusion, for better bonding in touching parts. 19 | */ 20 | void generateMultipleVolumesOverlap(std::vector &meshes); 21 | 22 | class MultiVolumes 23 | { 24 | public: 25 | /*! 26 | * Carve all cutting meshes. 27 | * 28 | * Make a cutting mesh limited to within the volume of all other meshes 29 | * and carve this volume from those meshes. 30 | * 31 | * Don't carve other cutting meshes. 32 | * 33 | * \warning Overlapping cutting meshes result in overlapping volumes. \ref carveMultipleVolumes still needs to be called 34 | * 35 | * \param[in,out] volumes The outline data of each mesh 36 | * \param meshes The meshes which contain the settings for each volume 37 | */ 38 | static void carveCuttingMeshes(std::vector& volumes, const std::vector& meshes); 39 | }; 40 | 41 | }//namespace cura 42 | 43 | #endif//MULTIVOLUMES_H 44 | -------------------------------------------------------------------------------- /CuraEngine3/src/pathPlanning/CombPath.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2018 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #ifndef PATH_PLANNING_COMB_PATH_H 5 | #define PATH_PLANNING_COMB_PATH_H 6 | 7 | #include "../utils/IntPoint.h" 8 | 9 | namespace cura 10 | { 11 | 12 | struct CombPath : public std::vector //!< A single path either inside or outise the parts 13 | { 14 | bool cross_boundary = false; //!< Whether the path crosses a boundary. 15 | }; 16 | 17 | }//namespace cura 18 | 19 | #endif//PATH_PLANNING_COMB_PATH_H 20 | -------------------------------------------------------------------------------- /CuraEngine3/src/pathPlanning/CombPaths.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef PATH_PLANNING_COMB_PATHS_H 3 | #define PATH_PLANNING_COMB_PATHS_H 4 | 5 | #include "CombPath.h" 6 | 7 | namespace cura 8 | { 9 | 10 | struct CombPaths : public std::vector //!< A list of paths alternating between inside a part and outside a part 11 | { 12 | bool throughAir = false; //!< Whether the path is one which moves through air. 13 | }; 14 | 15 | }//namespace cura 16 | 17 | #endif//PATH_PLANNING_COMB_PATHS_H 18 | -------------------------------------------------------------------------------- /CuraEngine3/src/pathPlanning/GCodePath.cpp: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2016 Ultimaker 2 | //Released under terms of the AGPLv3 License 3 | 4 | #include "GCodePath.h" 5 | 6 | namespace cura 7 | { 8 | 9 | GCodePath::GCodePath(const GCodePathConfig& config, SpaceFillType space_fill_type, float flow, bool spiralize, double speed_factor) : 10 | config(&config), 11 | space_fill_type(space_fill_type), 12 | flow(flow), 13 | speed_factor(speed_factor), 14 | spiralize(spiralize), 15 | fan_speed(GCodePathConfig::FAN_SPEED_DEFAULT) 16 | { 17 | retract = false; 18 | perform_z_hop = false; 19 | perform_prime = false; 20 | points = std::vector(); 21 | done = false; 22 | estimates = TimeMaterialEstimates(); 23 | } 24 | 25 | bool GCodePath::isTravelPath() 26 | { 27 | return config->isTravelPath(); 28 | } 29 | 30 | double GCodePath::getExtrusionMM3perMM() 31 | { 32 | return flow * config->getExtrusionMM3perMM(); 33 | } 34 | 35 | int GCodePath::getLineWidthForLayerView() 36 | { 37 | return flow * config->getLineWidth() * config->getFlowPercentage() / 100.0; 38 | } 39 | 40 | void GCodePath::setFanSpeed(double fan_speed) 41 | { 42 | this->fan_speed = fan_speed; 43 | } 44 | 45 | double GCodePath::getFanSpeed() const 46 | { 47 | return (fan_speed >= 0 && fan_speed <= 100) ? fan_speed : config->getFanSpeed(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /CuraEngine3/src/pathPlanning/NozzleTempInsert.cpp: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2016 Ultimaker 2 | //Released under terms of the AGPLv3 License 3 | 4 | #include "NozzleTempInsert.h" 5 | 6 | namespace cura 7 | { 8 | 9 | NozzleTempInsert::NozzleTempInsert(unsigned int path_idx, int extruder, double temperature, bool wait, double time_after_path_start) 10 | : path_idx(path_idx) 11 | , time_after_path_start(time_after_path_start) 12 | , extruder(extruder) 13 | , temperature(temperature) 14 | , wait(wait) 15 | { 16 | assert(temperature != 0 && temperature != -1 && "Temperature command must be set!"); 17 | } 18 | 19 | void NozzleTempInsert::write(GCodeExport& gcode) 20 | { 21 | gcode.writeTemperatureCommand(extruder, temperature, wait); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /CuraEngine3/src/pathPlanning/NozzleTempInsert.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef PATH_PLANNING_NOZZLE_TEMP_INSERT_H 3 | #define PATH_PLANNING_NOZZLE_TEMP_INSERT_H 4 | 5 | #include "../gcodeExport.h" 6 | 7 | namespace cura 8 | { 9 | 10 | /*! 11 | * A gcode command to insert before a specific path. 12 | * 13 | * Currently only used for preheat commands 14 | */ 15 | struct NozzleTempInsert 16 | { 17 | const unsigned int path_idx; //!< The path before which to insert this command 18 | double time_after_path_start; //!< The time after the start of the path, before which to insert the command // TODO: use this to insert command in between moves in a path! 19 | int extruder; //!< The extruder for which to set the temp 20 | double temperature; //!< The temperature of the temperature command to insert 21 | bool wait; //!< Whether to wait for the temperature to be reached 22 | NozzleTempInsert(unsigned int path_idx, int extruder, double temperature, bool wait, double time_after_path_start = 0.0); 23 | 24 | /*! 25 | * Write the temperature command at the current position in the gcode. 26 | * \param gcode The actual gcode writer 27 | */ 28 | void write(GCodeExport& gcode); 29 | }; 30 | }//namespace cura 31 | 32 | #endif//PATH_PLANNING_NOZZLE_TEMP_INSERT_H 33 | -------------------------------------------------------------------------------- /CuraEngine3/src/progress/ProgressEstimator.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Tim Kuipers - Released under terms of the AGPLv3 License */ 2 | #ifndef PROGRESS_PROGRESS_ESTIMATOR_H 3 | #define PROGRESS_PROGRESS_ESTIMATOR_H 4 | 5 | #include 6 | 7 | namespace cura 8 | { 9 | /* 10 | * ProgressEstimator is a finger-tree with ProgressEstimatorLinear as leaves. 11 | * 12 | * Each (non-leaf) node consists of a ProgressStageEstimator which consists of several stages. 13 | * 14 | * The structure of this tree is an oversimplification of the call graph of CuraEngine. 15 | * 16 | */ 17 | 18 | class ProgressEstimator 19 | { 20 | public: 21 | virtual double progress(int current_step) = 0; 22 | virtual ~ProgressEstimator() 23 | { 24 | } 25 | }; 26 | 27 | } // namespace cura 28 | 29 | #endif // PROGRESS_PROGRESS_ESTIMATOR_H -------------------------------------------------------------------------------- /CuraEngine3/src/progress/ProgressEstimatorLinear.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Tim Kuipers - Released under terms of the AGPLv3 License */ 2 | #ifndef PROGRESS_PROGRESS_ESTIMATOR_LINEAR_H 3 | #define PROGRESS_PROGRESS_ESTIMATOR_LINEAR_H 4 | 5 | #include 6 | 7 | #include "ProgressEstimator.h" 8 | 9 | namespace cura 10 | { 11 | 12 | 13 | class ProgressEstimatorLinear : public ProgressEstimator 14 | { 15 | unsigned int total_steps; 16 | public: 17 | ProgressEstimatorLinear(unsigned int total_steps) 18 | : total_steps(total_steps) 19 | { 20 | } 21 | double progress(int current_step) 22 | { 23 | return double(current_step) / double(total_steps); 24 | } 25 | }; 26 | 27 | } // namespace cura 28 | 29 | #endif // PROGRESS_PROGRESS_ESTIMATOR_LINEAR_H -------------------------------------------------------------------------------- /CuraEngine3/src/progress/ProgressStageEstimator.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "ProgressStageEstimator.h" 3 | 4 | 5 | namespace cura 6 | { 7 | 8 | 9 | ProgressStageEstimator::ProgressStageEstimator(std::vector< double >& relative_time_estimates) 10 | : total_estimated_time(0) 11 | , accumulated_estimate(0) 12 | , current_stage_idx(-1) 13 | { 14 | stages.reserve(relative_time_estimates.size()); 15 | for (double relative_estimated_time : relative_time_estimates) 16 | { 17 | stages.emplace_back(relative_estimated_time); 18 | total_estimated_time += relative_estimated_time; 19 | } 20 | } 21 | 22 | ProgressStageEstimator::~ProgressStageEstimator() 23 | { 24 | for (ProgressStage& stage : stages) 25 | { 26 | delete stage.stage; 27 | } 28 | } 29 | 30 | double ProgressStageEstimator::progress(int current_step) 31 | { 32 | ProgressStage& current_stage = stages[current_stage_idx]; 33 | return (accumulated_estimate + current_stage.stage->progress(current_step) * current_stage.relative_estimated_time) / total_estimated_time; 34 | } 35 | 36 | void ProgressStageEstimator::nextStage(ProgressEstimator* stage) 37 | { 38 | if (current_stage_idx >= int(stages.size()) - 1) 39 | { 40 | return; 41 | } 42 | if (current_stage_idx >= 0) 43 | { 44 | ProgressStage& current_stage = stages[current_stage_idx]; 45 | accumulated_estimate += current_stage.relative_estimated_time; 46 | } 47 | current_stage_idx++; 48 | stages[current_stage_idx].stage = stage; 49 | } 50 | 51 | 52 | } // namespace cura 53 | -------------------------------------------------------------------------------- /CuraEngine3/src/progress/ProgressStageEstimator.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Tim Kuipers - Released under terms of the AGPLv3 License */ 2 | #ifndef PROGRESS_PROGRESS_STAGE_ESTIMATOR_H 3 | #define PROGRESS_PROGRESS_STAGE_ESTIMATOR_H 4 | 5 | #include 6 | 7 | #include "ProgressEstimator.h" 8 | 9 | namespace cura 10 | { 11 | 12 | /*! 13 | * A staged progress estimator which estimates each stage to have different times. 14 | */ 15 | class ProgressStageEstimator : public ProgressEstimator 16 | { 17 | struct ProgressStage 18 | { 19 | double relative_estimated_time; 20 | ProgressEstimator* stage; 21 | ProgressStage(double relative_estimated_time) 22 | : relative_estimated_time(relative_estimated_time) 23 | , stage(nullptr) 24 | { 25 | } 26 | 27 | }; 28 | 29 | protected: 30 | std::vector stages; 31 | double total_estimated_time; 32 | 33 | private: 34 | double accumulated_estimate; 35 | int current_stage_idx; 36 | 37 | public: 38 | ProgressStageEstimator(std::vector& relative_time_estimates); 39 | 40 | double progress(int current_step); 41 | 42 | /*! 43 | * 44 | * \warning This class is responsible for deleting the \p stage 45 | * 46 | */ 47 | void nextStage(ProgressEstimator* stage); 48 | 49 | ~ProgressStageEstimator(); 50 | }; 51 | 52 | } // namespace cura 53 | 54 | #endif // PROGRESS_PROGRESS_STAGE_ESTIMATOR_H -------------------------------------------------------------------------------- /CuraEngine3/src/raft.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef RAFT_H 3 | #define RAFT_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | namespace cura { 8 | 9 | class Raft 10 | { 11 | public: 12 | static void generate(SliceDataStorage& storage, int distance); 13 | 14 | /*! 15 | * Get the height difference between the raft and the bottom of layer 1. 16 | * 17 | * This is used for the filler layers because they don't use the layer_0_z_overlap 18 | */ 19 | static int getZdiffBetweenRaftAndLayer1(const SliceDataStorage& storage); 20 | 21 | /*! 22 | * Get the amount of layers to fill the airgap and initial layer with helper parts (support, prime tower, etc.) 23 | * 24 | * The initial layer gets a separate filler layer because we don't want to apply the layer_0_z_overlap to it. 25 | */ 26 | static int getFillerLayerCount(const SliceDataStorage& storage); 27 | 28 | /*! 29 | * Get the layer height of the filler layers in between the raft and layer 1 30 | */ 31 | static int getFillerLayerHeight(const SliceDataStorage& storage); 32 | 33 | /*! 34 | * Get the total thickness of the raft (without airgap) 35 | */ 36 | static int getTotalThickness(const SliceDataStorage& storage); 37 | 38 | /*! 39 | * Get the total amount of extra layers below zero because there is a raft. 40 | * 41 | * This includes the filler layers which are introduced in the air gap. 42 | */ 43 | static int getTotalExtraLayers(const SliceDataStorage& storage); 44 | 45 | }; 46 | 47 | }//namespace cura 48 | 49 | #endif//RAFT_H 50 | -------------------------------------------------------------------------------- /CuraEngine3/src/settings/SettingConfig.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "SettingConfig.h" 3 | 4 | 5 | namespace cura 6 | { 7 | 8 | SettingConfig::SettingConfig(std::string key, std::string label) 9 | : SettingContainer(key, label) 10 | { 11 | // std::cerr << key << std::endl; // debug output to show all frontend registered settings... 12 | } 13 | 14 | }//namespace cura 15 | -------------------------------------------------------------------------------- /CuraEngine3/src/settings/SettingConfig.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef SETTINGS_SETTING_CONFIG_H 3 | #define SETTINGS_SETTING_CONFIG_H 4 | 5 | #include 6 | #include // debug out 7 | 8 | #include "SettingContainer.h" 9 | 10 | #include "../utils/NoCopy.h" 11 | #include "libs/rapidjson/document.h" 12 | 13 | namespace cura 14 | { 15 | 16 | /*! 17 | * Single setting data. 18 | * Filled from the fdmprinter.json file. Can contain child settings, and is registered in the 19 | * setting registry with it's key. 20 | */ 21 | class SettingConfig : public SettingContainer 22 | { 23 | private: 24 | std::string type; //!< The type of the default_value, e.g. str, int, bool 25 | std::string default_value; //!< The default value for this setting 26 | std::string unit; //!< The unit of the physical quantity in which this setting is measured, e.g. "mm", "mm/s", "" 27 | public: 28 | SettingConfig(std::string key, std::string label); 29 | 30 | std::string getKey() const 31 | { 32 | return key; 33 | } 34 | 35 | void setType(std::string type) 36 | { 37 | this->type = type; 38 | } 39 | 40 | std::string getType() const 41 | { 42 | return type; 43 | } 44 | 45 | void setDefault(std::string default_value) 46 | { 47 | this->default_value = default_value; 48 | } 49 | 50 | std::string getDefaultValue() const 51 | { 52 | return default_value; 53 | } 54 | 55 | void setUnit(std::string unit) 56 | { 57 | this->unit = unit; 58 | } 59 | 60 | std::string getUnit() const 61 | { 62 | return unit; 63 | } 64 | 65 | void debugOutputAllSettings() const 66 | { 67 | std::cerr << key << "(" << default_value << ")" << std::endl; 68 | for (const SettingConfig& child : children) 69 | { 70 | child.debugOutputAllSettings(); 71 | } 72 | } 73 | }; 74 | 75 | }//namespace cura 76 | #endif//SETTINGS_SETTING_CONFIG_H 77 | -------------------------------------------------------------------------------- /CuraEngine3/src/settings/SettingContainer.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "SettingContainer.h" 3 | #include "SettingConfig.h" 4 | 5 | #include 6 | #include // find_if 7 | 8 | namespace cura 9 | { 10 | 11 | SettingContainer::SettingContainer(std::string key, std::string label) 12 | : key(key) 13 | , label(label) 14 | { 15 | } 16 | 17 | SettingConfig* SettingContainer::addChild(std::string key, std::string label) 18 | { 19 | children.emplace_back(key, label); 20 | return &children.back(); 21 | } 22 | 23 | SettingConfig& SettingContainer::getOrCreateChild(std::string key, std::string label) 24 | { 25 | auto child_it = std::find_if(children.begin(), children.end(), [&key](SettingConfig& child) { return child.key == key; } ); 26 | if (child_it == children.end()) 27 | { 28 | children.emplace_back(key, label); 29 | return children.back(); 30 | } 31 | else 32 | { 33 | return *child_it; 34 | } 35 | } 36 | 37 | 38 | void SettingContainer::debugOutputAllSettings() const 39 | { 40 | std::cerr << "\nSETTINGS BASE: " << key << std::endl; 41 | for (const SettingConfig& child : children) 42 | { 43 | child.debugOutputAllSettings(); 44 | } 45 | } 46 | 47 | }//namespace cura 48 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/AABB3D.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | 3 | #include "AABB3D.h" 4 | 5 | #include 6 | 7 | #include "AABB.h" 8 | 9 | namespace cura 10 | { 11 | 12 | AABB3D::AABB3D() 13 | : min(std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::max()) 14 | , max(std::numeric_limits::min(), std::numeric_limits::min(), std::numeric_limits::min()) 15 | { 16 | } 17 | 18 | AABB3D::AABB3D(Point3 min, Point3 max) 19 | : min(min) 20 | , max(max) 21 | { 22 | } 23 | 24 | Point3 AABB3D::getMiddle() const 25 | { 26 | return (min + max) / 2; 27 | } 28 | 29 | AABB AABB3D::flatten() const 30 | { 31 | return AABB(Point(min.x, min.y), Point(max.x, max.y)); 32 | } 33 | 34 | 35 | bool AABB3D::hit(const AABB3D& other) const 36 | { 37 | if ( max.x < other.min.x 38 | || min.x > other.max.x 39 | || max.y < other.min.y 40 | || min.y > other.max.y 41 | || max.z < other.min.z 42 | || min.z > other.max.z) 43 | { 44 | return false; 45 | } 46 | return true; 47 | } 48 | 49 | void AABB3D::include(Point3 p) 50 | { 51 | min.x = std::min(min.x, p.x); 52 | min.y = std::min(min.y, p.y); 53 | min.z = std::min(min.z, p.z); 54 | max.x = std::max(max.x, p.x); 55 | max.y = std::max(max.y, p.y); 56 | max.z = std::max(max.z, p.z); 57 | } 58 | 59 | void AABB3D::include(const AABB3D& aabb) 60 | { 61 | include(aabb.min); 62 | include(aabb.max); 63 | } 64 | 65 | void AABB3D::includeZ(coord_t z) 66 | { 67 | min.z = std::min(min.z, z); 68 | max.z = std::max(max.z, z); 69 | } 70 | 71 | void AABB3D::offset(Point3 offset) 72 | { 73 | min += offset; 74 | max += offset; 75 | } 76 | 77 | void AABB3D::offset(Point offset) 78 | { 79 | min += offset; 80 | max += offset; 81 | } 82 | 83 | void AABB3D::expandXY(int outset) 84 | { 85 | min -= Point3(outset, outset, 0); 86 | max += Point3(outset, outset, 0); 87 | if (min.x > max.x || min.y > max.y) 88 | { // make this AABB3D invalid 89 | *this = AABB3D(); 90 | } 91 | } 92 | 93 | }//namespace cura 94 | 95 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/Coord_t.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2018 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #ifndef UTILS_COORD_T_H 5 | #define UTILS_COORD_T_H 6 | 7 | 8 | //Include Clipper to get the ClipperLib::IntPoint definition, which we reuse as Point definition. 9 | #include "libs/clipper/clipper.hpp" 10 | 11 | namespace cura 12 | { 13 | 14 | using coord_t = ClipperLib::cInt; 15 | 16 | #define INT2MM(n) (double(n) / 1000.0) 17 | #define INT2MM2(n) (double(n) / 1000000.0) 18 | #define MM2INT(n) (coord_t(std::round((n) * 1000))) 19 | #define MM2_2INT(n) (coord_t(std::round((n) * 1000000))) 20 | #define MM3_2INT(n) (coord_t(std::round((n) * 1000000000))) 21 | 22 | #define INT2MICRON(n) ((n) / 1) 23 | #define MICRON2INT(n) ((n) * 1) 24 | 25 | } // namespace cura 26 | 27 | 28 | #endif // UTILS_COORD_T_H 29 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/Date.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "Date.h" 3 | 4 | #include 5 | #include // sscanf 6 | #include // strstr 7 | #include // setw, setfill 8 | 9 | namespace cura 10 | { 11 | 12 | Date::Date(int year, int month, int day) 13 | : year(year) 14 | , month(month) 15 | , day(day) 16 | { 17 | } 18 | 19 | std::string Date::toStringDashed() 20 | { 21 | std::ostringstream str; 22 | str << std::setfill('0') << std::setw(4) << year << "-" 23 | << std::setfill('0') << std::setw(2) << month << "-" 24 | << std::setfill('0') << std::setw(2) << day; 25 | return str.str(); 26 | } 27 | 28 | Date::Date() 29 | : year(-1) 30 | , month(-1) 31 | , day(-1) 32 | { 33 | } 34 | 35 | Date Date::getDate() 36 | { 37 | Date ret; 38 | // code adapted from http://stackoverflow.com/a/1765088/2683223 Jerry Coffin 39 | const char* build_date = __DATE__; 40 | char s_month[5]; 41 | static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; 42 | 43 | std::sscanf(build_date, "%s %d %d", s_month, &ret.day, &ret.year); 44 | 45 | ret.month = (strstr(month_names, s_month) - month_names) / 3; 46 | 47 | ret.month++; // humans count Jan as month 1, not zero 48 | return ret; 49 | } 50 | 51 | 52 | } // namespace cura -------------------------------------------------------------------------------- /CuraEngine3/src/utils/Date.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef UTILS_DATE_H 3 | #define UTILS_DATE_H 4 | 5 | #include 6 | 7 | namespace cura 8 | { 9 | 10 | /*! 11 | * Simple class to represent a year, month and day. 12 | */ 13 | class Date 14 | { 15 | public: 16 | Date(int year, int month, int day); //!< Simple constructor 17 | static Date getDate(); //!< Get the current date (compile time) 18 | std::string toStringDashed(); //!< Get a formatted string: yyyy-mm-dd 19 | protected: 20 | int year; //!< Year, e.g. 2016 21 | int month; //!< Month, e.g. 12, i.e. starting at 1 22 | int day; //!< Day, e.g. 31, i.e. starting at 1 23 | private: 24 | Date(); //!< Simple constructor initializing all to -1 25 | }; 26 | 27 | } // namespace cura 28 | 29 | #endif // UTILS_DATE_H 30 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/Lock.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2017 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef UTILS_LOCK_H 3 | #define UTILS_LOCK_H 4 | 5 | 6 | #ifdef _OPENMP 7 | #include 8 | #endif // _OPENMP 9 | 10 | 11 | class Lock 12 | { 13 | public: 14 | Lock() 15 | { 16 | #ifdef _OPENMP 17 | omp_init_lock(&lock_object); 18 | #endif // _OPENMP 19 | } 20 | ~Lock() 21 | { 22 | #ifdef _OPENMP 23 | omp_destroy_lock(&lock_object); 24 | #endif // _OPENMP 25 | } 26 | void lock() 27 | { 28 | #ifdef _OPENMP 29 | omp_set_lock(&lock_object); 30 | #endif // _OPENMP 31 | } 32 | void unlock() 33 | { 34 | #ifdef _OPENMP 35 | omp_unset_lock(&lock_object); 36 | #endif // _OPENMP 37 | } 38 | int test_lock() 39 | { 40 | int ret = 1; 41 | #ifdef _OPENMP 42 | ret = omp_test_lock(&lock_object); 43 | #endif // _OPENMP 44 | return ret; 45 | } 46 | private: 47 | #ifdef _OPENMP 48 | omp_lock_t lock_object; 49 | #endif // _OPENMP 50 | Lock(const Lock&) = delete; 51 | Lock& operator=(const Lock&) = delete; 52 | }; 53 | 54 | #endif // UTILS_MULTITHREADING_LOCK_H -------------------------------------------------------------------------------- /CuraEngine3/src/utils/NoCopy.h: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_NO_COPY_H 2 | #define UTILS_NO_COPY_H 3 | 4 | /*! 5 | * Util class to base other objects off which should never be copied. 6 | * Is needed because C++ has an implicit copy constructor and assign operator when none are defined. 7 | */ 8 | class NoCopy 9 | { 10 | protected: 11 | NoCopy() {} 12 | 13 | private: 14 | /*! 15 | * Private copy constructor. 16 | * Cannot be called because it is private. 17 | */ 18 | NoCopy(const NoCopy&); 19 | 20 | /*! 21 | * Private assign operator. 22 | * Cannot be called because it is private. 23 | */ 24 | NoCopy& operator =(const NoCopy&); 25 | }; 26 | 27 | #endif // UTILS_NO_COPY_H -------------------------------------------------------------------------------- /CuraEngine3/src/utils/Point3.cpp: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2018 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #include "Point3.h" //The headers we're implementing. 5 | 6 | namespace cura 7 | { 8 | 9 | Point3 Point3::operator +(const Point3& p) const 10 | { 11 | return Point3(x + p.x, y + p.y, z + p.z); 12 | } 13 | 14 | Point3 Point3::operator -(const Point3& p) const 15 | { 16 | return Point3(x - p.x, y - p.y, z - p.z); 17 | } 18 | 19 | Point3 Point3::operator *(const Point3& p) const 20 | { 21 | return Point3(x * p.x, y * p.y, z * p.z); 22 | } 23 | 24 | Point3 Point3::operator /(const Point3& p) const 25 | { 26 | return Point3(x / p.x, y / p.y, z / p.z); 27 | } 28 | 29 | Point3& Point3::operator +=(const Point3& p) 30 | { 31 | x += p.x; 32 | y += p.y; 33 | z += p.z; 34 | return *this; 35 | } 36 | 37 | Point3& Point3::operator -=(const Point3& p) 38 | { 39 | x -= p.x; 40 | y -= p.y; 41 | z -= p.z; 42 | return *this; 43 | } 44 | 45 | Point3& Point3::operator *=(const Point3& p) 46 | { 47 | x *= p.x; 48 | y *= p.y; 49 | z *= p.z; 50 | return *this; 51 | } 52 | 53 | Point3& Point3::operator /=(const Point3& p) 54 | { 55 | x /= p.x; 56 | y /= p.y; 57 | z /= p.z; 58 | return *this; 59 | } 60 | 61 | bool Point3::operator ==(const Point3& p) const 62 | { 63 | return x == p.x && y == p.y && z == p.z; 64 | } 65 | 66 | bool Point3::operator !=(const Point3& p) const 67 | { 68 | return x != p.x || y != p.y || z != p.z; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/PolygonsPointIndex.cpp: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 Ultimaker B.V. 2 | //CuraEngine is released under the terms of the AGPLv3 or higher. 3 | 4 | #include "PolygonsPointIndex.h" 5 | 6 | namespace cura 7 | { 8 | 9 | bool PolygonsPointIndex::initialized() const 10 | { 11 | return polygons; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /CuraEngine3/src/utils/ProximityPointLink.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "ProximityPointLink.h" 3 | 4 | namespace cura 5 | { 6 | 7 | ProximityPointLink::ProximityPointLink(const ListPolyIt a, const ListPolyIt b, int dist, const ProximityPointLinkType type) 8 | : a(a) 9 | , b(b) 10 | , dist(dist) 11 | , type(type) 12 | { 13 | } 14 | 15 | bool ProximityPointLink::operator==(const ProximityPointLink& other) const 16 | { 17 | return (a == other.a && b == other.b) || (a == other.b && b == other.a); 18 | } 19 | 20 | void ProximityPointLink::setDist(coord_t distance) const 21 | { 22 | ProximityPointLink& thiss = *const_cast(this); 23 | thiss.dist = distance; 24 | } 25 | 26 | }//namespace cura 27 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/algorithm.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef UTILS_ALGORITHM_H 3 | #define UTILS_ALGORITHM_H 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | // extensions to algorithm.h from the standard library 11 | 12 | namespace cura 13 | { 14 | 15 | /*! 16 | * Get the order of a vector: the sorted indices of a vector 17 | * 18 | * {1.6, 1.8, 1.7} returns {1, 3, 2} meaning {in[1], in[3], in[2]} is a sorted 19 | * vector 20 | * 21 | * Thanks to Lukasz Wiklendt 22 | * 23 | * \param in The vector for which to get the order 24 | * \return An ordered vector of indices into \p in 25 | */ 26 | template 27 | std::vector order(const std::vector &in) 28 | { 29 | // initialize original index locations 30 | std::vector order(in.size()); 31 | std::iota(order.begin(), order.end(), 0); // fill vector with 1, 2, 3,.. etc 32 | 33 | // sort indexes based on comparing values in v 34 | std::sort(order.begin(), order.end(), 35 | [&in](size_t i1, size_t i2) 36 | { 37 | return in[i1] < in[i2]; 38 | } 39 | ); 40 | 41 | return order; 42 | } 43 | 44 | } // namespace cura 45 | 46 | #endif // UTILS_ALGORITHM_H 47 | 48 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/gettime.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #include "gettime.h" 3 | 4 | namespace cura 5 | { 6 | 7 | TimeKeeper::TimeKeeper() 8 | { 9 | restart(); 10 | } 11 | 12 | double TimeKeeper::restart() 13 | { 14 | double ret = getTime() - startTime; 15 | startTime = getTime(); 16 | return ret; 17 | } 18 | 19 | }//namespace cura -------------------------------------------------------------------------------- /CuraEngine3/src/utils/gettime.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef GETTIME_H 3 | #define GETTIME_H 4 | 5 | #ifdef __WIN32 6 | #include 7 | #else 8 | #ifdef USE_CPU_TIME 9 | #include 10 | #endif 11 | 12 | #include 13 | #include 14 | #include 15 | #endif 16 | 17 | namespace cura 18 | { 19 | static inline double getTime() 20 | { 21 | #ifdef __WIN32 22 | return double(GetTickCount()) / 1000.0; 23 | #else // not __WIN32 24 | #if USE_CPU_TIME // Use cpu usage time if available, otherwise wall clock time 25 | struct rusage usage; 26 | #ifdef DEBUG 27 | int ret = getrusage(RUSAGE_SELF, &usage); 28 | assert(ret == 0); 29 | ((void)ret); 30 | #else 31 | getrusage(RUSAGE_SELF, &usage); 32 | #endif 33 | double user_time = double(usage.ru_utime.tv_sec) + double(usage.ru_utime.tv_usec) / 1000000.0; 34 | double sys_time = double(usage.ru_stime.tv_sec) + double(usage.ru_stime.tv_usec) / 1000000.0; 35 | return user_time + sys_time; 36 | #else // not USE_CPU_TIME 37 | struct timeval tv; 38 | gettimeofday(&tv, nullptr); 39 | return double(tv.tv_sec) + double(tv.tv_usec) / 1000000.0; 40 | #endif // USE_CPU_TIME 41 | #endif // __WIN32 42 | } 43 | 44 | class TimeKeeper 45 | { 46 | private: 47 | double startTime; 48 | public: 49 | TimeKeeper(); 50 | 51 | double restart(); 52 | }; 53 | 54 | }//namespace cura 55 | #endif//GETTIME_H 56 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/logoutput.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef LOGOUTPUT_H 3 | #define LOGOUTPUT_H 4 | 5 | namespace cura { 6 | 7 | void increaseVerboseLevel(); 8 | void enableProgressLogging(); 9 | 10 | //Report an error message (always reported, independed of verbose level) 11 | void logError(const char* fmt, ...); 12 | //Report a warning message (always reported, independed of verbose level) 13 | void logWarning(const char* fmt, ...); 14 | //Report a message if the verbose level is 1 or higher. (defined as _log to prevent clash with log() function from ) 15 | void log(const char* fmt, ...); 16 | //Report an copyright message (always reported, independed of verbose level) 17 | void logAlways(const char* fmt, ...); 18 | 19 | //Report a message if the verbose level is 2 or higher. (defined as _log to prevent clash with log() function from ) 20 | void logDebug(const char* fmt, ...); 21 | 22 | //Report engine progress to interface if any. Only if "enableProgressLogging()" has been called. 23 | void logProgress(const char* type, int value, int maxValue, float percent); 24 | 25 | }//namespace cura 26 | 27 | #endif//LOGOUTPUT_H 28 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/macros.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2017 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef UTILS_MACROS_H 3 | #define UTILS_MACROS_H 4 | 5 | // macro to suppress unused parameter warnings from the compiler 6 | #define UNUSED_PARAM(param) (void)(param) 7 | 8 | #endif // UTILS_MACROS_H 9 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/math.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2016 Ultimaker - Released under terms of the AGPLv3 License */ 2 | #ifndef UTILS_MATH_H 3 | #define UTILS_MATH_H 4 | 5 | #include 6 | 7 | 8 | //c++11 no longer defines M_PI, so add our own constant. 9 | #ifndef M_PI 10 | #define M_PI 3.14159265358979323846 11 | #endif 12 | 13 | namespace cura 14 | { 15 | 16 | static const float sqrt2 = std::sqrt(2.0f); 17 | 18 | template inline T square(const T& a) { return a * a; } 19 | 20 | inline unsigned int round_divide(unsigned int dividend, unsigned int divisor) //!< Return dividend divided by divisor rounded to the nearest integer 21 | { 22 | return (dividend + divisor / 2) / divisor; 23 | } 24 | inline unsigned int round_up_divide(unsigned int dividend, unsigned int divisor) //!< Return dividend divided by divisor rounded to the nearest integer 25 | { 26 | return (dividend + divisor - 1) / divisor; 27 | } 28 | 29 | }//namespace cura 30 | #endif // UTILS_MATH_H 31 | 32 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/socket.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef __WIN32 5 | #include 6 | #else 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #endif 13 | 14 | #include "socket.h" 15 | #include "logoutput.h" 16 | 17 | namespace cura 18 | { 19 | 20 | #ifdef __WIN32 21 | bool wsaStartupDone = false; 22 | #endif 23 | 24 | ClientSocket::ClientSocket() 25 | { 26 | sockfd = -1; 27 | 28 | } 29 | 30 | void ClientSocket::connectTo(std::string host, int port) 31 | { 32 | 33 | } 34 | 35 | ClientSocket::~ClientSocket() 36 | { 37 | close(); 38 | } 39 | 40 | void ClientSocket::sendInt32(int32_t nr) 41 | { 42 | 43 | } 44 | 45 | void ClientSocket::sendFloat32(float f) 46 | { 47 | 48 | } 49 | 50 | 51 | void ClientSocket::sendAll(const void* data, int length) 52 | { 53 | 54 | } 55 | 56 | int32_t ClientSocket::recvInt32() 57 | { 58 | 59 | } 60 | 61 | float ClientSocket::recvFloat32() 62 | { 63 | 64 | } 65 | 66 | void ClientSocket::recvAll(void* data, int length) 67 | { 68 | 69 | } 70 | 71 | void ClientSocket::close() 72 | { 73 | sockfd = -1; 74 | } 75 | 76 | }//namespace cura 77 | -------------------------------------------------------------------------------- /CuraEngine3/src/utils/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef SOCKET_H 2 | #define SOCKET_H 3 | 4 | #include 5 | namespace cura 6 | { 7 | 8 | class ClientSocket 9 | { 10 | int sockfd; 11 | public: 12 | ClientSocket(); 13 | ~ClientSocket(); 14 | 15 | void connectTo(std::string host, int port); 16 | 17 | void sendInt32(int32_t nr); 18 | void sendFloat32(float f); 19 | void sendAll(const void* data, int length); 20 | 21 | int32_t recvInt32(); 22 | float recvFloat32(); 23 | void recvAll(void* data, int length); 24 | 25 | void close(); 26 | }; 27 | 28 | }//namespace cura 29 | #endif//SOCKET_H 30 | -------------------------------------------------------------------------------- /Magic3D/COM-test/GetCOM/GetCOM.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-06-02T13:07:30 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = GetCOM 12 | TEMPLATE = app 13 | 14 | 15 | SOURCES += main.cpp\ 16 | mainwindow.cpp 17 | 18 | HEADERS += mainwindow.h 19 | 20 | FORMS += mainwindow.ui 21 | -------------------------------------------------------------------------------- /Magic3D/COM-test/GetCOM/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWindow w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /Magic3D/COM-test/GetCOM/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | namespace Ui { 10 | class MainWindow; 11 | } 12 | 13 | class MainWindow : public QMainWindow 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit MainWindow(QWidget *parent = 0); 19 | ~MainWindow(); 20 | 21 | private: 22 | HKEY hKey; 23 | LPCWSTR subkey; 24 | wchar_t keyname[256]; //键名数组 25 | char keyvalue[256]; //键值数组 26 | DWORD keysize,type,valuesize; 27 | int indexnum; 28 | Ui::MainWindow *ui; 29 | 30 | QString getcomm(int index, QString keyorvalue); 31 | void init_comm(); 32 | }; 33 | 34 | #endif // MAINWINDOW_H 35 | -------------------------------------------------------------------------------- /Magic3D/COM-test/GetCOM/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 190 21 | 40 22 | 101 23 | 22 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 0 32 | 0 33 | 400 34 | 23 35 | 36 | 37 | 38 | 39 | 40 | TopToolBarArea 41 | 42 | 43 | false 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/GetCOM.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/GetCOM.exe -------------------------------------------------------------------------------- /Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/main.o -------------------------------------------------------------------------------- /Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/mainwindow.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/mainwindow.o -------------------------------------------------------------------------------- /Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/moc_mainwindow.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/COM-test/build-GetCOM-unknown-Debug/debug/moc_mainwindow.o -------------------------------------------------------------------------------- /Magic3D/Interface/configset.cpp: -------------------------------------------------------------------------------- 1 | #include "configset.h" 2 | #include "ui_configset.h" 3 | 4 | int MachineSetting=0; 5 | 6 | ConfigSet::ConfigSet(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::ConfigSet) 9 | { 10 | Revolution = 0; 11 | setWindowFlags(Qt::FramelessWindowHint); 12 | ui->setupUi(this); 13 | } 14 | 15 | ConfigSet::~ConfigSet() 16 | { 17 | delete ui; 18 | } 19 | 20 | void ConfigSet::on_radioButton_clicked() 21 | { 22 | Revolution = GuangI; 23 | MachineSetting = Revolution; 24 | } 25 | 26 | void ConfigSet::on_radioButton_2_clicked() 27 | { 28 | Revolution = GuangII; 29 | MachineSetting = Revolution; 30 | } 31 | -------------------------------------------------------------------------------- /Magic3D/Interface/configset.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIGSET_H 2 | #define CONFIGSET_H 3 | #define GuangI 1024 4 | #define GuangII 1920 5 | 6 | #include 7 | 8 | namespace Ui { 9 | class ConfigSet; 10 | } 11 | 12 | class ConfigSet : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ConfigSet(QWidget *parent = 0); 18 | ~ConfigSet(); 19 | 20 | private slots: 21 | void on_radioButton_clicked(); 22 | 23 | void on_radioButton_2_clicked(); 24 | 25 | private: 26 | int Revolution; 27 | Ui::ConfigSet *ui; 28 | }; 29 | 30 | #endif // CONFIGSET_H 31 | -------------------------------------------------------------------------------- /Magic3D/Interface/controlPanel/controlpanel.h: -------------------------------------------------------------------------------- 1 | #ifndef CONTROLPANEL_H 2 | #define CONTROLPANEL_H 3 | 4 | #include 5 | #include "printthread.h" 6 | #include "readgcode.h" 7 | #include "settingdialog.h" 8 | 9 | namespace Ui { 10 | class controlPanel; 11 | } 12 | 13 | class controlPanel : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit controlPanel(QWidget *parent = 0); 19 | ~controlPanel(); 20 | signals: 21 | void Sig_stopRecover(bool); 22 | void Sig_canclePrint(); 23 | void Sig_disconnectPrinter(); 24 | 25 | public slots: 26 | void slotConnect(bool); 27 | void updateProgressBar(unsigned int); 28 | void updateTemp(float); 29 | void setTotalProgressBar(unsigned int val); 30 | void hasCom(); 31 | 32 | private slots: 33 | void on_connect_clicked(); 34 | 35 | void on_Setting_clicked(); 36 | 37 | void on_loadfile_clicked(); 38 | 39 | void on_Print1_clicked(); 40 | 41 | void on_Stop_clicked(); 42 | 43 | void on_Recovery_clicked(); 44 | 45 | void on_Cancle1_clicked(); 46 | 47 | private: 48 | bool connected; 49 | bool stoped; 50 | QStringList printableList; 51 | PrintThread* printer; 52 | SettingDialog* machineControl; 53 | 54 | Ui::controlPanel *ui; 55 | }; 56 | 57 | #endif // CONTROLPANEL_H 58 | -------------------------------------------------------------------------------- /Magic3D/Interface/controlPanel/printthread.h: -------------------------------------------------------------------------------- 1 | #ifndef PRINTTHREAD_H 2 | #define PRINTTHREAD_H 3 | #include 4 | #include "../../Uart/qextserialenumerator.h" 5 | #include "../../Uart/win_qextserialport.h" 6 | #include 7 | #include 8 | #include 9 | #include "readgcode.h" 10 | 11 | 12 | class PrintThread : public QThread 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit PrintThread(QObject *parent = 0); 17 | ~PrintThread(); 18 | void run(); 19 | bool connectCom(QString port); 20 | void beginPrint(QStringList); 21 | void debugFunction(); 22 | 23 | int getTotalLay(); 24 | int getTime(); 25 | int getTotalGmd(); 26 | QStringList getCom(){return comlist;} 27 | 28 | public slots: 29 | void readArduino(); 30 | void stopPrint(bool); 31 | void canclePrint(); 32 | void disconnectCom(); 33 | void init_comm(); 34 | void controlPan(QString); 35 | void getTemp(); 36 | void preHeartFinish(); 37 | void preHeart(); 38 | 39 | signals: 40 | void Sig_consucceful(bool); 41 | void Sig_okmount(unsigned int); 42 | void Sig_oktalmount(unsigned int); 43 | void Sig_temp(float); 44 | void Sig_detectcoms(); 45 | void Sig_warmPre(); 46 | void Sig_recvCom(QString); 47 | void Sig_tempUpdate(double ,double); 48 | void Sig_startTimer(); 49 | 50 | private: 51 | //获取windows的串口 52 | HKEY hKey; 53 | LPCWSTR subkey; 54 | wchar_t keyname[256]; //键名数组 55 | char keyvalue[256]; //键值数组 56 | DWORD keysize,type,valuesize; 57 | int indexnum; 58 | 59 | QStringList comlist; 60 | QTimer* checkTimer; 61 | QTimer* checkTemp; 62 | 63 | QString getcomm(int index, QString keyorvalue); 64 | void checkCom(); 65 | 66 | 67 | //串口数字 68 | Win_QextSerialPort* Arcom; 69 | QList pPorts; 70 | 71 | QTimer *timer; 72 | 73 | void sendToArduino(QString str); 74 | void addToSender(); 75 | readGcode* gcode; 76 | QSettings * settings; 77 | QString tosend; 78 | bool isPrinting; 79 | bool isStop; 80 | int ok_mount; // 统计ok的数量 81 | float temperature; 82 | 83 | }; 84 | 85 | #endif // PRINTTHREAD_H 86 | -------------------------------------------------------------------------------- /Magic3D/Interface/controlPanel/readgcode.h: -------------------------------------------------------------------------------- 1 | #ifndef READGCODE_H 2 | #define READGCODE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | class readGcode : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit readGcode(QObject *parent = 0); 12 | ~readGcode(); 13 | QString readOneLine(); 14 | void setTargetFile(QString file); 15 | void reset(); 16 | unsigned int getTotalLayer(); 17 | unsigned int getTotalGcmd(); 18 | unsigned int getTotalTime(); 19 | signals: 20 | 21 | public slots: 22 | 23 | private slots: 24 | 25 | 26 | private: 27 | QFile* targetGcode; 28 | QString printFile; 29 | 30 | QTextStream* in; 31 | QString currentLine; 32 | 33 | unsigned int layers; 34 | unsigned int g_cmds; 35 | unsigned int totaltimes; 36 | }; 37 | 38 | #endif // READGCODE_H 39 | -------------------------------------------------------------------------------- /Magic3D/Interface/controlPanel/settingdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGDIALOG_H 2 | #define SETTINGDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class SettingDialog; 9 | } 10 | 11 | class SettingDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit SettingDialog(QWidget *parent = 0); 17 | ~SettingDialog(); 18 | void setControl(bool t); 19 | signals: 20 | void Sig_cmd(QString); 21 | void Sig_updateTemp(double,double); 22 | private slots: 23 | void on_xHome_clicked(); 24 | void on_yHome_clicked(); 25 | void on_zHome_clicked(); 26 | void on_xDele_2_clicked(); 27 | void on_xPlus_clicked(); 28 | void on_xDele_clicked(); 29 | void on_yDele_clicked(); 30 | void on_yPlus_clicked(); 31 | void on_zPlus_clicked(); 32 | void on_zDele_clicked(); 33 | void on_tempture_clicked(); 34 | void on_lineEdit_returnPressed(); 35 | void on_radioButton_clicked(); 36 | 37 | void on_radioButton_2_clicked(); 38 | 39 | void on_radioButton_3_clicked(); 40 | 41 | void on_lineEdit_2_returnPressed(); 42 | 43 | void on_lineEdit_3_cursorPositionChanged(int arg1, int arg2); 44 | 45 | void on_ePlus_clicked(); 46 | 47 | void on_eDele_clicked(); 48 | void on_pushButton_clicked(); 49 | void realTimeSlot(double,double); 50 | void upd(); 51 | 52 | void on_lineEdit_3_returnPressed(); 53 | 54 | void on_outlong_returnPressed(); 55 | 56 | void on_sendGcode_clicked(); 57 | 58 | void on_excurdSpeed_returnPressed(); 59 | 60 | void on_filamentDiameter_returnPressed(); 61 | 62 | void on_extrusionWidth_returnPressed(); 63 | 64 | void on_printSpeed_returnPressed(); 65 | 66 | public slots: 67 | void showMessage(QString); 68 | void slot_close(); 69 | private: 70 | Ui::SettingDialog *ui; 71 | float steps; 72 | float x_pos; 73 | float y_pos; 74 | float z_pos; 75 | QTimer* timers; 76 | int exculuerSpeed; 77 | }; 78 | 79 | #endif // SETTINGDIALOG_H 80 | -------------------------------------------------------------------------------- /Magic3D/Interface/graph.cpp: -------------------------------------------------------------------------------- 1 | #include "graph.h" 2 | 3 | Graph::Graph(QWidget*parent) 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /Magic3D/Interface/graph.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * * 3 | * Author : Peng Chen * 4 | * Version : 0.0.1 * 5 | * Date : 12 July 2014 * 6 | * Website : http://www.3green-tech.com * 7 | * Copyright : 3green-tech 2010-2014 * 8 | * * 9 | * Attributions: * 10 | * This Class was use for promotion the QGraphicsView which * 11 | * the QT designer provide.After been promoted,the main useful * 12 | * founction "resizeEvent()"will be rewritted. * 13 | * * 14 | *******************************************************************************/ 15 | 16 | #ifndef GRAPH_H 17 | #define GRAPH_H 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | class Graph : public QGraphicsView 24 | { 25 | public: 26 | Graph(QWidget*); 27 | protected: 28 | void resizeEvent(QResizeEvent *event) 29 | { 30 | if(scene()) 31 | scene()->setSceneRect(QRect(QPoint(0, 0), event->size())); 32 | QGraphicsView::resizeEvent(event); 33 | } 34 | }; 35 | 36 | #endif // GRAPH_H 37 | -------------------------------------------------------------------------------- /Magic3D/Interface/imageviewwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "imageviewwidget.h" 2 | #include "ui_imageviewwidget.h" 3 | 4 | ImageViewWidget::ImageViewWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::ImageViewWidget) 7 | { 8 | ui->setupUi(this); 9 | m_painter = ui->LayerShowWidget; 10 | // SliderValue = -1; 11 | } 12 | 13 | ImageViewWidget::~ImageViewWidget() 14 | { 15 | delete ui; 16 | } 17 | 18 | void ImageViewWidget::on_LayerSlider_valueChanged(int value) 19 | { 20 | m_painter->show_layer(storg,value); 21 | m_painter->update(); 22 | ui->label->setText(tr("%1").arg(value)); 23 | emit Sig_SliderValue(value); 24 | // SliderValue = value; 25 | 26 | } 27 | void ImageViewWidget::ReceiveStroage(SliceDataStorage *sto) 28 | { 29 | storg = sto; 30 | ui->LayerSlider->setRange(0,(storg->volumes[0].layers.size())-1); 31 | } 32 | 33 | void ImageViewWidget::on_CloseButton_clicked() 34 | { 35 | this->close(); 36 | emit Sig_printEditShow(); 37 | } 38 | -------------------------------------------------------------------------------- /Magic3D/Interface/imageviewwidget.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * * 3 | * Author : Peng Chen * 4 | * Version : 0.0.1 * 5 | * Date : 12 July 2014 * 6 | * Website : http://www.3green-tech.com * 7 | * Copyright : 3green-tech 2010-2014 * 8 | * * 9 | * Attributions: * 10 | * Used for show the layer image,show every slice layer image * * 11 | *******************************************************************************/ 12 | #ifndef IMAGEVIEWWIDGET_H 13 | #define IMAGEVIEWWIDGET_H 14 | 15 | #include 16 | #include "../SliceEngine/sliceDataStorage.h" 17 | #include "painter.h" 18 | 19 | namespace Ui { 20 | class ImageViewWidget; 21 | } 22 | 23 | class ImageViewWidget : public QWidget 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | explicit ImageViewWidget(QWidget *parent = 0); 29 | ~ImageViewWidget(); 30 | protected: 31 | void closeEvent(QCloseEvent *){emit Sig_SliderValue(-1);} 32 | void hideEvent(QHideEvent *){emit Sig_SliderValue(-1);} 33 | public slots: 34 | 35 | 36 | private slots: 37 | void on_LayerSlider_valueChanged(int value); 38 | void ReceiveStroage(SliceDataStorage *storage); 39 | 40 | void on_CloseButton_clicked(); 41 | 42 | private: 43 | Ui::ImageViewWidget *ui; 44 | SliceDataStorage *storg; 45 | Painter * m_painter; 46 | // int SliderValue; 47 | signals: 48 | void Sig_printEditShow(); 49 | void Sig_SliderValue(int); 50 | }; 51 | 52 | #endif // IMAGEVIEWWIDGET_H 53 | -------------------------------------------------------------------------------- /Magic3D/Interface/loadingbar.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Author : Peng Chen * 3 | * Version : 0.0.1 * 4 | * Date : 12 July 2014 * 5 | * Website : http://www.3green-tech.com * 6 | * Copyright : 3green-tech 2010-2014 * 7 | * * 8 | * Attributions: * 9 | * A loadingbar,can be used gloable * 10 | *******************************************************************************/ 11 | #ifndef LOADINGBAR_H 12 | #define LOADINGBAR_H 13 | 14 | #include 15 | #include 16 | 17 | 18 | class LoadingBar : public QDialog 19 | { 20 | Q_OBJECT 21 | 22 | public: 23 | LoadingBar(); 24 | LoadingBar(int min, int max, bool autoshow = true); 25 | ~LoadingBar(); 26 | 27 | public slots: 28 | void setMax(int max); 29 | void setMin(int min); 30 | void setValue(int val); 31 | void setDescription(QString str); 32 | void setProgress(qint64 fraction, qint64 total); 33 | void useCancelButton(bool use); 34 | int GetValue(); 35 | 36 | private: 37 | void SetupUI(bool autoshow); 38 | void SetupConnections(); 39 | QHBoxLayout* horizontalLayout; 40 | QProgressBar* progressBar; 41 | QPushButton* cancelButton; 42 | }; 43 | #endif 44 | -------------------------------------------------------------------------------- /Magic3D/Interface/mainbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "mainbutton.h" 2 | #include "ui_mainbutton.h" 3 | 4 | MainButton::MainButton(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::MainButton) 7 | { 8 | ui->setupUi(this); 9 | // ui->ModelButton->setText(tr("Model")); 10 | // ui->SupportMode->setText(tr("Support")); 11 | // ui->PrintMode->setText(tr("Print")); 12 | } 13 | 14 | MainButton::~MainButton() 15 | { 16 | delete ui; 17 | } 18 | 19 | void MainButton::on_ModelButton_clicked() 20 | { 21 | emit Sig_ModelMode(); 22 | } 23 | 24 | void MainButton::on_SupportMode_clicked() 25 | { 26 | emit Sig_SupportMode(); 27 | } 28 | 29 | void MainButton::on_PrintMode_clicked() 30 | { 31 | emit Sig_PrintMode(); 32 | } 33 | -------------------------------------------------------------------------------- /Magic3D/Interface/mainbutton.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * * 3 | * Author : Peng Chen * 4 | * Version : 0.0.1 * 5 | * Date : 12 July 2014 * 6 | * Website : http://www.3green-tech.com * 7 | * Copyright : 3green-tech 2010-2014 * 8 | * * 9 | * Attributions: * 10 | * This class include three mainbutton,model edit button,support edit button, * 11 | * and the print edit button. Press the button,enter the corresponding mode. * * 12 | *******************************************************************************/ 13 | #ifndef MAINBUTTON_H 14 | #define MAINBUTTON_H 15 | 16 | #include 17 | 18 | namespace Ui { 19 | class MainButton; 20 | } 21 | 22 | class MainButton : public QWidget 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | explicit MainButton(QWidget *parent = 0); 28 | ~MainButton(); 29 | 30 | private: 31 | Ui::MainButton *ui; 32 | signals: 33 | void Sig_ModelMode(); 34 | void Sig_SupportMode(); 35 | void Sig_PrintMode(); 36 | private slots: 37 | void on_ModelButton_clicked(); 38 | void on_SupportMode_clicked(); 39 | void on_PrintMode_clicked(); 40 | }; 41 | 42 | #endif // MAINBUTTON_H 43 | -------------------------------------------------------------------------------- /Magic3D/Interface/painter.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * * 3 | * Author : Peng Chen * 4 | * Version : 0.0.1 * 5 | * Date : 12 July 2014 * 6 | * Website : http://www.3green-tech.com * 7 | * Copyright : 3green-tech 2010-2014 * 8 | * * 9 | * Attributions: * 10 | * Painter was used for paint the slice layer. * 11 | *******************************************************************************/ 12 | #ifndef PAINTER_H 13 | #define PAINTER_H 14 | 15 | #include 16 | #include "../SliceEngine/sliceDataStorage.h" 17 | namespace Ui { 18 | class Painter; 19 | } 20 | 21 | class Painter : public QWidget 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | explicit Painter(QWidget *parent = 0); 27 | ~Painter(); 28 | 29 | void paintEvent(QPaintEvent *); 30 | void show_layer(SliceDataStorage * storage,int layers_n); 31 | 32 | QPixmap pix; 33 | 34 | SliceDataStorage *storage; 35 | int layers_n; 36 | private: 37 | Ui::Painter *ui; 38 | }; 39 | 40 | #endif // PAINTER_H 41 | -------------------------------------------------------------------------------- /Magic3D/Interface/painter.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Painter 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 300 13 | 14 | 15 | 16 | Form 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Magic3D/Interface/printedit.h: -------------------------------------------------------------------------------- 1 | #ifndef PRINTEDIT_H 2 | #define PRINTEDIT_H 3 | 4 | #include 5 | #include 6 | #include "cilent.h" 7 | #include 8 | #include 9 | #include 10 | #include "worldview.h" 11 | #include "uart/qextserialenumerator.h" 12 | #include "./uart/win_qextserialport.h" 13 | #include 14 | #include 15 | 16 | class WorldView; 17 | class GreenTech; 18 | 19 | 20 | namespace Ui { 21 | class PrintEdit; 22 | } 23 | 24 | class PrintEdit : public QWidget 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | explicit PrintEdit(QWidget *parent = 0); 30 | ~PrintEdit(); 31 | WorldView *pworld; 32 | void DisableSome(); 33 | 34 | private slots: 35 | void on_ImageButton_clicked(); 36 | void on_SliceButton_clicked(); 37 | void on_ConnectButton_clicked(); 38 | void on_PrintButton_clicked(); 39 | void on_StopPrintButton_clicked(); 40 | void on_RecoverButton_clicked(); 41 | void on_ResetButton_clicked(); 42 | void on_toolButton_clicked(); 43 | 44 | bool IsIPaddress(QString ip); 45 | void HostConnected(); 46 | void HostDisconnected(); 47 | void HostError(); 48 | 49 | //get the serialcom list 50 | QString getcomm(int index, QString keyorvalue); 51 | void init_comm(); 52 | void on_radioButton_clicked(bool checked); 53 | 54 | private: 55 | Ui::PrintEdit *ui; 56 | //获取windows的串口 57 | HKEY hKey; 58 | LPCWSTR subkey; 59 | wchar_t keyname[256]; //键名数组 60 | char keyvalue[256]; //键值数组 61 | DWORD keysize,type,valuesize; 62 | int indexnum; 63 | 64 | bool connected; 65 | bool Sliced; 66 | int servPort; 67 | 68 | 69 | //串口数字 70 | Win_QextSerialPort* Arcom; 71 | QList pPorts; 72 | 73 | void timerTask(); 74 | 75 | 76 | signals: 77 | void Sig_ImageShow(bool show); 78 | void Sig_Slice(); 79 | void Sig_Thickness(int); 80 | void Sig_ComError(QString); 81 | void Sig_curaSupport(bool); 82 | }; 83 | 84 | #endif // PRINTEDIT_H 85 | -------------------------------------------------------------------------------- /Magic3D/ModelData/modelloader.h: -------------------------------------------------------------------------------- 1 | #ifndef MODELLOADER_H 2 | #define MODELLOADER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | //simple structure to read triangles into 10 | //TODO assuming floats are 32bits on the compiling platform 11 | struct STLTri 12 | { 13 | float nx,ny,nz; 14 | //by stl definition, 15 | //the model is supposed to be in positive cordinates only 16 | //but were using unsigned anyway... 17 | float x0,y0,z0; 18 | float x1,y1,z1; 19 | float x2,y2,z2; 20 | }; 21 | class ModelLoader : public QObject 22 | { 23 | Q_OBJECT 24 | public: 25 | explicit ModelLoader( QString filename, bool &readyRead, QObject *parent = 0); 26 | ~ModelLoader(); 27 | 28 | bool LoadNextTri(STLTri *&tri, bool &errorFlag); 29 | float GetPercentDone(); 30 | QString GetError(){return lastError;}//returns any errors that happened in the loading process. 31 | 32 | 33 | signals: 34 | void PercentCompletedUpdate(qint64 frac, qint64 total); 35 | 36 | public slots: 37 | 38 | private: 39 | 40 | QString fileType;// "BIN_STL", "ASCII_STL", "UNCOMPRESSED_AMF"...... 41 | QFile asciifile; 42 | QTextStream asciiStream; 43 | QFile binfile; 44 | 45 | quint32 triCount; 46 | unsigned long int byteCount; 47 | 48 | QString lastError; 49 | 50 | float lastpercent; 51 | QString DetermineFileType(QString filename, bool &readyRead); 52 | void PrepareSTLForReading(QString filename, bool &readyRead); 53 | void PrepareAMFForReading(){} 54 | bool ReadBinHeader(); 55 | bool ReadAsciiHeader(); 56 | bool CheckBinFileValidity(); 57 | }; 58 | 59 | #endif // MODELLOADER_H 60 | -------------------------------------------------------------------------------- /Magic3D/ModelData/modelwriter.h: -------------------------------------------------------------------------------- 1 | #ifndef MODELWRITER_H 2 | #define MODELWRITER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | //Usage: create a ModelWriter object with filename and if readyWrite is true, 9 | //begin feeding triangles in using WriteNextTri(); 10 | //when finished use Finalize(); 11 | 12 | 13 | class Triangle3D; 14 | class ModelWriter : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | 19 | explicit ModelWriter(QString filename, bool &readyWrite, QObject *parent = 0); 20 | ~ModelWriter(); 21 | 22 | 23 | signals: 24 | 25 | //void PercentCompletedUpdate(qint64 frac, qint64 total); 26 | 27 | public: 28 | void WriteNextTri(Triangle3D* pTri); 29 | void Finalize();//goes back to the begining of the file and writes tri count. etc 30 | 31 | private: 32 | QFile binOUT; 33 | QDataStream binStream; 34 | unsigned long int triCount; 35 | 36 | void WriteHeader(quint32 triCount); 37 | 38 | 39 | }; 40 | 41 | #endif // MODELWRITER_H 42 | -------------------------------------------------------------------------------- /Magic3D/ModelData/verticaltricontainer.cpp: -------------------------------------------------------------------------------- 1 | #include "verticaltricontainer.h" 2 | 3 | VerticalTriContainer::VerticalTriContainer() 4 | { 5 | upContainer = NULL; 6 | downContainer = NULL; 7 | } 8 | -------------------------------------------------------------------------------- /Magic3D/ModelData/verticaltricontainer.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "triangle3d.h" 3 | 4 | #define TRICONTAINER_PLAY 0.001 5 | 6 | class VerticalTriContainer 7 | { 8 | public: 9 | VerticalTriContainer(); 10 | 11 | double maxZ; 12 | double minZ; 13 | 14 | VerticalTriContainer* upContainer; 15 | VerticalTriContainer* downContainer; 16 | 17 | std::vector tris; 18 | 19 | 20 | bool TriangleFits(Triangle3D* tri) 21 | { 22 | //test if the triangle has any part in the container. 23 | if((tri->maxBound.z() >= (minZ - TRICONTAINER_PLAY)) 24 | && 25 | (tri->minBound.z() <= (maxZ + TRICONTAINER_PLAY))) 26 | 27 | return true; 28 | 29 | return false; 30 | } 31 | 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /Magic3D/OS_Function.h: -------------------------------------------------------------------------------- 1 | //This Header is for application wide convenience functions. 2 | 3 | 4 | #ifndef OS_FUNCTION_H 5 | #define OS_FUNCTION_H 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | 14 | //OPERATING SYSTEM COMPATIBILITY HELPER FUNCTIONS:: 15 | //dialog compatibility 16 | 17 | QString CROSS_OS_GetSaveFileName(QWidget * parent = 0, 18 | const QString & caption = QString(), 19 | const QString & directory = QString(), 20 | const QString & filter = QString(), 21 | const QStringList &saveAbleExtensions = QStringList() ); 22 | //File Location Compatibility 23 | QString CROSS_OS_GetDirectoryFromLocationTag(QString locationtag); 24 | 25 | //Screen Saver Disabling 26 | bool CROSS_OS_DisableSleeps(bool disable = 1); 27 | 28 | //FILE HANDING HELPER FUNCTIONS 29 | //streams in "some random text with spaces" from the opened text file. 30 | QString StreamInTextQuotes(QTextStream &stream); 31 | 32 | //Cursor waiting 33 | void Enable_User_Waiting_Cursor(); 34 | void Disable_User_Waiting_Cursor(); 35 | 36 | 37 | #endif // 38 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/bridge.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include "bridge.h" 3 | #include "utils/polygondebug.h" 4 | #define M_PIs 3.14159265358979323846 5 | 6 | int bridgeAngle(SliceLayerPart* part, SliceLayer* prevLayer) 7 | { 8 | //To detect if we have a bridge, first calculate the intersection of the current layer with the previous layer. 9 | // This gives us the islands that the layer rests on. 10 | Polygons islands; 11 | for(unsigned int n=0; nparts.size(); n++) 12 | { 13 | if (!part->boundaryBox.hit(prevLayer->parts[n].boundaryBox)) continue; 14 | 15 | islands.add(part->outline.intersection(prevLayer->parts[n].outline)); 16 | } 17 | if (islands.size() > 5) 18 | return -1; 19 | 20 | //Next find the 2 largest islands that we rest on. 21 | double area1 = 0; 22 | double area2 = 0; 23 | int idx1 = -1; 24 | int idx2 = -1; 25 | for(unsigned int n=0; n area1) 32 | { 33 | if (area1 > area2) 34 | { 35 | area2 = area1; 36 | idx2 = idx1; 37 | } 38 | area1 = area; 39 | idx1 = n; 40 | }else if (area > area2) 41 | { 42 | area2 = area; 43 | idx2 = n; 44 | } 45 | } 46 | 47 | if (idx1 < 0 || idx2 < 0) 48 | return -1; 49 | 50 | Point center1 = islands[idx1].centerOfMass(); 51 | Point center2 = islands[idx2].centerOfMass(); 52 | 53 | double angle = atan2(center2.X - center1.X, center2.Y - center1.Y) / M_PIs * 180; 54 | if (angle < 0) angle += 360; 55 | return angle; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/bridge.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef BRIDGE_H 3 | #define BRIDGE_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | int bridgeAngle(SliceLayerPart* part, SliceLayer* prevLayer); 8 | 9 | #endif//BRIDGE_H 10 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/clipper/License.txt: -------------------------------------------------------------------------------- 1 | The Clipper Library (including Delphi, C++ & C# source code, other accompanying 2 | code, examples and documentation), hereafter called "the Software", has been 3 | released under the following license, terms and conditions: 4 | 5 | Boost Software License - Version 1.0 - August 17th, 2003 6 | http://www.boost.org/LICENSE_1_0.txt 7 | 8 | Permission is hereby granted, free of charge, to any person or organization 9 | obtaining a copy of the Software covered by this license to use, reproduce, 10 | display, distribute, execute, and transmit the Software, and to prepare 11 | derivative works of the Software, and to permit third-parties to whom the 12 | Software is furnished to do so, all subject to the following: 13 | 14 | The copyright notices in the Software and this entire statement, including the 15 | above license grant, this restriction and the following disclaimer, must be 16 | included in all copies of the Software, in whole or in part, and all derivative 17 | works of the Software, unless such copies or derivative works are solely in the 18 | form of machine-executable object code generated by a source language processor. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL 23 | THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY 24 | DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/clipper/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/SliceEngine/clipper/README -------------------------------------------------------------------------------- /Magic3D/SliceEngine/clipper/clipper.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/SliceEngine/clipper/clipper.cpp -------------------------------------------------------------------------------- /Magic3D/SliceEngine/comb.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef COMB_H 3 | #define COMB_H 4 | 5 | #include "utils/polygon.h" 6 | 7 | class Comb 8 | { 9 | private: 10 | Polygons& boundery; 11 | 12 | int64_t* minX; 13 | int64_t* maxX; 14 | unsigned int* minIdx; 15 | unsigned int* maxIdx; 16 | 17 | PointMatrix matrix; 18 | Point sp; 19 | Point ep; 20 | 21 | bool preTest(Point startPoint, Point endPoint); 22 | bool collisionTest(Point startPoint, Point endPoint); 23 | 24 | void calcMinMax(); 25 | 26 | unsigned int getPolygonAbove(int64_t x); 27 | 28 | Point getBounderyPointWithOffset(unsigned int polygonNr, unsigned int idx); 29 | 30 | public: 31 | Comb(Polygons& _boundery); 32 | ~Comb(); 33 | 34 | bool checkInside(Point p); 35 | 36 | bool moveInside(Point* p, int distance = 100); 37 | 38 | bool calc(Point startPoint, Point endPoint, vector& combPoints); 39 | }; 40 | 41 | #endif//COMB_H 42 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/includes.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDES_H 2 | #define INCLUDES_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #if defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) 10 | #include 11 | #include 12 | #endif 13 | #include 14 | 15 | #include "utils/gettime.h" 16 | #include "utils/logoutput.h" 17 | #include "sliceDataStorage.h" 18 | 19 | #include "modelFile/modelFile.h" 20 | #include "settings.h" 21 | #include "optimizedModel.h" 22 | #include "multiVolumes.h" 23 | #include "polygonOptimizer.h" 24 | #include "slicer.h" 25 | #include "layerPart.h" 26 | #include "inset.h" 27 | #include "skin.h" 28 | #include "infill.h" 29 | #include "bridge.h" 30 | #include "support.h" 31 | #include "pathOrderOptimizer.h" 32 | #include "skirt.h" 33 | #include "raft.h" 34 | #include "comb.h" 35 | #include "gcodeExport.h" 36 | 37 | #endif // INCLUDES_H 38 | 39 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/infill.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef INFILL_H 3 | #define INFILL_H 4 | 5 | #include "utils/polygon.h" 6 | 7 | void generateConcentricInfill(Polygons outline, Polygons& result, int offsets[], int offsetsSize); 8 | void generateLineInfill(const Polygons& in_outline, Polygons& result, int extrusionWidth, int lineSpacing, int infillOverlap, double rotation); 9 | 10 | #endif//INFILL_H 11 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/inset.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include "inset.h" 3 | #include "polygonOptimizer.h" 4 | 5 | void generateInsets(SliceLayerPart* part, int offset, int insetCount) 6 | { 7 | part->combBoundery = part->outline.offset(-offset); 8 | if (insetCount == 0) 9 | { 10 | part->insets.push_back(part->outline); 11 | return; 12 | } 13 | 14 | for(int i=0; iinsets.push_back(Polygons()); 17 | part->insets[i] = part->outline.offset(-offset * i - offset/2); 18 | optimizePolygons(part->insets[i]); 19 | if (part->insets[i].size() < 1) 20 | { 21 | part->insets.pop_back(); 22 | break; 23 | } 24 | } 25 | } 26 | 27 | void generateInsets(SliceLayer* layer, int offset, int insetCount) 28 | { 29 | for(unsigned int partNr = 0; partNr < layer->parts.size(); partNr++) 30 | { 31 | generateInsets(&layer->parts[partNr], offset, insetCount); 32 | } 33 | 34 | //Remove the parts which did not generate an inset. As these parts are too small to print, 35 | // and later code can now assume that there is always minimal 1 inset line. 36 | for(unsigned int partNr = 0; partNr < layer->parts.size(); partNr++) 37 | { 38 | if (layer->parts[partNr].insets.size() < 1) 39 | { 40 | layer->parts.erase(layer->parts.begin() + partNr); 41 | partNr -= 1; 42 | } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/inset.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef INSET_H 3 | #define INSET_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | void generateInsets(SliceLayerPart* part, int offset, int insetCount); 8 | 9 | void generateInsets(SliceLayer* layer, int offset, int insetCount); 10 | 11 | #endif//INSET_H 12 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/layerPart.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef LAYERPART_H 3 | #define LAYERPART_H 4 | 5 | #include "sliceDataStorage.h" 6 | #include "slicer.h" 7 | 8 | /* 9 | The layer-part creation step is the first step in creating actual useful data for 3D printing. 10 | It takes the result of the Slice step, which is an unordered list of polygons, and makes groups of polygons, 11 | each of these groups is called a "part", which sometimes are also known as "islands". These parts represent 12 | isolated areas in the 2D layer with possible holes. 13 | 14 | Creating "parts" is an important step, as all elements in a single part should be printed before going to another part. 15 | And all every bit inside a single part can be printed without the nozzle leaving the boundery of this part. 16 | 17 | It's also the first step that stores the result in the "data storage" so all other steps can access it. 18 | */ 19 | 20 | 21 | void createLayerWithParts(SliceLayer& storageLayer, SlicerLayer* layer, int unionAllType); 22 | 23 | void createLayerParts(SliceVolumeStorage& storage, Slicer* slicer, int unionAllType); 24 | 25 | void dumpLayerparts(SliceDataStorage& storage, const char* filename); 26 | 27 | void export_svg(SliceDataStorage &storage,const char* filename); 28 | #endif//LAYERPART_H 29 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/multiVolumes.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTIVOLUMES_H 2 | #define MULTIVOLUMES_H 3 | 4 | /* This file contains code to help fixing up and changing layers that are build from multiple volumes. */ 5 | 6 | 7 | #endif//MULTIVOLUMES_H 8 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/pathOrderOptimizer.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef PATHOPTIMIZER_H 3 | #define PATHOPTIMIZER_H 4 | 5 | #include 6 | #include "utils/polygon.h" 7 | 8 | class PathOrderOptimizer 9 | { 10 | public: 11 | Point startPoint; 12 | vector polygons; 13 | vector polyStart; 14 | vector polyOrder; 15 | 16 | PathOrderOptimizer(Point startPoint) 17 | { 18 | this->startPoint = startPoint; 19 | } 20 | 21 | void addPolygon(PolygonRef polygon) 22 | { 23 | this->polygons.push_back(polygon); 24 | } 25 | 26 | void addPolygons(Polygons& polygons) 27 | { 28 | for(unsigned int i=0;ipolygons.push_back(polygons[i]); 30 | } 31 | 32 | void optimize(); 33 | }; 34 | 35 | #endif//PATHOPTIMIZER_H 36 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/polygonOptimizer.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include "polygonOptimizer.h" 3 | 4 | void optimizePolygon(PolygonRef poly) 5 | { 6 | Point p0 = poly[poly.size()-1]; 7 | for(unsigned int i=0;iparts.size(); i++) 12 | { 13 | storage.raftOutline = storage.raftOutline.unionPolygons(layer->parts[i].outline.offset(distance)); 14 | } 15 | } 16 | 17 | SupportPolyGenerator supportGenerator(storage.support, 0); 18 | storage.raftOutline = storage.raftOutline.unionPolygons(supportGenerator.polygons.offset(distance)); 19 | storage.raftOutline = storage.raftOutline.unionPolygons(storage.wipeTower.offset(distance)); 20 | } 21 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/raft.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef RAFT_H 3 | #define RAFT_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | void generateRaft(SliceDataStorage& storage, int distance); 8 | 9 | #endif//RAFT_H 10 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/skin.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef SKIN_H 3 | #define SKIN_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | void generateSkins(int layerNr, SliceVolumeStorage& storage, int extrusionWidth, int downSkinCount, int upSkinCount, int infillOverlap); 8 | void generateSparse(int layerNr, SliceVolumeStorage& storage, int extrusionWidth, int downSkinCount, int upSkinCount); 9 | 10 | #endif//SKIN_H 11 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/skirt.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include "skirt.h" 3 | #include "support.h" 4 | 5 | void generateSkirt(SliceDataStorage& storage, int distance, int extrusionWidth, int count, int minLength, int initialLayerHeight) 6 | { 7 | bool externalOnly = (distance > 0); 8 | for(int skirtNr=0; skirtNrparts.size(); i++) 18 | { 19 | if (externalOnly) 20 | { 21 | Polygons p; 22 | p.add(layer->parts[i].outline[0]); 23 | skirtPolygons = skirtPolygons.unionPolygons(p.offset(offsetDistance)); 24 | } 25 | else 26 | skirtPolygons = skirtPolygons.unionPolygons(layer->parts[i].outline.offset(offsetDistance)); 27 | } 28 | } 29 | 30 | SupportPolyGenerator supportGenerator(storage.support, initialLayerHeight); 31 | skirtPolygons = skirtPolygons.unionPolygons(supportGenerator.polygons.offset(offsetDistance)); 32 | 33 | //Remove small inner skirt holes. Holes have a negative area, remove anything smaller then 100x extrusion "area" 34 | for(unsigned int n=0; n -extrusionWidth * extrusionWidth * 100) 38 | skirtPolygons.remove(n--); 39 | } 40 | 41 | storage.skirt.add(skirtPolygons); 42 | 43 | int lenght = storage.skirt.polygonLength(); 44 | if (skirtNr + 1 >= count && lenght > 0 && lenght < minLength) 45 | count++; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/skirt.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef SKIRT_H 3 | #define SKIRT_H 4 | 5 | #include "sliceDataStorage.h" 6 | 7 | void generateSkirt(SliceDataStorage& storage, int distance, int extrusionWidth, int count, int minLength, int initialLayerHeight); 8 | 9 | #endif//SKIRT_H 10 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/sliceDataStorage.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef SLICE_DATA_STORAGE_H 3 | #define SLICE_DATA_STORAGE_H 4 | 5 | #include "utils/intpoint.h" 6 | #include "utils/polygon.h" 7 | 8 | /* 9 | SliceData 10 | + Layers[] 11 | + LayerParts[] 12 | + OutlinePolygons[] 13 | + Insets[] 14 | + Polygons[] 15 | + SkinPolygons[] 16 | */ 17 | 18 | class SliceLayerPart 19 | { 20 | public: 21 | AABB boundaryBox; 22 | Polygons outline; 23 | Polygons combBoundery; 24 | vector insets; 25 | Polygons skinOutline; 26 | Polygons sparseOutline; 27 | int bridgeAngle; 28 | }; 29 | 30 | class SliceLayer 31 | { 32 | public: 33 | int sliceZ; 34 | int printZ; 35 | vector parts; 36 | }; 37 | 38 | /******************/ 39 | class SupportPoint 40 | { 41 | public: 42 | int32_t z; 43 | double cosAngle; 44 | 45 | SupportPoint(int32_t z, double cosAngle) : z(z), cosAngle(cosAngle) {} 46 | }; 47 | class SupportStorage 48 | { 49 | public: 50 | bool generated; 51 | int angle; 52 | bool everywhere; 53 | int XYDistance; 54 | int ZDistance; 55 | 56 | Point gridOffset; 57 | int32_t gridScale; 58 | int32_t gridWidth, gridHeight; 59 | vector* grid; 60 | SupportStorage(){grid = NULL;} 61 | ~SupportStorage(){if(grid) delete [] grid;} 62 | }; 63 | /******************/ 64 | 65 | class SliceVolumeStorage 66 | { 67 | public: 68 | vector layers; 69 | }; 70 | 71 | class SliceDataStorage 72 | { 73 | public: 74 | Point3 modelSize, modelMin, modelMax; 75 | Polygons skirt; 76 | Polygons raftOutline; //Storage for the outline of the raft. Will be filled with lines when the GCode is generated. 77 | vector oozeShield; //oozeShield per layer 78 | vector volumes; 79 | 80 | SupportStorage support; 81 | Polygons wipeTower; 82 | Point wipePoint; 83 | }; 84 | 85 | #endif//SLICE_DATA_STORAGE_H 86 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/support.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef SUPPORT_H 3 | #define SUPPORT_H 4 | 5 | #include "sliceDataStorage.h" 6 | #include "optimizedModel.h" 7 | 8 | void generateSupportGrid(SupportStorage& storage, OptimizedModel* om, int supportAngle, bool supportEverywhere, int supportXYDistance, int supportZDistance); 9 | 10 | class SupportPolyGenerator 11 | { 12 | public: 13 | Polygons polygons; 14 | 15 | private: 16 | SupportStorage& storage; 17 | double cosAngle; 18 | int32_t z; 19 | int supportZDistance; 20 | bool everywhere; 21 | int* done; 22 | 23 | bool needSupportAt(Point p); 24 | void lazyFill(Point startPoint); 25 | 26 | public: 27 | SupportPolyGenerator(SupportStorage& storage, int32_t z); 28 | }; 29 | 30 | #endif//SUPPORT_H 31 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/gettime.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include "gettime.h" 3 | 4 | TimeKeeper::TimeKeeper() 5 | { 6 | restart(); 7 | } 8 | 9 | double TimeKeeper::restart() 10 | { 11 | double ret = getTime() - startTime; 12 | startTime = getTime(); 13 | return ret; 14 | } 15 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/gettime.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef GETTIME_H 3 | #define GETTIME_H 4 | 5 | #ifdef WIN32 6 | #include 7 | #else 8 | #include 9 | #include 10 | #endif 11 | 12 | static inline double getTime() 13 | { 14 | #ifdef WIN32 15 | return double(GetTickCount()) / 1000.0; 16 | #else 17 | struct timeval tv; 18 | gettimeofday(&tv, NULL); 19 | return double(tv.tv_sec) + double(tv.tv_usec) / 1000000.0; 20 | #endif 21 | } 22 | 23 | class TimeKeeper 24 | { 25 | private: 26 | double startTime; 27 | public: 28 | TimeKeeper(); 29 | 30 | double restart(); 31 | }; 32 | 33 | #endif//GETTIME_H 34 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/logoutput.cpp: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #include 3 | #include 4 | 5 | #include "logoutput.h" 6 | 7 | static int verbose_level; 8 | static bool progressLogging; 9 | 10 | void increaseVerboseLevel() 11 | { 12 | verbose_level++; 13 | } 14 | 15 | void enableProgressLogging() 16 | { 17 | progressLogging = true; 18 | } 19 | 20 | void logError(const char* fmt, ...) 21 | { 22 | va_list args; 23 | va_start(args, fmt); 24 | vfprintf(stderr, fmt, args); 25 | va_end(args); 26 | fflush(stderr); 27 | } 28 | 29 | void _log(const char* fmt, ...) 30 | { 31 | if (verbose_level < 1) 32 | return; 33 | 34 | va_list args; 35 | va_start(args, fmt); 36 | vfprintf(stderr, fmt, args); 37 | va_end(args); 38 | fflush(stderr); 39 | } 40 | void logProgress(const char* type, int value, int maxValue) 41 | { 42 | if (!progressLogging) 43 | return; 44 | 45 | fprintf(stderr, "Progress:%s:%i:%i\n", type, value, maxValue); 46 | fflush(stderr); 47 | } 48 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/logoutput.h: -------------------------------------------------------------------------------- 1 | /** Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License */ 2 | #ifndef LOGOUTPUT_H 3 | #define LOGOUTPUT_H 4 | 5 | void increaseVerboseLevel(); 6 | void enableProgressLogging(); 7 | 8 | //Report an error message (always reported, independed of verbose level) 9 | void logError(const char* fmt, ...); 10 | //Report a message if the verbose level is 1 or higher. (defined as _log to prevent clash with log() function from ) 11 | void _log(const char* fmt, ...); 12 | #define log _log 13 | 14 | //Report engine progress to interface if any. Only if "enableProgressLogging()" has been called. 15 | void logProgress(const char* type, int value, int maxValue); 16 | 17 | #endif//LOGOUTPUT_H 18 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/socket.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef WIN32 5 | #include 6 | #else 7 | #include 8 | #include 9 | 10 | #endif 11 | 12 | #include "socket.h" 13 | #include "logoutput.h" 14 | 15 | #ifdef WIN32 16 | bool wsaStartupDone = false; 17 | #endif 18 | 19 | ClientSocket::ClientSocket() 20 | { 21 | sockfd = -1; 22 | 23 | #ifdef WIN32 24 | 25 | #endif 26 | } 27 | 28 | void ClientSocket::connectTo(std::string host, int port) 29 | { 30 | 31 | } 32 | 33 | ClientSocket::~ClientSocket() 34 | { 35 | close(); 36 | } 37 | 38 | void ClientSocket::sendNr(int nr) 39 | { 40 | sendAll(&nr, sizeof(int)); 41 | } 42 | 43 | void ClientSocket::sendAll(const void* data, int length) 44 | { 45 | 46 | } 47 | 48 | int ClientSocket::recvNr() 49 | { 50 | int ret = 0; 51 | recvAll(&ret, 4); 52 | return ret; 53 | } 54 | 55 | void ClientSocket::recvAll(void* data, int length) 56 | { 57 | 58 | } 59 | 60 | void ClientSocket::close() 61 | { 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Magic3D/SliceEngine/utils/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef SOCKET_H 2 | #define SOCKET_H 3 | 4 | #include 5 | 6 | class ClientSocket 7 | { 8 | int sockfd; 9 | public: 10 | ClientSocket(); 11 | ~ClientSocket(); 12 | 13 | void connectTo(std::string host, int port); 14 | 15 | void sendNr(int nr); 16 | void sendAll(const void* data, int length); 17 | int recvNr(); 18 | void recvAll(void* data, int length); 19 | 20 | void close(); 21 | }; 22 | 23 | #endif//SOCKET_H 24 | -------------------------------------------------------------------------------- /Magic3D/Uart/qextserialport.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _QEXTSERIALPORT_H_ 3 | #define _QEXTSERIALPORT_H_ 4 | 5 | /*POSIX CODE*/ 6 | #ifdef _TTY_POSIX_ 7 | #include "posix_qextserialport.h" 8 | #define QextBaseType Posix_QextSerialPort 9 | 10 | /*MS WINDOWS CODE*/ 11 | #else 12 | #include "win_qextserialport.h" 13 | #define QextBaseType Win_QextSerialPort 14 | #endif 15 | 16 | class QextSerialPort: public QextBaseType 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | typedef QextSerialBase::QueryMode QueryMode; 22 | 23 | QextSerialPort(); 24 | QextSerialPort(const QString & name, QueryMode mode = QextSerialPort::Polling); 25 | QextSerialPort(PortSettings const& s, QueryMode mode = QextSerialPort::Polling); 26 | QextSerialPort(const QString & name, PortSettings const& s, QueryMode mode = QextSerialPort::Polling); 27 | QextSerialPort(const QextSerialPort& s); 28 | QextSerialPort& operator=(const QextSerialPort&); 29 | virtual ~QextSerialPort(); 30 | 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Magic3D/build/debug/OS_Function.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/OS_Function.o -------------------------------------------------------------------------------- /Magic3D/build/debug/bridge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/bridge.o -------------------------------------------------------------------------------- /Magic3D/build/debug/clipper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/clipper.o -------------------------------------------------------------------------------- /Magic3D/build/debug/comb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/comb.o -------------------------------------------------------------------------------- /Magic3D/build/debug/configset.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/configset.o -------------------------------------------------------------------------------- /Magic3D/build/debug/gcodeExport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/gcodeExport.o -------------------------------------------------------------------------------- /Magic3D/build/debug/geometric.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/geometric.o -------------------------------------------------------------------------------- /Magic3D/build/debug/gettime.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/gettime.o -------------------------------------------------------------------------------- /Magic3D/build/debug/graph.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/graph.o -------------------------------------------------------------------------------- /Magic3D/build/debug/greentech.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/greentech.o -------------------------------------------------------------------------------- /Magic3D/build/debug/imageviewwidget.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/imageviewwidget.o -------------------------------------------------------------------------------- /Magic3D/build/debug/infill.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/infill.o -------------------------------------------------------------------------------- /Magic3D/build/debug/inset.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/inset.o -------------------------------------------------------------------------------- /Magic3D/build/debug/layerPart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/layerPart.o -------------------------------------------------------------------------------- /Magic3D/build/debug/layoutprojectdata.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/layoutprojectdata.o -------------------------------------------------------------------------------- /Magic3D/build/debug/loadingbar.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/loadingbar.o -------------------------------------------------------------------------------- /Magic3D/build/debug/logoutput.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/logoutput.o -------------------------------------------------------------------------------- /Magic3D/build/debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/main.o -------------------------------------------------------------------------------- /Magic3D/build/debug/mainbutton.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/mainbutton.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_configset.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_configset.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_greentech.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_greentech.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_imageviewwidget.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_imageviewwidget.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_layoutprojectdata.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_layoutprojectdata.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_loadingbar.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_loadingbar.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_mainbutton.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_mainbutton.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_modeledit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_modeledit.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_modelloader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_modelloader.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_modelwriter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_modelwriter.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_painter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_painter.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_printedit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_printedit.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_qextserialbase.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_qextserialbase.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_qextserialport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_qextserialport.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_win_qextserialport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_win_qextserialport.o -------------------------------------------------------------------------------- /Magic3D/build/debug/moc_worldview.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/moc_worldview.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modelFile.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modelFile.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modeldata.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modeldata.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modeledit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modeledit.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modelinstance.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modelinstance.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modelloader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modelloader.o -------------------------------------------------------------------------------- /Magic3D/build/debug/modelwriter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/modelwriter.o -------------------------------------------------------------------------------- /Magic3D/build/debug/optimizedModel.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/optimizedModel.o -------------------------------------------------------------------------------- /Magic3D/build/debug/painter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/painter.o -------------------------------------------------------------------------------- /Magic3D/build/debug/pathOrderOptimizer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/pathOrderOptimizer.o -------------------------------------------------------------------------------- /Magic3D/build/debug/polygonOptimizer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/polygonOptimizer.o -------------------------------------------------------------------------------- /Magic3D/build/debug/printedit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/printedit.o -------------------------------------------------------------------------------- /Magic3D/build/debug/pudding-gitlocal.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/pudding-gitlocal.exe -------------------------------------------------------------------------------- /Magic3D/build/debug/pynxl_res.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/pynxl_res.o -------------------------------------------------------------------------------- /Magic3D/build/debug/qextserialbase.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/qextserialbase.o -------------------------------------------------------------------------------- /Magic3D/build/debug/qextserialenumerator.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/qextserialenumerator.o -------------------------------------------------------------------------------- /Magic3D/build/debug/qextserialport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/qextserialport.o -------------------------------------------------------------------------------- /Magic3D/build/debug/qrc_img.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/qrc_img.o -------------------------------------------------------------------------------- /Magic3D/build/debug/raft.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/raft.o -------------------------------------------------------------------------------- /Magic3D/build/debug/settings.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/settings.o -------------------------------------------------------------------------------- /Magic3D/build/debug/skin.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/skin.o -------------------------------------------------------------------------------- /Magic3D/build/debug/skirt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/skirt.o -------------------------------------------------------------------------------- /Magic3D/build/debug/slicer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/slicer.o -------------------------------------------------------------------------------- /Magic3D/build/debug/socket.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/socket.o -------------------------------------------------------------------------------- /Magic3D/build/debug/support.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/support.o -------------------------------------------------------------------------------- /Magic3D/build/debug/supportstructure.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/supportstructure.o -------------------------------------------------------------------------------- /Magic3D/build/debug/timeEstimate.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/timeEstimate.o -------------------------------------------------------------------------------- /Magic3D/build/debug/triangle3d.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/triangle3d.o -------------------------------------------------------------------------------- /Magic3D/build/debug/verticaltricontainer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/verticaltricontainer.o -------------------------------------------------------------------------------- /Magic3D/build/debug/win_qextserialport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/win_qextserialport.o -------------------------------------------------------------------------------- /Magic3D/build/debug/worldview.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/debug/worldview.o -------------------------------------------------------------------------------- /Magic3D/build/object_script.pudding-gitlocal.Debug: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./debug\geometric.o 3 | ./debug\main.o 4 | ./debug\OS_Function.o 5 | ./debug\configset.o 6 | ./debug\graph.o 7 | ./debug\greentech.o 8 | ./debug\imageviewwidget.o 9 | ./debug\loadingbar.o 10 | ./debug\mainbutton.o 11 | ./debug\modeledit.o 12 | ./debug\painter.o 13 | ./debug\printedit.o 14 | ./debug\worldview.o 15 | ./debug\layoutprojectdata.o 16 | ./debug\modeldata.o 17 | ./debug\modelinstance.o 18 | ./debug\modelloader.o 19 | ./debug\modelwriter.o 20 | ./debug\triangle3d.o 21 | ./debug\verticaltricontainer.o 22 | ./debug\comb.o 23 | ./debug\layerPart.o 24 | ./debug\optimizedModel.o 25 | ./debug\pathOrderOptimizer.o 26 | ./debug\polygonOptimizer.o 27 | ./debug\settings.o 28 | ./debug\slicer.o 29 | ./debug\timeEstimate.o 30 | ./debug\clipper.o 31 | ./debug\modelFile.o 32 | ./debug\gettime.o 33 | ./debug\logoutput.o 34 | ./debug\supportstructure.o 35 | ./debug\socket.o 36 | ./debug\bridge.o 37 | ./debug\gcodeExport.o 38 | ./debug\infill.o 39 | ./debug\inset.o 40 | ./debug\raft.o 41 | ./debug\skin.o 42 | ./debug\skirt.o 43 | ./debug\support.o 44 | ./debug\qextserialbase.o 45 | ./debug\qextserialenumerator.o 46 | ./debug\qextserialport.o 47 | ./debug\win_qextserialport.o 48 | ./debug\moc_configset.o 49 | ./debug\moc_greentech.o 50 | ./debug\moc_imageviewwidget.o 51 | ./debug\moc_loadingbar.o 52 | ./debug\moc_mainbutton.o 53 | ./debug\moc_modeledit.o 54 | ./debug\moc_painter.o 55 | ./debug\moc_printedit.o 56 | ./debug\moc_worldview.o 57 | ./debug\moc_layoutprojectdata.o 58 | ./debug\moc_modelloader.o 59 | ./debug\moc_modelwriter.o 60 | ./debug\moc_qextserialbase.o 61 | ./debug\moc_qextserialport.o 62 | ./debug\moc_win_qextserialport.o 63 | ./debug\qrc_img.o 64 | ); 65 | -------------------------------------------------------------------------------- /Magic3D/build/object_script.pudding-gitlocal.Release: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./release\geometric.o 3 | ./release\main.o 4 | ./release\OS_Function.o 5 | ./release\configset.o 6 | ./release\graph.o 7 | ./release\greentech.o 8 | ./release\imageviewwidget.o 9 | ./release\loadingbar.o 10 | ./release\mainbutton.o 11 | ./release\modeledit.o 12 | ./release\painter.o 13 | ./release\printedit.o 14 | ./release\worldview.o 15 | ./release\layoutprojectdata.o 16 | ./release\modeldata.o 17 | ./release\modelinstance.o 18 | ./release\modelloader.o 19 | ./release\modelwriter.o 20 | ./release\triangle3d.o 21 | ./release\verticaltricontainer.o 22 | ./release\comb.o 23 | ./release\layerPart.o 24 | ./release\optimizedModel.o 25 | ./release\pathOrderOptimizer.o 26 | ./release\polygonOptimizer.o 27 | ./release\settings.o 28 | ./release\slicer.o 29 | ./release\timeEstimate.o 30 | ./release\clipper.o 31 | ./release\modelFile.o 32 | ./release\gettime.o 33 | ./release\logoutput.o 34 | ./release\supportstructure.o 35 | ./release\socket.o 36 | ./release\bridge.o 37 | ./release\gcodeExport.o 38 | ./release\infill.o 39 | ./release\inset.o 40 | ./release\raft.o 41 | ./release\skin.o 42 | ./release\skirt.o 43 | ./release\support.o 44 | ./release\qextserialbase.o 45 | ./release\qextserialenumerator.o 46 | ./release\qextserialport.o 47 | ./release\win_qextserialport.o 48 | ./release\moc_configset.o 49 | ./release\moc_greentech.o 50 | ./release\moc_imageviewwidget.o 51 | ./release\moc_loadingbar.o 52 | ./release\moc_mainbutton.o 53 | ./release\moc_modeledit.o 54 | ./release\moc_painter.o 55 | ./release\moc_printedit.o 56 | ./release\moc_worldview.o 57 | ./release\moc_layoutprojectdata.o 58 | ./release\moc_modelloader.o 59 | ./release\moc_modelwriter.o 60 | ./release\moc_qextserialbase.o 61 | ./release\moc_qextserialport.o 62 | ./release\moc_win_qextserialport.o 63 | ./release\qrc_img.o 64 | ); 65 | -------------------------------------------------------------------------------- /Magic3D/build/print.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/build/print.stl -------------------------------------------------------------------------------- /Magic3D/build/ui_painter.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'painter.ui' 3 | ** 4 | ** Created: Tue Jun 2 12:23:00 2015 5 | ** by: Qt User Interface Compiler version 4.8.1 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 8 | ********************************************************************************/ 9 | 10 | #ifndef UI_PAINTER_H 11 | #define UI_PAINTER_H 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | QT_BEGIN_NAMESPACE 21 | 22 | class Ui_Painter 23 | { 24 | public: 25 | 26 | void setupUi(QWidget *Painter) 27 | { 28 | if (Painter->objectName().isEmpty()) 29 | Painter->setObjectName(QString::fromUtf8("Painter")); 30 | Painter->resize(400, 300); 31 | 32 | retranslateUi(Painter); 33 | 34 | QMetaObject::connectSlotsByName(Painter); 35 | } // setupUi 36 | 37 | void retranslateUi(QWidget *Painter) 38 | { 39 | Painter->setWindowTitle(QApplication::translate("Painter", "Form", 0, QApplication::UnicodeUTF8)); 40 | } // retranslateUi 41 | 42 | }; 43 | 44 | namespace Ui { 45 | class Painter: public Ui_Painter {}; 46 | } // namespace Ui 47 | 48 | QT_END_NAMESPACE 49 | 50 | #endif // UI_PAINTER_H 51 | -------------------------------------------------------------------------------- /Magic3D/geometric.cpp: -------------------------------------------------------------------------------- 1 | #include "geometric.h" 2 | #include "math.h" 3 | #include 4 | #include "qmath.h" 5 | #include 6 | #include 7 | 8 | //Utility Function implementation 9 | bool IsZero(double number, double tolerance) 10 | { 11 | if(fabs(number) <= tolerance) 12 | { 13 | return true; 14 | } 15 | return false; 16 | } 17 | 18 | bool PointsShare(QVector2D point1, QVector2D point2, double tolerance) 19 | { 20 | if(IsZero(point2.x() - point1.x(), tolerance) && IsZero(point2.y() - point1.y(),tolerance)) 21 | { 22 | return true; 23 | } 24 | return false; 25 | } 26 | int PointLineCompare(QVector2D pointm, QVector2D dir, QVector2D quarrypoint)//returns 1 if point is on right, -1 if point is on left 27 | { 28 | //double MAx = (quarrypoint.x() - pointm.x()); 29 | //double MAy = (quarrypoint.y() - pointm.y()); 30 | 31 | double position = (dir.x()*(quarrypoint.y() - pointm.y())) - (dir.y()*(quarrypoint.x() - pointm.x())); 32 | return -int(ceil(position)); 33 | } 34 | 35 | double Distance2D(QVector2D point1, QVector2D point2) 36 | { 37 | return sqrt( pow((point2.x()-point1.x()),2) + pow((point2.y()-point1.y()),2)); 38 | } 39 | double Distance3D(QVector3D point1, QVector3D point2) 40 | { 41 | return sqrt( pow((point2.x()-point1.x()),2) + pow((point2.y()-point1.y()),2) + pow((point2.z()-point1.z()),2)); 42 | } 43 | 44 | bool VectorComponentsEqual(QVector3D &vec) 45 | { 46 | if((vec.x() == vec.y()) && vec.x() == vec.z()) 47 | return true; 48 | return false; 49 | } 50 | 51 | //returns the length of the largest compent in the vector. 52 | double VectorMaxComponentLength(QVector3D vec) 53 | { 54 | double max = -1.0; 55 | 56 | if(abs(vec.x()) > max) 57 | max = abs(vec.x()); 58 | if(abs(vec.y()) > max) 59 | max = abs(vec.y()); 60 | if(abs(vec.z()) > max) 61 | max = abs(vec.z()); 62 | 63 | 64 | return max; 65 | } 66 | 67 | //returns the angle between 2 3dimentional vectors. 68 | double MinAngleBetweenVectors(QVector3D a, QVector3D b) 69 | { 70 | double dot = QVector3D::dotProduct(a,b); 71 | if(dot > 1) 72 | dot = 1; 73 | if(dot < -1) 74 | dot = -1; 75 | return acos(dot); 76 | } 77 | -------------------------------------------------------------------------------- /Magic3D/image/bitbug_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/bitbug_favicon.ico -------------------------------------------------------------------------------- /Magic3D/image/dowm2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/dowm2.ico -------------------------------------------------------------------------------- /Magic3D/image/down.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/down.ico -------------------------------------------------------------------------------- /Magic3D/image/logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/logo1.ico -------------------------------------------------------------------------------- /Magic3D/image/logo2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/logo2.PNG -------------------------------------------------------------------------------- /Magic3D/image/logo2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/logo2.ico -------------------------------------------------------------------------------- /Magic3D/image/logo3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/logo3.ico -------------------------------------------------------------------------------- /Magic3D/image/splash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/image/splash.PNG -------------------------------------------------------------------------------- /Magic3D/img.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | image/bitbug_favicon.ico 4 | image/dowm2.ico 5 | image/down.ico 6 | image/splash.PNG 7 | image/logo3.ico 8 | image/logo1.ico 9 | image/logo2.PNG 10 | image/logo2.ico 11 | 12 | 13 | -------------------------------------------------------------------------------- /Magic3D/log.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PuddingPengChen/Magic3D/70e4757673020a42923f7cfbac8c09258107cd24/Magic3D/log.ico -------------------------------------------------------------------------------- /Magic3D/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "./Interface/greentech.h" 3 | #include "OS_Function.h" 4 | #include 5 | #include 6 | #include 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | // QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); 11 | QApplication a(argc, argv); 12 | 13 | QSplashScreen splash(QPixmap(":/image/splash.PNG")); 14 | splash.setDisabled(true); 15 | splash.show(); 16 | QElapsedTimer t; 17 | t.start(); 18 | while(t.elapsed()<2000) 19 | { 20 | QCoreApplication::processEvents(); 21 | } 22 | 23 | //import premade stls for support structures 24 | SupportStructure::ImportAttachmentDataFromStls(); 25 | SupportStructure::FillRegistryDefaults(); 26 | qDebug() << "Program Start"; 27 | qDebug() << "Relevent Used Application Directories"; 28 | qDebug() << " EXECUTABLE_DIR: " << CROSS_OS_GetDirectoryFromLocationTag("EXECUTABLE_DIR"); 29 | qDebug() << " APPLICATION_DIR: " << CROSS_OS_GetDirectoryFromLocationTag("APPLICATION_DIR"); 30 | qDebug() << " TEMP_DIR: " << CROSS_OS_GetDirectoryFromLocationTag("TEMP_DIR"); 31 | qDebug() << " DOCUMENTS_DIR: " << CROSS_OS_GetDirectoryFromLocationTag("DOCUMENTS_DIR"); 32 | GreenTech w; 33 | 34 | // w.setWindowOpacity(0.7); 35 | w.show(); 36 | splash.finish(&w); 37 | return a.exec(); 38 | } 39 | -------------------------------------------------------------------------------- /Magic3D/pynxl.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "log.ico" 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Magic3D 2 | Magic3D is a software which use for generate g-code for 3Dprinter. it also can use for control the FDM,SLA,and DLP 3D printer.The build environment is Qt4.8. 3 | ##what a test 4 | 5 | ## 2018-8-28 6 | 7 | Add the curaengine 3.4.1 project , pure c++11 complie, didn't need any other lib. Please follow the open source licence. 8 | -------------------------------------------------------------------------------- /build/ui_painter.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'painter.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.3.1 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_PAINTER_H 10 | #define UI_PAINTER_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | QT_BEGIN_NAMESPACE 20 | 21 | class Ui_Painter 22 | { 23 | public: 24 | 25 | void setupUi(QWidget *Painter) 26 | { 27 | if (Painter->objectName().isEmpty()) 28 | Painter->setObjectName(QStringLiteral("Painter")); 29 | Painter->resize(400, 300); 30 | 31 | retranslateUi(Painter); 32 | 33 | QMetaObject::connectSlotsByName(Painter); 34 | } // setupUi 35 | 36 | void retranslateUi(QWidget *Painter) 37 | { 38 | Painter->setWindowTitle(QApplication::translate("Painter", "Form", 0)); 39 | } // retranslateUi 40 | 41 | }; 42 | 43 | namespace Ui { 44 | class Painter: public Ui_Painter {}; 45 | } // namespace Ui 46 | 47 | QT_END_NAMESPACE 48 | 49 | #endif // UI_PAINTER_H 50 | --------------------------------------------------------------------------------