wmayer
1c8d0d1d84
Base: [skip ci] support of __round__ of QuantityPy
2020-02-16 21:50:06 +01:00
donovaly
66354b3c58
add units Gauss, Weber and Oersted
2020-01-07 07:36:22 -03:00
donovaly
b4f9e3c88b
Quantity.cpp: fix spacing
2020-01-05 15:00:46 +01:00
donovaly
05dadb4c75
add the units Ohm and Siemens
2020-01-05 15:00:46 +01:00
wmayer
ba95cc73ad
Base: [skip ci] do not normalize axis when changing angle of a Rotation object
2019-12-28 14:04:02 +01:00
luz.paz
6f11ed298a
src/Base: [skip ci] fix header uniformity
...
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
donovaly
ce56205ed0
more fixes for the UnitsCalculator
...
- we must read out the unit system description UTF8 to get the characters ² and ³
- update unit system description according to today's unit "cft" addition
- don't hardcode the unit system descriptions in the .ui file
- add acceleration to imperial schema
2019-12-24 13:31:13 +01:00
donovaly
6aeb0910b8
cosmetics to keep the overview
2019-12-24 13:31:00 +01:00
donovaly
cd8b63028c
missing parts from from commit d9d903faea
...
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
wmayer
d9d903faea
Units: extend parser to accept mph, sqft and cft. Fix a bug in imperial civil schema
2019-12-23 19:55:21 +01:00
donovaly
9c707479a6
also add unit THz as requested
2019-12-23 16:49:45 +01:00
donovaly
63bc9c5683
add units Mpsi, cal and kcal
...
- also ass missing parts from commit d7ca604c
2019-12-23 16:49:45 +01:00
wmayer
98dfe7c387
add posibility to use a unit schema other then the system schema to represent a quantity
2019-12-21 13:35:14 +01:00
wmayer
04b54cd6a5
Base: [skip ci] replace raw pointers of UnitsSchema with unique_ptr
2019-12-21 10:45:22 +01:00
wmayer
4bcb43ebd2
Base: [skip ci] make UnitSystem an enum class
2019-12-21 10:10:19 +01:00
wmayer
43e5933e3d
Base: [skip ci] handle acceleration and force m/s^2
2019-12-20 16:53:26 +01:00
wmayer
228f89638d
Python: change generation of callback functions for class or static methods
2019-12-19 17:55:12 +01:00
wmayer
df25aed148
Base: [skip ci] fix block comment in lexer file
2019-12-19 17:08:11 +01:00
donovaly
2949afb55b
add mJ and kW
...
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
317dd26a7d
correct Unit::Work conversions
...
- also add conversions for Unit::Mass and Unit::Power
2019-12-19 13:31:12 +01:00
donovaly
f5f0728a9f
take care of the UnitsCalculator
...
- also fix uF and uH
- add conversion routine for C and T
2019-12-19 13:31:12 +01:00
donovaly
1ffaaf100a
generate QuantityLexer.c
...
- also set proper unit conversions
- fix MilliWatt and MilliMole
2019-12-19 13:31:12 +01:00
donovaly
82dc8e88f5
add the following units:
...
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
luz.paz
06cf1d5b70
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
ad8668a9f3
fix -Wformat-pedantic
2019-12-05 12:23:51 +01:00
asapelkin
8bc5b585c8
Used single quotes for single character in string::find algorithm, more efficient
2019-11-21 18:59:43 +01:00
asapelkin
e951094af9
use emplace_back instead of push_back where justified
2019-11-21 14:48:09 +01:00
wmayer
33b0b1351e
[skip ci] suppress -Wgnu-zero-variadic-macro-arguments for some headers
2019-11-13 22:38:09 +01:00
wmayer
d2032da93d
Enhabce TypePy:
...
add convenience method getAllDerived()
support TypePy asrgument in getAllDerivedFrom() and isDerivedFrom()
return TypePy instead of str in getAllDerivedFrom()
2019-11-13 10:41:04 +01:00
wmayer
d61bf15c42
declare getAllDerivedFrom as static method
2019-11-13 00:57:21 +01:00
wmayer
e1f85cd091
export typeid system to Python
2019-11-13 00:43:23 +01:00
wmayer
34a083b159
handle possible exceptions for FreeCAD.Units.Unit(input string)
2019-11-03 19:01:27 +01:00
wmayer
0b47fb6ded
support quantities in a string of the form: value / unit
2019-11-03 18:47:33 +01: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
wmayer
8d5bc7eb09
[skip ci] remove unused variable
2019-10-21 12:04:23 +02:00
wmayer
d7ca604c99
Support for Frequency in quantity parser
2019-10-21 11:49:55 +02:00
wmayer
3500451a04
Basic support for Frequency as unit
2019-10-20 18:14:56 +02:00
howetuft
b858757bb2
Fix -Wdeprecated-copy warnings (rule of 5/3/0)
...
Fix -Wdeprecated-copy warnings in various places. Consists in enforcing
rule of five/three/zero (https://en.cppreference.com/w/cpp/language/rule_of_three )
mainly by deleting redundant copy constructors or copy assignment operators
that replicate default constructors/operators, or more rarely by adding
missing copy/move constructors/operators.
See also https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c20-if-you-can-avoid-defining-default-operations-do
2019-10-20 17:02:17 +02:00
wmayer
f98446e5cb
restore old behaviour of Python wrapper of Console class to increase flexibility when using in worker threads
2019-10-20 13:51:53 +02:00
wmayer
3613d834fc
in RedirectStdOutput/RedirectStdError/RedirectStdLog only flush when last character is newline to avoid garbled output in log file
2019-10-20 13:42:51 +02:00
wmayer
f94bf69a3c
fix -Winconsistent-missing-override
2019-10-20 13:23:41 +02:00
wmayer
aa011746e5
minor optimization in ConsoleObserverFile, if prefix is unknown then still write passed message
2019-10-20 12:52:08 +02:00
ezzieyguywuf
f27e4590a6
Refactor and rename ConsoleObserver...
...
...Renamed to "ILogger", to designate that this is an Interface for a
Logger. This "Interface" is pure virtual, so that it cannot be
instantiated directly. This makes it clear that it is intended to be
derived.
Finally, got rid of all the individual log-style methods and replaced
with SendLog. The idea here is that day-to-day users will only interact
with ILogger through ConsoleSingleton (or, likely, LoggerSingleton in
the future). This singleton will manage an arbirtary collection of
ILogger, and call SendLog with the appropriate parameters based on what
the user requests.
Therefore, the singleton itself will have the individual Log, Message,
Error, etc... methods, while stil allowing us to simplify the code base
of ILogger and its derived classes.
2019-10-20 11:46:15 +02:00
luz.paz
788a509184
Doxygen: Base/Parameter.h description
...
Adding a cursory description for `Parameter.h` + typo fix for it's companion .cpp file.
.
2019-10-19 16:14:53 -03:00
wmayer
f8f52e6fcf
replace some old C style casts with static_cast or reinterpret_cast
2019-10-18 15:50:15 +02:00
wmayer
81b615bfb9
fix several memory leaks in ParameterGrp when removing nodes from DOM document
2019-10-18 15:43:22 +02:00
wmayer
736511e5b6
+ implement a correct cleaning of a parameter group without creating ghost instances of ParameterGrp
2019-10-18 15:38:58 +02:00
wmayer
9a6824a3fe
+ before creating element in DOM document check if the group node still has the correct name
2019-10-18 15:34:20 +02:00
Richard
6eacb17b3e
Update swigpyrun.in for Python 3.8
...
In Python 3.8 some functions related to thread state were intentionally made private.
This fix (specific to FreeCAD) was suggested here:
https://bugs.python.org/issue35886
2019-10-18 10:12:59 +02:00
wmayer
ee63c324c1
Add an XSD validation scheme and implement ParameterManager::CheckDocument(), function is used in the parameter editor
2019-10-14 22:56:03 +02:00