Understanding the Path Mode of Inkscape
30 May 20181. Understanding “Object To Path”
1.1 Probelm 1:
After Marcel told me about boxes.py to generate the initial box files and apply modification on it. It seemed easy. We brought it to the laser cutter. It doesn’t work. orz. Paul helped to change the parameters for a great while. It still doesn’t work. orz
1.2 Quick Answer:
Applying “Object to Path”
1.3 Detailed Answer:
When I was standing there, I already knew that I messed up the ideas of an Object and a Path in inkscape. The requirement of “being understanding” is not only thinking from another human, such a beginning level, isn’t it. It seems like thinking from the perspective of a program is what all the mammals need to reach. lol
Now, this is what inkscape looks at an object, it is a rectangle (with a very round corner though). two nodes (right up corner, left down corner) and one sliding bar (rad of the corner) define the object, I can change them to make a different shape rectangle, but i can’t go beyond a doomed rectangle. This is an Object.
save it as .svg file. this is what I get in the file:
No wonder that I failed, I gave this to a laser cutter and expected it to go along the vector which was not there. I didn’t stand a chance.
Now applying “Object to Path”
more nodes appear, suddenly we can change it into any shape we want. Not necessary to be a rectangle. The way inkscape looks at it changed.
save the path as .svg file. this is what I get, a path indicates the laser cutter to go along:
while I thought there would be no more trouble, I got another failure.
2. Understanding “Stroke To Path”
2.1 Problem 2:
Finally the laser cutter started to work, but it cut multiple times at the same path.
2.2 Quick Answer:
Being careful with “Stroke to Path”
2.3 Detailed Answer:
When I saw the way the laser cutter moved, it made me think that duplicated paths share the same places so it went over and over again. I made great great effort to try to get rid of the redundant lines, combined nodes. All didn’t work. I started to think maybe they were not overlapped. they were different paths just very close. I made a great close-up. That was really the reason. It came from when a stroke was set with a thickness, and after I applying “stroke to path”, paths along the edges of the original stroke were created.
before “Stroke to Path”, our path is like a single closed line (see the red thin line)
after “Stroke to Path”, our path became the edges of the original stroke, they are two closed lines.
That is why the laser cutter went through the same (but actually not exactly) path multiple times.
3. Extensions TroubleShooting:
3.1 Problem 3:
When I tried to use Customized Extensions. I kept get missing lxml module error.
3.2 Quick Answer:
Check your python path
3.3 Detailed Answer:
This is such a pain. Because import lxml works just fine. I had no clue why it came along.
All I found is saying that it was a long-term bug.
I took it for granted for days as an inkscape bug. I can do nothing about it. Stop being understanding. Until the day I became A Dude Who Thinks from The Prespective of Inkscape. Yeappy, pay attention when you have the same problem, especially when you are using virtual environment.
when I work on tensorflow, I realize that I am running the python of anaconda. All the library I installed goes to anaconda’s python. What if inkscape is told to use the default native python, of course it will complain, there is no lxml library there. I have to tell inkscape to use that anaconda’s python.
goto your ${HOME}/.config/inkscape/preferences.xml
find the group tag with
add one line:
the problem is suddenly fixed.
4. Other small Notes
when using inkscape for lasercutting:
- in inkscape, set width of stroke as “0.1mm”, in corelDraw, set as “Hairline” two way to engrave, 1) set different colors, one for cutting, one for engrave, and setting cut way as “combine”, because engraving goes like bitmap. 2) make two runs, set less power for engrave part, then it will not able to go through.
- material and parameters: https://hci.rwth-aachen.de/lasercutter
- lasercutter can cut paper
- inkscape extensions having .py and .inx to say where to put it in the menu. They all goes to ${HOME}/.congif/inkscape/extensions, and restart the program. customized font folder in my machine /usr/share/fonts
- making a physical dot on the material along the laser calibration red pot. just in case when the job has to be interrupted. we still have a chance to continue. when the material is not standard size, set the canvas in program as real size to save material. And if still not confident, making power as 0 to see if every thing is in the area or use VisiCut to preview.
- in inkscape, the display unit “mm” is set at File -> Document Properties, select in object mode can change object size.
- one node can only connect to two other nodes. so don’t try to make three connects to a node.
- perfect fitting distance doesn’t make a tight-enough assembly, we used glue. tightness needs offset (e.g. 0.1mm).
- when load .svg to blender as preview, path-combine the nodes. and making fill. Inter-section Filling option is not obvious, it is two icons on the right up corner of Fill setting.
[END]