UICube
¶
A class representing a Rubik's cube in the RoboDK graphical user interface.
detach_face(self, face)
¶
Detach the given face from the gripper and attaches it to the mount. That means the chosen segments are set to children of the grip coordinate frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
face |
FacePosition |
The face to detach |
required |
Source code in core/ui/ui_cube.py
91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
perform_rotations(self, rotations, before_step=None, after_step=None)
¶
Perform the given rotations on the cube.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rotations |
List[core.spatial.Rotation.Rotation] |
the rotations to perform |
required |
before_step |
Optional[Callable] |
an action to perform before each rotation step |
None |
after_step |
Optional[Callable] |
an action to perform after each rotation step |
None |
Source code in core/ui/ui_cube.py
80 81 82 83 84 85 86 87 88 89 |
|
rotate(self, rotation=None, face=None, n=1)
¶
Perform the given rotation on the cube.
If the rotation
is given, face
and n
are ignored.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rotation |
Optional[core.spatial.Rotation.Rotation] |
the rotations to perform |
None |
face |
Optional[core.cube.FacePosition.FacePosition] |
the face to rotate |
None |
n |
int |
the number of 90° turns to execute |
1 |
Source code in core/ui/ui_cube.py
67 68 69 70 71 72 73 74 75 76 77 78 |
|
update_ui(self)
¶
Updates the ui of the cube, i.e. take the internal representation (Cube3D
) and display it in RoboDK.
Source code in core/ui/ui_cube.py
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 65 |
|