Expressions¶
HFD has a built in expression language that handles parameters, math and a handful of useful functions.
Available functionality in expressions¶
+-*/()
Normal arithmetic operators.sqrt(arg)
Square Root of argdistance(p1,p2)
ORdistance(x1,y1,x2,y2)
The distance between the points (x1,y1) and (x2,y2)angle(p1,p2)
ORangle(x1,y1,x2,y2)
The angle in degrees of the line described by p1,p2mmToInch(arg)
Converts to inches from mminchToMM(arg)
Converts to mm from inches
Parameters¶
Parameters in any expression are looked up based on the current context.
The order of lookup is as follows
Local attributes
Local params
Parent attributes
Parent params
… Repeat until Document
Document params