View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001856 | Drawing | Feature | public | 2014-12-13 00:24 | 2015-01-12 01:09 |
Reporter | triplus | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 14.04 |
Fixed in Version | 0.15 | ||||
Summary | 0001856: Add standard set of blank ISO drawing template sizes | ||||
Description | http://en.wikipedia.org/wiki/Engineering_drawing#Sizes_of_drawings Each of them takes only few lines of code. For example current default A4_Simple.svg drawing template basically only contains size info and DrawingContent tag in it: https://github.com/FreeCAD/FreeCAD_sf_master/blob/master/src/Mod/Drawing/Templates/A4_Simple.svg They should show in Drawing Workbench Drop Down menu therefore naming convention would need to be updated to pick up templates with names: A4_Landscape_blank.svg A4_portrait_blank.svg ... In the future there could be more non-blank drawing templates in FreeCAD by default but having blank ones doesn't hurt. I guess it shouldn't be to hard to add them compared to newbies needing to learn basics of FreeCAD drawing template system for being able to use for example any Portrait standard drawing template size. | ||||
Tags | No tags attached. | ||||
|
What i did is i used A4_Simple.svg drawing template as a reference: https://github.com/FreeCAD/FreeCAD_sf_master/blob/master/src/Mod/Drawing/Templates/A4_Simple.svg And changed dimension to get all standard blank paper sizes: http://en.wikipedia.org/wiki/Engineering_drawing#Sizes_of_drawings I attached the result as Plain_Templates.zip file. Hopefully someday it will be included in FreeCAD by default and insert dropdown menu inside the Drawing Workbench will pick them up by default. |
|
|
|
I'll already add these templates, but the popdown menu of the "Create new page" command isn't changed yet. |
|
Yes AFAIK only drawing templates following this naming convention: AX_Landscape.svg AX_Portrait.svg Where X is a number from 0 to 4 are picked up by Insert new drawing dropdown menu. I don't know if that is administrative or technical policy imposed trying to prevent something. Ideally user would put SVG template in template folder and it would show up in Insert new drawing dropdown menu regardless of the name. From this feature request point of view one of the devs would need to "hardcode" support for this naming convention: AX_Landscape_blank.svg AX_Portrait_blank.svg Where X is a number from 0 to 4 for this templates to be picked up by Insert new drawing dropdown menu by default. |
|
I guess this line determines what drawing templates from drawing templates folder are listed or not inside Insert new drawing dropdown menu: QRegExp rx(QString::fromAscii("(A|B|C|D|E)(\\d)_(Landscape|Portrait).svg")); https://github.com/FreeCAD/FreeCAD_sf_master/blob/a53a239f2f57ecdc54be10f4821a47c4d762e39d/src/Mod/Drawing/Gui/Command.cpp#L130 Some additional code would be needed for "Landscape_blank|Portrait_blank" to become "hardcoded templates". |
|
I am guessing this would do? QRegExp rx(QString::fromAscii("(A|B|C|D|E)(\\d)_(Landscape|Portrait|Landscape_blank|Portrait_blank).svg")); |
|
I would prefer something that picks anything after the orientation (let's say the "flavor"), or nothing, for the templat that have nothing after the orientation... But I cannot seem to come with a decent regex... |
|
I didn't test it and maybe i misunderstood you but something like this? QRegExp rx(QString::fromAscii("(A|B|C|D|E)(\\d)_(Landscape.*\.svg$|Portrait.*\.svg$)")); Maybe here you can find example for what you are after. http://qt-project.org/doc/qt-4.8/qregexp.html#PatternSyntax-enum |
|
OK what i did is i tested suggested regex: QRegExp rx(QString::fromAscii("(A|B|C|D|E)(\\d)_(Landscape.*\.svg$|Portrait.*\.svg$)")); In my tests it works as expected. Drawing template naming convention is extended by possibility of adding custom text: XY_Landscape.svg #Current XY_Landscape_custom.svg #New XY_Portrait.svg #Current XY_Portrait_custom.svg #New X = Paper size A,B,C,D,E Y = Paper size number custom = any text This way for example A4_Portrait.svg and A4_Portrait_blank.svg are picked up by Insert new drawing dropdown menu and A4_Simple.svg or A4_Portrait_blank.svg.bak are not. |
|
What i did is i took already available ISO7200 drawing templates and: - Added unit (font style) for fixing Firefox font rendering issue. - Changed default font from "sans" to "osifont". https://code.google.com/p/osifont/ - Separated singe text element for correct QtSvg font rendering. - Changed formatting of text/tspan elements to remove text indent in QtSvg font rendering. - Fixed Editable Texts support. - Added more intuitive default Editable Texts tags and list order. - Added remaining standard A size drawing templates. - Adjusted working space and title block for each drawing template page size. http://www.freecadweb.org/wiki/index.php?title=Drawing_templates Drawing templates are uploaded as ISO7200.zip. For reference i opened another feature request that could affect added blank set of templates if implemented: http://www.freecadweb.org/tracker/view.php?id=1880 P.S. I still believe default FreeCAD drawing templates should be available to FreeCAD user in a way inserting them would be intuitive. The same for custom added drawing templates. If changed regex is not the way to go i guess some other solution to achieve that goal would be nice. |
|
|
|
Just a side note. I did not go into details of "standards" i just used default ISO7200 drawing template and worked on that. For example if FreeCAD would really want to follow "standards" i guess the only Portrait drawing template would be provided in A4 size. A3-A0 drawing templates would only be provided in Landscape mode. I thought about this and honestly sometimes i do want to be able to do "non-standard" things with FreeCAD and i guess others might do the same. Maybe in the future when DW matures more emphasis is put on default standards compliance and there is nothing wrong with that but additional "non-standard" features as an easy option to achieve is sometimes nice to have that possibility. |
|
I did two small changes and uploaded updated drawing templates as ISO7200_2.zip. 1.) I Changed border line thickness according to drawing template size. http://www.metrication.com/drafting/lines.html Side note: FreeCAD could pick this preset value from drawing template and set default line width accordingly until drawing workbench global preferences for such settings are implemented. http://www.freecadweb.org/tracker/view.php?id=1863 2.) I left standard 20mm left border margin for A4 portrait and A3 landscape drawing templates and other sizes use the same margin for all borders. P.S. I thought about removing non-standard portrait drawing templates (A0, A1, A2 and A3) but decided not to and i left them in zip package. If this templates pack for whatever reason should not be included by default in FreeCAD i suggest to at least update already included set of ISO7200 drawing templates as they do not work as expected without fixes. |
|
|
|
I was thinking i could commit and do some additional changes: - Reduce complexity of titleblock. Who needs complex titleblock will end up making custom one. I would remove for example field 1, 2 , 5, 7, 8 and C. - Making titleblock 185mm wide and have border margin of (min standard) 5mm. - Do some cleaning like translating SVG ids to english language and removing small bits of unneeded code (inkscape related). This would take me few hours for sure and i will only do it if there is remote chance of this getting into FreeCAD. I don't mind if i do the work and it is not accepted after review because of some valid reasons but seeing there is real lack of motivation to provide end users with some basic SVG drawing templates i wonder if there is a point in me doing this and i rather ask up front before doing the work. |
|
I did it in the end anyway regardless of the outcome. Uploaded drawing template package file name is ISO7200_3.zip. 1.) I only left recommended paper sizes: A4 Portrait A3, A2, A1, A0 Landscape The reason i did this is because if FreeCAD user would like to use for example A4 Landscape drawing template then i guess rotating A4 Portrait drawing template (90 degrees) and adding orientation marks on it would be the recommended way to do it! 2.) I removed all Inkscape related code and that makes the templates quite lightweight (code vise) and easy to read and understand for FreeCAD users wanting to make custom drawing templates. I translated SVG ids to English and only left the ones i feel are needed for better understanding of what the code does. 3.) I reduced complexity of titleblock but it still provides all recommended information. There is now a large input block intended for providing supplementary information where anything can be added like legal information, default units, tolerances, company name, material used, weight, logo, number of pieces to be produced... I believe regular FreeCAD users should not be confronted with titleblock not knowing how to fill it up correctly because of its complexity. For more complex scenarios i predict there is almost always a need to make custom drawing templates in the end anyway. 4.) I reintroduced 20mm left border margin for all template sizes and left 10 mm margin for other borders. Doing this allows the FreeCAD user to always get the whole (180 mm) titleblock on front when folding larger paper sizes and 20mm left margin for filing for all paper sizes. Basically this way folding and filing should produces good results! If by any chance this is merged in FreeCAD i would like it to be available in drop down menu. It would be cool if drawing templates GUI text could be translated like the rest of FreeCAD GUI but i don't know if this is possible ATM or not. Cheers. |
|
|
|
Today i decided to put drawing templates to test in real project and noticed small issue. ISO7200 set of templates has A4 under Size: for each template and i changed that accordingly. Uploaded file is ISO7200_final.zip After that i noticed plain set of drawing templates did not play along with insert an orthographic projection DW tool. The reason was plain set of drawing templates did not have working space tag added. I added the working space tag to solve that and cleaned up code a bit. Uploaded file is named Plain_Templates_final.zip I consider the work done and if something else rises up separate issue will most likely be opened to report it. To sum up: Plain_Templates_final.zip fixes insert an orthographic projection tool issue for already added set of plain drawing templates. ISO7200_final.zip is the last and only package for review and decision if it should be included by default in FreeCAD. It contains 5 drawing templates (recommended sizes). It fixes 3 older already included ISO7200 drawing templates that currently don't work good plus it contains two other sizes not yet available in FreeCAD. Decision should be made if the regex should be change or something else should be done to have added drawing templates available in drop down menu. Cheers! |
|
|
|
|
|
I noticed this feature request was implemented. Great! - Finally custom file name text can be added to the SVG drawing template file name and user therefore can have size variations. For example before you could only have A4_Landscape.svg in drawing templates drop down menu and if you renamed your custom drawing template to A4_Landscape.svg it was overwritten at next FreeCAD (PPA) update. - It is nice to see all standard A sizes in drop down menu and grouping by paper size works good for now. I do believe from this feature request point of view two areas could still be improved. - Plain_Templates_final.zip (working space tag added) was not merged to update current set of blank drawing templates therefore orthographic projection tool does not work as good as it could. The difference can be observed by for example opening A0_Landscape_blank.svg available in FreeCAD ATM and A0_Landscape_blank.svg from Plain_Templates_final.zip when using orthographic projection tool. It will work in both cases but i do believe preferred behaviour is the one found with the updated Plain_Templates_final.zip set of blank drawing templates. - I noticed only 3 new drawing templates from ISO7200_final.zip were merged and the existing ones were not updated: A4_Portrait_ISO7200.svg A3_Landscape_ISO7200.svg I do believe from consistency point of view and because of current broken state of mentioned two templates it would make sense to use updated ones from ISO7200_final.zip package. ---- P.S. There is still one drawing template in quite broken state left A4_Landscape_ISO7200 but that probably is something for another bug/feature report/request. I will mentioned it here anyway: From standard point of view probably A4_Portrait_ISO7200 drawing template should be rotated 90 degrees and orientation marks should be added but from user point of view i am not sure if that is what the user expect. Majority of FreeCAD users probably only have A4 printer and would probably like to "mimic" A3_Portrait_ISO7200 drawing template. Having 5 mm border on all edges to maximize A4 working space probably makes sense. Titleblock should probably be the same as for other ISO7200 paper sizes... Any comment on this? What would be the best solution for A4_Landscape_ISO7200 drawing template. |
|
Can you give a list of which SVG file from which .zip file should be used to update the repository, please? It is not very obvious because there are different versions of certain SVG files in several .zip files. |
|
Yes, no problem: 1.) Plain_Templates_final.zip All 10 files should be merged. 2.) ISO7200_final.zip This 2 files should be merged. A4_Portrait_ISO7200.svg A3_Landscape_ISO7200.svg (Remaining 3 files were already added: A0_Landscape_ISO7200.svg A1_Landscape_ISO7200.svg A1_Landscape_ISO7200.svg) 3.) Optional: ISO7200_2.zip AFAIK A4 Landscape is not "recommended size" used for engineering drawings. Nonetheless current FreeCAD default A4_Landscape_ISO7200.svg is broken. A4_Landscape_ISO7200.svg from ISO7200_2.zip will fix it. Titleblock is not changed (old one is used) but this can be done in the future is needed (another bug/feature) request. Cheers! |
FreeCAD: master 3210d0d2 2015-01-10 19:09:58 Details Diff |
+ issue 0001856: Add standard set of blank ISO drawing template sizes |
Affected Issues 0001856 |
|
mod - src/Mod/Drawing/Gui/Command.cpp | Diff File | ||
FreeCAD: master 9cb8471f 2015-01-10 22:21:20 Details Diff |
+ fixes 0001856: Add standard set of blank ISO drawing template sizes |
Affected Issues 0001856 |
|
mod - src/Mod/Drawing/App/CMakeLists.txt | Diff File | ||
FreeCAD: master c6fe925d 2015-01-12 01:56:14 Details Diff |
+ fixes 0001856: Add standard set of blank ISO drawing template sizes |
Affected Issues 0001856 |
|
mod - src/Mod/Drawing/Templates/A0_Landscape_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A0_Portrait_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A1_Landscape_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A1_Portrait_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A2_Landscape_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A2_Portrait_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A3_Landscape_ISO7200.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A3_Landscape_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A3_Portrait_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A4_Landscape_plain.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A4_Portrait_ISO7200.svg | Diff File | ||
mod - src/Mod/Drawing/Templates/A4_Portrait_plain.svg | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-13 00:24 | triplus | New Issue | |
2014-12-13 10:45 | triplus | Note Added: 0005373 | |
2014-12-13 10:45 | triplus | File Added: Plain_Templates.zip | |
2014-12-13 15:33 | yorik | Note Added: 0005374 | |
2014-12-13 16:05 | triplus | Note Added: 0005375 | |
2014-12-13 16:28 | triplus | Note Added: 0005376 | |
2014-12-13 16:29 | triplus | Note Edited: 0005376 | |
2014-12-13 16:35 | triplus | Note Added: 0005377 | |
2014-12-13 17:27 | yorik | Note Added: 0005378 | |
2014-12-13 19:15 | triplus | Note Added: 0005379 | |
2014-12-16 20:52 | triplus | Note Added: 0005397 | |
2014-12-16 20:55 | triplus | Note Edited: 0005397 | |
2014-12-28 18:43 | triplus | Note Added: 0005459 | |
2014-12-28 18:45 | triplus | File Added: ISO7200.zip | |
2014-12-28 19:40 | triplus | Note Added: 0005460 | |
2014-12-29 19:25 | triplus | Note Added: 0005466 | |
2014-12-29 19:25 | triplus | File Added: ISO7200_2.zip | |
2014-12-31 10:29 | triplus | Note Added: 0005472 | |
2015-01-03 01:28 | triplus | Note Added: 0005487 | |
2015-01-03 01:29 | triplus | File Added: ISO7200_3.zip | |
2015-01-05 00:18 | triplus | Note Added: 0005519 | |
2015-01-05 00:19 | triplus | File Added: Plain_Templates_final.zip | |
2015-01-05 00:19 | triplus | File Added: ISO7200_final.zip | |
2015-01-10 18:29 | wmayer | Changeset attached | => FreeCAD Master master 3210d0d2 |
2015-01-10 21:40 | wmayer | Changeset attached | => FreeCAD Master master 9cb8471f |
2015-01-10 21:40 | wmayer | Assigned To | => wmayer |
2015-01-10 21:40 | wmayer | Status | new => closed |
2015-01-10 21:40 | wmayer | Resolution | open => fixed |
2015-01-11 19:58 | triplus | Note Added: 0005615 | |
2015-01-11 19:58 | triplus | Status | closed => feedback |
2015-01-11 19:58 | triplus | Resolution | fixed => reopened |
2015-01-11 21:09 | wmayer | Assigned To | wmayer => |
2015-01-11 22:12 | wmayer | Note Added: 0005620 | |
2015-01-11 23:28 | triplus | Note Added: 0005624 | |
2015-01-11 23:28 | triplus | Status | feedback => new |
2015-01-12 01:01 | wmayer | Status | new => closed |
2015-01-12 01:01 | wmayer | Assigned To | => wmayer |
2015-01-12 01:01 | wmayer | Resolution | reopened => fixed |
2015-01-12 01:01 | wmayer | Fixed in Version | => 0.15 |
2015-01-12 01:09 | wmayer | Changeset attached | => FreeCAD Master master c6fe925d |