(self, parseResults)
| 673 | """ |
| 674 | |
| 675 | def __init__(self, parseResults): |
| 676 | |
| 677 | # define all token to object mappings |
| 678 | self.axes = { |
| 679 | "X": Vector(1, 0, 0), |
| 680 | "Y": Vector(0, 1, 0), |
| 681 | "Z": Vector(0, 0, 1), |
| 682 | "XY": Vector(1, 1, 0), |
| 683 | "YZ": Vector(0, 1, 1), |
| 684 | "XZ": Vector(1, 0, 1), |
| 685 | } |
| 686 | |
| 687 | self.namedViews = { |
| 688 | "front": (Vector(0, 0, 1), True), |
| 689 | "back": (Vector(0, 0, 1), False), |
| 690 | "left": (Vector(1, 0, 0), False), |
| 691 | "right": (Vector(1, 0, 0), True), |
| 692 | "top": (Vector(0, 1, 0), True), |
| 693 | "bottom": (Vector(0, 1, 0), False), |
| 694 | } |
| 695 | |
| 696 | self.operatorMinMax = { |
| 697 | ">": True, |
| 698 | ">>": True, |
| 699 | "<": False, |
| 700 | "<<": False, |
| 701 | } |
| 702 | |
| 703 | self.operator = { |
| 704 | "+": DirectionSelector, |
| 705 | "-": lambda v: DirectionSelector(-v), |
| 706 | "#": PerpendicularDirSelector, |
| 707 | "|": ParallelDirSelector, |
| 708 | } |
| 709 | |
| 710 | self.parseResults = parseResults |
| 711 | self.mySelector = self._chooseSelector(parseResults) |
| 712 | |
| 713 | def _chooseSelector(self, pr): |
| 714 | """ |
nothing calls this directly
no test coverage detected