// =========================================================================== // 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 planarTrim work. // global proc performPlanarTrimPreset( int $doHistory, int $degree, int $keepOutside, float $pntTol, int $partial, int $polys ) { // 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`; int $i, $n; $n = size($list); if( size($list) > 0 ) { $cmd = ( "planarSrf -ch " + $doHistory + " -d " + $degree + " -ko " + $keepOutside + " -tol " + $pntTol + " -rn " + $partial + " -po " + $polys ); for( $i=0; $i<$n; $i+=1 ) { $cmd = $cmd + " \"" + $list[$i] + "\""; } string $results[] = evalEcho($cmd); if( 0 == size($results) ) { string $msg = (uiRes("m_performPlanarTrimPreset.kFailedOnObjects")); error($msg); } else { select -r $results[0]; } } else { string $msg = (uiRes("m_performPlanarTrimPreset.kNoValidItems")); error($msg); } }