Commit Graph

1741 Commits

Author SHA1 Message Date
looooo
e8109204a9 importDWG: use libredwg's dwgtodxf converter if available 2020-01-07 07:35:14 -03:00
vocx-fc
fa44c7ae2f Draft: new command for Draft PolarArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-07 07:18:39 -03:00
paullee0
cb1fb09d26 [DraftGeomUtils] isReallyClosed(): Add back support to test if wire is Circle / Ellipse 2020-01-07 07:16:41 -03:00
Bernd Hahnebach
dee8a4075b Draft: workaround for error on document loading 2020-01-05 22:16:15 +01:00
Grey Christoforo
c0ebcbee48 fix brick01 file name 2019-12-29 21:25:14 +01:00
carlopav
d4954837d3 [Draft] Edit, changed endEdit
Before behaviour when user click and when user input coordinates:
1- mousePressed -> endEditing -> numericInput -> update
2- numericInput -> update
Now:
1- mousePressed -> endEditing -> update
2- numericInput -> endEditing -> update
2019-12-28 15:59:26 -03:00
carlopav
510e15cf20 [Draft] Edit Documentation
Documented better the whole tool.
Changed the name of self.call to self. selection_callback for easier code reading.
[Draft] Edit small bugfix

Deleted a bunch of code I PR by error
2019-12-28 15:59:26 -03:00
vocx-fc
f2ed9054f6 Draft: fix CMakeLists to install files in directories 2019-12-28 15:56:02 -03:00
vocx-fc
71154715e7 Draft: add GuiCommandBase class to serve as the parent class of all DraftTools
Prepare auxiliary directories to restructure all graphical tools
for objects, viewproviders, gui commands, and taskpanels.
2019-12-27 11:01:34 -03: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
Zheng, Lei
668e237889 Draft: fix array restore 2019-12-26 15:56:31 -03:00
ageeye
51a23bd770 Use DraftVecUtils.tup only two times. 2019-12-26 15:54:10 -03:00
ageeye
b22c33ab61 Fix the Draft Array polar type. Rotate first global and then object own rotation(spin) of placement. 2019-12-26 15:54:10 -03:00
Syres916
0d17b6faaf [Draft] ImportDXF Bug upgrading from 0.16
See discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=41879
2019-12-26 15:52:30 -03:00
carlopav
6992863638 [Draft] Edit further cleanup
[Draft] Edit fix minor bug
2019-12-26 13:31:06 -03:00
carlopav
df846aaea4 [Draft] Edit _ code cleanup
According to @vocx_fc suggestions, this commit is a first cleanup of the code.
2019-12-26 13:31:06 -03:00
carlopav
99f9aa42f7 [Draft] Edit: improved Draft Circle editing
Now Draft circle editing works also with App::Part
2019-12-26 13:31:06 -03:00
carlopav
4fc3af1390 [Draft] Edit _ improved rectangle editing
Improved rectangle editing to use 3 nodes. Now it works also inside App::Part
2019-12-26 13:31:06 -03:00
carlopav
8dd2b328fe [Draft] Edit: general refactor
Changed names of several methods from set to get, changed the general set of nodes, improved placement calculation to use getGlobalPlacement instead of Placement.
2019-12-26 13:31:06 -03:00
Bernd Hahnebach
3f514b08bd Draft: Layer, more code formating 2019-12-23 09:46:05 +01:00
JeromeL63
6c8875e58a Draft: Layer, code formating 2019-12-23 09:46:05 +01:00
JeromeL63
a0e88dfbac Draft: Layer, Separate Line color and shape color override 2019-12-23 09:46:05 +01:00
Bernd Hahnebach
7a652357fc line endings, better handling in module directory 2019-12-19 22:26:15 +01:00
Bernd Hahnebach
8f7220da51 Draft: add gitattributes file to let git manage file endings and normalize them 2019-12-19 07:51:09 +01:00
Yorik van Havre
597de362c3 Draft: Fixed regression in Rotate tool 2019-12-17 15:30:31 -03:00
vocx-fc
fa73d29d84 Draft: move the TestDraft unit tests to separate modules
This results in better organization of the tests,
avoiding extremely big files.
2019-12-17 15:06:36 -03:00
Yorik van Havre
39ee1654f9 Draft: fixed minor bug 2019-12-12 14:11:59 -03:00
Yorik van Havre
15f72b9167 Draft: fixed regression in rotations 2019-12-11 23:15:05 -03:00
0penBrain
0e96abb891 Improve Inkscape version parsing in SVG import 2019-12-06 14:35:59 -03:00
Zheng, Lei
8e4685fb2e Draft: support linked transform and color override in link array 2019-12-06 14:33:59 -03:00
wmayer
68f998c6db fix broken XML syntax in .ui file 2019-12-06 14:58:48 +01:00
luz.paz
e7ee5fe777 Tooltips: added missing tooltips + refined pre-existing
Some pre-existing tooltips needed to be a compound of lines instead of 1 long one.
Removed bold text from tooltip  
Removed URL from tooltip
2019-12-05 17:07:44 +01:00
Zheng, Lei
8c9d67c2c0 Draft: signal icon change in Layer 2019-12-04 18:59:28 +01:00
Zheng, Lei
d77b569c9c Draft: fix Layer for Python2 2019-12-04 18:59:28 +01:00
luz.paz
379d041664 Fix typos and some trailing whitespace
Found via:  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -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,./src/Doc/FreeCAD.uml
```
2019-12-03 12:22:59 +01: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
5ee4a2e87c Draft: PySide should be available already 2019-11-21 16:35:29 +01:00
vocx-fc
c021ff70de Draft: rename SubelementModify to SubelementHighlight 2019-11-11 18:04:10 -03:00
carlopav
7adca7be31 [Draft] Edit: allow multiple objects editing
Allow editing of multiple objects at once.
2019-11-11 18:00:02 -03:00
carlopav
c9522a6e63 [Draft] Edit: fix bug #4187
Fix bug #4187. When canceling a Dwire editing session with the Esc key or the "close" button Dwire editing breaks.
2019-11-11 17:59:08 -03:00
vocx-fc
0347a4b7a6 Draft: TestDraft, refactor unit tests, 66 in total.
Only 50 test are really performed.

Some tests are not fully implemented, for example, arc_3points, dimension_radial,
shapestring, trim, extend, and stretch. The reason is that there are no proper
functions to test.
In order to have a unit test, basic functions that perform these actions
must be written inside Draft.py. At the moment, these tests just
run a _fake_function() which always returns successfully
and thus the test always passes without problem.

There are also tests for the import and export
of SVG, DXF, DWG, and OCA files. Currently these are also not implemented.
Sample files could be provided in the source tree in order to test basic operations
like opening, import, and export.
A complete unit test would require writing a test for each geometrical element
that could be imported and exported, that is, line, circle, arc, rectangle, etc.

These tests are inspired by the tests in the FEM workbench.
Import of modules is tested, as well as the creation and modification tools.
Eventually, the tests should be migrated to individual modules,
and test files should be provided to serve as reference.
2019-11-05 09:29:25 -03:00
vocx-fc
c9402696f6 Draft: fix double translation in Draft._PointArray 2019-10-25 10:55:19 -03:00
vocx-fc
d57cc0c336 Draft: set the Autoconstraint view property only if the interface is up (FreeCAD.GuiUp) 2019-10-25 10:54:31 -03:00
vocx-fc
210dfbf13a Draft: change DisplayMode only if the interface is up (FreeCAD.GuiUp) 2019-10-25 10:54:31 -03:00
luz.paz
892db1a770 Draft: whitespace fix [skip-ci] 2019-10-25 10:25:31 -03:00
luz.paz
bec8e1befd Draft: use string operator instead of numeric LGTM fix 2019-10-25 10:25:31 -03:00
luz.paz
cf854a52a5 Draft: DraftEdit.py use string operator instead of numeric LGTM fix [skip ci] 2019-10-25 10:25:31 -03:00
luz.paz
6084bbfb1b Draft: Draft.py missing translate() context LGTM fixes [skip ci] 2019-10-25 10:25:31 -03:00
luz.paz
1c981e8f14 Fix typos and misc. formatting [skip ci]
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -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,./src/Doc/FreeCAD.uml`
2019-10-21 16:02:23 -03:00