Testing TechDraw

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: Testing TechDraw

Post by Mongrel_Shark »

yorik wrote: Sat Aug 19, 2017 2:32 pm
Both Drawing and TechDraw use the same system to make texts editable:

https://www.freecadweb.org/wiki/Drawing_Template_HowTo

Thats odd. Then why does the template I made with that guide not have any editable text? It works in drawing or drawing dimensioning, but not in tech draw.

Could it be that the text is a small size and the green dot is not visable?

I can't post the full file as the boss could get upset, but I can provide a few screen shots of the code I changed in the svg. Took me a whole weekend and 8 revisions to get it working last time. Has about 40 editable fields...

Here is the top of the .svg text
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_070.png
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_070.png (195.93 KiB) Viewed 2069 times
and a couple of freecad editable bits.
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_067.png
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_067.png (188.35 KiB) Viewed 2069 times
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_068.png
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_068.png (191.76 KiB) Viewed 2069 times

And the end of the document.
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_069.png
.Plan Template fre8.svg (~-CAD-Ozone1) - gedit_069.png (188.18 KiB) Viewed 2069 times

It works in drawing but not in tech draw....

Hopefully I did something obvious and someone can help me fix it. :?:
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: Testing TechDraw

Post by Mongrel_Shark »

I just realised there are dedicated Tech draw templates and the editable text parts are very very different.

Its all at the very bottom of the text file, and based on location coordinates. So much easier to deal with. Yay!!

I'm going to have a crack at my template, Will probably break stuff. Help would be awesome. (Help with the template that is. I got the breaking stuff part well covered)
A3_Landscape_ISO7200TD.svg (-usr-share-freecad-daily-Mod-TechDraw-Templates) - gedit_071.png
A3_Landscape_ISO7200TD.svg (-usr-share-freecad-daily-Mod-TechDraw-Templates) - gedit_071.png (241.02 KiB) Viewed 2067 times
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Testing TechDraw

Post by thschrader »

Mongrel_Shark wrote: Sat Aug 19, 2017 10:21 pm I just realised there are dedicated Tech draw templates...
As yorik said: you can use inkscape to edit the templates.
regards thomas
A3_Landscape_shark.svg
(78.44 KiB) Downloaded 234 times
shark_engineering.FCStd
(71.23 KiB) Downloaded 70 times
new_design.JPG
new_design.JPG (48.63 KiB) Viewed 2045 times
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw

Post by wandererfan »

very simple template with EditableTexts attached.
Attachments
A4_Landscape_EditableSample.svg
(2.41 KiB) Downloaded 196 times
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: Testing TechDraw

Post by Mongrel_Shark »

Thanks for the help guys.
Seems the part I was missing is a new define required for Tech Draw.
<g id="FCText"> needs to be in the file somewhere above the freecad editable stuff.

Like this (I think)
</g>
<g id="FCText">
<path
inkscape:connector-curvature="0"
id="path3204"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 1171.0317,322.55859 7.4567,0 0,9.01901 -7.4567,0 0,-9.01901 z" /><path
inkscape:connector-curvature="0"
id="path3206"
style="fill:none;stroke:#000000;stroke-width:0.2174685;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none"
d="m 1171.0317,322.55859 7.4567,0 0,9.01901 -7.4567,0 0,-9.01901 z" /><g
transform="matrix(0.30460952,0,0,0.30184094,935.7755,-9.2877446)"
id="g3208"><text
id="text3210"
transform="matrix(0,0.9999,1,0,787.32,1108.29)"
freecad:editable="1.0"><tspan
id="tspan3212"
sodipodi:role="line"
y="0"
x="0 4.8020372 7.1980319"
style="font-size:9.60000038px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:TT19At00;-inkscape-font-specification:TT19At00">1.0</tspan></text>

My document is still really messed up.
I think too many transitions between text editor, inkscape and freecad has really messed up the X-Y data
For eg

<text
freecad:editable="5"
xml:space="preserve"
style="font-size:2.39726758px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
x="215.1348"
y="1156.6674"
id="text14575"
sodipodi:linespacing="125%"
transform="matrix(0,1.0006203,0.99938008,0,0,0)"><tspan
sodipodi:role="line"
id="tspan14577"
x="215.1348"
y="1156.6674">5</tspan></text>
<text
freecad:editable="56"
xml:space="preserve"
style="font-size:2.39726758px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
x="215.1348"
y="1152.5615"
id="text14579"
sodipodi:linespacing="125%"
transform="matrix(0,1.0006203,0.99938008,0,0,0)"><tspan
sodipodi:role="line"
id="tspan14581"
x="215.1348"
y="1152.5615">56</tspan></text>
<text
xml:space="preserve"
style="font-size:2.39726734px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
x="232.89124"
y="1168.7782"
id="text14591"
sodipodi:linespacing="125%"
transform="matrix(0,1.0006203,0.99938008,0,0,0)"><tspan
sodipodi:role="line"
id="tspan14690"
x="232.89124"
y="1168.7782">Scale </tspan></text>


Looks at first like the decimal on the Y lines is one spot to the right of where it should be, but changing that doesn't put the fields in the right place. I think I have broken the document beyond repair and need to start from scratch. :cry:

Here is another section...

<text
transform="matrix(0,0.9954039,1.0046173,0,0,0)"
id="text3140"
x="291.77136"
y="1146.9475"
style="font-size:3.63851404px"
freecad:editable="Client name"><tspan
style="font-size:3.49297333px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:TT19At00;-inkscape-font-specification:TT19At00"
x="291.77136 293.556 295.15546 296.97623 298.8313 299.59521 301.41602 303.23416 305.08878 305.88763 306.65152 309.0163 309.81659 311.41602 313.20041"
y="1146.9475"
sodipodi:role="line"
id="tspan3142">Client name</tspan></text>



On the bright side I worked out how to make a template another way. With almost no text editing of the .svg. Will make a new thread on that soon.
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw

Post by wandererfan »

transform="matrix(0,1.0006203,0.99938008,0,0,0)">
TechDraw Templates don't understand transforms for editable text yet. You need to use the absolute coordinates for X,Y location.

Transform for lines/graphics/uneditable text is fine.
Post Reply