// =========================================================================== // 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: // Global function to make sure the options for rebuild surface are set. // // Input Arguments: // Force the factory setting or not. // // Return Value: // None. // global proc rebuildSurfaceSetOptionVars( int $forceFactorySettings ) { // Keep Original option var. This corresponds to the // "-rpo/-replaceOriginal" flag for rebuild surface commands. if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceKeepOriginal`) { optionVar -intValue rebuildSurfaceKeepOriginal 0; } // Rebuild Type , one of Uniform, Reduce Spans, Match Knots, // No Mult. Knots, Curvature. if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceType`) { optionVar -intValue rebuildSurfaceType 0; } // Uniform Rebuild Type: Number of resulting spans and degree when // rebuilding a surface. if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceTypeUniformNumSpansU`) { optionVar -intValue rebuildSurfaceTypeUniformNumSpansU 4; } if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceTypeUniformDegreeU`) { optionVar -intValue rebuildSurfaceTypeUniformDegreeU 3; } if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceTypeUniformNumSpansV`) { optionVar -intValue rebuildSurfaceTypeUniformNumSpansV 4; } if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceTypeUniformDegreeV`) { optionVar -intValue rebuildSurfaceTypeUniformDegreeV 3; } // Direction - int, can be 0|1|2 if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceDirection`) { optionVar -intValue rebuildSurfaceDirection 2; } // End knots - nonmultiple if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceEndKnots`) { optionVar -intValue rebuildSurfaceEndKnots 1; } // Keep Corners - boolean if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceKeepCorners`) { optionVar -intValue rebuildSurfaceKeepCorners 1; } // Keep Control Points - boolean if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceKeepControlPoints`) { optionVar -intValue rebuildSurfaceKeepControlPoints 0; } // Keep Num Spans - boolean if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceKeepNumSpans`) { optionVar -intValue rebuildSurfaceKeepNumSpans 0; } // Tolerance for rebuilding surfaces - whether to use global or local // tolerance (boolean), local tolerance (float) if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceUseGlobalTolerance`) { optionVar -intValue rebuildSurfaceUseGlobalTolerance 1; } if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceLocalTolerance`) { optionVar -floatValue rebuildSurfaceLocalTolerance 0.05; } // Produce polygons or not(boolean) if ($forceFactorySettings || !`optionVar -exists rebuildSurfacePolys`) { optionVar -intValue rebuildSurfacePolys 0; } // Fit/Rebuild - specifies the rebuild method to be used, e.g. // "Convert Classic". // if ($forceFactorySettings || !`optionVar -exists rebuildSurfaceFitRebuild`) { optionVar -intValue rebuildSurfaceFitRebuild 0; } }