예제 #1
0
파일: teardrop.py 프로젝트: folksjos/RepG
def addNegativesByDerivation(end, extrudeDerivation, negatives, radius, start, xmlElement):
	"Add teardrop drill hole to negatives."
	extrudeDerivation.offsetAlongDefault = [start, end]
	extrudeDerivation.tiltFollow = True
	extrudeDerivation.tiltTop = Vector3(0.0, 0.0, 1.0)
	extrudeDerivation.setToXMLElement(xmlElement.getCopyShallow())
	extrude.addNegatives(extrudeDerivation, negatives, [getTeardropPathByEndStart(end, radius, start, xmlElement)])
예제 #2
0
def addNegativesByRadius(end, negatives, radius, start, xmlElement):
    "Add teardrop drill hole to negatives."
    copyShallow = xmlElement.getCopyShallow()
    extrude.setXMLElementToEndStart(end, start, copyShallow)
    extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
    extrude.addNegatives(
        extrudeDerivation, negatives,
        [getTeardropPathByEndStart(end, radius, start, xmlElement)])
예제 #3
0
def addNegativesByRadius(elementNode, end, negatives, radius, start):
	"Add teardrop drill hole to negatives."
	if radius <= 0.0:
		return
	copyShallow = elementNode.getCopyShallow()
	extrude.setElementNodeToEndStart(copyShallow, end, start)
	extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
	extrude.addNegatives(extrudeDerivation, negatives, [getTeardropPathByEndStart(elementNode, end, radius, start)])
예제 #4
0
파일: teardrop.py 프로젝트: Sciumo/SFACT
def addNegativesByRadius(end, negatives, radius, start, xmlElement):
	"""Add teardrop drill hole to negatives."""
	if radius <= 0.0:
		return
	copyShallow = xmlElement.getCopyShallow()
	extrude.setXMLElementToEndStart(end, start, copyShallow)
	extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
	extrude.addNegatives(extrudeDerivation, negatives, [getTeardropPathByEndStart(end, radius, start, xmlElement)])
예제 #5
0
def addNegativesByRadius(elementNode, end, negatives, radius, start):
    "Add teardrop drill hole to negatives."
    if radius <= 0.0:
        return
    copyShallow = elementNode.getCopyShallow()
    extrude.setElementNodeToEndStart(copyShallow, end, start)
    extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
    extrude.addNegatives(
        extrudeDerivation, negatives,
        [getTeardropPathByEndStart(elementNode, end, radius, start)])
예제 #6
0
def addGroove(derivation, negatives):
	'Add groove on each side of cage.'
	copyShallow = derivation.elementNode.getCopyShallow()
	extrude.setElementNodeToEndStart(copyShallow, Vector3(-derivation.demilength), Vector3(derivation.demilength))
	extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
	bottom = derivation.demiheight - 0.5 * derivation.grooveWidth
	outside = derivation.demiwidth
	top = derivation.demiheight
	leftGroove = [
		complex(-outside, bottom),
		complex(-derivation.innerDemiwidth, derivation.demiheight),
		complex(-outside, top)]
	rightGroove = [
		complex(outside, top),
		complex(derivation.innerDemiwidth, derivation.demiheight),
		complex(outside, bottom)]
	extrude.addNegatives(extrudeDerivation, negatives, euclidean.getVector3Paths([leftGroove, rightGroove]))
예제 #7
0
def addGroove(derivation, negatives):
	'Add groove on each side of cage.'
	copyShallow = derivation.elementNode.getCopyShallow()
	extrude.setElementNodeToEndStart(copyShallow, Vector3(-derivation.demilength), Vector3(derivation.demilength))
	extrudeDerivation = extrude.ExtrudeDerivation(copyShallow)
	bottom = derivation.demiheight - 0.5 * derivation.grooveWidth
	outside = derivation.demiwidth
	top = derivation.demiheight
	leftGroove = [
		complex(-outside, bottom),
		complex(-derivation.innerDemiwidth, derivation.demiheight),
		complex(-outside, top)]
	rightGroove = [
		complex(outside, top),
		complex(derivation.innerDemiwidth, derivation.demiheight),
		complex(outside, bottom)]
	extrude.addNegatives(extrudeDerivation, negatives, euclidean.getVector3Paths([leftGroove, rightGroove]))