Commit Graph

997 Commits

Author SHA1 Message Date
Zheng, Lei
c3db1e02ec App: add list/tuple() function to Expression
For easy creation of Python list/tuple using expression. Range
expression can now be expanded into list or tuple.
2019-09-28 15:30:55 +02:00
Zheng, Lei
38c47d6e95 Expression: split Expression.h to ExpressionParser.h
Split Expression details into a separate header to reduce recompilation
time on changes.
2019-09-28 15:30:41 +02:00
Zheng, Lei
8cbdc3ad5d App: use Python number protocol in Expression
This adds support to do mul/div with matrix and vector, as well as
Python formated string with operator %.
2019-09-28 15:30:34 +02:00
luz.paz
dae18259e0 src/App/Application: Improve FC CLI help output
Help the user find more details info by directing them to the exact wiki page needed instead of the front page of the official site.
2019-09-28 12:46:14 +02:00
wmayer
3f8ec4b9e9 do not use an int but an enum to handle different modes 2019-09-27 22:00:25 +02:00
Zheng, Lei
d1b5e07eee App: improve exception handling in FeaturePython 2019-09-27 18:02:20 +02:00
Zheng, Lei
d3dea0178d App/Gui: unify NotImplementedError handling in python features
Recognize NotImplementedError as an indication to call the C++
implementation.
2019-09-27 18:01:54 +02:00
lorenz
e9e1c89929 add missing include to Precompiled.h 2019-09-25 20:06:36 +02:00
wandererfan
375fe1bd48 [App][Gui]Add Filter for PropertyFile in PropertyEditor 2019-09-20 07:56:52 -04:00
wmayer
d4bac9e259 fix some MSVC warnings 2019-09-19 17:55:10 +02:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
1cdd2d166f Add virtual method allowOverrideViewProviderName to DocumentObject to indicate if a DocumentObject's view provider type can be overriden.
For most object types this is not allowed to avoid to create incompatible combinations via Python or manipulated project files and possibly provoke crashes.

For more details see also: https://forum.freecadweb.org/viewtopic.php?f=10&t=38970&p=333951#p333951
2019-09-14 00:52:09 +02:00
wmayer
7c83a2d05d fix regression caused by commit 469e3b5bf 2019-09-13 13:08:48 +02:00
Zheng, Lei
f1b569621a Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
Zheng, Lei
99311c25a8 App: improve document::readObjects() 2019-09-10 14:17:06 +02:00
luz.paz
5807e0b531 Fix typos, grammar, and some whitespace issues
Found via `codespell -q 2 -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-09-07 11:58:38 -04:00
wmayer
3be856db27 minor change 2019-09-07 17:08:40 +02:00
Zheng, Lei
d4a83a9b52 App: check active document before revert in Document::restore() 2019-09-07 17:00:25 +02:00
Zheng, Lei
f90afabac4 App: call setActiveDocument when reverting document 2019-09-07 17:00:03 +02:00
wmayer
994578d8af encode keys of PropertyMap when saving as XML 2019-09-05 18:51:35 +02:00
Dietmar Czekay
65ccdee9d8 add VacuumPermittivity and fix adding user values to material editor in FEM 2019-09-04 11:29:09 -03:00
wmayer
662eb5c092 remove unused variable 2019-09-03 17:21:16 +02:00
Jean-Marie Verdun
9a007cfbc4 Fix copyright 2019-09-03 17:21:11 +02:00
Jean-Marie Verdun
dda591ec6e Fix some copyright issues reported by luzpaz
Fix some typos reported by kkremitzi
Remove resetTouched which was dead code following update on Document management
2019-09-03 17:21:08 +02:00
Jean-Marie Verdun
a2e21f79f2 Add initial version of the Cloud workbench 2019-09-03 17:21:05 +02:00
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
611159b000 App: remove unused variable 2019-08-30 15:52:18 +02:00
Zheng, Lei
3c242e05f6 App: ignore unit in PropertyBool/Float/Integer
In other word, those property now accept expression result with a unit,
by ignoring it.
2019-08-30 15:50:26 +02:00
Zheng, Lei
05155daf82 App: improve exception message in PropertyExpressionEngine 2019-08-30 15:50:13 +02:00
Zheng, Lei
880d90e4f9 App: fix virtual function shadowing in PropertyXLinkSub 2019-08-30 15:49:41 +02:00
Zheng, Lei
a7a34ab983 App: more sanity check in PropertyContainerPy 2019-08-30 15:46:47 +02:00
Zheng, Lei
deede02ed8 App: more sanity check in ObjectIdentifier 2019-08-30 15:46:33 +02:00
Zheng, Lei
8d5f3c7e1d App: do not return null Shape in PropertyContainerPy 2019-08-30 15:45:58 +02:00
Zheng, Lei
d967e86fcc App: fix Python object leak in ObjectIdentifier 2019-08-30 15:45:44 +02:00
Zheng, Lei
bfca168ab7 App: fix crash on accessing non-existent attribute in ObjectIdentifier 2019-08-30 15:45:28 +02:00
Zheng, Lei
52d30b4053 App: fix Document::_abortTransaction() 2019-08-30 14:55:49 +02:00
Zheng, Lei
58a62288a0 App: allow starting '_' in an expression identifier
It's a signle line change in the flex source, bug a big change in the
generated source.
2019-08-30 14:47:53 +02:00
Zheng, Lei
495234f753 App: fix LinkBaseExtension::extensionGetSubObject()
This fix obtain shape from a link to a sub element
2019-08-30 14:42:19 +02:00
Zheng, Lei
0e115be0ec App: make recompute aborting optional 2019-08-30 14:41:46 +02:00
Zheng, Lei
15b61112b1 App: prevent recursive abort/commitTransaction 2019-08-30 14:35:23 +02:00
wmayer
8e582d68c4 use GNU directory structure on non-Windows systems 2019-08-22 16:57:11 +02:00
wmayer
05f1680360 work around to fix build failure with clang 3.4 2019-08-20 14:24:27 +02:00
wmayer
53e597a5d6 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-private-field
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:51:51 +02:00
wmayer
1c234373d6 fix MSVC compiler warnings 2019-08-17 19:35:21 +02:00
Zheng, Lei
b59e4ad9a5 App: do not throw on recursive recompute 2019-08-17 15:32:51 +02:00
Zheng, Lei
d18d489599 App: fix rollback of dynamic property changes 2019-08-17 15:32:51 +02:00
Zheng, Lei
f36714974a Command: disable auto transaction if triggering editing
Each command will create an App::AutoTransaction to auto create and
commit a transaction for proper undo/redo. But if the command starts
editing, the current transaction may be required to out live the current
command.

Note that the command can only detect editing if the code calls
Gui::Document::setEdit(). There are objects that starts editing by
calling its own ViewProvider::setEdit(), e.g. various TechDraw
ViewProviders. In this case, to avoid auto committing, one can call
App::Application::setActiveTransaction() with the second argument set to
true, or call App::AutoTransaction::setEnable(false).
2019-08-17 15:32:51 +02:00
Zheng, Lei
f13ee08c3f App: fix xml indentation in PropertyContainer::Save 2019-08-17 15:32:50 +02:00
Zheng, Lei
d7dd720eaf App: fix property type matching in transaction 2019-08-17 15:32:50 +02:00
Zheng, Lei
a4028b0bd5 App: fix Python object leak in PropertyListT
* Fix Python object leak in _setPyObject()
* Add support for Python iterables
* Minor performance improvement on setPyValues()
2019-08-17 15:32:49 +02:00