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 ...
随机推荐
- 论如何O(1)快速乘
然而并没有什么好论的... 直接贴代码算了... ll Mul(ll x,ll y,ll Mod){ x=(x%Mod+Mod)%Mod;y=(y%Mod+Mod)%Mod; return (x*y- ...
- ZOJ2107 Quoit Design 最近点对
ZOJ2107 给定10^5个点,求距离最近的点对的距离. O(n^2)的算法是显而易见的. 可以通过分治优化到O(nlogn) 代码很简单 #include<iostream> #inc ...
- VBNET AutoCAD Activex 切换图层为当前图层失效
最近有朋友询问切换图层的代码 com切换图层 <CommandMethod("mycl")> Public Sub MySubLayerChange() Dim Thi ...
- 【洛谷3345_BZOJ3924】[ZJOI2015]幻想乡战略游戏(点分树)
大概有整整一个月没更博客了 -- 4 月为省选爆肝了一个月,最后压线进 B 队,也算给 NOIP2018 翻车到 316 分压线省一这个折磨了五个月的 debuff 画上了一个不算太差的句号.结果省选 ...
- 01背包(类) UVA 10564 Paths through the Hourglass
题目传送门 /* 01背包(类):dp[i][j][k] 表示从(i, j)出发的和为k的方案数,那么cnt = sum (dp[1][i][s]) 状态转移方程:dp[i][j][k] = dp[i ...
- 启动tomcat报错:ImageFormatException
启动某工程报错: java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException 查找此类存在于jdk的rt ...
- VMWare虚拟网络编辑
VMWare虚拟网络编辑记录. 点击"编辑->虚拟网络编辑器" 在网卡列表中选择"VMnet8"查看目前设置,点击右下角的更改设置进行网络修改. 备注:更 ...
- mysqldump使用笔记
mysqldump备份简述 mysqldump可产生两种类型的输出文件,取决于是否选用 --tab=dir_name选项. 1.不使用 --tab=dir_name选项,mysqldump产生的数据文 ...
- leetcode377 Combination Sum IV
思路: dp. 实现: class Solution { public: int combinationSum4(vector<int>& nums, int target) { ...
- Android基础TOP4_2:弹窗式选择列表
Activity: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...