← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1968: 1. utils.facetBox() and utils.facetCylinder() function description where changed according to Epy...

 

------------------------------------------------------------
revno: 1968
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-01-14 16:57:38 +0100
message:
  1. utils.facetBox() and utils.facetCylinder() function description where changed according to Epytext format.
modified:
  py/utils.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'py/utils.py'
--- py/utils.py	2010-01-12 15:18:55 +0000
+++ py/utils.py	2010-01-14 15:57:38 +0000
@@ -232,25 +232,23 @@
 
 def facetBox(center,extents,orientation=[1,0,0,0],wallMask=63,**kw):
 	"""Create arbitrarily-aligned box composed of facets, with given center, extents and orientation.
-If any of the box dimensions is zero, corresponding facets will not be created. The facets are oriented outwards from the box.
-	:Parameters:
-		`center` :
-			center of the created box; (X,Y,Z) coordinates;
-		`extents` :
-			lengths of the box sides; (eX,eY,eZ);
-		`orientation` :
-			orientation of the box in quaternion format;
-		`wallMask`: bitmask;
-			 determines which walls will be created, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32).
-			 The numbers are ANDed; the default 63 means to create all walls.
-		`**kw`:
-			passed to utils.facet;
-	
-	:Return:
-		List of facets forming the box.
+	If any of the box dimensions is zero, corresponding facets will not be created. The facets are oriented outwards from the box.
+	
+	@param center: center of the created box; (X,Y,Z) coordinates;
+	
+	@param extents: lengths of the box sides; (eX,eY,eZ);
+	
+	@param orientation: orientation of the box in quaternion format;
+	
+	@param wallMask: bitmask; determines which walls will be created, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32). The numbers are ANDed; the default 63 means to create all walls;
+	
+	@param **kw: passed to utils.facet;
+	
+	@return : List of facets forming the box;
+	
 	"""
 	
-	"""Defense from zero dimensions"""
+	#Defense from zero dimensions
 	if (extents[0]==0):
 		wallMask=1
 	elif (extents[1]==0):
@@ -283,26 +281,26 @@
 	return ret
 	
 def facetCylinder(center,radius,height,orientation=[1,0,0,0],segmentsNumber=10,closed=1,**kw):
-	"""Create arbitrarily-aligned cylinder composed of facets, with given center, height and orientation.
-	:Parameters:
-		`center` :
-			cylinder center; (X,Y,Z) coordinates
-		`radius` :
-			cylinder radius;
-		`extents` :
-			lengths of the box sides; (eX,eY,eZ);
-		`orientation` :
-			orientation of the box in quaternion format;
-		`**kw` :
-			passed to utils.facet;
-		`closed` :
-			flag, which defines, whether cylinder is closed from the ends or not;
-		`segmentsNumber` :
-			the number of edges on the cylinder surface, the minimum is 5;
-	:Return:
-		List of facets forming the cylinder.
+	"""Create arbitrarily-aligned cylinder composed of facets, with given center, radius, height and orientation.
+	
+	@param center: center of the created box; (X,Y,Z) coordinates;
+	
+	@param radius: cylinder radius;
+	
+	@param height: cylinder height;
+	
+	@param orientation: orientation of the box in quaternion format;
+	
+	@param segmentsNumber: the number of edges on the cylinder surface, the minimum is 5;
+	
+	@param closed:  defines, whether cylinder is closed from the ends or not;
+	
+	@param **kw: passed to utils.facet;
+	
+	@return : List of facets forming the cylinder;
+	
 	"""
-	"""Defense from zero dimensions"""
+	#Defense from zero dimensions
 	if (segmentsNumber<5):
 		raise RuntimeError("The segmentsNumber should be at least 5");
 	if (height<=0):


Follow ups