Giter Club home page Giter Club logo

toolpath_gcode_generation's Introduction

Toolpath Generation and CNC Simulation

Simple example which contains the different toolpath generation, and G-code generation for the 5AXISMAKER machine or UR5e robot

Installation

Please compile the code with QMake file "TpGene_and_cncSim.pro".

Platform: Windows + Visual Studio 2022 + QT-plugin (tested QT version: 5.12.3 + msvc2017_64)

Install Steps:

  • Install Visual Studio Extension plug-in (QT VS Tool) to open the .pro file and generate the project
  • Set 'shapeLab' as the start up project
  • Enable OpenMP to get best performace at: ShapeLab Project Property -> 'Configuration Proerties' -> c/c++ -> Language -> Open MP Support -> Select 'Yes (/openmp)'
  • Open Console at: ShapeLab Project Property -> 'Configuration Proerties' -> Linker -> System -> Select 'Console (/SUBSYSTEM:CONSOLE)' in 'SubSystem'

Usage

Step 0: input layer files (.obj) . Prerequisite: Remesh the surface layer ( python + meshlab 2022.02 )

  • source directory: ../DataSet/source_layer/input;
  • double click "remesh.py" to do remesh.
  • So, the files of the layers (.obj) for the model will be saved in the following folder '../DataSet/source_layer/output'

Step 1: Read Layers . Click button '1. Read Layers'.

  • The layers will be loaded and form a whole model to display in the window automatically .

Step 2: 3D coordinates modification Input the needed value in the boxs for modification Click button '2.Update Pos and Ort'.

  • The initially loaded model might be not in the appropriate position or orientation. The model should be upward along the Z-axis and its center should also be around the Z-axi.

  • The boxes for Xm, Ym and Zm means the 'move' along the corresponding axis for the input milimeters.

  • The boxes for Xr, Yr and Zr means the 'rotation' around the corresponding axis for the input degree angle.

for 'Display'

  • By inputting the number of layer in the 'show' box, It will display the layers from 0 to the inputted number.

  • By ticking the checkbox each, it will only display the individual layer of the inputted number.

  • By clicking the button ** All**, it will display the whole model.

Step 3: Toolpath Generation

input width and distance in the boxes

Choosing and Clicking button '3. 1 Spiral Tp Generation' or '3. 2 Contour Tp Generation' or '3. 3 Zigzag Tp Generation'

  • the 'width' will set the distance between the adjacent toolpathes.

  • the 'distance' will set the distance between the adjacent nodes along the path.

  • the 'Spiral', 'Contour' and 'Zigzag' are 3 different patterns for the generated toolpath.

Step 4: CNC Motion Planning

Prerequisite:

  • Copy the "CURVED_LAYER" and "TOOL_PATH" in "../DataSet" and save them into "../DataSet/FABRICATION/modelName/"

Note: "modelName" can be decided by user, e.g. "Dome".

  • Remesh the surface layer ( python + meshlab 2022.02 ) to make the layer sparse and speed up the calculation of layer height for extrusion volume calculation -- source directory: ../DataSet/FABRICATION/modelName; -- double click "remesh.py" to do remesh. -- So, the files of the layers (.obj) for the model will be saved in the following folder '../DataSet/FABRICATION/modelName/layer_Simplified'

  • In the 'Model' box, input the folder name of the needed model, which is stored at : '../DataSet/FABRICATION/modelName/layer_Simplified' and '../DataSet/FABRICATION/modelName/waypoint'

  • Click the '1. Read data'โ€˜, --the programme will automatically load the Waypoints and Slices (Obj.) files. --Input the range of needed layers in 'From' and To' --Input tool length in 'toolLns'

  • Click the '2. Calculate Extrusion Volume', --The volume of the material will be calculated base on the waypoint width, distance and height.

  • Click the '3. Singularity Optimization', --It will use the position and normal of waypoints to calculate the movements of the 5axis to reduce the nagetive effect of Singularity.

  • Click the'4. G Code Writing' -- The G code will be stored at folder '../DataSet/G_CODE'

  • Click the Simulate --The progress bar shows the percentage of completed print volume, and clicking the checkbox 'stop' will stop the simulation from running.

Notes: This project also support the waypoint generation for the UR robot

Prerequisite:

  • open the ../DataSet/FABRICATION/robotWpGeneration"
  • and duble click "copy_and_remesh.py", it will copy the "CURVED_LAYER" and "TOOL_PATH" in "../DataSet" and save them into "../DataSet/FABRICATION/"-

Click the '1. Ur5e robot Gcode Generation'

  • the programme will automatically load the Waypoints (.txt) and Slices (.obj) files.

  • output the data for ur5e robot into "../DataSet/FABRICATION/toolpath_robot_ur/"

Curved Layer Generation Algorithm

Tianyu Zhang, Guoxin Fang, Yuming Huang, Neelotpal Dutta, Sylvain Lefebvre, Zekai Murat Kilic, and Charlie C.L. Wang, ACM Transactions on Graphics (SIGGRAPH Asia 2022), vol.41, no.6, article no.277 (15 pages), December 2022

toolpath_gcode_generation's People

Contributors

jiahao-geng avatar zhangty019 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.