Commit Graph

253 Commits

Author SHA1 Message Date
luz.paz
97e11fadac Fix typo in templateClassPyExport.py [skip ci] 2019-12-23 16:50:23 +01:00
luz.paz
9e0507c0bc Templates: fix header uniformity
This PR fixes header uniformity across all template files.
2019-12-21 16:12:54 +01:00
wmayer
065356281d Python: change generation of callback functions for class or static methods 2019-12-19 17:55:12 +01:00
luz.paz
cc97145e9d Fix various typos [skip ci]
Fixed 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-17 15:13:48 -03:00
wmayer
7f7a573ace handle nested name spaces in Python generation script 2019-11-20 22:57:58 +01:00
wmayer
76f76f02dd add support of static and class methods in Python wrappers 2019-11-12 23:24:42 +01:00
wmayer
e4a7349947 make PythpnToCPP script Py2 compliant 2019-11-05 21:11:10 +01:00
Huang, Zhaoquan
c00f842a8f Explicitly specify encoding in PythonToCPP.py
On Windows, the python script opens a file with the default ANSI
encoding. This causes UnicodeDecodeError in some region. The encoding
should be set explicitly to match the files.
2019-11-05 09:28:44 -03:00
donovaly
7a0d4dfd7f ThumbnailProvider: update MSVC solution file
Now ThumbnailProvider can be compiled easily using MSVC 2017
2019-11-05 10:15:20 +01:00
wmayer
fa8263ccb4 fix building of thumbnail dll for msvc 2017 or higher 2019-11-04 19:08:54 +01:00
luz.paz
30d2e29e0c LGTM: various fixes for using string operator instead of numeric 2019-10-25 10:33:12 -03:00
wmayer
eff400620c add new CMake macro generate_from_any and extend PythonToCPP script to create source file from any text file 2019-10-14 22:20:59 +02:00
Przemo Firszt
f37f0256ef SubWCRev out ot source build fix by sopwith
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2019-09-21 13:14:46 +02:00
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
812aea7262 Tools: modify exception catch implemention in templateClassPyExport 2019-08-28 17:46:07 +02:00
luz.paz
50a8e3cf22 Fix misc. source comment 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`  
Fix ./src/Tools/fcinfo grammar + whitesapce  
Fix typos in ./src/Mod/Mesh/App/Core/Evaluation.cpp
2019-08-07 20:16:45 -04:00
Yorik van Havre
a1edbb092c Tools: added --gui option to fcinfo tool 2019-07-28 13:59:03 -03:00
Yorik van Havre
d04686026d Tools: Small additional fix in fcinfo tool 2019-07-27 15:59:03 -03:00
Yorik van Havre
42d0282580 Tools: More options to fcinfo tool 2019-07-27 15:48:51 -03:00
luz.paz
c2827611be [Crowdin] string fix + misc. typo and whitespace fixes
* Crowdin link: https://crowdin.com/translate/freecad/6766/en-hu#6576162  
* Tacked on a few typo+whitespace fixes
2019-06-20 18:42:09 +02:00
Yorik van Havre
80725ccfdd Tools: Prefer using Qt5 translation tools over Qt4 2019-06-17 19:32:37 -03:00
Yorik van Havre
b69864f402 Tools: Added AddonManager to translation scripts 2019-06-17 17:26:19 -03:00
wmayer
6c97351d8f Py3: make fcbt scripts working 2019-05-20 19:02:35 +02:00
luz.paz
659d17129a FIx some user and non-user facing 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* -L pard,wallthicknessOn`  
codespell version 1.15.0.dev0
2019-05-12 16:59:26 +02:00
Yorik van Havre
b3bea4746e Tools: small fix in update script 2019-05-10 19:18:52 -03:00
Russell Johnson
3d2a8504c8 Path: Integrate 4th-axis feature to PathPocketShape and 3D Surface ops (#2114)
* PathSurface: Add StepDown support

Add StepDown support for PathSurface operation.
A low-level optimization algorithm is included.

* Update PageOpSurfaceEdit.ui

* PathSurface: Activate CompletionMode input

Update code to use CompletionMode selection from user.

* PathSurfaceGui: Add Completion Mode selection box

Add Completion Mode selection box for user input.

* PathSurface: Use depth_params() for step control

Implemented PathUtils.depth_params() for control of step downs to maintain consistency throughout PathWB.
Suggested by Sliptonic.

* PathSurface: Improve stability - Rev3

Organized code better, improved path optimization algorithm

* PathSurface: Add XY rotational surfacing

Add options to perform 3D surfacing by rotating object around X or Y axis.

* PathSurface: update setup function

Add properties to setup function

* PathSurface: Remove extraneous code

removed commented lines that consume processing time

* PathSurface: Correct nxt.z point assignment

Corrected error in nxt.z value assignment. Was assigning value to pnt.z instead of nxt.z

* PathSurface: Update 4th axis operation

Provided both parallel and perpendicular to axis  scans when performing rotational operation.

* PathSurface: Corrected Y-axis rotation to gcode

Inverted Y-axis scan values in gcode to produce correct result

* PathSurface: Adjust gcode feed rates

Adjust feed rates for axial rotations

* PathSurface: Implement waterline alternative

Used OCL dropcutter scan as data base for python algorithm to extract a waterline.  Waterline also incorporates step down feature.

* PathSurface: Update to 3m-Usable

stability improvements
fixed step on multi-pass 4th axis scans
initiate code to accommodate cut modes: zigzag, line
initiate code to accommodate offset cutter on 4th axis scans to simulate a tilted cutter for ball end mills

* PathSurface: Update 3m-Usable_r1

change instantiated static class attributes from value None, to 0.0

* PathSurface: Revert to 3i-Usable_r1

Further testing needed for 3m-Usable release

* PathSurface: Update to Rev. 3s Usable

fixed step over in rotational scans
start/stop indexes
tilt cutter adaptation for ball end mill
cut pattern: zigzag, line partially implemented
ignore waste option initiated for planar scans
cut mode partially implemented: conventional & climb

* PathSurface: Update to Rev. 3t Usable

Corrected rotational errors
corrected cutter tilt rotation
added "ignore waste" feature for planar surface operation

* Implement 4th-axis feature

Implement 4th-axis feature:
add gcode commands for rotation
re-compute operation heights, to consider rotation radii

* Deleted reference to undeclared variable

* Added missing class attributes/variables

* Added missing class variables/attributes

* Relocate class variables to higher class

* Remove references to undeclared variables

relocated class variables here
delete references to undeclared variables

* Correct rotation direction for normal-to-Y faces

* Remove X oriented 180 degree rotation adjustment

Probable error in FreeCAD gcode renderer, producing incorrect B axis rotation

* Update 4th-axis integration

Address FC error with B axis rotation rendering: user input to override error for visual alignment with model.
Correct pocket depths with Final Depth input enforced.
Add Reverse Direction flag input for reversing direction of pocket: necessary in some use cases.
NOTE: 4th-axis throws errors with Extension Corners feature.  EC feature needs 4th-axis rotation integration when calculating extensions for a particular part feature/face.
General testing needed.

* PathSurface: Add StepDown support

Add StepDown support for PathSurface operation.
A low-level optimization algorithm is included.

* Update PageOpSurfaceEdit.ui

* PathSurface: Activate CompletionMode input

Update code to use CompletionMode selection from user.

* PathSurfaceGui: Add Completion Mode selection box

Add Completion Mode selection box for user input.

* PathSurface: Use depth_params() for step control

Implemented PathUtils.depth_params() for control of step downs to maintain consistency throughout PathWB.
Suggested by Sliptonic.

* PathSurface: Improve stability - Rev3

Organized code better, improved path optimization algorithm

* PathSurface: Add XY rotational surfacing

Add options to perform 3D surfacing by rotating object around X or Y axis.

* PathSurface: update setup function

Add properties to setup function

* PathSurface: Remove extraneous code

removed commented lines that consume processing time

* PathSurface: Correct nxt.z point assignment

Corrected error in nxt.z value assignment. Was assigning value to pnt.z instead of nxt.z

* PathSurface: Update 4th axis operation

Provided both parallel and perpendicular to axis  scans when performing rotational operation.

* PathSurface: Corrected Y-axis rotation to gcode

Inverted Y-axis scan values in gcode to produce correct result

* PathSurface: Adjust gcode feed rates

Adjust feed rates for axial rotations

* PathSurface: Implement waterline alternative

Used OCL dropcutter scan as data base for python algorithm to extract a waterline.  Waterline also incorporates step down feature.

* PathSurface: Update to 3m-Usable

stability improvements
fixed step on multi-pass 4th axis scans
initiate code to accommodate cut modes: zigzag, line
initiate code to accommodate offset cutter on 4th axis scans to simulate a tilted cutter for ball end mills

* PathSurface: Update 3m-Usable_r1

change instantiated static class attributes from value None, to 0.0

* PathSurface: Revert to 3i-Usable_r1

Further testing needed for 3m-Usable release

* PathSurface: Update to Rev. 3s Usable

fixed step over in rotational scans
start/stop indexes
tilt cutter adaptation for ball end mill
cut pattern: zigzag, line partially implemented
ignore waste option initiated for planar scans
cut mode partially implemented: conventional & climb

* PathSurface: Update to Rev. 3t Usable

Corrected rotational errors
corrected cutter tilt rotation
added "ignore waste" feature for planar surface operation

* Implement 4th-axis feature

Implement 4th-axis feature:
add gcode commands for rotation
re-compute operation heights, to consider rotation radii

* Deleted reference to undeclared variable

* Added missing class attributes/variables

* Added missing class variables/attributes

* Relocate class variables to higher class

* Remove references to undeclared variables

relocated class variables here
delete references to undeclared variables

* Remove X oriented 180 degree rotation adjustment

Probable error in FreeCAD gcode renderer, producing incorrect B axis rotation

* Correct rotation direction for normal-to-Y faces

* Update 4th-axis integration

Address FC error with B axis rotation rendering: user input to override error for visual alignment with model.
Correct pocket depths with Final Depth input enforced.
Add Reverse Direction flag input for reversing direction of pocket: necessary in some use cases.
NOTE: 4th-axis throws errors with Extension Corners feature.  EC feature needs 4th-axis rotation integration when calculating extensions for a particular part feature/face.
General testing needed.

* Apply XYZ Model translations to paths; Add rotation axis selection property

* Spelling correction

ln 110

* Geometry list box: shrink height

560 to 400 height

* Update 4th-axis integration

Clean up code
Add comments for visionary elements
Apply axis selection to opHeights rotational calculations

* Update 4th-axis integration

Prepare sorting of vertical faces per axis_angle grouping, just as horizontal faces are sorted, for analysis as connected shapes

* Reset to FreeCAD master current

* Reset to current FreeCAD master version

* Update PathPocketBase.py

* Reset to current FreeCAD master

* Corrected __created__ date

* Convert all print() to PathLog.debug()

* Convert print() to PathLog.debug(); Clean up code

Use PathLog.debug over print() for troubleshooting
Clean up large commented sections of code.

* Convert print() to PathLog.debug(); combine duplicate methods

* Update last modified stamp

* Update last mofified timestamp

Also, removed commented-out code

* Typo corrected: "selt." to "self."

Discovered in https://api.travis-ci.org/v3/job/526456071/log.txt
on 30 April 2019 while searching for errors related to failure of PR #2114

* Restore initialization of self.depthparams

PR is failing Travis CI build test. Previous deletion of this code appears to be the reason.
See report at: https://api.travis-ci.org/v3/job/526492709/log.txt

* Convert tuple sizes from other PathWB ops

* B-axis rotation: render correction

* Revert "rebase to FC master 2019-05-02"

* Correct depthparams opOnDocumentRestored() issue

* Relocate "UseRotation" property from PathAreaOp.py

* Improve meshFromShape() calculation per @sliptonic

faster mesh creation
helps smooth jagged lines in path results

* Part: Make 3rd party libraries into PCH

* PartDesign: 3rdParty to PCH

* Sketcher: PCH

* PartDesign: PCH GUI

* Sketcher: GUI PCH

* Travis windows build (#2110)

Travis windows build

* Travis: enable clcache debug

* disable travis clcache debug

* respect user settings for dialog used in merge-document command

* msbuild verbose and logo

* Travis force wait 60 minutes

* Travis: Use & between vars sourcing and msbuild

* Travis: Move building to external batch script (#2131)

* Travis: Move building to external batch script

* Travis: double quotes to escape route

* Travis: use cmd.exe to call batch file

* Crowdin: fix grammatical error + whitespace 

https://crowdin.com/translate/freecad/569/en-fi#6498705

* Crowdin: experiment to fix crowdin 'ghost' strings

The following translation strings still perpetuate after updating crowdin translations. This commit experiments with removing their source counterparts in the FC .ts files. I'm not sure why they are not rendered obsolete by the normal operations. 
  
* https://crowdin.com/translate/freecad/6766/en-en#6499472  
* https://crowdin.com/translate/freecad/6766/en-en#6573450

* fix for edit tracker draw styles

* deleted commented code

* Travis: filter out

* AddonManager: allow to add custom repositories

* Revert "rebase to FC master 2019-05-02"

* Draft: Fixed Draft text justification

* Arch: Fixed bug in arch windows creation

* Arch: Fixed export of windows colors to IFC

* Draft: Fixed 0.18.1 bug in DXF importer

* Arch: Fixed wrong exported objects in IFC export

* Arch: Fixed export of sites to IFC

* Start: Fixed bad default icon in start page

* Correct depthparams opOnDocumentRestored() issue

* Relocate "UseRotation" property from PathAreaOp.py

* Improve meshFromShape() calculation per @sliptonic

faster mesh creation
helps smooth jagged lines in path results

* Relocate "UseRotation" property in PathAreaOp.py

* Syntax correction

Travis CI python 3.7 build test fails regularly due to syntax error at this point

* Correct rebase issue: PR #2114

* Correct rebase issue: PR #2114

* Correct rebase issue: PR #2114

* Correct rebase issue: PR #2114

* Correct rebase issue: PR #2114

* Correct rebase issue: PR #2114

* path pep8 cleanup

* Multi-face geometry selection repaired

Previous version broke ability to select process multiple faces selected by user in geometry tab in operation task window.
Also performed some syntax cleaning per PEP8 linter

* Update script version info
2019-05-06 21:29:08 -05:00
Mikael Lindqvist
bf6d0235cb When using fcbt.py to generate a python module, use FreeCAD.getUserAppDataDir() rather than FreeCAD.getHomeDir() to specify the module icon 2019-05-06 10:26:10 -03:00
luz.paz
d0beeb74da src/Tools/updatets.py: modernization tweeks
Made CLI output more user-friendly especially since we're transitioning to py3/qt5 and the translation tools have different standards (minor changes).  
+ added Changelog
+ bumped version and added authors
2019-05-06 10:21:58 -03:00
Yorik van Havre
9e1c5c956c Tools: Updated wiki download scripts 2019-03-06 17:11:00 -03:00
Yorik van Havre
7155e40080 Tools: Fixed bug in FreeCAD.ts generation 2019-03-02 19:32:10 -03:00
Yorik van Havre
76d9d655cf Tools: Updated translation scripts to handle only the master (untranslated) ts files 2019-02-08 19:15:56 -02:00
Yorik van Havre
5360dc5e0c Tools: Discard obsolete strings in translation files 2019-02-08 18:32:10 -02:00
luz.paz
cb4a0adf71 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
Yorik van Havre
e2a064228f Tools: Use downloaded zip file from crowdin without arguments 2019-02-01 13:53:38 -02:00
Yorik van Havre
6b1b0ba475 Re-added linux thumbnailer utility that had been washed out together with debian folder 2019-01-12 13:27:31 -02:00
cclauss
823f3372ca flake8 noqa a Python 3 syntax error 2019-01-09 10:31:27 +01:00
cclauss
4d246412d3 Undefined name: to --> 'to' (again)
Just like #1884 but on a different file.
```
./src/Tools/FCFileTools.py:47:50: F821 undefined name 'to'
                print('Error copying', pathFrom, to, pathTo, '--skipped')
                                                 ^
./src/Tools/FCFileTools.py:86:54: F821 undefined name 'to'
                    print('Error copying', pathFrom, to, pathTo, '--skipped')
                                                     ^
```
2019-01-08 11:57:18 -02:00
cclauss
a8a02e881d Drop depencence on six module 2019-01-07 15:51:34 +01:00
cclauss
00d8f39840 Fix file, long, raw_input, and xrange for Python 3 2019-01-07 15:42:37 +01:00
cclauss
2aa53c7316 Fix TabError for Python 3
Was split out of #1885...
```
./src/Tools/ArchiveNameFromVersionHeader.py:41:34: E999 TabError: inconsistent use of tabs and spaces in indentation
	version['FCRepositoryHash'] = SHA
                                 ^
```
2019-01-05 12:20:49 +01:00
wmayer
3e12a59d41 fix several Py3 issues 2019-01-03 18:11:37 +01:00
cclauss
730f314839 Undefined name: to --> 'to'
```
./src/Tools/fcbt/FileTools.py:47:50: F821 undefined name 'to'
                print('Error copying', pathFrom, to, pathTo, '--skipped')
                                                 ^
./src/Tools/fcbt/FileTools.py:86:54: F821 undefined name 'to'
                    print('Error copying', pathFrom, to, pathTo, '--skipped')
                                                     ^
```
2019-01-03 17:38:45 +01:00
Yorik van Havre
d33d352d94 Fixed translations of startpage 2018-12-30 12:38:03 -02:00
Yorik van Havre
13fb9e879d Fixed translation of py commands in Image 2018-12-27 11:14:07 -02:00
Yorik van Havre
3b80b23805 fixed non-executable translation script 2018-12-27 10:55:58 -02:00
Yorik van Havre
9ef3598405 Added support for arabic and vietnamese 2018-12-23 13:56:46 -02:00
Yorik van Havre
d4ace10858 Tools: cosmetic fix in translation scripts 2018-12-18 11:36:46 -02:00
Yorik van Havre
445e9efdb7 Tools: fixed translation of py files in Part 2018-12-10 11:00:53 -02:00
Stian Skjelstad
1f2dc3a366 Remove reuse of variable-name.
customwidgets.cpp: In member function ‘virtual void Gui::AccelLineEdit::keyPressEvent(QKeyEvent*)’:
customwidgets.cpp:287:38: error: no match for ‘operator+’ (operand types are ‘Qt::Modifier’ and ‘QKeySequence’)
             QKeySequence key(Qt::CTRL+key);
                              ~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:38:0,
                 from customwidgets.cpp:24:

g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
2018-12-10 09:17:20 -03:00
looooo
c2be67e812 py3: iteritems -> items, iterkeys -> keys 2018-12-08 11:27:22 -03:00