
just for display, and any text entry will happen via some floating text box, same as entering a dimension on the sketch. Add the hover and selection mechanism, which now seems to work. Still not clear how to do imported parts, for assemblies and hierarchy. The handle formats may still have to change. [git-p4: depot-paths = "//depot/solvespace/": change = 1662]
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
|
|
#ifndef __EXPR_H
|
|
#define __EXPR_H
|
|
|
|
class Expr;
|
|
|
|
class Expr {
|
|
public:
|
|
// A parameter, by the hParam handle
|
|
static const int PARAM = 0;
|
|
// A parameter, by a pointer straight in to the param table (faster,
|
|
// if we know that the param table won't move around)
|
|
static const int PARAM_PTR = 1;
|
|
|
|
// These are used only for user-entered expressions.
|
|
static const int POINT = 10;
|
|
static const int ENTITY = 11;
|
|
|
|
static const int CONSTANT = 20;
|
|
|
|
static const int PLUS = 100;
|
|
static const int MINUS = 101;
|
|
static const int TIMES = 102;
|
|
static const int DIV = 103;
|
|
static const int NEGATE = 104;
|
|
static const int SQRT = 105;
|
|
static const int SQUARE = 106;
|
|
static const int SIN = 107;
|
|
static const int COS = 108;
|
|
|
|
int op;
|
|
Expr *a;
|
|
Expr *b;
|
|
union {
|
|
hParam parh;
|
|
double *parp;
|
|
hPoint point;
|
|
hEntity entity;
|
|
double v;
|
|
} x;
|
|
};
|
|
|
|
#endif
|