v7.5
指定したエッジリストを、Unfold Property のカッティングラインとして設定します。この操作は、UnfoldClearCut の後に UnfoldAddToCut を実行することと同じです。
oBoolean = UnfoldSetCut( UnfoldProperty, [EdgeList(s)] ); |
コマンドが成功したかどうかをレポートするBooleanを戻します。
| パラメータ | タイプ | 説明 |
|---|---|---|
| UnfoldProperty | Property | 新しいカッティング ラインの定義を設定する Unfold プロパティ。 |
| EdgeList(s) | エッジのリストまたは EdgeCollection |
カッティング ラインの定義に使用されるエッジ。 デフォルト値:指定されていない場合は、現在の選択が使用されます。 |
#
# This example demonstrates how to set and reset the
# current cutting definition of an Unfold property
#
a = Application
a.NewScene("", 0)
def LogCuts( in_prop ) :
x = Application
x.UnfoldSelectCut(in_prop)
if (x.Selection.Count) :
x.LogMessage(in_prop.Parent3DObject.Name + " cutting line: " + x.Selection(0).Value)
else :
x.LogMessage(in_prop.Parent3DObject.Name + " cutting line: [empty]")
g = a.CreatePrim("Grid", "MeshSurface")
# Set up an Unfold property on the grid with a cutting line
a.UnfoldApply("grid")
up = g.Properties("Unfold")
a.UnfoldSetCut(up, "grid.edge[14,34,51,68,71,73,75]")
LogCuts(up)
# Now modify the cutting line definition
a.UnfoldAddToCut(up, "grid.edge[2,3]")
LogCuts(up)
# Now set a completely different definition
a.UnfoldSetCut(up, "grid.edge[5,28,45,48,50,66,83,100,103,105,121]")
LogCuts(up)
# -------------------------
# Expected results
# INFO : grid cutting line: grid.edge[14,34,51,68,71,73,75]
# INFO : grid cutting line: grid.edge[2,3,14,34,51,68,71,73,75]
# INFO : grid cutting line: grid.edge[5,28,45,48,50,66,83,100,103,105,121] |