View Issue Details

IDProjectCategoryView StatusLast Update
0002877FreeCADFeaturepublic2017-07-20 17:42
ReporterFreeCadder Assigned Toeivindkvedalen  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformx64OSWindowsOS Version7
Product Version0.16 
Fixed in Version0.17 
Summary0002877: hypot() for expressions
DescriptionIt would be convenient to have a hypot() aggregrate function like in C++:
h = hypot(a, b, c) = sqrt(pow(a, 2) + pow(b, 2) + pow(c, 2))

Maybe also a catet(), cath(), or cathet() function for calculating a leg of a triangle:
c = catet(h, a, b) = sqrt(pow(h, 2) - pow(a, 2) - pow(b, 2))
Additional Informationhttp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0030r1.pdf
Tagsexpressions, spreadsheet
FreeCAD Information

Activities

FreeCadder

2017-01-27 15:37

reporter   ~0008028

BTW, 0.16 cannot parse "pow(x,y)" correctly if there is no space after the comma.

Kunda1

2017-01-27 22:08

administrator   ~0008032

@FreeCadder please follow the same guidelines as mentioned in 0002876:0008031 Thank you in advance.

FreeCadder

2017-01-28 03:37

reporter   ~0008035

Last edited: 2017-01-29 02:33

Thanks. Sorry, should have written in the following way, without pow() and sqrt():

h = hypot(a, b, c) = (a^2 + b^2 + c^2) ^ .5
c = catet(h, a, b) = (h^2 - a^2 - b^2) ^ .5

A convenience of the functions is that one needs less parentheses if their arguments are expressions.

Kunda1

2017-01-28 05:13

administrator   ~0008039

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20300

Kunda1

2017-01-29 14:26

administrator   ~0008072

@FreeCadder please read and respond to the discussion happening in the thread ^

Kunda1

2017-07-20 10:31

administrator   ~0009786

Fix submitted in FreeCAD Pull Request 887

Kunda1

2017-07-20 17:42

administrator   ~0009788

c:FreeCAD:2e96d9bf9594d62b4eb679b927f1e5e3a03e8244:

Issue History

Date Modified Username Field Change
2017-01-27 15:29 FreeCadder New Issue
2017-01-27 15:37 FreeCadder Note Added: 0008028
2017-01-27 22:08 Kunda1 Note Added: 0008032
2017-01-27 22:08 Kunda1 Status new => feedback
2017-01-28 03:37 FreeCadder Note Added: 0008035
2017-01-28 03:37 FreeCadder Status feedback => new
2017-01-28 05:13 Kunda1 Note Added: 0008039
2017-01-28 11:53 eivindkvedalen Assigned To => eivindkvedalen
2017-01-28 11:53 eivindkvedalen Status new => assigned
2017-01-29 02:33 FreeCadder Note Edited: 0008035
2017-01-29 14:26 Kunda1 Note Added: 0008072
2017-05-07 15:01 Kunda1 Tag Attached: expressions
2017-07-20 10:31 Kunda1 Note Added: 0009786
2017-07-20 11:00 Kunda1 Tag Attached: spreadsheet
2017-07-20 17:16 wmayer Status assigned => closed
2017-07-20 17:16 wmayer Resolution open => fixed
2017-07-20 17:16 wmayer Fixed in Version => 0.17
2017-07-20 17:42 Kunda1 Note Added: 0009788