Commit Graph

53 Commits

Author SHA1 Message Date
Daniel-Khodabakhsh
8003606222 Expressions: Add Vector API expression functions (#10237) 2023-08-15 23:00:16 -05:00
0penBrain
1580fe7c96 Spreadsheet: update and add tests 2023-07-23 22:11:08 -04:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
CarlOlson
926c1253af update expression grammar to handle parens around cond 2023-03-26 18:48:59 +02:00
Daniel-Khodabakhsh
827af464e3 Add various matrix related expression functions (#8603)
Adds a few new Expression functions with the goal to:

- Simplify Placement, Rotation, Vector and Matrix object creation.
- Add new matrix functions for rotation and translation.
2023-03-11 20:13:23 -06:00
luzpaz
d8146c1db8 Spreadsheet: fix header uniformity
+ trailing whitespace
2023-01-22 21:46:17 +01:00
Chris Hennes
6d9b287e7c Spreadsheet: Add unit test for #7841
Ensure that aliases can be set on empty cells.
2022-11-27 18:54:56 -06:00
Chris Hennes
4adf5836c7 Spreadsheet: Add getUsedRange() and getNonEmptyRange() 2022-11-10 14:36:54 -06:00
Chris Hennes
11dd7fc5f9 Spreadsheet: Add Python API for getUsedCells
Also adds access to getNonEmptyCells, and unit tests for both. Designed
to fix #7587.
2022-11-10 14:36:54 -06:00
wmayer
6c89e6dc73 Spreadsheet: add tests for merging cells and binding cells 2022-06-16 15:05:43 +02:00
wmayer
9d3040cc60 Spreadsheet: PR #6843: add missing unit test 2022-05-09 10:27:52 +02:00
wmayer
c1c06f4ccb Spreadsheet: [skip ci] issue #6840/#6844: add unit test 2022-05-08 21:29:56 +02:00
wmayer
ee3038d32f Spreadsheet: [skip ci] issue #6844: add unit test 2022-05-08 18:59:23 +02:00
wmayer
10ca067d95 Spreadsheet: unit test for expressions using an input spreadsheet
A bug was reported here: https://forum.freecadweb.org/viewtopic.php?p=564502#p564502
2022-01-24 14:20:26 +01:00
wmayer
b836712c83 Test: [skip ci] clean up documents for unit test with cross links 2022-01-15 16:34:13 +01:00
wmayer
94e2ce44b4 Test: [skip ci] add unit test with cross links
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=58603
2022-01-15 14:28:08 +01:00
Chris Hennes
3ef6e1c6d0 [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Yorik van Havre
aa52a3f55c Merge pull request #4215 from hyarion/feature-spreadsheet-equal-prefix-for-expressions
[Spreadsheet] Only evaluate cell values when prefixed with '='
2021-02-05 13:29:57 +01:00
Benjamin Nauck
37952a5949 Spreadsheet: Add test for undo alias issue 2021-01-30 14:04:57 +01:00
Benjamin Nauck
98414334ad [Spreadsheet] Add unit tests for new input behaviour 2021-01-20 18:55:27 +01:00
Benjamin Nauck
d525b29fa5 [Spreadsheet] Remove alias from dynamic properties on removeRows/Columns
When removing a row in a spreadsheet which has an assigned alias, the
alias will not be removed from the list of dynamic properties.

This makes it impossible to create a new alias which uses the same name
even if the original was removed (using removeRows/removeColumns)

Fixes #4492
2021-01-04 22:10:58 +01:00
luz paz
5bd5f3a963 Spreadsheet: Fix header uniformity + trailing whitespace
[skip ci]
2020-11-27 19:39:06 +01:00
Cheuksan Wang
0aa759b5c5 Move the aliases before other content of cells
When a user performs insert rows, remove rows, insert columns, or
remove rows, we need to move multiple cells as a batch. The cells are
moved sequentially. For each cell, its dependent alias positions are
looked up and dependencies are added.  However, those cells with
aliases may be moved later in the batch. Thus the earlier dependencies
become wrong. This commit fixes this bug by moving all the aliases
before moving the cells. Unit tests are added to for this bug.

fixes issue #4429
2020-09-13 11:58:54 +02:00
Zheng, Lei
d5a4996d25 App: fix Expression _moveCells()
The problem is caused by not refreshing ObjectIdentifier internal cache
after change.
2019-12-31 15:23:03 +01:00
DeepSOIC
f1a8dc4b2c Spreadsheet: fix tests to use fuzzy placement comparison 2019-10-12 15:39:39 +02:00
Zheng, Lei
78999b471b Spreadsheet: fix test case
Because of change in RotationPy __pow__
2019-10-08 17:53:20 +02:00
Zheng, Lei
bda372be83 Spreadsheet: add test case for operation on matrix/placement/rotation 2019-10-07 17:24:31 +02:00
Zheng, Lei
8dec78747f Spreadsheet: fix test cases due to change in error message 2019-09-28 15:31:36 +02:00
Zheng, Lei
d141975701 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
Zheng, Lei
1d274f6697 Test cases changes
Slight adjustment of various test cases due to various API changes.
2019-08-17 15:32:48 +02:00
Eivind Kvedalen
ae7bef9978 Expressions: Fixed issue #3432; aggregate functions sometimes ignore some of their arguments.
Also updated regression tests in Spreadsheet module.
2018-04-21 22:33:54 +02:00
Eivind Kvedalen
0574ac37ed Spreadsheet/Expressions: Fixed issue #3363. 2018-03-25 11:53:35 +02:00
Eivind Kvedalen
5fe7a9af71 Spreadsheet: Fix for issue #3225.
Done by adding a selector function to Document::renameObjectIdentifiers(...) to ensure
that the Spreadsheet document object is not rewritten twice.
2017-11-08 23:15:16 +01:00
Eivind Kvedalen
054a3da107 Part::Thickness: This fixes issue #2876 by changing property type for value to include a unit. 2017-07-23 22:14:05 +02:00
Eivind Kvedalen
2e96d9bf95 Fixed issue #2877: Added hypot() and catet() functions to expression framework. 2017-07-20 18:57:31 +02:00
Eivind Kvedalen
72dd6dfd9a Expressions: Fixed issue #3128; mod(x;y) should support arbitrary units for both arguments. 2017-07-13 12:20:31 +02:00
wmayer
44fba58b25 close document in spreadsheet tests 2017-07-17 08:09:37 +02:00
Eivind Kvedalen
338ca55622 Spreadsheet: Fixed issue #2894: Unit strings could be used as aliases. 2017-03-07 13:45:53 -03:00
Kunda
dde52952f4 source typo fixes pt1 (only on py3 merged code)
issue 0002914
2017-02-27 11:32:47 +01:00
looooo
4d21adf476 py3: spreadsheet: gathering spreadsheet relevant commits:
356b3b5736d6a83a91050973f77db9fc005b8551 Update Arch,Fem,Material,Spreadsheet for py3 print
70967107210481e362eab1cef78d15b8ba08c300 py3: Fixes from last rebase
2017-02-18 08:19:25 +01:00
Eivind Kvedalen
0d6f777099 Expressions: Fixed issue #2879. 2017-02-02 10:27:29 +01:00
Eivind Kvedalen
25c56b7864 Spreadsheet: Fix for issue #2646: Spreadsheet-Sum-Function does not work with units
This fix also fixes the other aggregates.
2016-12-15 17:27:18 +01:00
Eivind Kvedalen
de27adbefa Spreadsheet: Fix for issue #2647, stddev does not work with arrays. 2016-12-15 17:27:18 +01:00
Eivind Kvedalen
eb32b3d831 Spreadsheet: Fixed for issue #2767: In some instances, needed parentheses are dropped from the expression. Fixed and updated unit tests. 2016-12-15 17:27:18 +01:00
wmayer
1855c80f36 replace Part.Line with Part.LineSegment 2016-11-30 21:25:18 +01:00
Eivind Kvedalen
484ba25ce6 Spreadsheet: Added test cases. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
9d617ce4c8 Expressions: Changed precedence of ?, :, EQ, NEQ, LT, GT, GTE, and LTE. 2016-03-15 18:28:23 +01:00
wmayer
7ee6214415 + fix unit tests for spreadsheet 2016-03-09 17:03:48 +01:00
Eivind Kvedalen
ec7e920453 Spreadsheet: Added test case for conditional expressions. 2016-03-08 16:09:31 +01:00
Eivind Kvedalen
9606fb144a Spreadsheet: Updated test cases. 2016-02-18 16:54:43 +01:00