compute.rhino3d web服务的python客户端库
compute-rhino3d的Python项目详细描述
计算Rhino3D
python包提供调用compute.rhino3d.com的便利函数 几何Web服务
项目名称:https://github.com/mcneel/compute.rhino3d
支持的平台
- 这是一个纯python包,应该适用于python的所有版本
测试
- 开始
python
>>> from rhino3dm import *
>>> import compute_rhino3d.Util
>>> import compute_rhino3d.Mesh
>>>
>>> center = Point3d(250, 250, 0)
>>> sphere = Sphere(center, 100)
>>> brep = sphere.ToBrep()
>>> compute_rhino3d.Util.authToken = AUTH_TOKEN_FROM (rhino3d.com/compute/login)
>>> response = compute_rhino3d.Mesh.CreateFromBrep(brep)
>>> mesh = CommonObject.Decode(response[0])
>>> print("Computed mesh with {} faces".format(len(mesh.Faces))