Drawing Template Sets And Their Implementation In FreeCAD

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
j-dowsett
Posts: 210
Joined: Wed Sep 07, 2011 9:37 am

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by j-dowsett »

Ok, so seems that some way of having additional info available, beyond just an additional part of the filename, would be desirable?

A
quick61 wrote:Now that you mention it, doing it that way could make it feel laggy, especially when the menu was full of templates. How about then having a radio button, check box, clickable field, whatever that would grab the metadata on demand. That way, none of the info is gathered until it is requested. Would that be workable?
B
ulrich1a wrote:I like the idea of the metadata. Could the scanning of all available templates not be done in a new preferences dialog?
These ideas seem to work, think they work something like:
A - Open the dialog for 'All templates', decide that you want to see additional information so click a button which parses the available templates and fills in the extra column.

B - Go into the preferences, click a button, and it parses available templates looking for additional information, compiles all of this into a text file which is then used to populate the additional info for templates each time the 'All templates' dialog is opened.

Of course a combination of these could be applied, have the button that causes parsing of the files in the 'All templates' dialog (A) but rather than just populating the column there and then have it also save the info into a text file ready for next time (B)

quick61 wrote:Remembering that somewhere in there we still need to edit in the one or 2 characters that are used to generate the icons on the fly. If that feature is going to be kept, I I'd vote for it to be.
I don't see why this shouldn't be kept. I imagine it'd just remain as 'A4' or 'A', whatever denotes the paper size. I've not really used this much (I've hardly ever actually created drawings for use...), I think it doesn't remember between sessions which was the last paper size used? It always shows A3 for me (upon restarting FreeCAD) even if I used A4 last? If we end up with an MRU list then I imagine this should simply be the last used regardless of restarting FreeCAD?

ulrich1a wrote:There should also be a field for a custom template folder. When FreeCAD will be installed from a Distribution, the folder for the supplied templates may not be writable for every one.
This makes sense, have it look for templates in both /Mod/Drawing/Templates and in a second location specified in preferences. Just in case of duplicates, maybe have hint text in the All Templates dialog display the full path of a template (or a final column on the right).

Putting aside a most-recent list. If the dropdown menu were to list all templates of a given standard... would that be fixed in a preference (ie, always show me ISO series regardless of what I used last), or should it show the standard that corresponds to whichever template was used last? Underneath these both equate to the same thing, a preference specifying which standard to show, but it's just a question of whether this updates automatically if a different standard is selected or if it should require the user to actively go into preferences to change this. I suppose if this was a 'fixed' preference then it would be possible to incorporate someway of changing it into the All Templates dialog ('Set as default template series' checkbox or something).
ulrich1a wrote:There could also be a field for the users name. So every time a new drawing is created, the users name could be automatically filled in? I understand this will be an additional task. But this is, what comes in my mind.
Do you mean in the 'All Templates' dialog? Or in the preferences? I think maybe this falls into Luke's territory, I'm not sure but possibly he's thinking about things like this with his new drawing workbench...
quick61 wrote:As to the actual naming scheme, simple is always better. I'm thinking something like SeriesInfo_Size_Orientation.svg. Where SeriesInfo could be anything and would show in the All templates.. Additional info view for easy identification . Size would be 1 or 2 characters that would be displayed on the icons in the short list, along with landscape / portrait as they do now.
Sorry, I hadn't read this properly the first time, I see we were saying essentially the same thing. However I think it's simplest if anything beyond size and orientation in the name goes at the end. Simply for extracting info from the filename, I think in code it'd be nicer to work from the beginning... 1st bit = size, 2nd bit = orientation, optional 3rd bit...

A4_Portrait.svg
A4_Portrait_modified.svg

whereas if the maybe-some-more was at the beginning you might have

A4_Portrait.svg
modified_A4_Portrait.svg
j-dowsett
Posts: 210
Joined: Wed Sep 07, 2011 9:37 am

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by j-dowsett »

Also.
If we had an MRU list in the dropdown menu, do we also want it to show the full set of a given standard?

ie

A4 Landscape
A Portrait
ZZ Landscape
A3 Landscape
----------------
A4 Landscape
A4 Portrait
A3 Landscape
A3 Portrait
A2 Landscape
A2 Portrait
----------------
All templates...

or just the MRU list + All templates... ?
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by mario52 »

Hi
jmaustpc wrote: Thanks Mario

That explains a lot. I am pretty sure that means that there is nothing wrong with the templates, it is just a limitation of your system because of a combination of your FreeCAD and QT versions and the fact you are on Windows. That version of QT on windows had many limitations with displaying SVGs. We had many problems with icons with that version of QT on Windows, it works better on Linux.

There are improvements in Drawing WB in 0.14Dev, some are being worked on right now, some are already there.

So in summary Mario's problem...I believe... are just limitations due to older versions of software.

Jim
I found the real reason for the non-display line
on the picture you can see displayed lines and missing lines on the convention representation
Here is the XML for the lines that are displayed (all displayed lines are in this format)

Code: Select all

    <path
       d="M 257.5 269 L 257.5 258"
       id="path136" />
    <path
       d="M 243.5 265.5 L 243.5 261.5"
       id="path138" />
    <path
       d="M 243.5 261.5 L 251.5 259.5"
       id="path140" />
    <path
       d="M 251.5 259.5 L 251.5 267.5"
       id="path142" />
    <path
       d="M 251.5 267.5 L 243.5 265.5"
       id="path144" />
Here is the XML for the 5 lines that are not displayed
SVG_not_lines_02 &quot;connector-curvature&quot;
SVG_not_lines_02 "connector-curvature"
SVG_not_lines_02.png (26.55 KiB) Viewed 2237 times

Code: Select all

    <path
       d="m 247.6223,269 0,-11"
       id="path136"
       inkscape:connector-curvature="0"
       style="stroke-width:0.34999999" />
    <path
       d="m 253.3777,265.5 0,-4"
       id="path138"
       inkscape:connector-curvature="0"
       style="stroke-width:0.34999999" />
    <path
       d="m 253.3777,261.5 8,-2"
       id="path140"
       inkscape:connector-curvature="0"
       style="stroke-width:0.34999999" />
    <path
       d="m 261.3777,259.5 0,8"
       id="path142"
       inkscape:connector-curvature="0"
       style="stroke-width:0.34999999" />
    <path
       d="m 261.3777,267.5 -8,-2"
       id="path144"
       inkscape:connector-curvature="0"
       style="stroke-width:0.34999999" />
I checked the drawing of quick61 that lines do not appear in me are made like this
How to work in Inkscape for not having any "connector-curvature"
quick61 wrote:I have started on writing up a tutorial for making templates which will include how and where to apply all the appropriate tags to make them fully usable in FreeCAD. Any help, advice, contributions, you or anyone would like to make is most welcome. When it gets close to the time j-dowsett is ready to make a pull request, I'll get the tutorial up on the Wiki with V0.1 and we can take it from there.
hi quick61 There is this page Svg_Namespace
PS:It would be nice to it also formats A0, A1, A2

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by quick61 »

j-dowsett wrote:Of course a combination of these could be applied, have the button that causes parsing of the files in the 'All templates' dialog (A) but rather than just populating the column there and then have it also save the info into a text file ready for next time (B)
If that's workable, then yes, the hybrid seems to be a good way to go.
j-dowsett wrote:I don't see why this shouldn't be kept. I imagine it'd just remain as 'A4' or 'A', whatever denotes the paper size. I've not really used this much (I've hardly ever actually created drawings for use...), I think it doesn't remember between sessions which was the last paper size used? It always shows A3 for me (upon restarting FreeCAD) even if I used A4 last? If we end up with an MRU list then I imagine this should simply be the last used regardless of restarting FreeCAD?
That would be handy. For me, being in the US, I am always having to dig out my us Letter or US Legal templates to make a print as those 2 sizes are what my printer will handle here at home and it's usually the Arch E used when I go to the office store for larger prints.
j-dowsett wrote:Sorry, I hadn't read this properly the first time, I see we were saying essentially the same thing. However I think it's simplest if anything beyond size and orientation in the name goes at the end. Simply for extracting info from the filename, I think in code it'd be nicer to work from the beginning... 1st bit = size, 2nd bit = orientation, optional 3rd bit...

A4_Portrait.svg
A4_Portrait_modified.svg

whereas if the maybe-some-more was at the beginning you might have

A4_Portrait.svg
modified_A4_Portrait.svg
Which ever way works best for the code. That would be the first important thing. Those of us doing templates can follow whatever rules get defined. That will be the easy part, and not break what currently exist.
j-dowsett wrote:Also.
If we had an MRU list in the dropdown menu, do we also want it to show the full set of a given standard?
Now that's a tough one. :? Both have merit. Good question, do we want to keep it simple or make it more convenient?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by jmaustpc »

quick61 wrote: j-dowsett wrote:Also.
If we had an MRU list in the dropdown menu, do we also want it to show the full set of a given standard?



Now that's a tough one. :? Both have merit. Good question, do we want to keep it simple or make it more convenient?

Mark
No, not the full standard, because the idea would be you could easily switch between standards. My thoughts are that it should just be whatever you most commonly, or recently, used. For example you may use one a4 and another US Letter template often.

I have some more ideas, some of which conflict with each other, but I want to think about it for a day or so...I'll come back in a day or so.
j-dowsett
Posts: 210
Joined: Wed Sep 07, 2011 9:37 am

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by j-dowsett »

jmaustpc wrote:No, not the full standard, because the idea would be you could easily switch between standards. My thoughts are that it should just be whatever you most commonly, or recently, used. For example you may use one a4 and another US Letter template often.

I have some more ideas, some of which conflict with each other, but I want to think about it for a day or so...I'll come back in a day or so.
That makes sense. I don't think it would be particularly problematic to change it anyway. I've started playing, but only to familiarise myself with bits of the code and how it works at the moment. I'll be interested to hear what your latest thoughts are

One thing I've realised, I think everyone is refering to getting icons in the dropdown menu itself? Is there a preference somewhere (I couldn't see it...) to have icons in the menus, as I don't have any anywhere?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by jmaustpc »

j-dowsett wrote:One thing I've realised, I think everyone is refering to getting icons in the dropdown menu itself? Is there a preference somewhere (I couldn't see it...) to have icons in the menus, as I don't have any anywhere?
Doesn't your look like this?
drawing_drop_down_icons.png
drawing_drop_down_icons.png (50.54 KiB) Viewed 2176 times

the menu "Drawing"
drawing_drop_down_icons1.png
drawing_drop_down_icons1.png (44.4 KiB) Viewed 2176 times
the Part workbench "Part" menu
Part_menu_icons.png
Part_menu_icons.png (70.85 KiB) Viewed 2176 times
Jim

OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3012 (Git)
Branch: master
Hash: ca3b87a719825ad4065b47ade7b472e1f67dd134
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by quick61 »

Not only are the template size icons in the pulldown, they are also in the Drawing > Insert new drawing popout as well.
Drawing_menu.png
Drawing_menu.png (69.19 KiB) Viewed 2175 times

Mark

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3012 (Git) (which now includes the sweet new Drawing Workbench) :geek:
Branch: master
Hash: ca3b87a719825ad4065b47ade7b472e1f67dd134
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by jriegel »

Looks cool!

Move it to PullRequest if you feel its ready!
Stop whining - start coding!
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Drawing Template Sets And Their Implementation In FreeCA

Post by quick61 »

mario52 wrote:I checked the drawing of quick61 that lines do not appear in me are made like this
How to work in Inkscape for not having any "connector-curvature"
mario, I'v been looking at other SVG editors and the one that at first looked promising was Carbon, part of KDE office. It writes the .svg code in a basic way but the program has problems... Sad, but I'm finding it a bit unreliable/buggy. I'm going back to look at what Inkscape does when saving in plain svg format. I'll give it a good look over tomorrow.
mario52 wrote:hi quick61 There is this page Svg_Namespace
I added a link back on that page to the Drawing templates page. See my post here

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Post Reply