Esempio n. 1
0
	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())
Esempio n. 2
0
	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())
Esempio n. 3
0
	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
Esempio n. 4
0
	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
Esempio n. 5
0
	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
Esempio n. 6
0
    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
Esempio n. 7
0
	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
Esempio n. 8
0
    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
Esempio n. 9
0
	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())
Esempio n. 10
0
 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())