次のメソッドは、メッシュ エッジへの基本アクセスを提供します。
メソッド:
getEdgeVis <mesh> <face_index_integer> <edge_index_integer>
インデックスで指定された面上にある所定のエッジ(1、2、3)について、可視性をブール値で返します。
setEdgeVis <mesh> <face_index_integer> <edge_index_integer> <boolean>
インデックスで指定された面上にある所定のエッジ(1、2、3)について、可視性を設定します。
getEdgeSelection <node> [<modifier_or_index>] [name:<name> ]
getEdgeSelection <mesh>
エッジ選択セットを取得します。オプションの name:
パラメータが BitArray として指定されている場合は、指定された名前の付いた選択セットを取得します。詳細は、getVertSelection()
メソッドを参照してください。
setEdgeSelection <node> [<modifier_or_index>] ( <sel_bitarray> | <sel_array> ) [name:<name> ] [keep:<boolean> ]
setEdgeSelection <mesh> ( <sel_bitarray> | <sel_array> ) [keep:<boolean> ]
編集可能メッシュ基本オブジェクト、メッシュ選択モディファイヤ、メッシュを編集モディファイヤ、ポリゴンを選択モディファイヤ、または TriMesh にエッジの選択内容を設定します。これらの関数は、既に述べた選択項目を取得する関数に対応しています。詳細は、setVertSelection()
メソッドを参照してください。
deselectHiddenEdges <mesh>
メッシュ内で非表示のエッジの選択を解除します。このメソッドは TriMesh には適用されません。
例:
obj = convertToMesh (Sphere()) -- Create a Sphere, turn to EMesh obj.allEdges = true -- Show all edges select obj -- Select the mesh max modify mode -- Switch to Modify panel subObjectLevel = 2 -- Set Sub-Object level to Edge edgeSelSet=#() -- Init. an Array for face = 1 to obj.numfaces do -- Go through all faces for edge = 1 to 3 do -- And for every of the 3 edges if (getedgevis obj face edge) do -- If the visibility is true, append edgeSelSet (((face-1)*3)+edge) --collect the edge setedgeselection obj edgeSelSet -- Select all visible edges
![]()
以下の関数は Point 2 値としてエッジを定義する 2 つの頂点のインデックスを返します。関数の 2 つの引数は編集可能メッシュ ノードまたは TriMesh 値とエッジ インデックスです。最初の引数が編集可能メッシュ ノードまたは TriMesh 値でない場合、あるいはエッジ インデックスが範囲外の場合は、undefined
値が返されます。
関数:
fn edgeVerts theObj theEdge = ( if not (classof theObj == Editable_mesh or classof theObj == triMesh) do return undefined if theEdge < 1 or theEdge >(theObj.numfaces*3) do return undefined local theFace = ((theEdge-1)/3)+1 local theVerts = getFace theObj theFace case ((mod (theEdge-1)3) as integer) of ( 0: point2 theVerts.x theVerts.y 1: point2 theVerts.y theVerts.z 2: point2 theVerts.z theVerts.x ) )
メッシュに関連するメソッドについては、以下を参照してください。