弱弱的回个贴,还不会gh,楼主看下这段代码能不能给楼主点思路
#coding=utf-8
import rhinoscriptsyntax as rs
cur = rs.GetObject("请选取曲线",rs.filter.curve)
re = rs.GetReal("请输入分段数")
poi = rs.DivideCurve(cur, re)
for i in poi:
pa = rs.CurveClosestPoint(cur, i)
vet = rs.CurveTangent(cur, pa)
vet_scale = rs.VectorScale(vet, 5)
poi2 = rs.PointAdd(i,vet_scale)
line = rs.AddLine(i,poi2)
rs.CurveArrows(line, 2) |