// =========================================================================== // 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: April 21 1997 // // // Description: // Global function to ensure the options for bevel plus are set. // // Input Arguments: // Force the factory setting or not. // // Return Value: // None. // global proc bevelPlusSetOptionVars( int $forceFactorySettings ) // // // { if ($forceFactorySettings || !`optionVar -exists bevelPlusWidth`) { optionVar -floatValue bevelPlusWidth 0.1 ; } if ($forceFactorySettings || !`optionVar -exists bevelPlusDepth`) { optionVar -floatValue bevelPlusDepth 0.1 ; } if ($forceFactorySettings || !`optionVar -exists bevelPlusExtrudeHeight`) { optionVar -floatValue bevelPlusExtrudeHeight 0.25 ; } if ($forceFactorySettings || !`optionVar -exists bevelPlusInsideCurves`) { optionVar -intValue bevelPlusInsideCurves 0; } // Bevel curves forced to straight // if ($forceFactorySettings || !`optionVar -exists innerStyleBevelCurve`){ optionVar -intValue innerStyleBevelCurve 0; } if ($forceFactorySettings || !`optionVar -exists outerStyleBevelCurve`){ optionVar -intValue outerStyleBevelCurve 0; } // attach Surfaces. // attach is set to true. // if ($forceFactorySettings || !`optionVar -exists bevelPlusAttachSurfaces`){ optionVar -intValue bevelPlusAttachSurfaces 1; } // Bevel inner curve same as outer // if ($forceFactorySettings || !`optionVar -exists innerStyleSameAsOuter`){ optionVar -intValue innerStyleSameAsOuter 1; } // Number of sides. // 1 - only extrude. // 2 - bevel top and extrude. // 3 - bevel bottom and extrude. // 4 - bevel both ends and extrude. // if ($forceFactorySettings || !`optionVar -exists bevelPlusNSides`){ optionVar -intValue bevelPlusNSides 4; } // Number of caps. // 1 - None // 2 - At Start // 3 - At End // 4 - At Start and End // if ($forceFactorySettings || !`optionVar -exists bevelPlusCaps`){ optionVar -intValue bevelPlusCaps 4; } // bevelPlusOutputPolygons (int) - // 0 - NURBS // 1 - polys // 2 - Bezier surfaces (NOT supported at present) // 3 - subdivision surfaces // if ($forceFactorySettings || !`optionVar -exists bevelPlusOutputPolygons`){ optionVar -intValue bevelPlusOutputPolygons 1; } // Global or local tolerance: if( $forceFactorySettings || !`optionVar -exists bevelPlusUseGlobalTol` ){ optionVar -intValue bevelPlusUseGlobalTol false; } // Tolerance for bevelPlus if ($forceFactorySettings || !`optionVar -exists bevelPlusTolerance`){ optionVar -floatValue bevelPlusTolerance 0.01; } // Now, the poly conversion options: if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyFormat` ) { optionVar -iv bevelPlusPolyFormat 2; } if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyCount` ) { optionVar -iv bevelPlusPolyCount 200; } if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeU` ) { optionVar -iv bevelPlusPolyTypeU 3; } if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeV` ) { optionVar -iv bevelPlusPolyTypeV 3; } if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberU` ) { optionVar -iv bevelPlusPolyNumberU 2; } if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberV` ) { optionVar -iv bevelPlusPolyNumberV 6; } }