v7.5
指定した Unfold Property に関連付けられているカッティングラインをクリアします。
警告: このコマンドを実行すると、プロパティのカッティングラインの一部を指定している場合でも、全体がクリアされます。 たとえば、球のカッティング ラインが「sphere.edge[0,1,2,3,4]」に設定されている場合に、Objects パラメータが「sphere.edge[3,4]」に設定されたこのコマンドを呼び出すと、球の指定した Unfold プロパティに設定されているカッティング ラインはすべてなくなります。
oBoolean = UnfoldClearCut( UnfoldProperty, [Object(s)] ); |
コマンドが成功したかどうかをレポートするBooleanを戻します。
| パラメータ | タイプ | 説明 |
|---|---|---|
| UnfoldProperty | Property | カットをクリアする Unfold プロパティ |
| Object(s) | オブジェクトのリストまたは X3DObject |
Unfold プロパティから削除するカッティング ラインを含むオブジェクト デフォルト値:指定されていない場合は、現在の選択が使用されます。 |
/*
This example demonstrates how to set up, modify, and remove
a cutting line for a grid on its Unfold property.
*/
NewScene(null, false);
var g = CreatePrim("Grid", "MeshSurface");
// Apply the Unfold property to the grid and get a pointer to it
UnfoldApply(g);
var u = g.Properties("Unfold");
// Set the cutting line using 7 edges and log it
UnfoldSetCut(u, "grid.edge[14,34,51,68,71,73,75]");
LogCuts(u);
// Add edges 2 and 3 to the current cutting line and log it again
UnfoldAddToCut("grid.Unfold", "grid.edge[2,3]");
LogCuts(u);
// Reset the cutting line
UnfoldClearCut("grid.Unfold", "grid");
LogCuts(u);
// Launch Unfolding computations (since there's no cutting line
// there's nothing to do, as you can see from the Texture Editor)
UnfoldUpdate("grid.Unfold");
OpenView("Texture Editor");
// -------------------------
//
// Expected results
//
// INFO : Unfold cutting line: grid.edge[14,34,51,68,71,73,75]
// INFO : Unfold cutting line: grid.edge[2,3,14,34,51,68,71,73,75]
// INFO : Unfold cutting line: [empty]
// -------------------------
//
// Helper function
//
function LogCuts( in_prop )
{
var a = Application;
UnfoldSelectCut(in_prop);
if (a.Selection.Count) {
a.LogMessage(in_prop.Name + " cutting line: " + a.Selection(0));
} else {
a.LogMessage(in_prop.Name + " cutting line: [empty]");
}
} |