Plugin for laser cutting

This forum is for 'Work-in-Progress' QCAD user developed script Add Ons and Plug-ins.

Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: andrew, Husky, J-J

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Plugin for laser cutting

Post by RR88 » Thu Jun 14, 2018 8:42 pm

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.
Last edited by RR88 on Fri Mar 25, 2022 4:04 pm, edited 5 times in total.
Arch Linux, QCad 3.22.0 Prof.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » Thu Jun 14, 2018 10:07 pm

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?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » Thu Jun 14, 2018 10:13 pm

Yes, that's true. I never tried it with windows. What are the difficulties?
Arch Linux, QCad 3.22.0 Prof.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » Thu Jun 14, 2018 10:44 pm

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 ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » 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. 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?
Arch Linux, QCad 3.22.0 Prof.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » Fri Jun 15, 2018 12:52 am

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.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » Fri Jun 15, 2018 1:32 am

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.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » Fri Jun 15, 2018 4:21 am

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
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

User avatar
andrew
Site Admin
Posts: 9019
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD-Plugin for laser cutting

Post by andrew » Fri Jun 15, 2018 8:53 am

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());

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » Fri Jun 15, 2018 2:12 pm

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.

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » Fri Jan 18, 2019 7:36 am

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.
Arch Linux, QCad 3.22.0 Prof.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » 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. :(
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: Plugin for laser cutting

Post by RR88 » Sun Jan 20, 2019 10:21 am

I'm sorry. Can you say, what's wrong? I don't have windows.

Edit: It works well on Win7.
Arch Linux, QCad 3.22.0 Prof.

RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Re: QCAD-Plugin for laser cutting

Post by RR88 » Sun Jan 05, 2020 8:30 pm

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
Arch Linux, QCad 3.22.0 Prof.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: QCAD-Plugin for laser cutting

Post by Husky » Sun Jan 05, 2020 9:46 pm

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:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

Post Reply

Return to “QCAD 'Script Add-On & Plug-in challenge' - Work in Progress”