Example #1
0
	def info(self):
		"""Displays a text summary of this post."""
		
		print "Post: " + self.printId() + \
		"\n Length: " + str(round(self.axis.Length, 2)) + \
		"\n Origin: " + common.printPoint3d(self.origin) + \
		"\n----"
Example #2
0
	def display(self, transform=False, axis=False):
		"""Add a polyline to the document showing toolpath line
		
		Returns: guid for added polyline
		"""
		
		objects = []
		
		for p in self.getPath(transform=transform, axis=axis):
			p = Rhino.Geometry.Polyline(p)
			p.DeleteShortSegments(0.01)
			
			guid = sc.doc.Objects.AddPolyline(p)
			if guid == System.Guid.Empty:
				print "Error adding polyline {0}\nCoordinates:".format(guid)
				for c in p:
					print common.printPoint3d(c)
				print "\n"
			objects.append(guid)
		
		return objects
Example #3
0
	def info(self):
		"""Displays a text summary of this Pocket."""
		
		print "Pocket: <{0}> on {1}\nOrigin: {2}\n----".format(
			self.type, self.post.printId(), common.printPoint3d(self.origin))