t-oster / VisiCut

A userfriendly tool to prepare, save and send Jobs to Lasercutters
https://visicut.org
Other
228 stars 114 forks source link

map by stroke width: greater than, less than #14

Closed mgmax closed 11 years ago

mgmax commented 12 years ago

In mappings it is only possible to filter by stroke width "IS" or "IS NOT". Adding ">=", ">", "<" and "<=" would be helpful.

t-oster commented 12 years ago

You mean in the "Advanced->Edit Mappings" dialog? At first I thought, people would use VisiCut to lasercut files, which were not created for lasercutting. That's why this original mapping editor is so powerful. Later I came to the conclusion, that most people create their files extra for lasercutting and therefore, this mapping-dialog is way to complex for the average user. So I created the "Custom-Mapping" dialog, which only allows to map by one criterium and lists all options, which occur in the currently open file. I don't think there would be a use for such possiblity, because people won't have that much different stroke-widths if they want to distinguish the mapping after that (if you cut a line, the width is fixed by the laser-beam, so the real line-width has only effects for engraving).

So the Advanced->Edit Mappings dialog is only a left-over and I'm thinking about completely removing it and only provide the Everythin=> and Custom-Mappings.

But since VisiCut should be a community-driven project, we should discuss about such features with more users.

mgmax commented 12 years ago

To clarify this problem: Today I opened a document and VisiCut recognized two stroke widths: 0.1 and 0.100001. I once set the same line width, but after some work in Inkscape they are no longer the same.

I like the "Edit Mappings" feature because I can save mappings and don't have to set it every time. For example I created a mapping "cut red lines, ignore blue things, engrave the rest" and use for most drawings I create. Without this feature I would have to set it again every time I open VisiCut.

Although the dialog is too complicated for the average user, it is a useful feature. Think of writing the shortest possible lasercutter guide: Open Inkscape. Draw what you want. Use red lines for cutting, blue for comments and other colors for engraving. Click on Extensions->Lasercut->Open with VisiCut. Choose material. Select "Cut red lines, ignore blue, engrave the rest" from "Predefined Mappings". (If necessary, adjust size and position in the preview.) If the preview shows everything correctly, click on "Execute".

This as easy as the Windows/CorelDraw workflow: Open Corel Draw. Draw what you want. Use "hairline" for cutting, thicker lines (> 0.2mm) for the rest. Click on File->Print. Choose "Epilog Engraver x64". Click on Options. Click on "Advanced". Select Material (List is not alphabetically sorted!). Click on "Load". Click on "OK". Click on "OK". (There is no preview, but if you did everything right, the object will surely come out as you drew it.)

For VisiCut with only Custom Mappings this would certainly be a lot longer. The "Everything" mappings are sometimes useless (engraving one thick line and cutting another line), so they are no option for me.

The non-free Epilog Windows driver distinguishes by stroke width: Very small stroke widths for cutting and thicker strokes for engraving. To allow easy switching between VisiCut and this driver, I wanted to create a mapping that does exactly the same and can be accessed with one click.

I think we should pick some random people from the street and look where they have difficulties :)

t-oster commented 12 years ago

What about mapping by Layers?Create one Cut-, one Engrave etc layer. Those will not be modified by operations like scale etc and its already clear in Inkscape, what they are for.

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

mgmax commented 12 years ago

Using separate layers seems possible, although a bit more complicated.

Think of cutting an elliptic piece of plastic and engraving a text on it. First you have to create two layers. Then you create objects and make sure that they are on the right layer. If you did something wrong, there is no direct visual feedback (color or line width) telling you your object is on the wrong layer!

The standard Inkscape settings need to be changed: By default, selections only apply to one layer, which can be changed somewhere in the global settings. If you want to change the size of the whole drawing in Inkscape, you select-all and scale both the text and the ellipse at once, which doesn't work with the default settings.

t-oster commented 12 years ago

Hmm... I'm still hesitating to implement that, because it will change the PLF-File-Format and will be only accessible from the dialog, I do not encourage to use. My suggestions are:

  1. I could allow to save the "Custom_Mappings", so you don't need to always recreate them
  2. If you use Color for selection, you won't run into the scaling problems
  3. In Corel-Draw, hairlines are equivalent to stroke-width 0. If you map that to cut, it should also be scale-invariant (x*0=0). Cutting lines below a certain width is counter-intuitive anyway in my opinion.
mgmax commented 12 years ago

I agree it is counter-intuitive, but how am I supposed to map SVG files created for the Epilog driver? Currently I open it with inkscape, manually select every thin line and change the color to something unique.

Use case: Yesterday a lab user wanted to cut something. The Windows VM had somehow become extremely slow, and if there had been a one-click mapping, I would have simply switched over to VisiCut. But without this feature it was easier to reboot Windows and continue with the non-free driver.

Suggestion 1 does not solve this case: The saving custom mapping only covers certain line widths encountered before. But when I encounter a line that is 0,124 px wide and the mapping only knows 0,123px, I have to manually select it for cutting and save the mapping again.

Suggestions 2 is great for people using only VisiCut, but not for this use-case. Solution 3 is limited to Corel Draw.

t-oster commented 12 years ago

How about you try to implement the feature yourself and if it works reliably, you send me a pull-request and I will include it into the main repository?

t-oster commented 11 years ago

Does anyone still need this feature?

mgmax commented 11 years ago

yes please. same use-case as before: import files made for the Windows Epilog laser driver.