Revision: 56348
http://sourceforge.net/p/brlcad/code/56348
Author: starseeker
Date: 2013-07-30 18:11:13 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
Well, this example doesn't (yet) apply to the c command, since it turns out c
and comb are currently different commands... commit it so it's in the repo.
Will be looking at merging c and comb - if that can't work for whatever reason,
will copy c.xml to comb.xml and sort out the contents accordingly.
Modified Paths:
--------------
brlcad/trunk/doc/docbook/system/mann/en/c.xml
Modified: brlcad/trunk/doc/docbook/system/mann/en/c.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/mann/en/c.xml 2013-07-30 17:57:12 UTC
(rev 56347)
+++ brlcad/trunk/doc/docbook/system/mann/en/c.xml 2013-07-30 18:11:13 UTC
(rev 56348)
@@ -51,7 +51,7 @@
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>
- The example shows how to use the <command>c</command> command to create
a combination
+ This example shows how to use the <command>c</command> command to create
a combination
according to a given formula.
</para>
<example><title>Creating a combination according to a formula.</title>
@@ -67,6 +67,102 @@
</varlistentry>
</variablelist>
</example>
+
+ <example><title>Fixing a nested region.</title>
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ Suppose we have a situation where region2.r is unioned into
region1.r, and both
+ region1.r and region2.r have the region flag set, as seen in the tree
below.
+ </term>
+
+
+<listitem>
+ <literallayout>
+ <computeroutput>
+<prompt>mged></prompt> <userinput>tree region1.r</userinput>
+region1.r/R
+ u region2.r/R
+ u sph.s
+ u comb.c/
+ u arb.s
+ </computeroutput>
+ </literallayout>
+
+ <para>
+ This geometry has an error in that one
+ region is not supposed to be combined into another using boolean
operations.
+ Further, suppose that one or
+ more assemblies use region2.r and expect it to be a region - i.e.,
region2.r needs
+ to remain a region with the same contents.
+
+ To fix this problem without disturbing other geometry using region2.r,
first
+ make a combination below region2.r using the <option>w</option> flag to
<command>comb</command>:
+ </para>
+
+ <literallayout>
+ <computeroutput>
+<prompt>mged></prompt> <userinput>c -w region2.r</userinput>
+<prompt>mged></prompt> <userinput>tree region2.r</userinput>
+region2.r/R
+ u region2.r.c/
+ u sph.s
+ </computeroutput>
+ </literallayout>
+
+ <para>
+ The next step is to adjust the region1.r tree definition to reference
the
+ non-region combination instead of region2.r:
+ </para>
+
+ <literallayout>
+ <computeroutput>
+<prompt>mged></prompt> <userinput>set glob_compat_mode 0</userinput>
+0
+<prompt>mged></prompt> <userinput>get region1.r tree</userinput>
+u {l region2.r} {l comb.c}
+<prompt>mged></prompt> <userinput>adjust region1.r tree {u {l region2.r.c}
{l comb.c}}</userinput>
+<prompt>mged></prompt> <userinput>tree region1.r</userinput>
+region1.r/R
+ u region2.r.c/
+ u sph.s
+ u comb.c/
+ u arb.s
+ </computeroutput>
+ </literallayout>
+
+ <para>
+ Because the tree is manipulated as a Tcl list, we need glob
compatibility mode to be
+ off on the MGED command line. Once the tree is re-defined, region1.r
no longer has
+ region2.r below it, but still defines the same physical volume via
region2.r.c.
+ </para>
+
+ <para>
+ Optionally, the name region2.r.c can be changed to the name region2.c
with
+ the <command>mvall</command> command:
+ </para>
+
+ <literallayout>
+ <computeroutput>
+<prompt>mged></prompt> <userinput>mvall region2.r.c region2.c</userinput>
+<prompt>mged></prompt> <userinput>tree region1.r</userinput>
+region1.r/R
+ u region2.c/
+ u sph.s
+ u comb.c/
+ u arb.s
+<prompt>mged></prompt> <userinput>tree region2.r</userinput>
+region2.r/R
+ u region2.c/
+ u sph.s
+ </computeroutput>
+ </literallayout>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD
Team</para></refsection>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits