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的更多相关文章

  1. C#把某个数组的一部分复制到另一个数组中的两种方法:Buffer.BlockCopy和Array.Copy

    static void Main(string[] args) { , , , , , }; ;//目标数组大小 int int_size = sizeof(int);//用于获取值类型的字节大小. ...

  2. Array.Copy

    var bt = new byte[] { 0x03, 0x00, 0x01, 0xD9, 0x23 }; var result = new byte[] { 0x01, 0x00, 0x03, 0x ...

  3. Swift Array copy 的线程安全问题

    Swift Array copy 的线程安全问题 NSArray 继承自 NSObject,属于对象,有 copy 方法.Swift 的 Array 是 struct,没有 copy 方法.把一个 A ...

  4. Array.Copy 数据是克隆吗?

    偶然看到 Array.Copy 方法的时候,想到,它是否是克隆,又是否是深克隆. 做了一个测试 public class abc { public string hello; } [TestMetho ...

  5. C# 字节数组拼接的速度实验(Array.copy(),Buffer.BlockCopy(),Contact())

    无聊做了如题的一个算法的优劣性能比较,由于很多人都只关心结果,那么我先贴出结果如下: 由于我的测试数据量比较小,只能得出Array.Copy()和Buffer.BlockCopy()方法性能要好于Co ...

  6. Array.Copy vs Buffer.BlockCopy

    http://stackoverflow.com/questions/1389821/array-copy-vs-buffer-blockcopy Since the parameters to Bu ...

  7. [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  ...

  8. 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) ...

  9. java使用array.copy复制数组

    总结:理解理解.重要啊 package com.a; import java.util.Arrays; public class FJKDLS { public static void main(St ...

随机推荐

  1. python 统计文件的个数

    import os path = r'F:\1back\picture' #获取当前路径 count = 0 for root,dirs,files in os.walk(path): #遍历统计 i ...

  2. odb_sqlite_demo

    #include <iostream>       #include <odb/database.hxx>   #include <odb/transaction.hxx ...

  3. 1998 NOIP 拼数 string 和sort的新理解

    题目:https://www.luogu.org/problemnew/show/P1012 今天真是长了见识.这道题做了十几分钟,用模拟愣是调不出来.直到我看了题解——(当场去世)…… 题的意思是n ...

  4. mybatis 注解写法 多层嵌套foreach,调用存储过程,批量插入数据

    @Select("<script>" + "DECLARE @edi_Invoice_Details edi_Invoice_Details;" + ...

  5. AutoCAD VBA添加菜单

    # 给cad添加自定义菜单 Private Sub AddBar() Dim NewMenuItem As AcadPopupMenuItem Dim TheMacro As String Dim M ...

  6. React实战之60s倒计时按钮(发送短信验证按钮)

    React实战之60s倒计时按钮——短信验证按钮 导入:(antd组件——Form表单) import { Button, Form, Input } from 'antd'; const FormI ...

  7. 洛谷 P2881 [USACO07MAR]排名的牛Ranking the Cows

    题应该是假的...先不做了 https://www.cnblogs.com/Blue233333/p/7249057.html 比如输入5 0,答案是10,但可以比较8次就出来.就是在一个已知有序数列 ...

  8. selenium-server 启动命令

    启动hub主机: java -jar selenium-server-standalone-2.39.0.jar -role hub 启动node 本地:java -jar selenium-serv ...

  9. Jmeter接口测试---JDBC简单实践

    我的环境:MySQL:mysql-5.6.24-win32 jdbc驱动:mysql-connector-java-5.1.22-bin.jar JMeter:apache-jmeter-2.13 1 ...

  10. [转] Redis在windows下安装过程

    转载自(http://www.cnblogs.com/M-LittleBird/p/5902850.html) 一.下载windows版本的Redis 去官网找了很久,发现原来在官网上可以下载的win ...