[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2592] contrib/py/scripts/addons/ add_mesh_masonry.py: removing masonry this script is now a package in the add_mesh_walls folder
Brendon Murphy
meta.androcto1 at gmail.com
Mon Nov 7 16:22:47 CET 2011
Revision: 2592
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2592
Author: meta-androcto
Date: 2011-11-07 15:22:46 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
removing masonry this script is now a package in the add_mesh_walls folder
Removed Paths:
-------------
contrib/py/scripts/addons/add_mesh_masonry.py
Deleted: contrib/py/scripts/addons/add_mesh_masonry.py
===================================================================
--- contrib/py/scripts/addons/add_mesh_masonry.py 2011-11-07 09:38:58 UTC (rev 2591)
+++ contrib/py/scripts/addons/add_mesh_masonry.py 2011-11-07 15:22:46 UTC (rev 2592)
@@ -1,2404 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you may redistribute it, and/or
-# modify it, under the terms of the GNU General Public License
-# as published by the Free Software Foundation - either version 2
-# 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
-#
-# or go online at: http://www.gnu.org/licenses/ to view license options.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
- "name": "Masonry",
- "author": "Paul Spooner, Dudecon, Ziggy",
- "version": (0,5,8),
- "blender": (2, 5, 9),
- "api": 39789,
- "location": "View3D > Add > Mesh > Masonry",
- "description": "Add Stonework - walls, towers, path, block meshes.",
- "warning": "WIP - updates pending and API not final for Blender",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
- "Scripts/Add_Mesh/Masonry",
- "tracker_url": "http://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=24980",
- "category": "Add Mesh"
-}
-
-"""
- This script builds a wall; at current 3D-Cursor location.
- The wall can be modified to be a disc (radial), curved (slope), or dome (radial+slope).
- Actually, it could be a path, or a tower, or anything made with blocks.
- Crenelations also work which can double as arrow slits or support beam holes.
- Slots, both vertical and horizontal, can be added as openings.
- Steps and platforms may be added as extensions to the wall.
-"""
-
-# Using SourceForge commit number as version until official release.
-VERSION = '\n\tAdd Masonry v0.58' # show on load (add to menu)
-
-# Version History
-# v0.58 2010/12/06 Added "backside" for shelf and steps, and "cantilevered step" options.
-# v0.57 2010/12/03 Minor updates for Blender SVN maintenance.
-# v0.56 2010/11/19 Revised UI for property access/display.
-# V0.55 2010/11/15 Added stairs, improved shelf, fixed plan generation.
-# V0.54 2010/11/11 Changed version number to match sourceforge check-in,
-# basic shelf, and, some general cleanup.
-# V0.5 2010/10/31 Converted to Blender 2.5.4
-# V0.4 2009/11/29 Converted to Blender 2.5
-# V0.3 2009/11/28 Re-did much of the internals, everything works better,
-# especially edge finding.
-# V0.2 2008/03/?? Reworked nearly all the code, many new features
-# V0.1 2007/09/14 First release!
-
-##
-#
-# Module notes:
-#
-# All uses for tlist are commented out for release
-# (time tracking disabled).
-#
-##
-
-# <pep8-80 compliant>
-
-import bpy, time, math
-from random import random
-from math import fmod, sqrt, sin, cos, atan
-
-#A few constants
-SMALL = 0.000000000001
-NOTZERO = 0.01 # for values that must be != 0; see UI options/variables -
-# sort of a bug to be fixed.
-PI = math.pi
-
-#global variables
-
-#General masonry Settings
-settings = {'w': 1.2, 'wv': 0.3, 'h': .6, 'hv': 0.3, 'd': 0.3, 'dv': 0.1,
- 'g': 0.1, 'gv': 0.07, 'gd': 0.01, 'gdv': 0.0, 'b': 0, 'bv': 0,
- 'f': 0.0, 'fv': 0.0, 't': 0.0, 'sdv': 0.1, 'hwt': 0.5, 'aln':0,
- 'wm': 0.8, 'hm': 0.3, 'dm':0.1,
- 'woff':0.0, 'woffv':0.0, 'eoff':0.3, 'eoffv':0.0, 'rwhl':1,
- 'hb':0, 'ht':0, 'ge':0, 'physics':0}
-# 'w':width 'wv':widthVariation
-# 'h':height 'hv':heightVariation
-# 'd':depth 'dv':depthVariation
-# 'g':grout 'gv':groutVariation 'gd':groutDepth 'gdv':groutDepthVariation
-# 'b':bevel 'bv':bevelVariation
-# 'f':flawSize 'fv':flawSizeVariation 'ff':flawFraction
-# 't':taper
-# 'sdv':subdivision(distance or angle)
-# 'hwt':row height effect on block widths in the row (0=no effect,
-# 1=1:1 relationship, negative values allowed, 0.5 works well)
-# 'aln':alignment(0=none, 1=rows w/features, 2=features w/rows)
-# (currently un-used)
-# 'wm':width minimum 'hm':height minimum 'dm':depth minimum
-# 'woff':row start offset(fraction of width)
-# 'woffv':width offset variation(fraction of width)
-# 'eoff':edge offset 'eoffv':edge offset variation
-# 'rwhl':row height lock(1 is all blocks in row have same height)
-# 'hb':bottom row height 'ht': top row height 'ge': grout the edges
-# 'physics': set up for physics
-
-# dims = area of wall (face)
-dims = {'s':0, 'e':PI*3/2, 'b':0.1, 't':12.3} # radial
-# 's':start x or theta 'e':end x or theta 'b':bottom z or r 't':top z or r
-# 'w' = e-s and h = t-b; calculated to optimize for various operations/usages
-#dims = {'s':-12, 'e':15, 'w':27, 'b':-15., 't':15., 'h':30}
-#dims = {'s':-bayDim/2, 'e':bayDim/2, 'b':-5., 't':10.} # bay settings?
-
-radialized = 0 # Radiating from one point - round/disc; instead of square
-slope = 0 # Warp/slope; curved over like a vaulted tunnel
-# 'bigblock': merge adjacent blocks into single large blocks
-bigBlock = 0 # Merge blocks
-
-# Gaps in blocks for various apertures.
-#openingSpecs = []
-openingSpecs = [{'w':0.5, 'h':0.5, 'x':0.8, 'z':2.7, 'rp':1, 'b':0.0,
- 'v':0, 'vl':0, 't':0, 'tl':0}]
-# 'w': opening width, 'h': opening height,
-# 'x': horizontal position, 'z': vertical position,
-# 'rp': make multiple openings, with a spacing of x,
-# 'b': bevel the opening, inside only, like an arrow slit.
-# 'v': height of the top arch, 'vl':height of the bottom arch,
-# 't': thickness of the top arch, 'tl': thickness of the bottom arch
-
-# Add blocks to make platforms.
-shelfExt = 0
-#shelfSpecs = []
-shelfSpecs = {'w':0.5, 'h':0.5, 'd': 0.3, 'x':0.8, 'z':2.7}
-# 'w': block width, 'h': block height, 'd': block depth (shelf size; offset from wall)
-# 'x': horizontal start position, 'z': vertical start position
-
-# Add blocks to make steps.
-stepSpecs = {'x':0.0, 'z':-10, 'w':10.0, 'h':10.0,
- 'v':0.7, 't':1.0, 'd':1.0 }
-# 'x': horizontal start position, 'z': vertical start position,
-# 'w': step area width, 'h': step area height,
-# 'v': riser height, 't': tread width, 'd': block depth (step size; offset from wall)
-
-
-#tlist = [(time.clock(),'start')]
-# example sample tlist += [(time.clock(),'make pancakes')]
-
- #easier way to get to the random function
-def rnd(): return random()
-
- #random number from -0.5 to 0.5
-def rndc(): return (random() - 0.5)
-
- #random number from -1.0 to 1.0
-def rndd(): return (random() - 0.5)*2.0
-
-
-#Opening Test suite
-#opening test function
-
-def test(TestN = 13):
- dims = {'s':-29., 'e':29., 'b':-6., 't':TestN*7.5}
- openingSpecs = []
- for i in range(TestN):
- x = (random() - 0.5) * 6
- z = i*7.5
- v = .2 + i*(3./TestN)
- vl = 3.2 - i*(3./TestN)
- t = 0.3 + random()
- tl = 0.3 + random()
- rn = random()*2
- openingSpecs += [{'w':3.1 + rn, 'h':0.3 + rn, 'x':float(x),
- 'z':float(z), 'rp':0, 'b':0.,
- 'v':float(v), 'vl':float(vl),
- 't':float(t), 'tl':float(tl)}]
- return dims, openingSpecs
-
-#dims, openingSpecs = test(15)
-
-
-#For filling a linear space with divisions
-def fill(left, right, avedst, mindst=0.0, dev=0.0, pad=(0.0,0.0), num=0,
- center=0):
- __doc__ = '''\
- Fills a linear range with points and returns an ordered list of those points
- including the end points.
-
- left: the lower boundary
- right: the upper boundary
- avedst: the average distance between points
- mindst: the minimum distance between points
- dev: the maximum random deviation from avedst
- pad: tends to move the points near the bounds right (positive) or
- left (negative).
- element 0 pads the lower bounds, element 1 pads the upper bounds
- num: substitutes a numerical limit for the right limit. fill will then make
- a num+1 element list
- center: flag to center the elements in the range, 0 == disabled
- '''
-
- poslist = [left]
- curpos = left+pad[0]
-
- # Set offset by average spacing, then add blocks (fall through);
- # if not at right edge.
- if center:
- curpos += ((right-left-mindst*2)%avedst)/2+mindst
- if curpos-poslist[-1]<mindst: curpos = poslist[-1]+mindst+rnd()*dev/2
-
- # clip to right edge.
- if (right-curpos<mindst) or (right-curpos< mindst-pad[1]):
- poslist.append(right)
- return poslist
-
- else: poslist.append(curpos)
-
- #unused... for now.
- if num:
- idx = len(poslist)
-
- while idx<num+1:
- curpos += avedst+rndd()*dev
- if curpos-poslist[-1]<mindst:
- curpos = poslist[-1]+mindst+rnd()*dev/2
- poslist.append(curpos)
- idx += 1
-
- return poslist
-
- # make block edges
- else:
- while True: # loop for blocks
- curpos += avedst+rndd()*dev
- if curpos-poslist[-1]<mindst:
- curpos = poslist[-1]+mindst+rnd()*dev/2
- # close off edges at limit
- if (right-curpos<mindst) or (right-curpos< mindst-pad[1]):
- poslist.append(right)
- return poslist
-
- else: poslist.append(curpos)
-
-
-#For generating block geometry
-def MakeABlock(bounds, segsize, vll=0, Offsets=None, FaceExclude=[],
- bevel=0, xBevScl=1):
- __doc__ = '''\
- MakeABlock returns lists of points and faces to be made into a square
- cornered block, subdivided along the length, with optional bevels.
- bounds: a list of boundary positions:
- 0:left, 1:right, 2:bottom, 3:top, 4:back, 5:front
- segsize: the maximum size before lengthwise subdivision occurs
- vll: the number of vertexes already in the mesh. len(mesh.verts) should
- give this number.
- Offsets: list of coordinate delta values.
- Offsets are lists, [x,y,z] in
- [
- 0:left_bottom_back,
- 1:left_bottom_front,
- 2:left_top_back,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list