API Reference
mecode_viewer()
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_name |
str
|
name of gcode file |
required |
rel_mode |
bool
|
True if relative coordinates, False if absolute coordinates |
False
|
animate |
bool
|
True for 3D animation, False for static matplotlib figure |
False
|
verbose |
bool
|
If True, will return print history as a list of dict's |
False
|
raw_gcode |
List[str]
|
Can provide list of gcode str commands in lieu of file_name |
None
|
origin |
Union[List[Union[int, float]], Tuple[Union[int, float]]]
|
Specify origin as initial starting point |
(0, 0, 0)
|
extrude_cmd |
str or List[str] or Tuple[str]
|
Command string that is used to start extruding.E.g., Nordson pressure controller will typically use |
None
|
extrude_cmd |
str or List[str] or Tuple[str]
|
Command string that is used to stop extruding. |
None
|
Returns:
Type | Description |
---|---|
Optional[List[Dict]]
|
Optional[List[Dict]]: If |
Examples:
>>> mecode_viewer(file_name='gcode_file.pgm', rel_mode=True) # specify relative coordinates are being used
>>> mecode_viewer(file_name='gcode_file.pgm', extrude_cmd='FREERUN PDISP5') # using linear actuator command to specify extrusion
Note
If extrude_cmd
is not provided, the default value will be to use the Nordson controller command (Call togglePress
). If extrude_cmd
is provided, mecode_viewer
will search for extrude_cmd
within gcode.
Source code in mecode_viewer/mecode_viewer.py
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|