def _checkHit(self, a, b): if a == b: return False if self._oneAtATime: return polygon.polygonCollision(a._headAreaMinHull + a.getPosition(), b._boundaryHull + b.getPosition()) else: return polygon.polygonCollision(a._boundaryHull + a.getPosition(), b._boundaryHull + b.getPosition())
def checkPlatform(self, obj): area = obj._printAreaHull + obj.getPosition() if not polygon.fullInside(area, self._machinePolygons[0]): return False #Check the "no go zones" for poly in self._machinePolygons[1:]: if polygon.polygonCollision(poly, area): return False return True
def checkPlatform(self, obj): objectSink = profile.getProfileSettingFloat("object_sink") area = obj._printAreaHull + obj.getPosition() if obj.getSize()[2] - objectSink > self._machineSize[2]: return False if not polygon.fullInside(area, self._machinePolygons[0]): return False #Check the "no go zones" for poly in self._machinePolygons[1:]: if polygon.polygonCollision(poly, area): return False return True
def checkPlatform(self, obj): objectSink = profile.getProfileSettingFloat("object_sink") if profile.getPreference('startMode') == 'Simple': objectSink = float(profile.settingsDictionary["object_sink"].getDefault()) area = obj._printAreaHull + obj.getPosition() if obj.getSize()[2] - objectSink > self._machineSize[2]: return False if not polygon.fullInside(area, self._machinePolygons[0]): return False #Check the "no go zones" for poly in self._machinePolygons[1:]: if polygon.polygonCollision(poly, area): return False return True
def checkPlatform(self, obj): objectSink = profile.getProfileSettingFloat("object_sink") if profile.getPreference('startMode') == 'Simple': objectSink = float( profile.settingsDictionary["object_sink"].getDefault()) area = obj._printAreaHull + obj.getPosition() if obj.getSize()[2] - objectSink > self._machineSize[2]: return False if not polygon.fullInside(area, self._machinePolygons[0]): return False #Check the "no go zones" for poly in self._machinePolygons[1:]: if polygon.polygonCollision(poly, area): return False return True
def _checkHit(self, addIdx, idx): obj = self._scene._objectList[idx] addObj = self._scene._objectList[addIdx] return polygon.polygonCollision(obj._boundaryHull + obj.getPosition(), addObj._headAreaHull + addObj.getPosition())
def _checkHit(self, addIdx, idx): obj = self._scene._objectList[idx] addObj = self._scene._objectList[addIdx] return polygon.polygonCollision( obj._boundaryHull + obj.getPosition(), addObj._headAreaHull + addObj.getPosition())