返回或设置文档的相对公差。相对公差值为百分比。详情请参考 Rhino 帮助文档中关于 文档属性 的部分。
rhinoscriptsyntax.UnitRelativeTolerance (relative_tolerance=None, in_model_units=True)
rhinoscript.document.UnitRelativeTolerance (relative_tolerance=None, in_model_units=True)
relative_tolerance |
可选参数。数字。相对公差(百分比)。 |
in_model_units |
可选参数。布尔值。返回或修改文档的模型单位(True)或文档的页面单位(False)。默认值为 True 。 |
数字 |
如果没有指定 relative_tolerance 参数,返回当前的相对公差。 |
数字 |
如果指定了 relative_tolerance 参数,返回先前的相对公差。 |
import rhinoscriptsyntax as rs
tol = rs.UnitRelativeTolerance()
if tol<1.0:
rs.UnitRelativeTolerance(1.0)