Plugin for laser cutting
Moderators: andrew, Husky, J-J
Plugin for laser cutting
I'm proud to introduce a new plugin for QCAD. It is made for laser cutting and it is hosted at https://github.com/zippy84/lc-qcad. A full description and the install instructions are contained in the readme of the project.
The plugin works also with the trial version of QCAD.
The plugin works also with the trial version of QCAD.
Last edited by RR88 on Fri Mar 25, 2022 4:04 pm, edited 5 times in total.
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
Hi RR88 - nice approach! Thanks for sharing that!
I made a first test but I'm experiencing a few difficulty's. Just to be sure that the installation of this plugin is correct on my Win10.
Folder:
... qcad-3.20.1.3-pro-win64\scripts\Misc\Modify\LaserCuttingFormatter
contains 3 files:
FormatterDialog.ui
LaserCuttingFormatter.js
lcBundle.js
Correct?
I made a first test but I'm experiencing a few difficulty's. Just to be sure that the installation of this plugin is correct on my Win10.
Folder:
... qcad-3.20.1.3-pro-win64\scripts\Misc\Modify\LaserCuttingFormatter
contains 3 files:
FormatterDialog.ui
LaserCuttingFormatter.js
lcBundle.js
Correct?
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: QCAD-Plugin for laser cutting
Yes, that's true. I never tried it with windows. What are the difficulties?
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
Thanks for confirmation.
If I use your script it will delete all blocks, correct?
If I try to undo the result of your script I have to do it multiple times and then QCAD will be terminate by itself ...
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: QCAD-Plugin for laser cutting
The undo argument of all transactions is set to false because there is no need of a history tracking. I think it is not turned off for the addLayer function. That causes the crash.
It's right that there are no blocks at the end, but blocks will be handled. Only blocks that are not referenced will be deleted. Or what do you mean?
It's right that there are no blocks at the end, but blocks will be handled. Only blocks that are not referenced will be deleted. Or what do you mean?
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
Ok, that is then a matter of opinion. I think there is a need to adjust the settings or ad least undo the action.
Partly what I mean.
New Blocks created in that particular drawing are deleted when unused. Used Blocks will remain.
Blocks loaded with a template are always deleted. Regardless of used or not used.
BTW: Your script creates the blocks BO, BB. Trying to edit or make them invisible leads to an unintended deleting of the block.
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: QCAD-Plugin for laser cutting
I don't know much about templates to understand what you are expect from my plugin. Please describe it in more detail. Actually all blocks and layers must be visible and unlocked. Otherwise it leads to an unexpected termination.
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
A template can be used as s a starting point for a new drawing and is basically an ordinary drawing which could also contain blocks.
Here a brief description:
http://www.qcad.org/doc/qcad/latest/ref ... te_en.html
Here a brief description:
http://www.qcad.org/doc/qcad/latest/ref ... te_en.html
Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: QCAD-Plugin for laser cutting
Undo should only be turned off if there is absolutely no doubt that undo / redo will never be used (i.e. when automatically generating a drawing off-screen without any user interaction possible).
You might want to group multiple transactions into one undo / redo step, so user can undo everything at once after running a tool. You can do this as follows:
Code: Select all
// start a new transaction group:
doc.startTransactionGroup();
...
// then, for all operations in the same group:
op.setTransactionGroup(doc.getTransactionGroup());
Re: QCAD-Plugin for laser cutting
Thanks for the feedback. I'm afraid that the tracked transactions will make it significantly slower. But I will try to make it possible. Also the better handling of unused blocks.
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
A new version of my plugin is out. Please check it out. Contributions like bug-reports, improvement proposals or other would be great 
The plugin is not longer hosted on gitlab.com.


Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
It doesn't works on my system which runs the the latest release of QCAD Pro on Win10.

Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
Re: Plugin for laser cutting
I'm sorry. Can you say, what's wrong? I don't have windows.
Edit: It works well on Win7.
Edit: It works well on Win7.
Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
It should works fine now. Try it with one of the dxf's in example2.


Arch Linux, QCad 3.22.0 Prof.
Re: QCAD-Plugin for laser cutting
I was going to but I can't implement the script on Win10 / QCAD Version: 3.24.0.1

Work smart, not hard: QCad Pro
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!
If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!