AddPointInteriorToPolygon

導入

v4.0

詳細

指定のポリゴンの内側にポイントを追加します。 このポイントは、それぞれ適切なウェイトが指定されたポリゴンの 3 つのノードにより求められる重心座標(「オフセット」と呼ばれます)で定義されます。

Pt = Weight1 * Polygon.Node(Offset1).Pos

+ Weight2 * Polygon.Node(Offset2).Pos

+ Weight3 * Polygon.Node(Offset3).Pos

最終ポイントは、高さパラメータを使用して、ポリゴン平面の上または下に配置できます。

注: このコマンドを使用するのは、AddEdge コマンドを使用して新しいエッジ シーケンスを開始し、TerminateAddEdgeWithInteriorPoints コマンドを呼び出して次の最終エッジを作成した後(多数の内部ポイントが作成された状態)でないと意味がありません。

スクリプト構文

AddPointInteriorToPolygon( Operator, PolygonID, FirstOffset, SecondOffset, ThirdOffset, FirstWeight, SecondWeight, ThirdWeight, [Height] );

パラメータ

パラメータ タイプ 説明
Operator 文字列 最終エッジ シーケンスを作成するのに使用される [エッジ オペレータの追加]を指定します。
PolygonID Integer ポリゴンの ID
FirstOffset Integer ポリゴンのポイント リスト内にある最初の重心点が格納されているインデックス。
SecondOffset Integer ポリゴンのポイント リスト内にある 2 番目の重心点が格納されているインデックス。
ThirdOffset Integer ポリゴンのポイント リスト内にある 3 番目の重心点が格納されているインデックス。
FirstWeight Double 最初のポイントの重心の重さ。
SecondWeight Double 2 番目のポイントの重心の重さ。
ThirdWeight Double 3 番目のポイントの重心の重さ。
Height Double ポリゴン平面の下の高さ。

デフォルト値: 0.0

VBScript の例

'

' The following example uses add-edge and at some point adds a 

' point in the interior of a quad. The edge is terminated using 

' TerminateAddEdgeWithInteriorPoints.

'

NewScene , false

CreatePrim "Grid", "MeshSurface"

SetValue "grid.polymsh.geom.subdivu", 1

SetValue "grid.polymsh.geom.subdivv", 1

SplitEdge "grid.edge[1]", 64.9271844660194, False, True, siPersistentOperation

ApplyOp "AddEdge", "grid.pnt[LAST];grid.edge[3];grid.poly[0]"

AddPointInteriorToPolygon "grid.polymsh.addedgeop", 0, 0, 1, 2, _

	0.394370594438662, 0.102825667243581, 0.502803738317757

TerminateAddEdgeWithInteriorPoints "grid.polymsh.addedgeop", 0, 3, 27.7912621359223

関連項目

ApplyOp ConnectNewPolygonToEdge ConnectNewPolygonToPoint AddPointToNewPolygon RemovePointFromPolygon RemoveLastPointInteriorToPolygon TerminateAddEdgeWithInteriorPoints SnapOffsetToPointForSlicePolygons