NCF参数化建筑论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6198|回复: 9
打印 上一主题 下一主题

[网络资源] 分享rhinoscript的array函数库

[复制链接]
跳转到指定楼层
1m
发表于 2011-5-21 20:15:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 1235813 于 2011-5-21 20:18 编辑

来至---RhinoScript.org


' ****************************** RhinoScript.org ******************************
'
'   Array Library, version 1.4
'
'   by Hanno Stehling, published Jun 30, 2008
'
'
'   A collection of functions to make life with arrays in RhinoScript easier
'
'
'
'
'   This RhinoScript Library has been downloaded from RhinoScript.org.
'
'   Rhino versions: Rhino 4
'
'   LICENSE INFORMATION:
'   This script is published under the GNU General Public License, version 3
'   or any later version, and thus comes WITHOUT ANY WARRANTY. You can get
'   the complete license text here: www.rhinoscript.org/gpl
'
' ****************************** RhinoScript.org ******************************

' Array library - Version 1.4
' ---------------------------------------
' Hanno Stehling | post@hanno-stehling.de
'
' This library contains some functions to make working with arrays easier.
' Most functions are inspired by PHPs convenient array_* functions. There is
' a function list directly beneath this text. More detailed documentation is
' given directly with the code of each function.
' IMPORTANT:  Nearly all functions only work with one-dimensional arrays,
' exceptions are explicitely mentioned in the documentation. You can use
' array_2to1dim() or array_3to1dim() to create a nested one-dimensional array
' from a two- or three-dimensional one.
' ALSO IMPORTANT: Many functions alter the array you feed them.
' Those arrays are marked * in the documentation (and of course passed ByRef)

' Function list:
' --------------
'
' array_dimensions: get number of array dimensions
' array_dim: dimension a one-dimensional array
' array_dim2: dimension a two-dimensional array
' array_dim3: dimension a three-dimensional array
' array_fill: dimension a one-dimensional array and fill it with a default value
' array_fill2: dimension a two-dimensional array and fill it with a default value
' array_fill3: dimension a three-dimensional array and fill it with a default value
' array_2to1dimension: convert a two-dimensional array into a nested one-dimensional array
' array_3to1dimension: convert a three-dimensional array into a nested one-dimensional array
' array_flatten: convert a nested array into a flat array
' array_flatten2: convert a two-dimensional array into a flat one-dimensional array
' array_flatten3: convert a three-dimensional array into a flat one-dimensional array
' array_swap: swaps dimensions of a two-dimensional array
' array_count: returns the number of elements in an array
' array_insert: insert a value into an array
' array_extract: extract a value from an array
' array_push: append a value to the end of an array
' array_pop: return and remove a value from the end of an array
' array_unshift: insert a value at the beginning of an array
' array_shift: return and remove a value from the beginning of an array
' array_slice: return part of an array
' array_clean: remove all elements with a given value from an array
' array_unique: remove duplicate values from an array
' array_merge: merge two or more arrays
' array_pad: expand an array to a given size and fill new elements with a default value
' array_sort: sort an array
' array_nsort: sort arrays in a nested array after the element at a given index
' array_reverse: get an array in reversed order
' array_search: search an array for a value
' array_search_neg: search an array for an element that does not equal a value
' array_min: get the minimal value found in an array
' array_max: get the maximal value found in an array
' array_sum: get the sum of all values in an array
' array_product: get the product of all values in an array
' array_rand: get the value at a random position of an array
' array_implode: implode all elements of an array to a string
' array_print: print an array to the Rhino command window

20080630_rvb_1_Array_Library_v1.4.rvb (20.39 KB, 下载次数: 37)
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享
2m
发表于 2011-5-21 22:46:25 | 只看该作者
其实是好东西啦  不过这个函数  一般用不上。。。
3m
发表于 2011-5-21 22:46:48 | 只看该作者
mark一下~~
4m
发表于 2011-5-22 10:02:42 | 只看该作者
为啥仅有array
5m
发表于 2011-5-22 14:47:47 | 只看该作者
我的rhinoscript還沒開始!來瞧一下!
6m
发表于 2011-5-23 11:25:34 | 只看该作者
quite good
7m
 楼主| 发表于 2011-5-23 16:15:34 | 只看该作者
thinks {:3_53:}{:3_52:}
8m
发表于 2011-5-24 11:57:54 | 只看该作者
又是一个很有用处的东西啊
9m
发表于 2011-7-29 21:03:58 | 只看该作者
{:3_56:}{:3_56:}
10m
发表于 2011-10-15 12:18:43 | 只看该作者
.................{:3_46:}

小黑屋|手机版|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 )    辽公网安备21021102000973号

GMT+8, 2024-11-22 09:57 , Processed in 0.155772 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表