'--------------------------------------------------------------------
'This example shows how to use the Subset method
'
' README: install the example from the filter object help
' page before running this example.
'--------------------------------------------------------------------
set f = Application.Filters("LargeMesh")
if ( typename(f) <> "Nothing" ) then
set model = ActiveSceneRoot
set cone = model.AddGeometry( "Cone", "MeshSurface" )
set cube = model.AddGeometry( "Cube", "MeshSurface" )
set sphere = model.AddGeometry( "Sphere", "MeshSurface" )
set phong = sphere.AddMaterial( "phong" )
Selection.Add cone
Selection.Add cube
selection.Add sphere
Selection.Add phong
set subset = f.Subset(Selection)
LogMessage f.name & ".Subset("&Selection.GetAsText&"): " & subset.GetAsText
'Output of above script:
'INFO : "LargeMesh.Subset(cone,cube,sphere): sphere"
end if |