Commit Graph

696 Commits

Author SHA1 Message Date
wmayer
a5fbf61dea Base: [skip ci] support of spheres in InventorBuilder 2020-04-08 18:01:13 +02:00
Eric Trombly
56769f1a27 change isOnLine to isOnLineSegment 2020-04-06 06:34:53 -05:00
Eric Trombly
f210d71f18 remove sleep calls, change some for loops to list comp, move isPointOnLine to base vector 2020-04-06 06:34:53 -05:00
luz.paz
ae72e2c762 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
e14e5b845e [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
wmayer
8451cb332a Part: [skip ci] support of expressions of Euler angles in attachment dialog 2020-03-21 14:27:53 +01:00
wmayer
5bfef75696 Base: [skip ci] add method to more easily set the Python error indicator from a Base::Exception 2020-03-18 17:53:13 +01:00
wmayer
18e3be01eb CMake: use XercesC_LIBRARIES to store debug and release version of xerces 2020-03-16 12:24:40 +01:00
wmayer
9415e7b6da Base: [skip ci] implement method Quantity.toStr() to control string representation 2020-02-29 22:51:55 +01:00
wmayer
ea6ed77b3e Base: [skip ci] improve repr() for quantity
https://forum.freecadweb.org/viewtopic.php?f=10&t=43718
https://forum.freecadweb.org/viewtopic.php?f=10&t=43431&p=369556#p369575
2020-02-29 00:20:21 +01:00
plgarcia
59269207b4 Change backup policy
1 - Reports the error to the user in a popup.
2 - Names of the backups include the timstamp instead of a number. Names have more sense and the files can be sorted by names what is also the age order.
3 - Behaviors when changing configuration improved, the number of files present on the system was not reduced when reducing the number of backups or backups deactivated.
2020-02-24 23:06:26 +01:00
wmayer
f9cc8b143a Base: [skip ci] support of __round__ of QuantityPy 2020-02-16 21:50:06 +01:00
donovaly
d1b354fc6b add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
317c153494 Quantity.cpp: fix spacing 2020-01-05 15:00:46 +01:00
donovaly
68ea38cc8d add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
wmayer
a92cf1a785 Base: [skip ci] do not normalize axis when changing angle of a Rotation object 2019-12-28 14:04:02 +01:00
luz.paz
011e5aedfa 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
bab14b5895 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
3da00267cf cosmetics to keep the overview 2019-12-24 13:31:00 +01:00
donovaly
b255475d7c missing parts from from commit 33b8054228
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
wmayer
2484cd56ef 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
a6a043a6f2 also add unit THz as requested 2019-12-23 16:49:45 +01:00
donovaly
edd97de6a2 add units Mpsi, cal and kcal
- also ass missing parts from commit 0021efbf
2019-12-23 16:49:45 +01:00
wmayer
e1b7ef10c7 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
980c6ab227 Base: [skip ci] replace raw pointers of UnitsSchema with unique_ptr 2019-12-21 10:45:22 +01:00
wmayer
c16c7eda27 Base: [skip ci] make UnitSystem an enum class 2019-12-21 10:10:19 +01:00
wmayer
a81e7ff747 Base: [skip ci] handle acceleration and force m/s^2 2019-12-20 16:53:26 +01:00
wmayer
065356281d Python: change generation of callback functions for class or static methods 2019-12-19 17:55:12 +01:00
wmayer
546dc43929 Base: [skip ci] fix block comment in lexer file 2019-12-19 17:08:11 +01:00
donovaly
26196ae612 add mJ and kW
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
23ec305c4b correct Unit::Work conversions
- also add conversions for Unit::Mass and Unit::Power
2019-12-19 13:31:12 +01:00
donovaly
53b34a3dc0 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
4b99ee28ce generate QuantityLexer.c
- also set proper unit conversions
- fix MilliWatt and MilliMole
2019-12-19 13:31:12 +01:00
donovaly
94bae36cee 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
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
33f1511039 fix -Wformat-pedantic 2019-12-05 12:23:51 +01:00
asapelkin
875a463923 Used single quotes for single character in string::find algorithm, more efficient 2019-11-21 18:59:43 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
aa472d8460 [skip ci] suppress -Wgnu-zero-variadic-macro-arguments for some headers 2019-11-13 22:38:09 +01:00
wmayer
f5a63e0953 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
d953a44eaf declare getAllDerivedFrom as static method 2019-11-13 00:57:21 +01:00
wmayer
79ef4be9de export typeid system to Python 2019-11-13 00:43:23 +01:00
wmayer
4539bd90b7 handle possible exceptions for FreeCAD.Units.Unit(input string) 2019-11-03 19:01:27 +01:00
wmayer
0a5b1f3aab support quantities in a string of the form: value / unit 2019-11-03 18:47:33 +01:00
luz.paz
30a717beac 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
210601c2be [skip ci] remove unused variable 2019-10-21 12:04:23 +02:00
wmayer
617a8d7598 Support for Frequency in quantity parser 2019-10-21 11:49:55 +02:00
wmayer
4d831ea442 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
howetuft
3e5d3460c7 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
77bc9cd8d5 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