Welcome! Log In Create A New Profile

Advanced

Viewer of G-Code / Sketchup G-Code importer.

Posted by davidfi 
Viewer of G-Code / Sketchup G-Code importer.
January 21, 2013 12:49PM
Hi Guys.
I wrote a G-Code importer for Sketchup.
Using this importer will enable viewing of the G-Code back in the familiar enviroment of sketchup.

you can find it in:Sketchup to a Virtual 3D-Printer

It could be usefull for debugging the slic3r and seeing the g-Code file.

I will be happy to try to solve bugs - make improvements ect...
So...
Have a look and let me know.

Thank you.
David.
Re: Viewer of G-Code / Sketchup G-Code importer.
January 21, 2013 02:03PM
David,

Thank you for this Ruby Plugin. . I've played with this for all of 10 minutes and am having fun with it. I can see myself using this to measure the dimensions of of a finished g-code file, and compare it to both a print, and the original STL file.

Thank you.
Re: Viewer of G-Code / Sketchup G-Code importer.
January 27, 2013 08:44AM
Thank you.
Just Updated the plugin.

Have fun.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 09, 2013 02:27PM
Your Help needed :-)

In the new version we have a G-Code Exporter of the previously imported G-Code in the plugin menu.

The new exporter is a very simple assuming that in the next versions will be adding all the
needed features to make it usable - so please let me know what need's to be fixed.


Thank you.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 15, 2013 12:53AM
Another version 0.0.8.
This time improve the exporter.
Now it is possible to delete a component from the previously imported G-Code.

Guys,
I don't have my printer yet... so I need you help!.
what is the logic used by slic3r for writing G-Code?
If we will be using this tool - it make sence to make it output the same G-Code as a slic3r would.

So:
1) What is the logic for E - how to culculate the amount of extruded material?
2) What is the logic for F - how to decide what speed to move the motors?
Re: Viewer of G-Code / Sketchup G-Code importer.
February 15, 2013 03:16PM
1 - E axis can work both as absolute and as relative. It will just use G92 E0 to reset the distance at the beginning of every thread.
The option can be found in Printer Settings > General > Use relative E distances.

2 - You can set specific speeds for various types of moves (infill/solid/perimeter/bridge/etc). These speeds will also be capped by the firmware, if they exceed the firmware limits.
The option can be found in Print Settings > Speed.

PS: you can play around with Slic3r even if your printer is not ready yet.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 16, 2013 04:33AM
I see.
So the logic is complicated. It is not something I could reproduce in a simple way.

So, the only option I can think of now is to import this information from the G-Code.
To do this I would need to change the "filament" component's appearance according to speed and amount of filament.

I can guess the effect of more filament extruded, but
What the "real world" effect of fast move of the head, have on the filament?
assuming the same move distance and the same amount of extruded filament.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 16, 2013 05:24AM
You can always check the source code and see how everything in Slic3r works.

As about the fast moves, if you move the same distance and your extruder keeps up with that move in terms of extruding the same amount but in a smaller timeframe, then nothing happens different. However, if the moves get ridiculously fast, the extruder won't be able to keep up, sometimes it will jam, or the motor will slip, resulting in either stretched filament, or incomplete or even missing threads.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 18, 2013 04:25PM
Does extruded amount (the number after the E), always related to length of the filament segment?
Or there are more parameters to get the number following the E?
Re: Viewer of G-Code / Sketchup G-Code importer.
February 18, 2013 10:10PM
After calibration, G1 E5 should make the printer move 5mm of filament. As in: 5mm of your filament pass from your spool, through your hobbed bolt (or whatever you are using). On the other hand, in term of printed threads, the slicing software calculates how much filament should be melted in order to obtain a 5mm thread of a specific layer height and thread width.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 19, 2013 03:24PM
So
E1 will move the extruder motor 1mm (No matter what speed the X,Y motors move at )
The amount to filament that will come out is :
PI * (Filament Diameter/2)^2 * 1mm = 3.14 * (3mm/2)^2 * 1mm = 3.14*9/4 mm^3 of extruded plastic
This extruded filament will create a filament line 0.5mm nozel * 0.1mm "Layer hight" * Length
Length is: 3.14*9/4 mm^3 / 0.5mm / 0.1mm =
=141.3mm Length of filament line per 1mm of extruded filament.
This means that the X,Y motors needs to move 141.3mm per 1mm of the move in E motor

Is my calculation correct?
Do we need to take into account anything else? like the edges for instance?
Re: Viewer of G-Code / Sketchup G-Code importer.
February 19, 2013 08:29PM
MPower Wrote:
-------------------------------------------------------
> After calibration, G1 E5 should make the printer
> move 5mm of filament. As in: 5mm of your filament
> pass from your spool, through your hobbed bolt (or
> whatever you are using). On the other hand, in
> term of printed threads, the slicing software
> calculates how much filament should be melted in
> order to obtain a 5mm thread of a specific layer
> height and thread width.

Actually this is not 100% true. If you are set to relative E distances, then G1 E5 will extrude 5 mm of filament. If you are set to absolute, the extruder will move to position 5mm. This means that if you had previously extruded to position 10mm, the extruder would actually retract 5 mm.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 20, 2013 12:52AM
jbernardis Wrote:
-------------------------------------------------------
> MPower Wrote:
> --------------------------------------------------
> -----
> > After calibration, G1 E5 should make the
> printer
> > move 5mm of filament. As in: 5mm of your
> filament
> > pass from your spool, through your hobbed bolt
> (or
> > whatever you are using). On the other hand, in
> > term of printed threads, the slicing software
> > calculates how much filament should be melted
> in
> > order to obtain a 5mm thread of a specific
> layer
> > height and thread width.
>
> Actually this is not 100% true. If you are set to
> relative E distances, then G1 E5 will extrude 5 mm
> of filament. If you are set to absolute, the
> extruder will move to position 5mm. This means
> that if you had previously extruded to position
> 10mm, the extruder would actually retract 5 mm.

I was obviously talking about the relative scenario. Read post #6.
Re: Viewer of G-Code / Sketchup G-Code importer.
February 23, 2013 01:36PM
Version 0.0.9
New in Importer:
Will put a Attribute with the value of speed from the imported G-Code in the
"filament" & "MotorMove" components
Change the Z scale of the "filament" component according to the amount of
extruded filament in the imported G-Code
New in Exporter:
Export to the G-Code the Attribute of speed as was imported by the importer.
Export the Extruded length according to the Z scale of the "filament" component


Every version making this tool more usable.
I did not get my printer yet... so it is hard for me to guess what is needed to make this plugin usable
So ... your suggestions are more then welcome!.
Re: Viewer of G-Code / Sketchup G-Code importer.
March 03, 2013 12:42PM
What should the next feature be?
If you have an idea, I will be very happy to try implementing it.
Re: Viewer of G-Code / Sketchup G-Code importer.
March 05, 2013 06:51PM
I would like to suggest new features but I can only do that if I can get the plugin without having to register in another site.

Can you post the versions in an open site. I do not know were, can anybody suggest a place were each version can be uploaded.

Thanks.
Re: Viewer of G-Code / Sketchup G-Code importer.
March 05, 2013 08:33PM
Re: Viewer of G-Code / Sketchup G-Code importer.
March 12, 2013 05:35PM
rapdi Wrote:
-------------------------------------------------------
> I would like to suggest new features but I can
> only do that if I can get the plugin without
> having to register in another site.
>
> Can you post the versions in an open site. I do
> not know were, can anybody suggest a place were
> each version can be uploaded.
>
> Thanks.

Enjoy.!!!
And let me know :-D
Attachments:
open | download - Fishelzon_GcodeTools0.0.9.rbz (8 KB)
Re: Viewer of G-Code / Sketchup G-Code importer.
September 27, 2013 10:12PM
Thanks for the plugin but only work for gcode importer.
Sorry, only registered users may post in this forum.

Click here to login