future features in TechDraw workbench ??

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Ben Jammin wrote: Sun May 24, 2020 9:10 pm I tried three methods which give the same results :
Please post your Svg symbol files.
Ben Jammin
Posts: 23
Joined: Thu Mar 08, 2018 6:19 pm

Re: future features in TechDraw workbench ??

Post by Ben Jammin »

filetage_M5X20_rouge.svg
(5.89 KiB) Downloaded 32 times
filetage_M5X15_rouge.svg
(5.89 KiB) Downloaded 29 times
cercles_rouge.svg
(46.54 KiB) Downloaded 27 times
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Ben Jammin wrote: Mon May 25, 2020 8:22 am
En fin! I think I found it.

How are you adding your Svg files to the document?

If you use the main File>Import>Import Svg as geometry, you'll get something like this:
importSvgAsGeometry.png
importSvgAsGeometry.png (7.89 KiB) Viewed 1031 times
We need to use TechDraw's "Insert Symbol from Svg File" (TechDraw_Symbol). You can see the difference here:
ImportVsInsert.png
ImportVsInsert.png (40.86 KiB) Viewed 1031 times
Let me know if this fixes things for you.
Ben Jammin
Posts: 23
Joined: Thu Mar 08, 2018 6:19 pm

Re: future features in TechDraw workbench ??

Post by Ben Jammin »

I use this button
TechDraw_Symbol.jpg
TechDraw_Symbol.jpg (2.21 KiB) Viewed 1025 times
then I don't understand why I still get those squares around svg symbols when exporting to pdf.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Ben Jammin wrote: Mon May 25, 2020 4:03 pm then I don't understand why I still get those squares around svg symbols when exporting to pdf.
Nor do I. That's the same button I use.

I'll look some more, but I'm running out of ideas.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Ben Jammin wrote: Mon May 25, 2020 4:03 pm
Please try with these symbols and let me know the results.

Thanks.
Attachments
filetage_M5X20_rouge_noBBox.svg
(5.38 KiB) Downloaded 16 times
filetage_M5X15_rouge_noBBox.svg
(5.38 KiB) Downloaded 15 times
cercles_rouge_noBBox.svg
(45.83 KiB) Downloaded 16 times
Ben Jammin
Posts: 23
Joined: Thu Mar 08, 2018 6:19 pm

Re: future features in TechDraw workbench ??

Post by Ben Jammin »

it works !
Sélection_463.jpg
Sélection_463.jpg (182.3 KiB) Viewed 925 times

Then I tried to open your svg file in different software programs to observe what you have done. I noticed there was no image in Gimp, Firfefox and Pinta. Only KoulourPaint was able to "show" drawings. For information, when I open my svg file with those programs there is no problem.
Could you explain me what you have done ?
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Ben Jammin wrote: Tue May 26, 2020 8:55 am Could you explain me what you have done ?
I hand edited the Svg files to remove these "<rect>" elements

Code: Select all

<!-- in  <defs class="ClipPathGroup" -->
   <rect x="0" y="0" width="10000" height="10000"/>
   <rect x="10" y="10" width="9980" height="9980"/>

<!-- in the rest of the file -->
        <rect class="BoundingBox" stroke="none" fill="none" x="2498" y="2498" width="5004" height="5004"/>
        <rect class="BoundingBox" stroke="none" fill="none" x="499" y="6768" width="2734" height="2453"/>
        <rect class="BoundingBox" stroke="none" fill="none" x="499" y="9218" width="462" height="3"/>
        <rect class="BoundingBox" stroke="none" fill="none" x="998" y="998" width="8004" height="8004"/>
        <rect class="BoundingBox" stroke="none" fill="none" x="7829" y="799" width="697" height="1373"/>
        <rect class="BoundingBox" stroke="none" fill="none" x="8523" y="799" width="957" height="3"/>
I don't know enough about Svg to explain all this, but I do know the library we use for processing Svg files only supports the "Svg Tiny" spec. It may be that the original symbols are too advanced for the QtSvg library.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: future features in TechDraw workbench ??

Post by wandererfan »

Inkscape accepts this version, and I think it also solves the extra box problem.
Attachments
cercles_rouge_noBBox_noclip.svg
(46.64 KiB) Downloaded 21 times
Ben Jammin
Posts: 23
Joined: Thu Mar 08, 2018 6:19 pm

Re: future features in TechDraw workbench ??

Post by Ben Jammin »

OK great ! thanks a lot !
Post Reply