// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: Mar 14, 1997 // // Description: // This script is doing the boundary work. // global proc performBoundaryPreset( int $doHistory, int $order, int $insist, int $partial, int $polys, int $useGlobal, float $globalTol, float $localTol ) { // Get a list of each type of acceptable object type - // s, and s-on-surface. // global int $gSelectIsoparmsBit; global int $gSelectNurbsCurvesBit; global int $gSelectSurfaceEdgeBit; global int $gSelectCurvesOnSurfacesBit; global int $gSelectMeshEdge; string $list[] = `filterExpand -ex true -sm $gSelectMeshEdge -sm $gSelectIsoparmsBit -sm $gSelectNurbsCurvesBit -sm $gSelectSurfaceEdgeBit -sm $gSelectCurvesOnSurfacesBit`; // Execute boundary on all active s. // $cmd = "boundary" + " -ch " + $doHistory + " -or " + $order + " -ep " + $insist + " -rn " + $partial + " -po " + $polys; if( $useGlobal ) { $cmd += " -ept " + $globalTol; } else { $cmd += " -ept " + $localTol; } int $i, $n = size($list); if( $n > 4 ) { string $msg = (uiRes("m_performBoundaryPreset.kTooManyCurves")); warning(`format -stringArg $n $msg`); $n = 4; } if( $n < 3 ) { string $msg = (uiRes("m_performBoundaryPreset.kNotEnoughCurves")); error(`format -stringArg $n $msg`); return; } for( $i=0; $i<$n; $i+=1 ) { $cmd = $cmd + " \"" + $list[$i] + "\""; } string $results[] = evalEcho($cmd); if( 0 == size($results) ) { string $msg = (uiRes("m_performBoundaryPreset.kOpFailed")); error($msg); } else { select -r $results[0]; } }