コード例 #1
0
ファイル: trianglemesh.py プロジェクト: folksjos/RepG
def addPointsAtZ(edgePair, points, radius, vertexes, z):
    "Add point complexes on the segment between the edge intersections with z."
    carveIntersectionFirst = getCarveIntersectionFromEdge(
        edgePair.edges[0], vertexes, z)
    carveIntersectionSecond = getCarveIntersectionFromEdge(
        edgePair.edges[1], vertexes, z)
    intercircle.addPointsFromSegment(carveIntersectionFirst,
                                     carveIntersectionSecond, points, radius,
                                     0.3)
コード例 #2
0
def getInBetweenPointsFromLoops( importRadius, loops ):
	"Get the in between points from loops."
	inBetweenPoints = []
	for loop in loops:
		for pointIndex in xrange( len( loop ) ):
			pointBegin = loop[ pointIndex ]
			pointEnd = loop[ ( pointIndex + 1 ) % len( loop ) ]
			intercircle.addPointsFromSegment( pointBegin, pointEnd, inBetweenPoints, importRadius, 0.2123 )
	return inBetweenPoints
コード例 #3
0
def addPointsAtZ(edgePair, points, radius, vertexes, z):
    'Add point complexes on the segment between the edge intersections with z.'
    carveIntersectionFirst = getCarveIntersectionFromEdge(
        edgePair.edges[0], vertexes, z)
    carveIntersectionSecond = getCarveIntersectionFromEdge(
        edgePair.edges[1], vertexes, z)
    # threshold radius above 0.8 can create extra holes on Screw Holder, 0.7 should be safe for everything
    intercircle.addPointsFromSegment(carveIntersectionFirst,
                                     carveIntersectionSecond, points, radius,
                                     0.7)
コード例 #4
0
ファイル: boolean_solid.py プロジェクト: Spacexula/SFACT
def getInBetweenLoopsFromLoops(loops, radius):
	'Get the in between loops from loops.'
	inBetweenLoops = []
	for loop in loops:
		inBetweenLoop = []
		for pointIndex in xrange(len(loop)):
			pointBegin = loop[pointIndex]
			pointEnd = loop[(pointIndex + 1) % len(loop)]
			intercircle.addPointsFromSegment(pointBegin, pointEnd, inBetweenLoop, radius)
		inBetweenLoops.append(inBetweenLoop)
	return inBetweenLoops
コード例 #5
0
ファイル: boolean_solid.py プロジェクト: marrrry/ReplicatorG
def getInBetweenLoopsFromLoops(loops, radius):
	'Get the in between loops from loops.'
	inBetweenLoops = []
	for loop in loops:
		inBetweenLoop = []
		for pointIndex in xrange(len(loop)):
			pointBegin = loop[pointIndex]
			pointEnd = loop[(pointIndex + 1) % len(loop)]
			intercircle.addPointsFromSegment(pointBegin, pointEnd, inBetweenLoop, radius)
		inBetweenLoops.append(inBetweenLoop)
	return inBetweenLoops
コード例 #6
0
def getInBetweenPointsFromLoopsBoundarySideOtherLoops( inside, importRadius, loops, otherLoops, radiusSide ):
	"Get the in between points from loops."
	inBetweenPoints = []
	for loop in loops:
		for pointIndex in xrange( len( loop ) ):
			pointBegin = loop[ pointIndex ]
			pointEnd = loop[ ( pointIndex + 1 ) % len( loop ) ]
			inBetweenSegmentPoints = []
			intercircle.addPointsFromSegment( pointBegin, pointEnd, inBetweenSegmentPoints, importRadius, 0.2123 )
			for inBetweenSegmentPoint in inBetweenSegmentPoints:
				if isPointOrEitherLineBoundarySideInsideLoops( inside, otherLoops, pointBegin, inBetweenSegmentPoint, pointEnd, radiusSide ):
					inBetweenPoints.append( inBetweenSegmentPoint )
	return inBetweenPoints
コード例 #7
0
def addPointsAtZ( edgePair, points, radius, vertices, z ):
	"Add point complexes on the segment between the edge intersections with z."
	carveIntersectionFirst = getCarveIntersectionFromEdge( edgePair.edges[ 0 ], vertices, z )
	carveIntersectionSecond = getCarveIntersectionFromEdge( edgePair.edges[ 1 ], vertices, z )
	intercircle.addPointsFromSegment( carveIntersectionFirst, carveIntersectionSecond, points, radius, 0.3 )
コード例 #8
0
ファイル: triangle_mesh.py プロジェクト: 3DNogi/SFACT
def addPointsAtZ(edgePair, points, radius, vertexes, z):
	'Add point complexes on the segment between the edge intersections with z.'
	carveIntersectionFirst = getCarveIntersectionFromEdge(edgePair.edges[0], vertexes, z)
	carveIntersectionSecond = getCarveIntersectionFromEdge(edgePair.edges[1], vertexes, z)
	# threshold radius above 0.8 can create extra holes on Screw Holder, 0.7 should be safe for everything
	intercircle.addPointsFromSegment(carveIntersectionFirst, carveIntersectionSecond, points, radius, 0.7)