Page 1 of 2

Plugin for laser cutting

Posted: Thu Jun 14, 2018 8:42 pm
by RR88
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.

Re: QCAD-Plugin for laser cutting

Posted: Thu Jun 14, 2018 10:07 pm
by Husky
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?

Re: QCAD-Plugin for laser cutting

Posted: Thu Jun 14, 2018 10:13 pm
by RR88
Yes, that's true. I never tried it with windows. What are the difficulties?

Re: QCAD-Plugin for laser cutting

Posted: Thu Jun 14, 2018 10:44 pm
by Husky
RR88 wrote:
Thu Jun 14, 2018 10:13 pm
Yes, that's true. I never tried it with windows.
Thanks for confirmation.
RR88 wrote:
Thu Jun 14, 2018 10:13 pm
What are the difficulties?
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 ...

Re: QCAD-Plugin for laser cutting

Posted: Thu Jun 14, 2018 11:29 pm
by RR88
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?

Re: QCAD-Plugin for laser cutting

Posted: Fri Jun 15, 2018 12:52 am
by Husky
RR88 wrote:
Thu Jun 14, 2018 11:29 pm
The undo argument of all transactions is set to false because there is no need of a history tracking.
Ok, that is then a matter of opinion. I think there is a need to adjust the settings or ad least undo the action.
RR88 wrote:
Thu Jun 14, 2018 11:29 pm
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?
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.

Re: QCAD-Plugin for laser cutting

Posted: Fri Jun 15, 2018 1:32 am
by RR88
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.

Re: QCAD-Plugin for laser cutting

Posted: Fri Jun 15, 2018 4:21 am
by Husky
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

Re: QCAD-Plugin for laser cutting

Posted: Fri Jun 15, 2018 8:53 am
by andrew
RR88 wrote:
Thu Jun 14, 2018 11:29 pm
The undo argument of all transactions is set to false because there is no need of a history tracking.
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

Posted: Fri Jun 15, 2018 2:12 pm
by RR88
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.

Re: QCAD-Plugin for laser cutting

Posted: Fri Jan 18, 2019 7:36 am
by RR88
A new version of my plugin is out. Please check it out. Contributions like bug-reports, improvement proposals or other would be great 8)

:!: The plugin is not longer hosted on gitlab.com.

Re: QCAD-Plugin for laser cutting

Posted: Fri Jan 18, 2019 11:56 pm
by Husky
RR88 wrote:
Fri Jan 18, 2019 7:36 am
A new version of my plugin is out. Please check it out.
It doesn't works on my system which runs the the latest release of QCAD Pro on Win10. :(

Re: Plugin for laser cutting

Posted: Sun Jan 20, 2019 10:21 am
by RR88
I'm sorry. Can you say, what's wrong? I don't have windows.

Edit: It works well on Win7.

Re: QCAD-Plugin for laser cutting

Posted: Sun Jan 05, 2020 8:30 pm
by RR88
Husky wrote:
Fri Jan 18, 2019 11:56 pm
RR88 wrote:
Fri Jan 18, 2019 7:36 am
A new version of my plugin is out. Please check it out.
It doesn't works on my system which runs the the latest release of QCAD Pro on Win10. :(
It should works fine now. Try it with one of the dxf's in example2. :P :P

Re: QCAD-Plugin for laser cutting

Posted: Sun Jan 05, 2020 9:46 pm
by Husky
RR88 wrote:
Sun Jan 05, 2020 8:30 pm
It should works fine now. Try it with one of the dxf's in example2. :P :P
I was going to but I can't implement the script on Win10 / QCAD Version: 3.24.0.1 :oops: