我试图在Grasshopper中找出曲线的自交点出现的次数,但我不明白为什么我的出现列表中没有考虑一些点。
我使用Curve|Self (CX)查找交叉点,然后在Python中使用count()。
例如,点"2“、" 15”和" 37“是相同的,但是,python发现点2出现1次,15和37出现两次(而不是3次出现这三个点!)。你知道这个问题吗?如何使用Grasshopper和/或Python找到曲线和右侧引用的自交点?
谢谢
发布于 2019-08-06 05:20:37
import Rhino.Geometry.Intersect as its
a = []
itsevents = its.Intersection.CurveSelf(x, 0.01)
for event in itsevents:
a.append(event.PointA)
print len(a)看看这个screenshot,它会更有意义
记住将您的x输入类型提示设置为Curve
https://stackoverflow.com/questions/57141283
复制相似问题