array copy rotate in Pointwise
goal:

#
# Copyright 2010 (c) Pointwise, Inc.
# All rights reserved.
#
# This sample Pointwise script is not supported by Pointwise, Inc.
# It is provided freely for demonstration purposes only.
# SEE THE WARRANTY DISCLAIMER AT THE BOTTOM OF THIS FILE.
# ###############################################################################
##
## ArrayCopyRotate.glf
##
## Script to create copy all grid and database entities a user-prescribed
## number of times about a user-prescribed axis and angle.
##
############################################################################### package require PWI_Glyph 2 ############################################################################
# Define all user parameters
############################################################################ set RotAxis1 "0 0 0"
set RotAxis2 "1 0 0"
set RotAngle 60
set numRotCopies 2 ############################################################################
# Get and assign all database and grid entities to a variable.
############################################################################ set AllDB [pw::Database getAll]
set AllGrid [pw::Grid getAll]
set AllEnts [concat $AllDB $AllGrid] ############################################################################
## Set up control loop to paste multiple copies based
## on the prescribed rotation angle (RotAngle), the number of
## copies (numRotCopies), and the rotation axis (RotAxis1, RotAxis2).
############################################################################ for {set i 1} { $i <= $numRotCopies} { incr i } { # Copy the entities.
set copyMode [pw::Application begin Copy $AllEnts]
# Get the pasted entities.
set Copies [$copyMode getEntities]
# Set up the transformation.
set Rotate [pwu::Transform rotation -anchor $RotAxis1 $RotAxis2 [expr $RotAngle*$i]]
# Rotate the pasted entities.
pw::Entity transform $Rotate $Copies $copyMode end
}
Reference
https://github.com/pointwise/ArrayCopyRotate
array copy rotate in Pointwise的更多相关文章
- C#把某个数组的一部分复制到另一个数组中的两种方法:Buffer.BlockCopy和Array.Copy
static void Main(string[] args) { , , , , , }; ;//目标数组大小 int int_size = sizeof(int);//用于获取值类型的字节大小. ...
- Array.Copy
var bt = new byte[] { 0x03, 0x00, 0x01, 0xD9, 0x23 }; var result = new byte[] { 0x01, 0x00, 0x03, 0x ...
- Swift Array copy 的线程安全问题
Swift Array copy 的线程安全问题 NSArray 继承自 NSObject,属于对象,有 copy 方法.Swift 的 Array 是 struct,没有 copy 方法.把一个 A ...
- Array.Copy 数据是克隆吗?
偶然看到 Array.Copy 方法的时候,想到,它是否是克隆,又是否是深克隆. 做了一个测试 public class abc { public string hello; } [TestMetho ...
- C# 字节数组拼接的速度实验(Array.copy(),Buffer.BlockCopy(),Contact())
无聊做了如题的一个算法的优劣性能比较,由于很多人都只关心结果,那么我先贴出结果如下: 由于我的测试数据量比较小,只能得出Array.Copy()和Buffer.BlockCopy()方法性能要好于Co ...
- Array.Copy vs Buffer.BlockCopy
http://stackoverflow.com/questions/1389821/array-copy-vs-buffer-blockcopy Since the parameters to Bu ...
- [Array]189. Rotate Array
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array ...
- js array copy method
//浅拷贝: let arr=[1,2,3,4] let arr2=arr arr[3]=0 console.log(arr,arr2) //output: (4) [1, 2, 3, 0] (4) ...
- java使用array.copy复制数组
总结:理解理解.重要啊 package com.a; import java.util.Arrays; public class FJKDLS { public static void main(St ...
随机推荐
- POJ1808 平方(二次)同余方程
POJ1808 给定一个方程 x*x==a(mod p) 其中p为质数 判断是否有解 程序中 MOD_sqr()返回整数解 无解返回-1 数学证明略 #include<iostream> ...
- Python 之reduce()函数
reduce()函数: reduce()函数也是Python内置的一个高阶函数.reduce()函数接收的参数和 map()类似,一个函数 f,一个list,但行为和 map()不同,reduce() ...
- Java 链式写法
Java链式写法,子类继承父类的属性,也可以返回子类的对象,只是需要重写基类的Set方法 public class MyLS { public static void main(String[] ar ...
- 第三章 K近邻法(k-nearest neighbor)
书中存在的一些疑问 kd树的实现过程中,为何选择的切分坐标轴要不断变换?公式如:x(l)=j(modk)+1.有什么好处呢?优点在哪?还有的实现是通过选取方差最大的维度作为划分坐标轴,有何区别? 第一 ...
- 【原创】Eclipse实现图形化界面插件-vs4e
vs4e插件下载地址:http://visualswing4eclipse.googlecode.com/files/vs4e_0.9.12.I20090527-2200.zip 下载完成后,解压,然 ...
- GIT学习之路第四天 远程仓库
本文参考廖雪峰老师的博客进行总结,完整学习请转廖雪峰博客 git的服务器---Github,自行注册github账号后,按下面的步骤操作: 第一步,事实上,本地Git仓库和Github仓库之间的传输是 ...
- DFS POJ 1321 棋盘问题
题目传送门 /* DFS:因为一行或一列都只放一个,可以枚举从哪一行开始放,DFS放棋子,同一列只能有一个 */ #include <cstdio> #include <algori ...
- MVC之模型绑定
1.前言 MVC全名是Model View Controller,是模型(model)-视图(view)-控制器(controller)的缩写,一种软件设计典范,用一种业务逻辑.数据.界面显示分离的方 ...
- Unity笔记(2)自学第一天
学习记录: 界面使用:
- re.S解析
转自:https://www.cnblogs.com/xieqiankun/p/re-sinpython.html 在Python的正则表达式中,有一个参数为re.S.它表示“.”(不包含外侧双引号, ...