---------- Původní zpráva ----------
Od: Christopher Sean Morrison <[email protected]>
Datum: 2. 9. 2013
Předmět: Re: [brlcad-devel] mirror

"On Sep 1, 2013, at 6:06 PM, [email protected] wrote:

> Hello,
> 
> I have done some experiments with mged "mirror" command (version 7.24.0). 
I am curious about few things:
> 
> 1. What is -h option for?

The -h option is not very exciting. It's just a help option that prints 
usage.

> 2. How -p option works and how it interacts with -d option?

The -p option sets the mirror point. By default, this is the global origin 
(0,0,0), as you noted in your mirror.txt writeup. You mirror across a plane,
which is defined by a point, a direction, and a offset distance. Specifying 
the -x/-y/-z options is simply a shorthand for the corresponding -d 
direction vector.

If you specified a -p point that was the geometric center of the object, the
object would effectively flip "in place" in the direction you specified 
(assuming you don't specify a -o offset)."



Ok, I summarized this into the man page and converted it to the xml using 
template and some other man pages (attached). Nevertheless I think there is 
something wrong, or I do not understand it correctly. See attached database 
mirror.g. The center point of the reg.r is at 15 5 0 (top view, ignoring z 
coordinate). When trying to do the flip you just described I would use 
command "mirror -p {15 5 0} -d {1 1 0} reg.r reg.r1", but resulting object 
is not rotated around the 15 5 0 point. 
"

> Also I have noticed, there is no man page*, so I created raw concept 
(attached) which I would like to get done a convert to standard man xml. (If
it is desired of course.)

Desired? That's awesome.

There's a blank template you can follow in the source tree (mged_cmd_
template.xml) that might help, or you can follow any of the existing 
examples.

Cheers!
Sean


----------------------------------------------------------------------------
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel";
<!-- Converted by db4-upgrade version 1.0 -->

<refentry xmlns="http://docbook.org/ns/docbook"; version="5.0" xml:id="">

<refmeta>
  <refentrytitle/>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="source">BRL-CAD</refmiscinfo>
  <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>

<refnamediv xml:id="name">
  <refname>
    Mirror
  </refname>
  <refpurpose>
    Creates new shape by mirroring the old one.
  </refpurpose>
</refnamediv>

<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
  <cmdsynopsis sepchar=" ">
    <command>mirror</command>
      <arg choice="opt" rep="norepeat">-h</arg>
      <arg choice="opt" rep="norepeat">-p <replaceable>"# # #"</replaceable></arg>
      <arg choice="opt" rep="norepeat">-d <replaceable>"# # #"</replaceable></arg>
      <arg choice="opt" rep="norepeat">-x</arg>
      <arg choice="opt" rep="norepeat">-y</arg>
      <arg choice="opt" rep="norepeat">-z</arg>
      <arg choice="opt" rep="norepeat">-o</arg>
      <arg choice="opt" rep="norepeat">old</arg>
      <arg choice="opt" rep="norepeat">new</arg>
  </cmdsynopsis>
</refsynopsisdiv>

<refsection xml:id="description"><info><title>DESCRIPTION</title></info>

  <para>
    Creates new object by mirroring the old one. New object can be symetrical along xy, yz or xz plane, alternatively normal vector of mirroring plane can be entered using -d and -p options.
  </para>

  
  <itemizedlist mark="bullet">
    
    <listitem>
      <para>
	<emphasis>-h</emphasis>--Print help
      </para>
    </listitem>
  
    <listitem>
      <para>
	<emphasis>-p "x y z"</emphasis>--Mirror point coordinates
      </para>
    </listitem>
    
    <listitem>
      <para>
	<emphasis>-d "x y z"</emphasis>--Mirror plane normal (relative to 0 0 0 when used without <emphasis>-p</emphasis> option)
      </para>
    </listitem>
    
    <listitem>
      <para>
	<emphasis>-x</emphasis>--Mirror shape along yz plane
      </para>
    </listitem>
    
    <listitem>
      <para>
	<emphasis>-y</emphasis>--Mirror shape along xz plane
      </para>
    </listitem>
	
    <listitem>
      <para>
	<emphasis>-z </emphasis>--Mirror shape along xy plane
      </para>
    </listitem>
	  
    <listitem>
      <para>
	<emphasis>-o <i>#</i></emphasis>--Translate new shape about <emphasis>x</emphasis> units, positive value translates the object in the direction of selected axis or mirror plane normal.
      </para>
    </listitem>
	
    <listitem>
      <para>
	<emphasis>old</emphasis>--Name of an existing object to be mirrored
      </para>
    </listitem>
	  
    <listitem>
      <para>
	<emphasis>new</emphasis>--Name of a new object to be created
      </para>
    </listitem>
    
</refsection>

<refsection xml:id="examples"><info><title>EXAMPLES</title></info>

  <example><title>Create <emphasis>object1_mirror</emphasis>symetrical to <mirror>object1</mirror> across the <emphasis>yz</emphasis> plane.</title>
    <variablelist>
      <varlistentry>
	   <term><prompt>mged&gt;</prompt> <userinput>mirror -x object1 object1_mirror</userinput></term>
	   <listitem>
	     <para>
	     </para>
	   </listitem>
      </varlistentry>
     </variablelist>
  </example>
  
  <example><title>Create <emphasis>object1_mirror</emphasis>symetrical to <mirror>object1</mirror> across the <emphasis>yz</emphasis> plane. translate it 5 units in the x axis direction.</title>
    <variablelist>
      <varlistentry>
	   <term><prompt>mged&gt;</prompt> <userinput>mirror -x -o 5 object1 object1_mirror</userinput></term>
	   <listitem>
	     <para>
	     </para>
	   </listitem>
      </varlistentry>
     </variablelist>
  </example>
  
  <example><title>Create <emphasis>object1_mirror</emphasis>symetrical to <mirror>object1</mirror> across the across the <emphasis>plane defined with 1 1 0 normal</emphasis>.</title>
    <variablelist>
      <varlistentry>
	   <term><prompt>mged&gt;</prompt> <userinput>mirror -d "1 1 0" object1 object1_mirror</userinput></term>
	   <listitem>
	     <para>
	     </para>
	   </listitem>
      </varlistentry>
     </variablelist>
  </example>
  
  <example><title>Create <emphasis>object1_mirror</emphasis>symetrical to <mirror>object1</mirror> across the across the <emphasis>plane defined with 10 30 0 point and 1 1 0 normal</emphasis>.</title>
    <variablelist>
      <varlistentry>
	   <term><prompt>mged&gt;</prompt> <userinput>mirror -p "10 30 0" -d "1 1 0" object1 object1_mirror</userinput></term>
	   <listitem>
	     <para>
	     </para>
	   </listitem>
      </varlistentry>
     </variablelist>
  </example>

</refsection>

<info><corpauthor>BRL-CAD Team</corpauthor></info>

<refsection xml:id="bug_reports"><info><title>BUG REPORTS</title></info>

  <para>
    Reports of bugs or problems should be submitted via electronic
    mail to &lt;[email protected]&gt;, or via the "cadbug.sh" script.
  </para>
</refsection>
</refentry>

Attachment: mirror.g
Description: Binary data

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to