Easier to use as a library and Z Hop on retraction#54
Easier to use as a library and Z Hop on retraction#54aligator merged 2 commits intoaligator:masterfrom
Conversation
|
Hi, thank you, I will look at at the next days😃 |
|
oh shit git ^^ However I will post the change requests here. |
| InitialTemperatureLayerCount: 3, | ||
| RetractionSpeed: 30, | ||
| RetractionLength: Millimeter(2), | ||
| RetractionZHop: 0, |
There was a problem hiding this comment.
Please add the Option also to the cli options (in ParseFlags)
| @@ -151,17 +157,36 @@ func (g *Builder) AddPolygon(currentLayer data.PartitionedLayer, polygon data.Pa | |||
| } | |||
|
|
|||
| if isCrossing { | |||
There was a problem hiding this comment.
Please make sure that if zHop is 0, the resulting gcode should not differ from the gcode generated before your changes.
-> Please use the g.AddCommand like before to preserve the special retraction speed. That retraction speed should also apply if zHop is enabled.
-> I think better:
Add a new func (g *Builder) AddMoveSpeed(p data.MicroVec3, extrusion data.Millimeter, speed int) and modify the AddMove function to also use that.
Then you can just use AddMoveSpeed with the special retraction speed. And we avoid the (quite hacky) AddCommand I used before.
In this pull request I made the "model" struct public, to be easier to write custom readers and writers without copying too much from the original library's code. For instance, I wrote my own reader and writer for reading and wrinting in memory STL and GCode. I think I will provide more updates on this topic in the future.
Then I added support for lifting head when retraction happens, because I'm using the library to build test gcodes (levelling, thin walls, etc.) and I would need this feature.
P.S.: thank you for your great work!