Jun 262012
 


# -*- coding: utf-8 -*-
import rhinoscriptsyntax as rs
from random import *

#AddDimension関数
def AddDimension(_startpoint, _endpoint, _dimensionpoint):
rs.AddAlignedDimension(_startpoint, _endpoint, _dimensionpoint)
#ChangeDimScale関数
def ChangeDimScale(_number):
rs.DimScale(_number)



#寸法を取る最初の位置を選択
startpoint = rs.GetPoint("Select start point to add dimension")
#寸法を取る最後の位置を選択
endpoint = rs.GetPoint("Select end point to add dimension")
#寸法を入れたい位置をクリック
dimensionpoint = rs.GetPoint("Click where dimention will aligned")
#寸法の文字の大きさを変更
letterscale = rs.GetInteger("Enter a value of letter scale")



#AddDimension関数呼び出し
AddDimension(startpoint,endpoint,dimensionpoint)

#ChangeDimScale
if( letterscale != 1.0 ):
ChangeDimScale(1.0)
else:
ChangeDimScale(letterscale)


(作成:佐々木雅宏)

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>