I made this little addon this evening out of curiosity, it takes the magnitudes of the vertices of the active objects mesh, then makes the large ones small and the small ones large.
I wasn’t going to write a post or put it anywhere (because its only a little thing) but it effectively extends the number of basic meshes you can add… Have a look, and and let me know if it is worth uploading somewhere??? It’s found as a menu option under objects.
Try adding a cube, subdivide once then invert magnitudes. Do the same for the cone etc. If you do this with an IcoSphere (one subdivision) it makes a Icosidodecahedron, which was a surprise for me!!..
also try moving the objects origin first…
# -*- coding: utf-8 -*-
# ##### BEGIN GPL LICENSE BLOCK #####
#
# Blender script - Invert Magnitudes
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) Feb 2012 by John Michael Palmer
# All rights reserved.
#
# Contact: john53john + at + gmail + dot + com
# Information: none yet ###
#
# The Original Code is: all of this file.
#
# Contributor(s): none yet.
#
# ##### END GPL LICENSE BLOCK #####
bl_info = {
"name": "Invert Magnitudes",
"author": "John Michael Palmer (jump)",
"version": (0, 1),
"blender": (2, 6, 3),
"location": "",
"description": "Invert mesh Magnitudes",
"warning": "",
"wiki_url": "",
"tracker_url": ""\
"",
"category": "Mesh"}
import bpy
class FractionInvert(bpy.types.Operator):
bl_idname = 'invertmops.frac'
bl_label = 'Change Magnitudes based on a Fraction'
def execute(self, context):
sc = context.scene
mesh = sc.objects.active.data
mags = [v.co.magnitude for v in mesh.vertices]
mmin = min(mags)
mmax = max(mags)
mrange = mmax - mmin
if(mrange != 0):
for vert in mesh.vertices:
mag = mags[vert.index]
unitvec = vert.co.normalized()
minvec = unitvec * mmin
frac = (mag - mmin) / mrange
newfrac = 1 - frac # that's magic bit
vert.co = (newfrac * mrange * unitvec) + minvec
return {'FINISHED'}
def menu_draw(self, context):
self.layout.operator('invertmops.frac', text="Invert Magnitudes", icon = "PLUGIN")
def register():
bpy.utils.register_module(__name__)
bpy.types.VIEW3D_MT_object.prepend(menu_draw)
def unregister():
bpy.utils.unregister_module(__name__)
bpy.types.VIEW3D_MT_object.remove(menu_draw)
if __name__ == "__main__":
register()