<p>我是个初学者,我想用python编写while循环。我有两条相交的共面曲线,我想在公共平面上移动第一条曲线的某个向量,直到它们不再相交。我试过这样的方法:</p>
<pre><code>vec = [0,0.1,0]
int = True
while True:
move=rs.MoveObject(curve1,vec)
int=rs.CurveCurveIntersection(curve1, curve2)
if int = False:
break
</code></pre>
<p>有人知道我做错什么了吗?
提前谢谢!在</p>
<p>首先,您使用int关键字(integer类型)作为变量,并显式地将'int'变量设置为False(这是if中的语法错误)。这会把你的系统搞砸。您也没有显示错误消息是什么。在</p>
<pre><code>intersect = rs.CurveCurveIntersection(curve1, curve2)
if not intersect:
break
</code></pre>