2013年3月10日 星期日

<心得> Grasshopper /doc. and rhutil./ 差別

原文出處 :
http://www.grasshopper3d.com/forum/topics/doc-and-rhutil

心得: 比較 doc 與 rhuil 的差別

doc -> 
doc is short for "document". It is a class that offers access to a specific 3dm file. It allows you to add and retrieve objects from that file, access the layers, the linetypes, the materials etc. etc.

doc是一個class 提供給使用者直接取出rhino 3dm文件黨中的資訊,如圖層、模型材料、任何模型中的資訊。

rhutil ->
rhutil is a class that provides a wide array of static (Shared in VB) functions. These functions can be called anytime, anywhere as they are not tied to a specific instance of an object (that's what "shared" means).

rhutil 是一個class 提供使用者一個工具模組(當然是使用static class的方式建成)分享於GH VB /C# component (legacy)。

重點->
In the new SDK (RhinoCommon), RhUtil no longer exists. Neither does OnUtil. We've put the shared functions on the types that seem to make the most sense, instead of lumping everything into a single bucket.


在新版的SDK 使用者參照表中,rhutil 和OnUtil此工具模組不再存在給使用者使用,David Rutten 將會把rhutil 和OnUtil 相對應的功能放置在相對應的類別當中。

像是使用者要創建一個封閉平面,再legacy component 可以調用RhUtil.RhinoCreateEdgeSrf();的方法,但再新版的component中使用者必須使用使用brep class 類別中的 Brep.CreatePlanarBreps();此種方法。

但在往後的GH版本,David Rutten還是會保留legacy vb/c#的版本,所以使用這還是可以使用傳統版本,使用傳統版本就可以繼續使用rhutil 和OnUtil的方法。

rhino common sdk 線上版->
http://4.rhino3d.com/5/rhinocommon/




圖片說明 :
grasshopper VB legacy component -> 邊線創建平面的呼叫方法
此本PDF下載地址http://www.grasshopper3d.com/page/scripting-and-code-tutorials




圖片說明 :

rhino common sdk
grasshopper c# component ->  邊線創建平面的呼叫方法

沒有留言:

張貼留言