Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippAlignPartCommand.cpp

Go to the documentation of this file.
00001 // 
00002 // DISCLAIMER: 
00003 //  This software was produced by the National Institute of Standards 
00004 //  and Technology (NIST), an agency of the U.S. government, and by statute is 
00005 //  not subject to copyright in the United States.  Recipients of this 
00006 //  software assume all responsibility associated with its operation,
00007 //  modification,maintenance, and subsequent redistribution. 
00008 //
00009 //  See NIST Administration Manual 4.09.07 b and Appendix I. 
00010 //
00011 
00012 #include "stdafx.h"
00013 
00014 #include "ippdme/Command/ippAlignPartCommand.h"
00015 #include "ippdme/misc/ippStringBuilder.h"
00016 
00017 
00018 ippAlignPartCommand::ippAlignPartCommand(
00019     unsigned int tgNum, 
00020           double inPv1i, double inPv1j, double inPv1k,
00021           double inMv1i, double inMv1j, double inMv1k,
00022           double inPv2i, double inPv2j, double inPv2k,
00023           double inMv2i, double inMv2j, double inMv2k,
00024           double inAlpha, double inBeta
00025   )
00026    : ippCommand(tgNum, CommandTag, AlignPart)
00027 {
00028    _has2 = true;
00029    _partVector1.setValues(inPv1i, inPv1j, inPv1k);
00030    _machineVector1.setValues(inMv1i, inMv1j, inMv1k);
00031    _partVector2.setValues(inPv2i, inPv2j, inPv2k);
00032    _machineVector2.setValues(inMv2i, inMv2j, inMv2k);
00033    _alpha = inAlpha;
00034    _beta = inBeta;
00035 }
00036 
00037 ippAlignPartCommand::ippAlignPartCommand(
00038     unsigned int tgNum, 
00039           double inPv1i, double inPv1j, double inPv1k,
00040           double inMv1i, double inMv1j, double inMv1k,
00041           double inAlpha
00042   )
00043    : ippCommand(tgNum, CommandTag, AlignPart)
00044 {
00045    _has2 = false;
00046    _partVector1.setValues(inPv1i, inPv1j, inPv1k);
00047    _machineVector1.setValues(inMv1i, inMv1j, inMv1k);
00048    _alpha = inAlpha;
00049    _beta = 0.0;
00050 }
00051 
00052 std::string ippAlignPartCommand::getCommandString() const
00053 {
00054   ippStringBuilder builder(_tag);
00055   builder.StartFunc("AlignPart");
00056   
00057   builder.AppendParam(_partVector1.getI());
00058   builder.AppendParam(_partVector1.getJ());
00059   builder.AppendParam(_partVector1.getK());
00060 
00061   builder.AppendParam(_machineVector1.getI());
00062   builder.AppendParam(_machineVector1.getJ());
00063   builder.AppendParam(_machineVector1.getK());
00064 
00065   if (_partVector2.hasData() && _machineVector2.hasData()) {
00066     builder.AppendParam(_partVector2.getI());
00067     builder.AppendParam(_partVector2.getJ());
00068     builder.AppendParam(_partVector2.getK());
00069 
00070     builder.AppendParam(_machineVector2.getI());
00071     builder.AppendParam(_machineVector2.getJ());
00072     builder.AppendParam(_machineVector2.getK());
00073 
00074     builder.AppendParam(_alpha);
00075     builder.AppendParam(_beta);
00076 
00077   } else {
00078     builder.AppendParam(_alpha);
00079   }
00080   
00081   builder.EndFunc();
00082 
00083   return builder.ToString();
00084 }
00085 

Generated on Wed Nov 8 00:20:01 2006 for IPPDME by  doxygen 1.4.1