MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / SetPoint

Method SetPoint

src/ext/makerbot_driver/Gcode/Point.py:22–30  ·  view source on GitHub ↗

Given a set of codes with defined values, sets this point's axes to those values. @param dict codes: The codes that may or may not contain axes values

(self, codes)

Source from the content-addressed store, hash-verified

20 return [self.X, self.Y, self.Z, self.A, self.B]
21
22 def SetPoint(self, codes):
23 """Given a set of codes with defined values, sets this point's
24 axes to those values.
25
26 @param dict codes: The codes that may or may not contain axes values
27 """
28 for axis in ['X', 'Y', 'Z', 'A', 'B']:
29 if axis in codes:
30 setattr(self, axis, codes[axis])
31
32 def copy(self):
33 copy_point = Point()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected