UnfoldSetCut

Introduced

v7.5

Categories

Unfold

Description

Sets the specified edge list as the cutting line definition for the Unfold Property. This is the equivalent to calling UnfoldClearCut and then UnfoldAddToCut.

Scripting Syntax

oBoolean = UnfoldSetCut( UnfoldProperty, [EdgeList(s)] );

Return Value

Returns a Boolean reporting whether or not the command was successful.

Parameters

Parameter Type Description
UnfoldProperty Property The Unfold property on which you want to set a new cutting line definition.
EdgeList(s) List of edges or EdgeCollection Edges to use for the cutting line definition.

Default Value: If not specified, the current selection is used.

Examples

Python Example

#
# 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]

See Also

UnfoldAddToCut UnfoldAdjustUpdate UnfoldApply UnfoldApplySel UnfoldClearCut UnfoldPackUpdate UnfoldRemoveFromCut UnfoldSelectCut UnfoldUpdate Unfold Property Editor reference