[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2484] branches/geodesic_domes/ geodesic_259.py: Cylinder added (looks strange, but works)

Peter K.H. Gragert pkhgragert at gmail.com
Tue Oct 18 18:04:13 CEST 2011


Revision: 2484
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2484
Author:   pkhg
Date:     2011-10-18 16:04:11 +0000 (Tue, 18 Oct 2011)
Log Message:
-----------
Cylinder added (looks strange, but works)

Modified Paths:
--------------
    branches/geodesic_domes/geodesic_259.py

Modified: branches/geodesic_domes/geodesic_259.py
===================================================================
--- branches/geodesic_domes/geodesic_259.py	2011-10-18 15:41:52 UTC (rev 2483)
+++ branches/geodesic_domes/geodesic_259.py	2011-10-18 16:04:11 UTC (rev 2484)
@@ -40,20 +40,25 @@
         grysz = context.scene.grid_ysize
         grid=forms_259.grid(grxres,gryres,grxsz,grysz,1.0,1.0,0,0,0,0,1.0,1.0,superformparam)
         vefm_259.vefm_add_object(grid)
-    if chosen_type == 'Sphere':
+    if chosen_type == 'Sphere' or chosen_type == 'Cylinder':
         uresolution = context.scene.sphere_xres #number of lines N-S  (u coordinate)
         vresolution = context.scene.sphere_yres #number of lines O-W  (v cordinate)
         uscale = 10  #seams to be scaling from center in r direction
         vscale = 0   #expand and shift get factor vscale
         upart = 6.5 #gap?
         vpart = 1 #defines gaps?!
-        uphase = vphase = 1
+        uphase = 1
+        vphase = 1
         utwist = 0
         vtwist = 0
         xscale = 1  #scale in x direction
-        yscale = 1  #scale in z direction not y ?! the heigth so to say 
-        sphere=forms_259.sphere(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
-        vefm_259.vefm_add_object(sphere)        
+        yscale = 1  #scale in z direction not y ?! the heigth so to say
+        if chosen_type == 'Sphere':
+            sphere=forms_259.sphere(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
+            vefm_259.vefm_add_object(sphere)
+        elif chosen_type == 'Cylinder':
+            cylinder = forms_259.cylinder(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
+            vefm_259.vefm_add_object(cylinder)
     return {'FINISHED'}
 
 def get_chosen_type(context):



More information about the Bf-extensions-cvs mailing list