Commit Graph

140 Commits

Author SHA1 Message Date
Roy-043
5187bc0a28 Draft: importSVG: handle viewBox in mm (PR10929 fix was not correct) 2023-10-22 17:51:14 +02:00
Roy-043
44e01fac12 Draft: importSVG: handle viewBox in mm
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81696
2023-10-04 11:03:36 +02:00
Roy-043
25960b42f3 Draft: importSVG.py: check and fix path faces
Fixes #10659.
2023-09-12 23:16:41 +02:00
Yorik van Havre
f8f2d4c21c Draft: Skip SVG import DPI dialog if a unit is specified in the file - fixes #6653 (#9533) 2023-05-13 21:18:59 +02:00
Yorik van Havre
58335e7a93 Draft: Support group styles in SVG import - fixes #6900 (#9522)
* Draft: Support group styles in SVG import - fixes #6900

* Draft: SVG importer - apply styleto polylines
2023-05-13 21:01:04 +02:00
0penBrain
c171723a7f Draft: Improve color handling of SVG geometry importer
Handle 'none' color => Default to black (+ print message)
 Handle #RRGGBBAA color => Return alpha (+ print, message)
 Handle 'rgba(float, float, float, float) => Return alpha (+ print message)
 Reorganize function to return ASAP + print warning if unknown color format
2023-04-26 21:00:37 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
mosfet80
e9c1a1600a [Draft] Remove obsolete code related to Drawing WB
* [Draft] Remove obsolete code related to Drawing WB




remove unused elif

* [Draft] Remove obsolete code related to the Drawing WB

* Update preferences-draftvisual.ui

Also remove the template label.

* Update utils.py

Remove reference to "template"

* Remove Draft_Drawing.svg from Draft.qrc

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2023-04-03 16:36:23 +02:00
Roy-043
b5ade2c085 [Draft] Remove obsolete decode code (#9106) 2023-03-28 21:03:33 +02:00
luzpaz
95070bded4 Draft: Fix 'testing inequality to None' syntax (#7275)
* Draft: Fix 'testing inequality to None' syntax 

- Substitute `is not None` for `!= None`
- Trim trailing whitespace on touched files
2022-07-30 00:26:56 +02:00
Chris Hennes
3aa2920e33 Draft: fix SVG rotation around non-origin center
Fixes #6869
2022-05-16 11:10:04 -05:00
Roy
84b3003e8e Draft: Housekeeping: call 'make' functions with new name (4) 2022-02-20 22:31:08 -06:00
Roy-043
6f970b197f Draft: Fix importSVG.py: wrong position for certain ellipses (#5297)
Ellipses and elliptical arcs with a y radius larger than their x radius would end up in the wrong position.
2022-01-06 17:02:41 +01:00
Chris Hennes
26ce308cf1 [DRAFT] Add call to super().__init__ where missing
Identified by LGTM. The toplevel superclass does initialize one data
member to an empty array, but this didn't appear to cause any problems.
2021-02-27 18:21:54 +01:00
vocx-fc
2ce3629443 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
17ff22c721 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
9de3c4143a Draft: add warning message in case the radius is negative 2020-07-07 10:14:04 +02:00
Yorik van Havre
4d90327a97 Draft: Fixed further regressions 2020-04-21 12:46:08 +02:00
vocx-fc
863e1a879e Draft: importSVG.py, FreeCADGui with interface only
Also small fixes in imports and spacing
2020-04-07 18:12:06 +02:00
Bernd Hahnebach
41cf28d1fb Draft: SVG import, encode fix 2020-01-10 12:39:33 +01:00
luz.paz
8cfa85cf18 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
0penBrain
90825d290a Improve Inkscape version parsing in SVG import 2019-12-06 14:35:59 -03:00
0penBrain
47dfe708d9 Improve Python compatibility
According remark which I agree with
2019-11-29 14:52:29 +01:00
0penBrain
82931b4368 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@469e01d (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
bb96ff25df Draft: importSVG, commit 19f87739 accidentally introduced blady merged code that produced syntax errors; then 1ad65467 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
020a66cddf 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
b2a32125bc Draft: Fixed leftover from badly merged commit 2019-08-12 19:46:40 -03:00
Yorik van Havre
59863f4432 Merge branch 'misc-typos' of https://github.com/luzpaz/FreeCAD into luzpaz-misc-typos 2019-08-09 18:52:31 -03:00
vocx-fc
3e48aec60f 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
45bc9a73bb 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
6b4e3b274f 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
a5909173a5 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
5de106b2b3 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
dd8d3fb3c6 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
0d6fba6355 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
00b8ed29b3 Draft: importSVG.py, 4 space indentation, 8/8 translateVec, getMatrix 2019-08-09 18:46:46 -03:00
vocx-fc
c8fa7aebe4 Draft: importSVG.py, 4 space indentation, 7/? characters, endElement, applyTrans 2019-08-09 18:46:46 -03:00
vocx-fc
f747e4a8a6 Draft: importSVG.py, 4 space indentation, 6/? circles, texts, symbols 2019-08-09 18:46:46 -03:00
vocx-fc
5ca4c21e81 Draft: importSVG.py, 4 space indentation, 5/? lines, polylines, ellipses 2019-08-09 18:46:46 -03:00
vocx-fc
a0317cd461 Draft: importSVG.py, 4 space indentation, 3/? rects 2019-08-09 18:46:46 -03:00
vocx-fc
ea8de29daa Draft: importSVG.py, 4 space indentation, 3/? paths 2019-08-09 18:46:46 -03:00
vocx-fc
e67690d161 Draft: importSVG.py, 4 space indentation, 2/? 2019-08-09 18:46:46 -03:00
vocx-fc
3719e0c4a8 Draft: importSVG.py, 4 space indentation, 1/? 2019-08-09 18:46:46 -03:00
vocx-fc
32be13fa5d Draft: importSVG.py, improved Pythonic style, 4 space indentation instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
a1c304a869 Draft: importSVG.py, improved Pythonic style, 4 space indentation instead of 8 2019-08-09 18:46:46 -03:00
vocx-fc
3738ad67f3 Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
c4822fc30b Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
c3fccc0f1e Draft: importSVG.py, improved Pythonic style, spaces and comments 2019-08-09 18:46:46 -03:00
vocx-fc
e6ad9b5c71 Draft: importSVG.py, improved Pythonic style, 4 space indentation 2019-08-09 18:46:46 -03:00
vocx-fc
b28524fd95 Draft: importSVG.py, fixed indentation that causes an error 2019-08-09 18:46:46 -03:00