📄 _understanding_and_traversing_acis_topology_(part_iii).htm
字号:
</th><th> Description</th></tr><tr><td> ENTITY_LIST::ENTITY_LIST( )</td><td> creates an empty ENTITY_LIST.</td></tr><tr><td> ENTITY_LIST::ENTITY_LIST(ENTITY_LIST const &)</td><td> the copy constructor.</td></tr><tr><td> ENTITY_LIST::operator=( )</td><td> the assignment operator.</td></tr><tr><td> ENTITY_LIST::operator[ ]( )</td><td> the subscript operator. It returns the entry at a given index, if there is one. If the entry has been deleted (i.e., there is only a "tombstone" remaining in the list) the operator returns LIST_ENTRY_DELETED (i.e., -1).</td></tr><tr><td> ENTITY_LIST::add(ENTITY*)</td><td> adds an entity to the list, if it is not already in the list.</td></tr><tr><td> ENTITY_LIST::add(ENTITY_LIST const &)</td><td> adds a list of entities to the list, if they are not already in the list.</td></tr><tr><td> ENTITY_LIST::clear( )</td><td> removes all the entries from the list.</td></tr><tr><td> ENTITY_LIST::count( )</td><td> returns the number of entries in the list, including deleted entities.</td></tr><tr><td> ENTITY_LIST::init( )</td><td> initializes an iterator for the next( ) method.</td></tr><tr><td> ENTITY_LIST::iteration_count( )</td><td> returns the number of entries in the list, not including deleted entities.</td></tr><tr><td> ENTITY_LIST::lookup( )</td><td> returns the index of an entity if it is in the list, or -1 if it is not in the list.</td></tr><tr><td> ENTITY_LIST::next( )</td><td> returns the next undeleted entry in the list, or NULL if the end of the list has been reached.</td></tr><tr><td> ENTITY_LIST::remove(ENTITY const *)</td><td> removes an entity from the list. (This does not deallocate any memory, rather it leaves a "tombstone" in the list that will be noticed by count( ) and operator[ ] .)</td></tr></table><p>As you can probably tell from the above descriptions there are two simple ways to iterate through an ENTITY_LIST. You can iterate through all the entries in the list using the subscript operator and checking for removed entries, or you can iterate through all the non-deleted entries using the init( ) and next( ) methods.</p><p>When an attempt is made to add an ENTITY to an ENTITY_LIST the ENTITY is added only if the ENTITY is not already present in the list. In other words, an ENTITY will be contained at most one time by a list. Its index value will be unique. </p><p>The ENTITY_LIST class does not know about changes to the model. For instance, if an ENTITY is deleted, the ENTITY_LIST will continue to contain the deleted entity. It is up to the application developer to keep ENTITY_LISTS up-to-date. In addition, an ENTITY_LIST does not participate in history roll back. If you need a list that does participate in history roll back you should consider the EE_LIST. If you need a list that contains other than ENTITIES you should consider a VOID_LIST. It contains entries of type (void*).</p><a name="More_on_ACIS_topology"></a><h2> <span class="mw-headline"> More on ACIS topology </span></h2><a name="Face_types"></a><h3> <span class="mw-headline"> Face types </span></h3><p>Previously we mentioned that a face may be a sheet face, or it may bound a solid region, or it may be embedded inside a solid region. How can one determine which type of face one has? Two FACE methods are used to make this determination.</p><p>FACE::sides( ) returns either SINGLE_SIDED or DOUBLE_SIDED. If a face bounds a solid region it will return SINGLE_SIDED; otherwise, it will return DOUBLE_SIDED.</p><p>FACE::cont( ) returns either BOTH_INSIDE or BOTH_OUTSIDE. This only applies to DOUBLE_SIDED faces. If the face is a sheet face, with both sides of the face pointing away from the material of the sheet face, then it returns BOTH_OUTSIDE. If the face is embedded inside a solid region, with both sides of the face pointing into the material of the solid, then it returns BOTH_INSIDE.</p><a name="Wire_types"></a><h3> <span class="mw-headline"> Wire types </span></h3><p>We also mentioned that a wire may be either outside or inside a volume. How can one determine which type of wire one has? By using the WIRE::cont( ) method.</p><p>WIRE::cont( ) returns either ALL_INSIDE or ALL_OUTSIDE. If the wire is embedded inside a solid region, it returns ALL_INSIDE. If it is completely outside a solid region, it returns ALL_OUTSIDE. A wire cannot be both inside and outside a solid region. The wire must be split at the point(s) where it crossed the solid's boundary.</p><a name="Bounding_boxes"></a><h3> <span class="mw-headline"> Bounding boxes </span></h3><p>A very useful tool associated with most topological entities is its bounding box. The bounding box is aligned with the coordinate axes and completely contains the topological entity. A bounding box is not necessarily of minimal size, because it is often much faster to calculate a loose box than a tight box. The easiest way to obtain the bounding boxes of topological entities is to use the following set of global functions defined in getbox.hxx. </p><table class="wikitable"><tr><th> Global Function</th><th> Description</th></tr><tr><td> get_body_box(BODY*, ...)</td><td> returns the bounding box of a BODY</td></tr><tr><td> get_lump_box(LUMP*, ...)</td><td> returns the bounding box of a LUMP</td></tr><tr><td> get_shell_box(SHELL*, ...)</td><td> returns the bounding box of a SHELL</td></tr><tr><td> get_subshell_box(SUBSHELL*, ...)</td><td> returns the bounding box of a SUBSHELL</td></tr><tr><td> get_wire_box(WIRE*, ...)</td><td> returns the bounding box of a WIRE</td></tr><tr><td> get_face_box(FACE*, ...)</td><td> returns the bounding box of a FACE</td></tr><tr><td> get_loop_box(LOOP*, ...)</td><td> returns the bounding box of a LOOP</td></tr><tr><td> get_edge_box(EDGE*, ...)</td><td> returns the bounding box of a EDGE</td></tr></table><p>Each topological class that possesses a bounding box has a <i>bound( )</i> method that will return a pointer to the cached bounding box associated with the topological entity; however, if a particular bounding box has not been calculated or has been invalidated, the <i>bound( )</i> method will return a NULL pointer. The functions in the table above will either return the bounding box associated with a topological entity if the bounding box pointer is non-NULL, or calculate one for you if the pointer is NULL; therefore, we suggest you use these functions rather than the <i>bound( )</i> method.</p><p>There is also a family of API functions for calculating bounding boxes. These all have the name <i>api_get_entity_box( )</i>. The API functions call the lower level get_box functions. If you look at the signatures of the get_box and API functions you will notice that each has an argument to specify the tightness of the box calculated. We recommend that new users always use the default tightness, which corresponds to the box that is cached in the topological entity. </p><p>In the Part IV of this tutorial, <a href="/r18/index.php/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_IV%29" title="Tutorial:ACIS Tutorial 3: Understanding and traversing ACIS topology (Part IV)">Tutorial 3: Understanding and traversing ACIS topology (Part IV)</a>, we demonstrate these concepts with a couple C++ examples.</p><!-- Tidy found serious XHTML errors --><!-- Saved in parser cache with key r18_docdb-r18doc_:pcache:idhash:411-0!1!0!!en!2!edit=0 and timestamp 20080624025114 --><div class="printfooter">Retrieved from "<a href="http://doc.spatial.com/r18/index.php/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29">http://doc.spatial.com/r18/index.php/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29</a>"</div> <div id="catlinks"><p class='catlinks'><a href="/r18/index.php/Special:Categories" title="Special:Categories">Categories</a>: <span dir='ltr'><a href="/r18/index.php/Category:ACIS_Docs" title="Category:ACIS Docs">ACIS Docs</a></span> | <span dir='ltr'><a href="/r18/index.php/Category:ACIS_Tutorials" title="Category:ACIS Tutorials">ACIS Tutorials</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5>Views</h5>
<div class="pBody">
<ul>
<li id="ca-nstab-main" class="selected"><a href="/r18/index.php/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29" title="View the content page [c]" accesskey="c">Article</a></li>
<li id="ca-talk" class="new"><a href="/r18/index.php?title=Talk:Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29&action=edit" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
<li id="ca-viewsource"><a href="/r18/index.php?title=Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29&action=edit" title="This page is protected. You can view its source. [e]" accesskey="e">View source</a></li>
<li id="ca-history"><a href="/r18/index.php?title=Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29&action=history" title="Past versions of this page. [h]" accesskey="h">History</a></li>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5>Personal tools</h5>
<div class="pBody">
<ul>
<li id="pt-login"><a href="/r18/index.php?title=Special:Userlogin&returnto=Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_(Part_III)" title="You are encouraged to log in, it is not mandatory however. [o]" accesskey="o">Log in / create account</a></li>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(/r18/images/SpatialCorpLogo.gif);" href="/r18/index.php/Main_Page" title="Visit the Main Page [z]" accesskey="z"></a>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<div class='portlet' id='p-navigation'>
<h5>Navigation</h5>
<div class='pBody'>
<ul>
<li id="n--Home"><a href="http://doc.spatial.com/ "> Home</a></li>
<li id="n-mainpage"><a href="/r18/index.php/Main_Page" title="Visit the Main Page [z]" accesskey="z">Main Page</a></li>
<li id="n-recentchanges"><a href="/r18/index.php/Special:Recentchanges" title="The list of recent changes in the wiki. [r]" accesskey="r">Recent changes</a></li>
<li id="n-randompage"><a href="/r18/index.php/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li>
<li id="n-help"><a href="/r18/index.php/Help:Contents" title="The place to find out.">Help</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-spatial_sites'>
<h5>spatial sites</h5>
<div class='pBody'>
<ul>
<li id="n--Spatial.com"><a href="http://www.spatial.com "> Spatial.com</a></li>
<li id="n---Online-Support-Center"><a href="http://spatial.custhelp.com/cgi-bin/spatial.cfg/php/enduser/acct_login.php?p_sid=tblNMDHh&p_lva=&p_sp=&p_li=&p_next_page=std_alp.php"> Online Support Center</a></li>
<li id="n--Community-Forum"><a href="http://forums.spatial.com/ "> Community Forum</a></li>
<li id="n--Downloads"><a href="http://www.spatial.com/products/download.html "> Downloads</a></li>
<li id="n--Feedback"><a href="mailto:docfeedback_spatial@3ds.com "> Feedback</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-products'>
<h5>products</h5>
<div class='pBody'>
<ul>
<li id="n-ACIS-Tutorials---Beta"><a href="/r18/index.php/Tutorial:ACIS_Tutorials">ACIS Tutorials - Beta</a></li>
<li id="n-InterOp"><a href="/r18/index.php/Portal:InterOp">InterOp</a></li>
</ul>
</div>
</div>
<div id="p-search" class="portlet">
<h5><label for="searchInput">Search</label></h5>
<div id="searchBody" class="pBody">
<form action="/r18/index.php/Special:Search" id="searchform"><div>
<input id="searchInput" name="search" type="text" title="Search DocR18 [f]" accesskey="f" value="" />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" />
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" />
</div></form>
</div>
</div>
<div class="portlet" id="p-tb">
<h5>Toolbox</h5>
<div class="pBody">
<ul>
<li id="t-whatlinkshere"><a href="/r18/index.php/Special:Whatlinkshere/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
<li id="t-recentchangeslinked"><a href="/r18/index.php/Special:Recentchangeslinked/Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
<li id="t-specialpages"><a href="/r18/index.php/Special:Specialpages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
<li id="t-print"><a href="/r18/index.php?title=Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29&printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> <li id="t-permalink"><a href="/r18/index.php?title=Tutorial:ACIS_Tutorial_3:_Understanding_and_traversing_ACIS_topology_%28Part_III%29&oldid=1160" title="Permanent link to this version of the page">Permanent link</a></li> </ul>
</div>
</div>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/r18/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
<ul>
<li>© 1999-2008 Spatial Corp.</li>
<li> Please send feedback to <a href="mailto:docfeedback_spatial@3ds.com">docfeedback_spatial@3ds.com</a> or just <a href="../index.php?title=Special:Userlogin&returnto=Special:Userlogout">login</a> and start editing the comments page.</li>
</ul>
<ul id="f-list">
<li id="lastmod"> This page was last modified 16:09, 23 May 2008.</li>
<li id="viewcount">This page has been accessed 52 times.</li>
<li> <a href="../index.php/Project:Terms_of_Use">Terms of Use</a> </li>
<li> <a href="../index.php/Project:Privacy_policy">Privacy Policy</a> </li>
</ul>
</div>
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script> <script type='text/javascript' src='/r18/javascript_form/getXterlinks.js'></script> <script type='text/javascript'>getXterlinks()</script></div>
<!-- Served in 0.265 secs. --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -