??????????????????

 1年総政_中村 健太郎  ?????????????????? はコメントを受け付けていません。
6月 262012
 

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

x = raw_input("?????")
obj = rs.GetObject("?????????")

if obj:
	origin = rs.GetPoint("??????")
	if origin:
		rs.ScaleObject( obj, origin, (x,x,x))

??????????

??????????????????????

 1年総政_中村 健太郎  ?????????????????????? はコメントを受け付けていません。
6月 262012
 

a href=”http://algorism.000lab.com/?attachment_id=436″ rel=”attachment wp-att-436″>

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

obj = rs.GetObject("??????????????")

if obj:
	start = rs.GetPoint("?????????")
	end = rs.GetPoint("?????????")
	
	if start and end:
		rs.MirrorObject( obj, start, end, True )

?????????

2??????????????????

 1年総政_中村 健太郎  2?????????????????? はコメントを受け付けていません。
6月 262012
 

a href=”http://algorism.000lab.com/?attachment_id=434″ rel=”attachment wp-att-434″>

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

obj1 = rs.GetObject(message = "select first line")
obj2 = rs.GetObject(message = "select second line")

#obj1 LineLineIntersection()?????????
startpoint1 = rs.CurveStartPoint(obj1)
endpoint1 = rs.CurveEndPoint(obj1)
line1 = (startpoint1,endpoint1)

#obj2 LineLineIntersection()?????????
startpoint2 = rs.CurveStartPoint(obj2)
endpoint2 = rs.CurveEndPoint(obj2)
line2 = (startpoint2,endpoint2)

#???????
points = rs.LineLineIntersection(line1,line2)

#???????????????? ??????X???????????
a = int(startpoint1[0])
b = int(points[0][0])
c = int(endpoint1[0])
if a<b & b<c:
	pt = rs.AddPoint(points&#91;0&#93;)
	#????????
	rs.ObjectColor(pt,color = &#91;255,0,0&#93;)
elif a>b & b>c:
	pt = rs.AddPoint(points[0])
	#????????
	rs.ObjectColor(pt,color = [255,0,0])
else:
	print "????????????"

?????????

2??????????????????

 1年総政_中村 健太郎  2?????????????????? はコメントを受け付けていません。
6月 262012
 

a href=”http://algorism.000lab.com/?attachment_id=431″ rel=”attachment wp-att-431″>

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

obj1 = rs.GetObject(message = "select first line")
obj2 = rs.GetObject(message = "select second line")

#obj1 LineLineIntersection()?????????
startpoint1 = rs.CurveStartPoint(obj1)
endpoint1 = rs.CurveEndPoint(obj1)
line1 = (startpoint1,endpoint1)

#obj2 LineLineIntersection()?????????
startpoint2 = rs.CurveStartPoint(obj2)
endpoint2 = rs.CurveEndPoint(obj2)
line2 = (startpoint2,endpoint2)

#???????
points = rs.LineLineIntersection(line1,line2)
pt = rs.AddPoint(points[0])
#????????
rs.ObjectColor(pt,color = [255,0,0])

?????????