Commit Graph

126 Commits

Author SHA1 Message Date
vocx-fc
f23bb43004 Draft: importSVG considers Shape-less objects for export
If the object has a `Shape` it uses its bounding box to enlarge
the page size of the SVG. If it does not have a `Shape`
("Draft Text", "Draft Dimension", other `App::FeaturePython`)
it uses `Draft.get_bbox` to calculate one bounding box
from the viewprovider if possible.
2020-09-30 12:06:48 +02:00
vocx-fc
4b8ebccc7d Draft: improve style and indentation of getSVG function
Also rename `getSVG` to `get_svg`.

Instead of testing `obj.isDerivedFrom('Part::Feature')`
we test for a Shape, `hasattr(obj, 'Shape')`.
This is to support the SVG generation of `App::Links`.
2020-09-03 11:40:50 +02:00
vocx-fc
cc4e00a2fe Draft: add warning message in case the radius is negative 2020-07-07 10:14:04 +02:00
Yorik van Havre
6f2fd04518 Draft: Fixed further regressions 2020-04-21 12:46:08 +02:00
vocx-fc
dfedd10f3d Draft: importSVG.py, FreeCADGui with interface only
Also small fixes in imports and spacing
2020-04-07 18:12:06 +02:00
Bernd Hahnebach
7dd808ac6e Draft: SVG import, encode fix 2020-01-10 12:39:33 +01:00
luz.paz
ae7cb9e300 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
0penBrain
0e96abb891 Improve Inkscape version parsing in SVG import 2019-12-06 14:35:59 -03:00
0penBrain
b809867021 Improve Python compatibility
According remark which I agree with
2019-11-29 14:52:29 +01:00
0penBrain
0a8c73f325 Fix bad 'pt' unit definition
'pt' unit has been defined as 1.25 px while it is 4/3 px (~1.33 px).
Relates to issue #4200
Relates to Syres916@3db7496 (despite bug always existed, even before this commit)
Source : https://oreillymedia.github.io/Using_SVG/guide/units.html
2019-11-29 14:52:29 +01:00
vocx-fc
a66c8a3136 Draft: importSVG, commit 2a139a89 accidentally introduced blady merged code that produced syntax errors; then 537a011a tried to fix it by removing the syntax errors; however a large block of text needs to be removed as well; this was supposed to happen in pull request #2418; however, that pull request no longer merges cleanly so it was withdrawn; this commit finally fixes the problem. 2019-08-14 14:41:58 -03:00
luz.paz
050ac16f1c Fix misc. typos
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller -L od,orign,orginx,orginy`
2019-08-14 14:36:53 -03:00
Yorik van Havre
537a011a1d Draft: Fixed leftover from badly merged commit 2019-08-12 19:46:40 -03:00
Yorik van Havre
2a139a89d4 Merge branch 'misc-typos' of https://github.com/luzpaz/FreeCAD into luzpaz-misc-typos 2019-08-09 18:52:31 -03:00
vocx-fc
3e11cc5969 Draft: importSVG.py, commented out or removed unused variables. Quality of code checked with flake8 --ignore=E226,E266,E401,W503 2019-08-09 18:46:46 -03:00
vocx-fc
2770387422 Draft: importSVG.py, use auxiliary variables to reduce the length of the lines, particualrly the lines with regular expressions which search quantities in strings 2019-08-09 18:46:46 -03:00
vocx-fc
68f380076b Draft: importSVG.py, use auxiliary variables to reduce the length of the lines, and make the code more readable 2019-08-09 18:46:46 -03:00
vocx-fc
b554cb5df9 Draft: importSVG.py, use auxiliary variables to reduce the length of the lines, avoid too many nested parentheses, and make the code more readable 2019-08-09 18:46:46 -03:00
vocx-fc
7e45fd35dd Draft: importSVG.py, test for FreeCAD.GuiUp to confirm that the interface is up; the old check doesn't work; show the Qt dialog only if the interface exist, otherwise assume 96 dpi 2019-08-09 18:46:46 -03:00
vocx-fc
9424c114e6 Draft: importSVG.py, improved spacing, used auxiliary variables to reduce the line length and clean up the code 2019-08-09 18:46:46 -03:00
vocx-fc
79dfd6167c Draft: importSVG.py, improved spacing, used auxiliary variables to reduce the line length and clean up the code 2019-08-09 18:46:46 -03:00
vocx-fc
5c10b7eb57 Draft: importSVG.py, 4 space indentation, 8/8 translateVec, getMatrix 2019-08-09 18:46:46 -03:00
vocx-fc
908ccde34e Draft: importSVG.py, 4 space indentation, 7/? characters, endElement, applyTrans 2019-08-09 18:46:46 -03:00
vocx-fc
b17912f949 Draft: importSVG.py, 4 space indentation, 6/? circles, texts, symbols 2019-08-09 18:46:46 -03:00
vocx-fc
a4cd4bea21 Draft: importSVG.py, 4 space indentation, 5/? lines, polylines, ellipses 2019-08-09 18:46:46 -03:00
vocx-fc
ab420f3f17 Draft: importSVG.py, 4 space indentation, 3/? rects 2019-08-09 18:46:46 -03:00
vocx-fc
64ce130f78 Draft: importSVG.py, 4 space indentation, 3/? paths 2019-08-09 18:46:46 -03:00
vocx-fc
74d6b8f7d3 Draft: importSVG.py, 4 space indentation, 2/? 2019-08-09 18:46:46 -03:00
vocx-fc
81480a6dc4 Draft: importSVG.py, 4 space indentation, 1/? 2019-08-09 18:46:46 -03:00
vocx-fc
cf40dabaa9 Draft: importSVG.py, improved Pythonic style, 4 space indentation instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
696cbeca49 Draft: importSVG.py, improved Pythonic style, 4 space indentation instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
822327ca04 Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
dec7bd91bc Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
59eb93a708 Draft: importSVG.py, improved Pythonic style, spaces and comments 2019-08-09 18:46:46 -03:00
vocx-fc
330746d125 Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
e180d28eae Draft: importSVG.py, fixed indentation that causes an error 2019-08-09 18:46:46 -03:00
vocx-fc
96046379be Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
3d7995da71 Draft: importSVG.py, improved Pythonic style, 4 space indentations 2019-08-09 18:46:46 -03:00
vocx-fc
2068c0346c Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
80ebb72c90 Draft: importSVG.py, improved Pythonic style, spacing around mathematical operators and commas 2019-08-09 18:46:46 -03:00
vocx-fc
c9440078a7 Draft: importSVG.py, improved Pythonic style, 4 spaces instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
023b28803a Draft: importSVG.py, improved Pythonic style, 4 spaces instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
dacb262f6f Draft: importSVG.py, improved Pythonic style, 4 spaces instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
945eee8f86 Draft: importSVG.py, improved Pythonic style, 4 spaces instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
0e2c288137 Draft: importSVG.py, improved Python style, spacing around commas 2019-08-09 18:46:46 -03:00
vocx-fc
a7b305056c Draft: importSVG.py, improved Python style, spacing around commas 2019-08-09 18:46:46 -03:00
vocx-fc
3f653bf9f2 Draft: importSVG.py, improved Python style, spacing and indentation 2019-08-09 18:46:46 -03:00
vocx-fc
227dfc8a32 Draft: importSVG.py, improved docstrings, and comments 2019-08-09 18:46:46 -03:00
vocx-fc
fe409d5d84 Draft: importSVG.py, improved docstrings, and comments in the svgHandler class 2019-08-09 18:46:46 -03:00
vocx-fc
22e0a19f11 Draft: importSVG.py, improved docstrings, and comments in the functions 2019-08-09 18:46:46 -03:00