示例#1
0
        ///
        ///	 <summary> * fitsXYRelation - checks whether <code>xypair</code>matches the XYRelation
        ///	 * specified for this State
        ///	 *  </summary>
        ///	 * <param name="xypair">
        ///	 *            XYPair value to test </param>
        ///	 * <returns> boolean - true, if <code>xypair</code> matches XYRelation or if
        ///	 *         XYRelation is not specified </returns>
        ///
        private bool fitsXYRelation(JDFXYPair xypair)
        {
            if (!hasAttribute(AttributeName.XYRELATION))
            {
                return(true);
            }

            double x = xypair.X;
            double y = xypair.Y;

            EnumXYRelation relation = getXYRelation();

            if (!hasAttribute(AttributeName.TOLERANCE))
            {
                return(relation.evaluateXY(x, y, JDFBaseDataTypes_Fields.EPSILON, JDFBaseDataTypes_Fields.EPSILON));
            }

            double nt = getTolerance().X; // negative tolerance
            double pt = getTolerance().Y; // positive tolerance

            return(relation.evaluateXY(x, y, nt, pt));
        }
示例#2
0
 static JDFAutoXYPairEvaluation()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.TOLERANCE, 0x33333333, AttributeInfo.EnumAttributeType.XYPair, null, "0 0");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.VALUELIST, 0x33333333, AttributeInfo.EnumAttributeType.XYPairRangeList, null, null);
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.XYRELATION, 0x33333333, AttributeInfo.EnumAttributeType.XYRelation, EnumXYRelation.getEnum(0), null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.BASICPREFLIGHTTEST, 0x33333333);
 }
示例#3
0
 ///
 ///          <summary> * (9) get attribute XYRelation </summary>
 ///          * <returns> the value of the attribute </returns>
 ///
 public virtual EnumXYRelation getXYRelation()
 {
     return(EnumXYRelation.getEnum(getAttribute(AttributeName.XYRELATION, null, null)));
 }
示例#4
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute XYRelation
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (5) set attribute XYRelation </summary>
 ///          * <param name="enumVar">: the enumVar to set the attribute to </param>
 ///
 public virtual void setXYRelation(EnumXYRelation enumVar)
 {
     setAttribute(AttributeName.XYRELATION, enumVar == null ? null : enumVar.getName(), null);
 }
示例#5
0
 public virtual void setPresentHWRelation(EnumXYRelation @value)
 {
     setAttribute(AttributeName.PRESENTHWRELATION, @value.getName(), null);
 }
示例#6
0
 public virtual void setAllowedHWRelation(EnumXYRelation @value)
 {
     setAttribute(AttributeName.ALLOWEDHWRELATION, @value.getName(), null);
 }
示例#7
0
 public virtual void setXYRelation(EnumXYRelation @value)
 {
     setAttribute(AttributeName.XYRELATION, @value.getName(), null);
 }
示例#8
0
 public virtual JDFElement.EnumXYRelation getAllowedXYRelation()
 {
     return(EnumXYRelation.getEnum(getAttribute(AttributeName.ALLOWEDXYRELATION, null, null)));
 }