[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2565] branches/geodesic_domes: old gui files deleted replaced by gui_pkhg.py
Peter K.H. Gragert
pkhgragert at gmail.com
Wed Nov 2 08:33:37 CET 2011
Revision: 2565
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2565
Author: pkhg
Date: 2011-11-02 07:33:36 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
old gui files deleted replaced by gui_pkhg.py
Modified Paths:
--------------
branches/geodesic_domes/tests/unittest_buildbasicgeodesics.py
Removed Paths:
-------------
branches/geodesic_domes/geodesic_259.py
branches/geodesic_domes/gui_259.py
branches/geodesic_domes/start_geodesic_dome_259.py
Deleted: branches/geodesic_domes/geodesic_259.py
===================================================================
--- branches/geodesic_domes/geodesic_259.py 2011-11-02 06:43:37 UTC (rev 2564)
+++ branches/geodesic_domes/geodesic_259.py 2011-11-02 07:33:36 UTC (rev 2565)
@@ -1,551 +0,0 @@
-#v 0.4
-###TODO a reset necessary!
-import math
-import bpy
-
-from geodesic_domes import forms_259 as forms_259
-from geodesic_domes import vefm_259 as vefm_259
-from geodesic_domes import geodesic_classes_259 as geodesic_classes_259
-
-created_vefm_mesh_values = None
-last_generated_object = None
-
-superformparam = []
-def check_contains(cl,name , print_value = False):
- dir_class = dir(cl)
- for el in dir_class:
- if el.startswith("_"):
- pass
- else:
- if print_value:
- tmp = getattr(cl,el)
- print(name , " contains ==>",el," value = ", tmp)
- else:
- print(name , " contains ==>",el)
- print("\ncheck_contains finished\n\n")
-
-
-def generate(context):
- global superformparam, last_generated_object
- um = context.scene.superformula_um
- un1 = context.scene.superformula_un1
- un2 = context.scene.superformula_un2
- un3 = context.scene.superformula_un3
- ua = context.scene.superformula_ua
- ub = context.scene.superformula_ub
- vm = context.scene.superformula_vm
- vn1 = context.scene.superformula_vn1
- vn2 = context.scene.superformula_vn2
- vn3 = context.scene.superformula_vn3
- va = context.scene.superformula_va
- vb = context.scene.superformula_vb
- uact = context.scene.superformula_uact
- vact = context.scene.superformula_vact
- uturn = context.scene.superformula_uturn
- vturn = context.scene.superformula_vturn
- utwist = context.scene.superformula_utwist
- vtwist = context.scene.superformula_vtwist
- superformparam=[um,un1,un2,un3,ua,ub,vm,vn1,vn2,vn3,va,vb,uact,vact,uturn*math.pi,vturn*(math.pi),utwist,vtwist]
- chosen_type = get_chosen_type(context)
- print("***INFO generate*** ,chosen:",chosen_type, " \nsuperformparam = ",superformparam)
-
-#startvaule 2.49
-#???PKHG TODO
- if chosen_type == 'Geodesic':
- which_geodesic, which_orientation = get_geodesic_special()
- frequency = context.scene.geodesic_frequency
- eccentricity = context.scene.geodesic_eccentricity
- squish = context.scene.geodesic_flatten
- radius = context.scene.geodesic_radius
- squareness = context.scene.geodesic_square
- squarez = context.scene.geodesic_square_z
- dual = context.scene.geodesic_dual
- parameters=[frequency, eccentricity, squish, radius, squareness,squarez,0,0,0,0,dual,0,0,1,superformparam]
- if which_geodesic == 'Tetrahedron':
- if which_orientation == "PointUp":
- new_geodesic = geodesic_classes_259.tetrahedron(parameters)
- created_vefm_mesh_values = ['Tetrahedron',new_geodesic.PKHG_parameters]
- print("\n**DBG***>>>>>> created_vefm_mesh_values",created_vefm_mesh_values)
- elif which_orientation == "EdgeUp":
- new_geodesic = geodesic_classes_259.tetraedge(parameters)
- else:
- new_geodesic = geodesic_classes_259.tetraface(parameters)
- elif which_geodesic == 'Octahedron':
- if which_orientation == "PointUp":
- new_geodesic = geodesic_classes_259.octahedron(parameters)
- elif which_orientation == "EdgeUp":
- new_geodesic = geodesic_classes_259.octaedge(parameters)
- else:
- new_geodesic = geodesic_classes_259.octaface(parameters)
- elif which_geodesic == 'Icosahedron':
- if which_orientation == "PointUp":
- new_geodesic = geodesic_classes_259.icosahedron(parameters)
- elif which_orientation == "EdgeUp":
- new_geodesic = geodesic_classes_259.icoedge(parameters)
- else:
- new_geodesic = geodesic_classes_259.icoface(parameters)
- new_geodesic.config()
- new_geodesic.connectivity()
- if dual:
- if frequency == 1 and not(which_geodesic == 'Icosahedron'):
- new_geodesic.dual()
- for i,el in enumerate(new_geodesic.verts):
- el.index = i
- for edg in new_geodesic.edges:
- edg.findvect()
- else:
- print("\n\n>>>>>>>>>>>>>>***Conversion not finished ERROR*** no dual at this moment \nand frequence must be 1")
- last_generated_object = new_geodesic
- vefm_259.vefm_add_object(new_geodesic)
- bpy.context.active_object.location = (0,0,0)
- elif chosen_type == 'Grid':
- grxres = context.scene.grid_xres #at this moment any res = 1 will generate only points!
- gryres = context.scene.grid_yres
- grxsz = context.scene.grid_xsize
- 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)
- last_generated_object = grid
- vefm_259.vefm_add_object(grid)
- bpy.context.active_object.location = (0,0,0)
- elif chosen_type == 'Sphere':
- uresolution = context.scene.sphere_uresolution #number of lines N-S (u coordinate)
- vresolution = context.scene.sphere_vresolution #number of lines O-W (v cordinate)
- uscale = context.scene.sphere_uscale #seams to be scaling from center in r direction
- vscale = context.scene.sphere_vscale #expand and shift get factor vscale
- upart = context.scene.sphere_upart # only at side
- vpart = context.scene.sphere_vpart # only at side
- uphase = context.scene.sphere_uphase
- vphase = context.scene.sphere_vphase #default
- utwist = context.scene.sphere_utwist
- vtwist = context.scene.sphere_vtwist
- xscale = context.scene.sphere_xscale #seams to be scaling from center in r direction
- yscale = context.scene.sphere_yscale #expand and shift get factor vscale
- if upart == 0 or vpart == 0:
- print("\n***Info*** xgap and/or ygap should not be zeor, singular type")
- sphere=forms_259.sphere(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
- last_generated_object = sphere
- vefm_259.vefm_add_object(sphere)
- bpy.context.active_object.location = (0,0,0)
- elif chosen_type == 'Cylinder':
- uresolution = context.scene.cylinder_uresolution #number of lines N-S (u coordinate)
- vresolution = context.scene.cylinder_vresolution #number of lines O-W (v cordinate)
- uscale = context.scene.cylinder_uscale #seams to be scaling from center in r direction
- vscale = context.scene.cylinder_vscale #expand and shift get factor vscale
- upart = context.scene.cylinder_upart # only at side
- vpart = context.scene.cylinder_vpart # only at side
- uphase = context.scene.cylinder_uphase
- vphase = context.scene.cylinder_vphase #default
- utwist = context.scene.cylinder_utwist
- vtwist = context.scene.cylinder_vtwist
- xscale = context.scene.cylinder_xscale #seams to be scaling from center in r direction
- yscale = context.scene.cylinder_yscale #expand and shift get factor vscale
- cylinder = forms_259.cylinder(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
- last_generated_object = cylinder
- vefm_259.vefm_add_object(cylinder)
- bpy.context.active_object.location = (0,0,0)
- elif chosen_type == 'Parabola':
- uresolution = context.scene.parabola_uresolution #number of lines N-S (u coordinate)
- vresolution = context.scene.parabola_vresolution #number of lines O-W (v cordinate)
- uscale = context.scene.parabola_uscale #seams to be scaling from center in r direction
- vscale = context.scene.parabola_vscale #expand and shift get factor vscale
- upart = context.scene.parabola_upart # only at side
- vpart = context.scene.parabola_vpart # only at side
- uphase = context.scene.parabola_uphase
- vphase = context.scene.parabola_vphase #default
- utwist = context.scene.parabola_utwist
- vtwist = context.scene.parabola_vtwist
- xscale = context.scene.parabola_xscale #seams to be scaling from center in r direction
- yscale = context.scene.parabola_yscale #expand and shift get factor vscale
- parabola = forms_259.parabola(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
- last_generated_object = parabola
- vefm_259.vefm_add_object(parabola)
- bpy.context.active_object.location = (0,0,0)
- elif chosen_type == 'Torus':
- uresolution = context.scene.torus_uresolution #old ures
- vresolution = context.scene.torus_vresolution #old vres
- uscale = context.scene.torus_uscale #old vrad
- vscale = context.scene.torus_vscale #old urad
- upart = context.scene.torus_upart #old upart
- vpart = context.scene.torus_vpart #old vpart
- uphase = context.scene.torus_uphase #old ugap
- vphase = context.scene.torus_vphase #old vgap
- utwist = 0 #context.scene.torus_utwist #old 0
- vtwist = 0 #context.scene.torus_vtwist #old 0
- xscale = context.scene.torus_xscale #old uellipse
- yscale = context.scene.torus_yscale #old vellipse
- torus = forms_259.torus(uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,superformparam)
- last_generated_object = torus
- vefm_259.vefm_add_object(torus)
- bpy.context.active_object.location = (0,0,0)
- return {'FINISHED'}
-
-def get_chosen_type(context):
- chosen_type = context.scene.choose_type
- print("\n***INFO*** >>>>>chosen type =",chosen_type)
- posible_types = {'0':'Geodesic',
- '1':'Grid',
- '2':'Cylinder',
- '3':'Parabola',
- '4':'Torus',
- '5':'Sphere',
- '6':'Your mesh',
- '7':'Apply sform',
- }
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list