Showing posts with label g-code. Show all posts
Showing posts with label g-code. Show all posts

May 2, 2020

How to use MS Visual Code to Edit G-Code by NYC CNC

I use Visual Code daily in my work. I never considered it as a tool to edit post processors or g-code but this great tutorial by NYC CNC showed me how.


Feb 20, 2017

3D Printable Control Unit with 32 Programmable Keys

Here is a very useful DIY 3d printable control unit that can send custom g-code scripts and macros via 32 programmable keys. It can be used on almost any machine that uses g code, like CNC mills, 3d printers, laser cutters and other. It is powered with Arduino Nano. 

The "Gcode Sender" was developed and released by James Sierra. Here is his description of the project:
This project is very much like using Pronterface or Repetier Host manual control to send gcode instructions to your printer while connected to the computer via USB cable, but instead using an Arduino Nano connected to a small keypad to send the Gcode scripts/macros.
Gcode sender is intended to work for 3D printers as well as a CNC mills and laser engravers. Any machine that uses gcode.
This setup allows one to send highly customized gcode scripts/macros to the printer with a push of a button. I've tested all of the scripts I included in the sketch. Any one of them can be replaced or edited.
In the sketch, i tired to include a lot of comments to make it easier to tweak the code to suit your own needs.
Communication between Gcode Sender and printer is through serial communication (Tx, Rx). On RAMPS style boards the AUX-1 port can be used. Specifics on wiring can be found in the Wiring.zip file. Be sure that Tx out wire on the Gcode Sender is connected to Rx on printer and Rx is connected to Tx. In Repetier firmware, I had to enable Bluetooth serial port to make use of the AUX-1 port.






























All files and instructions to make it yourself can be found at:

http://www.thingiverse.com/thing:2105847

Jan 10, 2017

gDraw Software that Converts 2D Drawing into G-Code

Niklas Roy developed gDraw software that enables you to draw in 2D and then export it as 3D printable g-code.

In this example he used it to create simple Christmas card:






























Learn more about gDraw here:

http://www.niklasroy.com/articles/194/gdraw-free-software-for-you

GitHub repository:

https://github.com/royrobotiks/gDraw

May 17, 2015

How to convert G-Code back into STL?

I've been researching methods to convert pure G-Code back to STL / .OBJ, and it seems that there are not many options but it can be done.

G-Code Reverser by MakePrintable

Even in its beta version it looks the most developed out solution.

Here is the Reverser description:
The Generated G-Code commands represent horizontal layers “slices” of the 3D model, sliced as the model was placed, scaled, and rotated in the slicing software’s platform, those commands are generated with user and printer-specific settings, all of which makes the G-Code almost impossible to modify in order to retarget different printers, let alone modifying the original model itself.
Our Reverser interprets the G-code, and collects the details and data needed from the commands, then it regenerates the 3D model which represents the outcome of the printing process using the respective G-code file.
This feature allows users to reuse G-code, by regenerating the G-code using the Reverser’s outcome, and simply changing the settings, or even target other printers than the one targeted in the G-code file.
Power users and 3D designers would get the chance to modify the model once more, as the outcome of the Reverser would be in .OBJ or .STL formats, which means they can import it into 3D editing software and start with their editing.




Blender GCode Reader Add-on and GCodeImport
https://github.com/zignig/blender-gcode-reader

http://www.thingiverse.com/thing:6236

New version: https://github.com/iraytrace/BlenderGcodeImport


There are some solutions that enable G-Code visualization and / or printing simulation like but not conversion or export to STL:

GCode2Vtk that displays g-code like VTK 3d model.

https://github.com/pbrier/gcode2vtk

GCode Analyzer/Visualizer
http://www.thingiverse.com/thing:35248

http://gcode.ws/

CNCSimulator can simulate 3d printering out of g-code

http://cncsimulator.com/




Repetier Host seems to be able to simulate g-code in 3d model bu I'm not expert on it.

If you know any other methods to convert g-code back to STL let me know so I can update this post.





















Update:

Could this be used to hack 3d model streaming services? A kind of a workaround?
There are services like Pinshape that use "streaming" as a sort of DRM that enable you to print an object without downloading it in order to preserve the original .stl object and prevent sharing or piracy.
Theoretically you could us a sort of custom Marlin that only reads the g-code and records it and you could use g-code reverser to make an original STL.

Here is an example of streaming service:



Source blog post about streaming function:

http://blog.pinshape.com/the-3d-printing-cloud-based-streaming-has-arrived/?cet=3130

DRM systems always fail and punish only a paying customer.


Jan 28, 2015

Simple algorithm to prevent oozing problems on dual extruders

James Yong developed a small g-code algorithm to help prevent oozing in dual extruder printing by producing a small barrier to scrape off the oozing filament.

Here is the g-code he uses:
Layer change G-code:
T1;
G92 E0;
G1 E-0.5 F1200;
G92 E0;
G1 X96.450 Y60.8 F5000;
G1 E1.5 F1500;
G92 E0;
G1 X96.450 Y36.650 E0.07476 F1500.000;
G1 X96.950 Y36.650 E0.08390;
G1 X96.950 Y65.150 E0.23935;
G1 X96.450 Y65.150 E0.24850;
G1 X96.450 Y60.813 E0.32782;
G1 X95.950 Y60.813 F5400.000;
G1 X95.950 Y36.150 E0.41309 F1500.000;
G1 X97.450 Y36.150 E0.44053;
G1 X97.450 Y65.650 E0.61427;
G1 X95.950 Y65.650 E0.64170 F1500.000;
G1 X95.950 Y60.888 E0.72879;
G4 P200; wait for ooze to slow
G10;
T0;
G92 E0;
G1 X174.750 Y61.9 F5000;
G1 E1.4 F1500;
G92 E0;
G1 X174.750 Y37.750 E0.07476 F1500.000;
G1 X175.250 Y37.750 E0.08390;
G1 X175.250 Y66.250 E0.23935;
G1 X174.750 Y66.250 E0.24850;
G1 X174.750 Y61.913 E0.32782;
G1 X174.250 Y61.913 F5400.000;
G1 X174.250 Y37.250 E0.41309 F1500.000;
G1 X175.750 Y37.250 E0.44053;
G1 X175.750 Y66.750 E0.61427;
G1 X174.250 Y66.750 E0.64170 F1500.000;
G1 X174.250 Y61.988 E0.72879;
G4 P200; wait for ooze to slow
G10;
Tool change G-code:
G1 X80 Y40 F4000;
G1 X130 Y40 F4000;
G1 X130 Y55 F4000;
G1 X190 Y55 F4000;
He uses Prusa i3 with double extruder, Slic3r, Marlin firmware and Repetier Host.

On the left you can see a "barricade" that binds oozing filament and on the right the dual 3d printed object that looks very good.


























Here is a detailed video of algorithm in action and it really does prevent oozing remains on the printed object and increases print quality:




Here is a video showing a similar purge - wipe wall feature in Makerware 2.3.0.4. but with much higher walls and more filament spending.




I don't own dual extruder machine or have much experience with dual extruders so let me know your opinions and experiences in the comments. Thank you James for sharing the code!

Jan 6, 2015

Lin3s simple design tool that works great for compressed air extruders

Lin3s is a simple CAD web tool that enables you to create 3d objects from simle line drawings. It works great for paste extrusion and air pressure extruders. Lin3s is developed by 3digitalscooks crew and they use it in their 3d printed food projects. Great work!

Here is a basic tutorial on how to use Lin3s with main options:




... and here is the result 3d printed with hummus (yes, hummus!) mmmm on nom nom ...



You can use it via web interface here: http://www.3digitalcooks.com/design-tools/lin3s/lin3s.html

...or learn more about it here:

http://3digitalcooks.com/2015/01/lin3s-new-design-tool/

Interface is very simple:

















Nov 8, 2014

How to run Easel CAD on Raspberry Pi and send g code to Arduino

Easel is a very easy browser based 3d design CAD software you can now run on a Raspberry Pi thanks to this tutorial by Sacha.

It is a small hack that could be used in specific situations, ie.: if you don't want to expose your more expensive design computer to workshop environment or maybe in educational setting where cheaper hardware is more affordable ...



Detailed tutorial can be found at:

http://thesimpleswitch.blogspot.com/2014/10/shapeokoarduinoraspberry-pieasel.html

Here is the workflow from the site:
Prerequisites: 
  • latest version of Raspian and Epiphany browser (type "sudo apt-get update" followed by "sudo apt-get dist-upgrade" in a terminal window if you don't have Epiphany installed)
  • Raspberry Pi Model B (hardware I tested on). Model B+, and compute module should work. I don't know if this will work on Model A, I suspect it will, but it will be even slower. Large/intricate designs might cause memory problems on the model A.
  • Some kind of Gcode sender 
  • I like GRBL Controller, it's more feature-filled and stable than Universal Gcode Sender 
  • Shapeoko attached to the Raspberry Pi via USB running GRBL on Arduino
On your design computer:
  • Create your design, save design as an Easel project.
  • You could do this on the Rasperry Pi, but using Easel on a Raspberry Pi is quite slow and does not display the 3D view.
  • On the Raspberry Pi:
  • Launch Epiphany
  • Load the file you created earlier - make sure the 2D view looks ok (you won't see a 3D view, Epiphany doesn't support it)
  • Go to machine>advanced>generate GCode. A progress bar will appear and CPU usage will max out for a while.
  • When the progress bar goes away, click Download GCode.
  • After a few moments (again, CPU usage will max out), a new unnamed tab will appear.
  • Go to that tab, you'll see a bunch of GCode on that tab. 
  • Click the gear icon in Epiphany, select "save as" and save the new tab as <file name>.nc 
  • Launch your gcode sender
  • Open the .nc file from your gcode sender and begin cutting normally.





May 4, 2014

GCodePrintr loading g-code from NFC tag embedded in 3d printed object




Here is video demonstration of GCodePrintr interacting with NFC tags embedded in 3d printed objects. After the near contact the NFC tag emits link to URL that loads remote g code of the object in the software and you can print new copy.
Simply, you touch an object and you can print it using your smartphone.
I could see many use cases, like consumer goods where you can print simple replacement parts like handles etc. by scanning the NFC tag embedded in them.








Jan 23, 2014

Making Machines that Make talk by Nadya Peek

Must-watch video if you are interested into DIY, desktop manufacturing machines, hacking, making and generally awesome stuff!

Nadya Peek speaks about the process and basics of making machines that make, technology, digital fabrication economics, MIT modern high-end CNC machines and their limitations, how g-code is very stupid  and how biologists buy expensive machines that are easy and cheap to DIY ...
She also talks and shows many interesting machines that you can make yourself like liquid transfer and auto pipetting machines...



From video description:
Making a new control system for a machine is often a slow and tedious task. Maybe you already have a 3 axis stage, and you already know how to move it around. But what if you want to add a camera and use it for position feedback? You'd have to redesign the whole hardware layer.
I'll talk about some ways I've built modularity into control systems for machines so that you can quickly iterate on different kinds of machine systems without getting stuck in hardware land forever. This includes connecting synchronized nodes across a network and importing legacy nodes for things like, say, an old pressure box you found in the trash and has rs232 in.
Down with gcode! Long live machine control.

You can see her PopFab factory in a briefcase here:

http://diy3dprinting.blogspot.com/2012/07/popfab-factory-in-briefcase.html

Here is the post about MTM Multifab and Fab-in-a-Box:

http://diy3dprinting.blogspot.com/2014/01/mtm-multifab-multitool-desktop.html

Nadya Peeks home page:

http://infosyncratic.nl/

I found one of her presentations which loosely follows the theme of the talk in PDF format:

http://cba.mit.edu/events/13.03.scifab/Peek.pdf

She also spoke about some high end CNC machines being monitored by gyroscope, sensors and GPS so they can not be moved without authorization to prevent them begin exported to blacklisted countries. Here you can see the perfect example of that crazy security policy: http://boingboing.net/2014/01/06/high-end-cnc-machines-cant-b.html


The talk was part of 30th Chaos Communication Congress (30c3) by the Chaos Computer Club (CCC) at Congress Centrum Hamburg (CCH)



Dec 10, 2013

GCode Simulator & Print software - controlling 3d printing on PC, Android or via Bluetooth

GCode Simulator is software package of several programs / apps that run on PC or Android device enabeling you to simulate G-Code 3d printing on your PC and on Android and giving you full control of compatible 3d printer in paid (1,99 €) version.
This is very useful since there is plenty of very affordable low cost Androide devices such as tablets that can provide you with powerful touch screen 3d printer controller.

GCode Simulator also supports wireless printing over Bluetooth. GCode Simulator & Printer can connect to Bluetooth enabled 3D printers. Any RepRap 3d printer based on RAMPS can easily be extended to support Bluetooth by connecting a JY-MCU Bluetooth serial  module.











Video of GCode simulator on PC making a 3d printing simulation:





Video of GCode simulator in Android environment:





Here is Steve Gerbers video of GCode Simulator running on ultra cheap Android tablet and working great with Cerberus delta printer:




For a full set of features and details visit GCode Simulator & Printer homepage

http://www.dietzm.de/gcodesim/





Update:

It has been updated and renamed:

http://diy3dprinting.blogspot.com/2014/01/gcodeprintr-v152-for-android-has-been.html

Nov 20, 2013

New Slic3r version 1.0.0RC1 is Out! Featuring built-in automatic STL repair

New Slic3r is out with many new features! Huraaaaaayyy!

From the news post:

Major new features:
  • built-in automatic STL repair
  • OpenGL 3D preview of the repaired file (thanks to iXce for the initial work); also supports multi-material files
  • ability to override individual config options for each object in the same print job
  • new support material rewritten from scratch
  • new Ooze Prevention feature for multiple extruders (park extruders outside skirt and drop temperature by a specified delta)
  • options to avoid starting loops on convex vertices and/or overhangs
  • volume calculation
  • ability to customize how materials are mapped to extruders
  • new First Layer Acceleration option
  • new option to use firmware-controlled retraction (G10/G11)
  • new option to use a distinct extruder for support material interface

Improvements:
  • Slic3r is now much faster because many mature parts of code were rewritten in C++ for faster processing and less memory usage (Slic3r is now 40% C++)
  • most of memory is now truly shared between threads, reducing the total footprint
  • improved infill patterns and bridge detection
  • the automated test suite was largely enriched
  • don't combine retract and travel anymore when using G0 (Mach3 compatibility)
  • better Makerbot (Makerware/Sailfish) compatibility
  • Windows binaries are now built with Expat for faster AMF parsing
  • Minor improvements:
  • new [layer_num] placeholder in layer-change G-code
  • custom G-code can be supplied via command line too
  • some options were renamed or rearranged for clarity
  • new --info command line option to get information about the file
  • add .ngc to supported G-code suffixes
  • the wizard now saves initial profiles automatically
  • automatically copy Simple Mode settings into a 'Simple Mode' preset in Expert Mode

Changes:
  • layer height ranges are scaled automatically when object is scaled in plater
  • avoid G92 E0 for sailfish output
  • the "Infill every n layers" option was renamed to "Combine infill every n layers" to clarify its purpose

Bugfixes:
  • several threading issues were fixed
  • some situations causing incomplete infill were fixed
  • fixed regression causing wrong direction for inwards move in holes, thus little blobs
  • fix crash on Windows when username had non-ASCII characters
  • some spiral vase prints had little gaps in the loops
  • Z-offset was not applied to spiral vase prints
  • lift was not working correctly with multiple extruders and multiple skirt layers
  • fix speed math for wipe, which was causing too fast retraction
  • other minor fixes

http://slic3r.org/releases/1.0.0RC1


Update:

Here are some possible bugs screen-captured by Radusava