// =========================================================================== // 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: July 24, 1998 // // Description: // The doFilletBlendArgList() procedure executes one fillet blend // operation on the selected objects. // proc string pieceTogetherBlendCmd( string $version, string $args[] ) // // Description : // Put together an blend Cmd. Note that there is enough curves by now. // { string $cmd = ""; int $need = 9; if( "1" == $version ) { warning (uiRes("m_doFilletBlendArgList.kObsoletVersion")); $cmd = "blend "; $cmd = $cmd + " -ch " + $args[0]; $cmd = $cmd + " -cfr " + $args[1]; $cmd = $cmd + " -ad " + $args[2]; $cmd = $cmd + " -fl " + $args[3]; $cmd = $cmd + " -fr " + $args[4]; $cmd = $cmd + " -mk " + $args[5]; $cmd = $cmd + " -pt " + $args[6]; $cmd = $cmd + " -tt " + $args[7]; $cmd = $cmd + " -po " + $args[8]; } else { $cmd = "blend2 "; $cmd = $cmd + " -ch " + $args[0]; $cmd = $cmd + " -cfr " + $args[1]; $cmd = $cmd + " -an " + $args[2]; $cmd = $cmd + " -fln " + $args[3]; $cmd = $cmd + " -frn " + $args[4]; $cmd = $cmd + " -mk " + $args[5]; $cmd = $cmd + " -pt " + $args[6]; $cmd = $cmd + " -tt " + $args[7]; $cmd = $cmd + " -po " + $args[8]; $cmd = $cmd + " -aa " + $args[9]; $cmd = $cmd + " -la " + $args[10]; $cmd = $cmd + " -ls " + $args[11]; $cmd = $cmd + " -le " + $args[12]; $cmd = $cmd + " -rvl " + $args[13]; $cmd = $cmd + " -ra " + $args[14]; $cmd = $cmd + " -rs " + $args[15]; $cmd = $cmd + " -re " + $args[16]; $cmd = $cmd + " -rvr " + $args[17]; } return $cmd ; } global proc doFilletBlendArgList( string $version, string $args[] ) // // Description : // Proc to do one blend depending on number // of valid selection items. // { //--------------------------------------------- // Get the list of nurbs curves in select list. //--------------------------------------------- // global int $gSelectIsoparmsBit; global int $gSelectCurvesOnSurfacesBit; global int $gSelectSurfaceEdgeBit; string $curveList[] = `filterExpand -ex true -sm $gSelectIsoparmsBit -sm $gSelectCurvesOnSurfacesBit -sm $gSelectSurfaceEdgeBit`; int $curveCount = size($curveList); if( $curveCount < 2 ) { error (uiRes("m_doFilletBlendArgList.kMustSelectCurves")); } else { string $cmd = pieceTogetherBlendCmd( $version, $args ); string $results[] = evalEcho( $cmd ); if( 0 == size($results) ) { error (uiRes("m_doFilletBlendArgList.kFailedOnSelectedObject")); } else { select -r $results; } } }