📄 acis_tutorials_(options).htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Tutorial:ACIS Tutorials (Options),Tutorial:ACIS Tutorials,Tutorial:ACIS Tutorials (ACIS Tolerances),Tutorial:ACIS Tutorials (Attributes),Tutorial:ACIS Tutorials (Background),Tutorial:ACIS Tutorials (Creating Applications),Tutorial:ACIS Tutorials (Exception Handling),Tutorial:ACIS Tutorials (Geometry),Tutorial:ACIS Tutorials (History Streams),Tutorial:ACIS Tutorials (Importing Non-ACIS Models),Tutorial:ACIS Tutorials (Math Classes)" /> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="search" type="application/opensearchdescription+xml" href="/r18/opensearch_desc.php" title="DocR18 (English)" /> <link title="Creative Commons" type="application/rdf+xml" href="/r18/index.php?title=Tutorial:ACIS_Tutorials_%28Options%29&action=creativecommons" rel="meta" /> <title>Tutorial:ACIS Tutorials (Options) - DocR18</title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "/r18/skins/common/shared.css?97";
@import "/r18/skins/monobook/main.css?97";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="/r18/skins/common/commonPrint.css?97" />
<!--[if lt IE 5.5000]><style type="text/css">@import "/r18/skins/monobook/IE50Fixes.css?97";</style><![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/r18/skins/monobook/IE55Fixes.css?97";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/r18/skins/monobook/IE60Fixes.css?97";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/r18/skins/monobook/IE70Fixes.css?97";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/r18/skins/common/IEFixes.js?97"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/var skin = "monobook";var stylepath = "/r18/skins";var wgArticlePath = "/r18/index.php/$1";var wgScriptPath = "/r18";var wgScript = "/r18/index.php";var wgServer = "http://doc.spatial.com";var wgCanonicalNamespace = "";var wgCanonicalSpecialPageName = false;var wgNamespaceNumber = 0;var wgPageName = "Tutorial:ACIS_Tutorials_(Options)";var wgTitle = "Tutorial:ACIS Tutorials (Options)";var wgAction = "view";var wgRestrictionEdit = ["sysop"];var wgRestrictionMove = ["sysop"];var wgArticleId = "429";var wgIsArticle = true;var wgUserName = null;var wgUserGroups = null;var wgUserLanguage = "en";var wgContentLanguage = "en";var wgBreakFrames = false;var wgCurRevisionId = "1122";/*]]>*/</script>
<script type="text/javascript" src="/r18/skins/common/wikibits.js?97"><!-- wikibits js --></script>
<script type="text/javascript" src="/r18/index.php?title=-&action=raw&gen=js&useskin=monobook"><!-- site js --></script>
<style type="text/css">/*<![CDATA[*/@import "/r18/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/r18/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/r18/index.php?title=-&action=raw&gen=css&maxage=18000";/*]]>*/</style>
<!-- Head Scripts -->
<script type="text/javascript" src="/r18/skins/common/ajax.js?97"></script><style type="text/css">/*<![CDATA[*/.source-cpp {line-height: normal;}.source-cpp li {line-height: normal;}/** * GeSHi Dynamically Generated Stylesheet * -------------------------------------- * Dynamically generated stylesheet for cpp * CSS class: source-cpp, CSS id: * GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */.source-cpp .de1, .source-cpp .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}.source-cpp {}.source-cpp .head {}.source-cpp .foot {}.source-cpp .imp {font-weight: bold; color: red;}.source-cpp .ln-xtra {color: #cc0; background-color: #ffc;}.source-cpp li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}.source-cpp li.li2 {font-weight: bold;}.source-cpp .kw1 {color: #0000ff;}.source-cpp .kw2 {color: #0000ff;}.source-cpp .kw3 {color: #0000dd;}.source-cpp .kw4 {color: #0000ff;}.source-cpp .kw5 {color: #000099;}.source-cpp .kw6 {color: #000099; font-weight:normal}.source-cpp .kw7 {color: #004D99;}.source-cpp .co1 {color: #006600; font-style: italic;}.source-cpp .co2 {color: #006600;}.source-cpp .coMULTI {color: #006600; font-style: italic;}.source-cpp .es0 {color: #666666; font-weight: bold;}.source-cpp .br0 {color: #B300D6;}.source-cpp .st0 {color: #999933;}.source-cpp .nu0 {color: #A30000;}.source-cpp .me1 {color: #993300;}.source-cpp .me2 {color: #993300;}@import "/r18/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";/*]]>*/</style> </head>
<body class="mediawiki ns-0 ltr page-Tutorial_ACIS_Tutorials_Options">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<h1 class="firstHeading">Tutorial:ACIS Tutorials (Options)</h1>
<div id="bodyContent">
<h3 id="siteSub">From DocR18</h3>
<div id="contentSub"></div>
<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content -->
<table style="background:transparent; font-size:90%; text-align:center; width:100%" cellspacing="0" cellpadding="0" border="0"><tr><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials" title="Tutorial:ACIS Tutorials">Start</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Background%29" title="Tutorial:ACIS Tutorials (Background)">Fundamentals</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Creating_Applications%29" title="Tutorial:ACIS Tutorials (Creating Applications)">Creating Applications</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Model_Topology%29" title="Tutorial:ACIS Tutorials (Model Topology)">Topology</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Geometry%29" title="Tutorial:ACIS Tutorials (Geometry)">Geometry</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Math_Classes%29" title="Tutorial:ACIS Tutorials (Math Classes)">Math Classes</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28ACIS_Tolerances%29" title="Tutorial:ACIS Tutorials (ACIS Tolerances)">Tolerances</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:white; line-height:0.95em; border:solid 2px #A3B1BF; border-bottom:0; font-weight:bold;" width="20"> <strong class="selflink">Options</strong></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Memory_Management%29" title="Tutorial:ACIS Tutorials (Memory Management)">Memory Management</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Exception_Handling%29" title="Tutorial:ACIS Tutorials (Exception Handling)">Exception Handling</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28History_Streams%29" title="Tutorial:ACIS Tutorials (History Streams)">History</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Attributes%29" title="Tutorial:ACIS Tutorials (Attributes)">Attributes</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="padding:0.5em; background-color:#e3e5e7; font-size:90%; line-height:0.95em; border:1px solid #A3B1BF; border-bottom:solid 2px #A3B1BF" width="20"> <a href="/r18/index.php/Tutorial:ACIS_Tutorials_%28Importing_Non-ACIS_Models%29" title="Tutorial:ACIS Tutorials (Importing Non-ACIS Models)">Importing Models</a></td><td style="border-bottom:2px solid #A3B1BF" width="3"> </td><td style="border-bottom:2px solid #A3B1BF" width="3000"> </td></tr></table><div style="border:2px solid #A3B1BF; padding:.5em 1em 1em 1em; border-top:none; background-color:#fff; color:#000"><a name="ACIS_Options"></a><h2> <span class="mw-headline"> ACIS Options </span></h2><div style="float:right;"><a href="http://doc.spatial.com/r18/index.php?title=Tutorial:ACIS_Tutorial_7:_Options&action=edit" class="external text" title="http://doc.spatial.com/r18/index.php?title=Tutorial:ACIS_Tutorial_7:_Options&action=edit" rel="nofollow"><span style="color: #000000">edit</span></a></div><table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div><ul><li class="toclevel-1"><a href="#ACIS_Options"><span class="tocnumber">1</span> <span class="toctext">ACIS Options</span></a></li><li class="toclevel-1"><a href="#What_is_a_global_option.3F"><span class="tocnumber">2</span> <span class="toctext">What is a global option?</span></a></li><li class="toclevel-1"><a href="#Effects_of_using_options"><span class="tocnumber">3</span> <span class="toctext">Effects of using options</span></a></li><li class="toclevel-1"><a href="#Usage"><span class="tocnumber">4</span> <span class="toctext">Usage</span></a></li></ul></td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><p>The behavior of ACIS can be modified using <a href="/r18/index.php?title=Options&action=edit" class="new" title="Options">global options</a>. </p><a name="What_is_a_global_option.3F"></a><h2> <span class="mw-headline"> What is a global option? </span></h2><p>A global option is more like a global variable than an argument to a function. It affects the behavior of ACIS modally, until the value of the option is modified again. The default values for global options are set the way most users prefer the functionality to behave, but there may be cases in which some users would prefer the alternative functionality, so the options exist.</p><p>ACIS maintains a list of options. Each option has a keyword and a value. Options are obtained using their keyword. The documentation provides an index of the options whose values are available for user modification. See <a href="/r18/index.php?title=Category:ACIS_Options&action=edit" class="new" title="Category:ACIS Options">List of ACIS Options</a>. In addition to the options described in the documentation there are some undocumented options. Undocumented options are for system use and their values should <i>not</i> be modified. You should also be aware that some options affect only the behavior of the Scheme Aide and do not exist in the ACIS libraries. These Scheme-only options are also described in the documentation.</p><a name="Effects_of_using_options"></a><h2> <span class="mw-headline"> Effects of using options </span></h2><p>Before we get into the mechanics of options, let's give an example of an option so you have a better understand of what we are talking about. There is an option called <tt><a href="/r18/index.php?title=Option:Periodic_no_seam&action=edit" class="new" title="Option:Periodic no seam">periodic_no_seam</a></tt>. The value of this option specifies whether or not periodic spline faces require a seam edge. If a seam edge is required, every periodic spline face must have a periphery loop. If a seam edge is not required, periodic spline faces may be bounded by two separation loops. The default value for <code>periodic_no_seam</code> is <tt>TRUE</tt>, which means that periodic spline faces do not require a seam edge. However, some applications do not support periodic spline faces without seam edges, so those applications should modify the value of this option, probably immediately after ACIS initialization. </p><p>Another example of a global option is the <tt><a href="/r18/index.php?title=Option:Merge&action=edit" class="new" title="Option:Merge">merge</a></tt> option. The <code>merge</code> option affects the behavior of regularized Boolean operations and sweep operations. If the value of the <i>merge</i> option is TRUE, its default value, merging of topology with common geometry will occur as part of regularized Boolean and sweep operations. If it is FALSE, merging will not occur. Some applications may desire merging to occur during some operations but not during others. In this case those applications could set the <code>merge</code> option to <tt>FALSE</tt> before the operation and reset it to <tt>TRUE</tt> after the operation.</p><p>In the examples above both options have logical values, either TRUE or FALSE, but options may have integer, floating point, or string values as well. </p><a name="Usage"></a><h2> <span class="mw-headline"> Usage </span></h2><p>Options are implemented using the <tt><a href=/r18/qref/ACIS/html/classoption__header.html class="external text">option_header</a></tt> class. An application developer may obtain an option using its keyword and the direct interface (<tt><a href=/r18/qref/ACIS/html/option_8hxx.html#8df776a9b4d0cfa0a2c98aefc534e6c6 class="external text">find_option</a></tt>) function:</p><pre class="source-cpp"><span class="kw7">option_header</span> * find_option<span class="br0">(</span><span class="kw4">char</span> <span class="kw4">const</span> *<span class="br0">)</span>;</pre> <p>The function one calls to obtain the value of an option depends on the type of the option (<code>logical</code>, <code>integer</code>, <code>double</code>, or <code>string</code>.) </p><ul><li> To obtain the value of a logical option one uses option_header::on( ), which returns TRUE or FALSE. </li><li> To obtain the value of an integer option one uses option_header::count( ), which returns the integer value of the option. </li><li> To obtain the value of a double option one uses option_header::value( ), which returns the double value of the option. </li><li> To obtain the value of a string option one uses option_header::string( ), which returns the string value of the option.</li></ul><p>There are multiple ways to modify the value of an option. Two of the most frequently used ways are to use the member functions push( ) and pop( ), or set( ) and reset( ). push( ) and pop( ) treat the option value as a stack. Values are <i>pushed</i> onto the stack and <i>popped</i> off the stack. Alternatively, on may repeatedly <i>set</i> the value of an option, which does not push new values onto the stack. Calling reset( ) will reset the value of the option to its default value, regardless of whether set( ) or push( ) was used to modify the value.</p><p>The use of push( ) and pop( ) is demonstrated in the code snippet below. Notice that the call to pop( ) is after the API_END statement. This ensures that the value will always be popped, even in the even of an exception. </p><pre class="source-cpp"><span class="kw4">volatile</span> <span class="kw7">option_header</span> * merge_option = <span class="kw2">NULL</span>;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -