QCAD source code learning
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 84
- Joined: Fri Oct 20, 2023 7:21 am
QCAD source code learning
I am reading the source code of QCAD and want to find the algorithm code for the corresponding explode function? Is this algorithm implemented in JS?
Re: QCAD source code learning
For the GUI Modify .. Explode (XP) method:
Yes.
https://github.com/qcad/qcad/tree/maste ... fy/Explode
https://github.com/qcad/qcad/blob/maste ... Explode.js
In a standard installation this available in compiled form.
For the dwgexplode functionality:
Yes, but that is not open source.
Probably this makes a selection in an offscreen document and then calls Explode.explodeSelection(di) before saving it as a new file.
Regards,
CVH
Yes.
https://github.com/qcad/qcad/tree/maste ... fy/Explode
https://github.com/qcad/qcad/blob/maste ... Explode.js
In a standard installation this available in compiled form.
For the dwgexplode functionality:
Yes, but that is not open source.
Probably this makes a selection in an offscreen document and then calls Explode.explodeSelection(di) before saving it as a new file.
Regards,
CVH
-
- Full Member
- Posts: 84
- Joined: Fri Oct 20, 2023 7:21 am
Re: QCAD source code learning
The QCAD installer packages JS files into resources, so which file should these resources be placed in?
-
- Full Member
- Posts: 84
- Joined: Fri Oct 20, 2023 7:21 am
Re: QCAD source code learning
The QCAD installer packages JS files into resources, so which file should these resources be placed in?CVH wrote: ↑Sun Oct 22, 2023 8:21 amFor the GUI Modify .. Explode (XP) method:
Yes.
https://github.com/qcad/qcad/tree/maste ... fy/Explode
https://github.com/qcad/qcad/blob/maste ... Explode.js
In a standard installation this available in compiled form.
For the dwgexplode functionality:
Yes, but that is not open source.
Probably this makes a selection in an offscreen document and then calls Explode.explodeSelection(di) before saving it as a new file.
Regards,
CVH
Re: QCAD source code learning
I see no reason to ask the same question twice within 47 minutes, with or without a quote.
The QCAD installer doesn't package, it installs a pre-packaged OS dedicated content.
JS files are resources, other resources are and may be written in C++.
Refer to: https://www.qcad.org/doc/qcad/latest/developer/
Where JS file resides can be seen in the QCAD application .. Help .. About .. Scripts.
This is not rocket science.
e.g. Block.js is located in folder .../QCAD/scripts/Block/Block.js where .../QCAD stand for your QCAD installation folder.
Notice the class name and the matching folder name.
Similar as all other here: https://github.com/qcad/qcad/tree/master/scripts
Remind that in a standard installation these are included in compiled form.
One can supersede standard compiled scripts by including them under the scripts folder given this convention.
Or under the scripts folder of your user data location.
If this doesn't answers your question then please rephrase your question with more details.
May I include that all this information is readily available on the QCAD site.
May I also repeat that updating QCAD is the easiest way to include dwgexplode.
Regards,
CVH
I'm having trouble understanding the gist of the question.WildWolfCJ wrote: ↑Mon Oct 23, 2023 3:13 amThe QCAD installer packages JS files into resources, so which file should these resources be placed in?
The QCAD installer doesn't package, it installs a pre-packaged OS dedicated content.
JS files are resources, other resources are and may be written in C++.
Refer to: https://www.qcad.org/doc/qcad/latest/developer/
Where JS file resides can be seen in the QCAD application .. Help .. About .. Scripts.
This is not rocket science.
e.g. Block.js is located in folder .../QCAD/scripts/Block/Block.js where .../QCAD stand for your QCAD installation folder.
Notice the class name and the matching folder name.
Similar as all other here: https://github.com/qcad/qcad/tree/master/scripts
Remind that in a standard installation these are included in compiled form.
One can supersede standard compiled scripts by including them under the scripts folder given this convention.
Or under the scripts folder of your user data location.
If this doesn't answers your question then please rephrase your question with more details.
May I include that all this information is readily available on the QCAD site.
May I also repeat that updating QCAD is the easiest way to include dwgexplode.
Regards,
CVH