Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi layer configuration #29

Closed
mkeyno opened this issue Apr 19, 2017 · 7 comments
Closed

multi layer configuration #29

mkeyno opened this issue Apr 19, 2017 · 7 comments

Comments

@mkeyno
Copy link

mkeyno commented Apr 19, 2017

I've used Chines laser cutter firmware and inkscape which is has multi layer configuration and can define power and speed for each layer , do you have plan to implement such feature ?
BR

@arkypita
Copy link
Owner

Hi mkeyno
For now I have no plans to implement a function of this type. The import of a raster image (the only one import implemented now) does not allow me to differentiate layers. When I will add the reading/import of vector files like .svg or .dxf I could put something like that you suggest.

best regards, Diego

@mkeyno
Copy link
Author

mkeyno commented Apr 19, 2017

thanks @arkypita , you did the hard part and I thought with many free C# vector2gcode lib it wont be hard to implement such feature , unfortunately I'm not C# pro to make PR in this case , but thanks for your repo , its very helpful

@arkypita
Copy link
Owner

vector file import is at the top of the list of things I want to implement. It's just because of the little free time I have that I whould not been able to add it yet!

@sh4wner
Copy link

sh4wner commented Apr 1, 2019

Hi @arkypita,

I´m a developer from Spain. First of all, congratulate for your application and for bring to all people the posibility of work with it. I past last days implementing a stroke color based multishape functionality and a material manager.

Loads and appends the SVG document N times as you mark in work repeats, filtering the shapes by work selected color and adjusting the speed and power for each work.

I´ve made too a material manager to store and load default values for each material.

I´ve not finished yet but this custom multishape functionality is working.
laser1.

If you think that this can supply this feature, contact me and i push my branch wherever.

Thanks!

@sh4wner
Copy link

sh4wner commented Apr 1, 2019

I made too a simply and optional InkScape integration (adding Inkscape folder to settings form) to convert svg texts to svg paths through the execution of a system command like this:

inkscape filename.svg --export-text-to-path --export-plain-svg out.svg

When the file is converted it replace the original filename in the rest of flux.
It works very well and it can be a solution (no desired but functional) for autoconvert svg files with text in a full paths svg. I know that this is a great dependency but for many users that have InkScape instaled can be a good point.

This is the function if any interested:

private string preprocesTextsWithInkScape(string filename) {
            string inkScapeFolder = Settings.GetObject("InkScapeFolder", "").ToString();
            if (inkScapeFolder!="")
            {
                EnsureExistTempPathFolder();
                var outFilename = TempPath + "out.svg";
                string strCmdLine = "/C \"" + inkScapeFolder + "\\inkscape.com\" " + filename + " --export-text-to-path --export-plain-svg " + outFilename;
                try
                {
                    var process1 = System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
                    process1.WaitForExit();
                    process1.Close();
                    filename = outFilename;
                }
                catch (Exception e)
                {
                }

            }

            return filename;
        }

@alastaira
Copy link

What is the best way to co-ordinate an effort to add support for multiple layers into LaserGRBL? I often find myself using File->Append to add both a raster engrave layer and SVG cut layer(s) to the same job. This works, but it would be nice to be able to view/edit/remove parameters of those layers individually after adding them, rather than having to start all over again if you want to change one of them.

I'm happy to contribute - either via code or financially - to help this happen, but it seems like it would require quite a fundamental architecture change to have LaserGRBL recognise the potential for multiple layers in a single job, which is why I thought it might need some guidance from @arkypita rather than just having a go myself.

@arkypita
Copy link
Owner

arkypita commented Oct 8, 2021

Hi @alastaira

You said well, that would be a great feature, and the current "append" function is by no means comfortable and not sufficient as a replacement.

You've also hit the spot. The LaserGRBL code was written a bit at random, and right now it is complex to add new features without worsening the situation. However, it must be said that the streaming part is very well done.

The biggest problem is that the features of LaserGRBL (vectorization, line2line, centerline, SVG) were made without a common base, putting together some parts developed by me, and other features taken from other opensource programs, so many parts repeat themselves ( there are at least 2 or three ways to convert a bezier to gcode, there are more than one class to indicate a point or a segment) and this prevents reusing some services (such as filling, or travel optimization for maximum speed of cut) which are applicable for example on the vector created from the raster, but not on the SVG.

In addition, the way in which the settings of each performance are managed is really bad.

If I had the desire and the time, it would have to be re-done with some concepts in mind that make it more modular and extendable, even by the contribution of third-party developers.

That said, I'm still open to collaboration.

If you want to try to develop this feature yourself, I suggest this approach: create a "project" editor.

In the editor insert the various graphic parts that you want to use in the final work, have a canvas where you can reposition and resize the various graphic parts working on a small light "preview", and for each object (or layer containing several objects) to foresee the processing settings (type of process: vectorization, dithering etc and speed-power).

Once the project is done translate it to gcode only at the end using the existing functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants