Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the titlebock editor in FreeCAD #74

Open
vocx-fc opened this issue Sep 6, 2020 · 3 comments
Open

Using the titlebock editor in FreeCAD #74

vocx-fc opened this issue Sep 6, 2020 · 3 comments

Comments

@vocx-fc
Copy link

vocx-fc commented Sep 6, 2020

Hi, I notice that you have a titleblock editor for your pages. Can you tell me where the source code of this editor is, and whether it would be possible to re-utilize in other applications? Does it depend on many pieces of QElectroTech, or would it be possible to easily use in another program?

I am one of the contributors to https://github.com/FreeCAD/FreeCAD. In this project we have the TechDraw Workbench to generate 2D technical drawings from 3D models. The templates used in this workbench are simple SVG files. Currently there is no easy way to create your own template with a custom titleblock; the process is entirely manual: you create it with something like Inkscape, and optionally edit the XML to have editable fields.

Having a dedicated titleblock and template creator would be something that would bring more user friendliness to TechDraw, and it's a feature often requested in the forum along with automatically filling the information of the titleblock.

I am not good at C++ but I can get in contact with the TechDraw main developer so that he can take a look at this. FreeCAD is programmed in C++ and Qt5, so I think it should be possible to integrate parts of QElectroTech without many problems. In addition, if the source files of the titleblock editor use standard functions from C++ and Qt5, then we may be able to translate those to pure Python, and this would be simpler to integrate.

An issue, however, is the license; FreeCAD uses the LGPL2 license, while QET uses GPL2. In this case, we would not copy the exact files from QET; some changes would be necessary so that the code is not a derivative work (so it can be licensed as LGPL2). An alternative is that the files from QET are re-licensed as LGPL2 so that they can be used directly inside FreeCAD. All source files of the base FreeCAD system must be LGPL2 compatible (also MIT and BSD are fine).

@scorpio810
Copy link
Contributor

Hi vocx-fc,
see /sources/titleblock/
Doxyfile documentation:
https://de-backer.github.io/qelectrotech-source-mirror/html/d4/d32/class_title_block_template_cell_widget.html

@scorpio810
Copy link
Contributor

For license see
https://www.gnu.org/licenses/gpl-faq.en.html#matrix-skip-target

7: LGPLv2.1 gives you permission to relicense the code under any version of the GPL since GPLv2. If you can switch the LGPLed code in this case to using an appropriate version of the GPL instead (as noted in the table), you can make this combination.

@vocx-fc
Copy link
Author

vocx-fc commented Sep 8, 2020

If you can switch the LGPLed code in this case to using an appropriate version of the GPL instead (as noted in the table), you can make this combination.

We know this, but we won't relicense FreeCAD code to GPL2; it must remain LGPL2 as FreeCAD can also be used as a library, so LGPL2 is more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants