forked from hlorus/CAD_Sketcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal_data.py
64 lines (52 loc) · 1.19 KB
/
global_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import sys
from enum import Enum
from mathutils import Vector
registered = False
PYPATH = sys.executable
entities = {}
batches = {}
offscreen = None
redraw_selection_buffer = False
hover = -1
ignore_list = []
selected = []
# Allows to highlight a constraint gizmo,
# Value gets unset in the preselection gizmo
highlight_constraint = None
highlight_entities = []
Z_AXIS = Vector((0, 0, 1))
draw_handle = None
# Workplane requirement options
class WpReq(Enum):
OPTIONAL, FREE, NOT_FREE = range(3)
solver_state_items = [
("OKAY", "Okay", "Successfully solved sketch", "CHECKMARK", 0),
(
"INCONSISTENT",
"Inconsistent",
"Cannot solve sketch because of inconsistent constraints",
"ERROR",
1,
),
(
"DIDNT_CONVERGE",
"Didnt Converge",
"Cannot solve sketch, system didn't converge",
"ERROR",
2,
),
(
"TOO_MANY_UNKNOWNS",
"Too Many Unknowns",
"Cannot solve sketch because of too many unknowns",
"ERROR",
3,
),
(
"UNKNOWN_FAILURE",
"Unknown Failure",
"Cannot solve sketch because of unknown failure",
"ERROR",
4,
),
]