Template Nodes Misalignment [SOLVED]

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Template Nodes Misalignment [SOLVED]

Post by Laurie Hartley »

I haven't used the techdraw workbench for quite some time and have hit a couple of snags:-

I had my own custom A3 template which I used previously. I tried to reopen it in the techdraw work bench and found my editable fields were out of alignment. I have inserted both files as well as aan image showing the difference - when I open the template in FreeCAD the editable fields have moved to the right.

(also part view is invisible which is a bit baffling??)
All help appreciated.

Code: Select all

OS: Debian GNU/Linux 10 (buster) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.29182 (Git) AppImage
Build type: Release
Branch: master
Hash: e89ebba7369dca5775fd8aa878a0d3c494e6b2ac
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/Australia (en_AU)
Installed mods: 
  * Help 1.0.3
  * PieMenu
  * A2plus 0.4.56a
  * Assembly4 0.12.3
  * Curves 0.5.2
  * Pyramids-and-Polyhedrons
  * CubeMenu
  * fasteners 0.3.50
  * Manipulator 1.4.9
  * BOLTSFC
  * lattice2 1.0.0
  * dodo
  * ExplodedAssembly
Attachments
Plate Wxample.FCStd
(46.14 KiB) Downloaded 16 times
A3_Landscape - Foursquare Logo.svg
(128.23 KiB) Downloaded 16 times
View in Inkscape.png
View in Inkscape.png (74.5 KiB) Viewed 1081 times
View in FreeCAD.png
View in FreeCAD.png (36.15 KiB) Viewed 1081 times
Last edited by Laurie Hartley on Mon Jul 25, 2022 6:40 am, edited 1 time in total.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Template Nodes Misalignment

Post by wandererfan »

Laurie Hartley wrote: Sat Jul 23, 2022 7:46 am I had my own custom A3 template which I used previously. I tried to reopen it in the techdraw work bench and found my editable fields were out of alignment. I have inserted both files as well as aan image showing the difference - when I open the template in FreeCAD the editable fields have moved to the right.
from TechDraw_Templates:
Svg transform clauses will cause problems in custom templates. See a Stackoverflow discussion on removing transform clauses in SVG files.

The xml:space="preserve" clause sometimes causes problems with text size and positioning. It is best to avoid/remove this clause from your custom template's SVG code.
Your template has both. A version without either is attached.
noPreserveNoTransPlain.png
noPreserveNoTransPlain.png (58.62 KiB) Viewed 1026 times
(also part view is invisible which is a bit baffling??)
You have told the drawing not to update, so it didn't.
doNotUpdate.png
doNotUpdate.png (17.45 KiB) Viewed 1026 times
Attachments
A3_Landscape - Foursquare Logo_nopreserve_noTransform_plain.svg
(125.6 KiB) Downloaded 21 times
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Template Nodes Misalignment

Post by Laurie Hartley »

@wandererfan thank you for taking the time to look at this and your very detailed reply. I am away from my computer today but will make use of your information tomorrow and respond.
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Template Nodes Misalignment

Post by Laurie Hartley »

wandererfan wrote: Sat Jul 23, 2022 1:56 pm
from TechDraw_Templates:
Svg transform clauses will cause problems in custom templates. See a Stackoverflow discussion on removing transform clauses in SVG files.
The xml:space="preserve" clause sometimes causes problems with text size and positioning. It is best to avoid/remove this clause from your custom template's SVG code.
Your template has both. A version without either is attached.
(also part view is invisible which is a bit baffling??)
You have told the drawing not to update, so it didn't.
doNotUpdate.png
[/quote]

I have had a good look through this information wandererfan - the wiki page is very enlightening ;) - as my former work colleagues in IT used to say "Read the !!! Menu" :D

Once again thank you especially for taking the trouble to fix my template up for me.
Cheers
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Template Nodes Misalignment [SOLVED]

Post by Laurie Hartley »

@wandererfan my A3 template is working fine but I decided I need an A4 version so i had a go from scratch with Inkscape. I have tried to follow your advice and watched a couple of YouTube tutorials but I just can’t get the fields to be editable. I must have missed something. Would you mind having a quick look at this one and tell me what I have missed please. I saved it as a “simple” svg.

EDIT: I think I may have found the problem:

I have xmnls:Freecad in the attributes instead of xmlns:freecad. I discovered it on an iPad svg viewer when I was checking my post. I got an error message -

Error on line 18 column 53: namespace prefix on xmnls for freecad on svg is not defined.

I will fix it tomorrow and see if that solves my problem
Attachments
FSQ_A4simple.svg
(26.13 KiB) Downloaded 15 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Template Nodes Misalignment [SOLVED]

Post by wandererfan »

Laurie Hartley wrote: Mon Aug 29, 2022 11:06 am
The XML namespace declaration for FreeCAD was missing the "http://" at the beginning.
Attachments
FSQ_A4simple_http.svg
(26.14 KiB) Downloaded 15 times
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Template Nodes Misalignment [SOLVED]

Post by Laurie Hartley »

wandererfan wrote: Mon Aug 29, 2022 12:36 pm
Laurie Hartley wrote: Mon Aug 29, 2022 11:06 am
The XML namespace declaration for FreeCAD was missing the "http://" at the beginning.
Thanks wandererfan once again.
Post Reply