/// /// <summary> * (20) get JDFXYPair attribute RelativeStartPosition </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getRelativeStartPosition() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.RELATIVESTARTPOSITION, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute Center </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getCenter() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.CENTER, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute ToleranceDotGain </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getToleranceDotGain() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.TOLERANCEDOTGAIN, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute RelativeWorkingPath </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getRelativeWorkingPath() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.RELATIVEWORKINGPATH, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute SheetOffset </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getSheetOffset() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.SHEETOFFSET, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute BlockSubdivision </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getBlockSubdivision() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.BLOCKSUBDIVISION, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute BlockElementSize </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getBlockElementSize() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.BLOCKELEMENTSIZE, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute CartonTopFlaps </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getCartonTopFlaps() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.CARTONTOPFLAPS, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute BurnOutArea </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getBurnOutArea() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.BURNOUTAREA, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// <summary> * (20) get JDFXYPair attribute HalfTonePhaseOrigin </summary> /// * <returns> JDFXYPair the value of the attribute, null if a the /// * attribute value is not a valid to create a JDFXYPair </returns> /// public virtual JDFXYPair getHalfTonePhaseOrigin() { string strAttrName = ""; JDFXYPair nPlaceHolder = null; strAttrName = getAttribute(AttributeName.HALFTONEPHASEORIGIN, null, JDFConstants.EMPTYSTRING); try { nPlaceHolder = new JDFXYPair(strAttrName); } catch (FormatException) { return(null); } return(nPlaceHolder); }
/// /// * <param name="sm2_2"> </param> /// * <param name="idAnchor"> </param> /// * <exception cref="FormatException"> </exception> /// private static void setNextAnchor(KElement sm2_2, string idAnchor, string anchor, string absolutePosition, string xmlComment, string anchorType, double rotation) { KElement nextAnchor = sm2_2.appendElement("RefAnchor"); nextAnchor.setAttribute("Anchor", anchor); JDFMatrix m = new JDFMatrix("1 0 0 1 0 0"); JDFXYPair xy = absolutePosition == null ? null : new JDFXYPair(absolutePosition); m.shift(xy); m.rotate(rotation); if (xy != null || rotation != 0) { sm2_2.setAttribute("CTM", m.ToString()); } nextAnchor.setAttribute("rRef", idAnchor); nextAnchor.setAttribute("AnchorType", anchorType); nextAnchor.setXMLComment(xmlComment); }
/// /// <summary> * fitsTolerance - checks whether this Evaluation has a specified Tolerance /// * that it is not equal to "0 0", and expands the original rangelist to the /// * rangelist that fits Tolerance. /// * </summary> /// * <param name="origRangeList"> /// * original rangelist </param> /// * <returns> NumberRangeList - expanded rangelist, returns original range if /// * Tolerance=="0 0" </returns> /// private JDFXYPairRangeList fitsTolerance(JDFXYPairRangeList origRangeList) { JDFXYPair tolerance = getTolerance(); double nt = tolerance.X; // negative tolerance double pt = tolerance.Y; // positive tolerance if ((nt == 0) && (pt == 0)) { return(origRangeList); } // expand our original range into the range +/- Tolerance JDFXYPairRangeList rangeList = new JDFXYPairRangeList(origRangeList); JDFXYPairRangeList tolRangeList = new JDFXYPairRangeList(); int size = rangeList.Count; for (int i = 0; i < size; i++) { JDFXYPairRange range = (JDFXYPairRange)rangeList[i]; JDFXYPair left = range.Left; double leftX = left.X; double leftY = left.Y; left.X = leftX - nt; left.Y = leftY - nt; JDFXYPair right = range.Right; double rightX = right.X; double rightY = right.Y; right.X = rightX + pt; right.Y = rightY + pt; range.Left = left; range.Right = right; tolRangeList.Append(range); } return(tolRangeList); }
/// /// <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)); }
// // * // Element getter / setter // // // * // Element getter / setter // // // * (non-Javadoc) // * // * @see // * org.cip4.jdflib.resource.devicecapability.JDFAbstractState#addValue(java // * .lang.String, org.cip4.jdflib.datatypes.JDFBaseDataTypes.EnumFitsValue) // public override void addValue(string @value, EnumFitsValue testlists) { if (fitsValue(@value, testlists)) { return; } JDFXYPair rect; try { rect = new JDFXYPair(@value); } catch (FormatException) { return; // nop for bad values } if (testlists == null || EnumFitsValue.Allowed.Equals(testlists)) { JDFXYPairRangeList list = getAllowedValueList(); if (list == null) { list = new JDFXYPairRangeList(); } list.Append(rect); setAllowedValueList(list); } if (testlists == null || EnumFitsValue.Present.Equals(testlists)) { JDFXYPairRangeList list = getPresentValueList(); if (list == null || !hasAttribute(AttributeName.PRESENTVALUELIST)) { list = new JDFXYPairRangeList(); } list.Append(rect); setPresentValueList(list); } }
/// /// <summary> * fitsXYRelation - checks whether <code>xypair</code> value matches the /// * AllowedXYRelation/PresentXYRelation specified for this State /// * </summary> /// * <param name="xypair"> /// * xypair to test </param> /// * <param name="xyrelation"> /// * switches between AllowedXYRelation and PresentXYRelation. </param> /// * <returns> boolean - true, if the <code>xypair</code> matches xyrelation or /// * if AllowedXYRelation is not specified </returns> /// private bool fitsXYRelation(JDFXYPair xypair, EnumFitsValue xyrelation) { EnumXYRelation relation; if (xyrelation.Equals(EnumFitsValue.Allowed)) { relation = getAllowedXYRelation(); } else { relation = getPresentXYRelation(); } if (relation == null) { return(true); } double x = xypair.X; double y = xypair.Y; return(relation.evaluateXY(x, y, JDFBaseDataTypes_Fields.EPSILON, JDFBaseDataTypes_Fields.EPSILON)); }
// --------------------------------------------------------------------- // Methods for Attribute Position // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute Position </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setPosition(JDFXYPair @value) { setAttribute(AttributeName.POSITION, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute ValueMod // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute ValueMod </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setValueMod(JDFXYPair @value) { setAttribute(AttributeName.VALUEMOD, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute SheetOffset // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute SheetOffset </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setSheetOffset(JDFXYPair @value) { setAttribute(AttributeName.SHEETOFFSET, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute NumberUp // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute NumberUp </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setNumberUp(JDFXYPair @value) { setAttribute(AttributeName.NUMBERUP, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute ScalingOrigin // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute ScalingOrigin </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setScalingOrigin(JDFXYPair @value) { setAttribute(AttributeName.SCALINGORIGIN, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute Scaling // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute Scaling </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setScaling(JDFXYPair @value) { setAttribute(AttributeName.SCALING, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute PosterOverlap // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute PosterOverlap </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setPosterOverlap(JDFXYPair @value) { setAttribute(AttributeName.POSTEROVERLAP, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute Poster // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute Poster </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setPoster(JDFXYPair @value) { setAttribute(AttributeName.POSTER, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute RepeatStep // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute RepeatStep </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setRepeatStep(JDFXYPair @value) { setAttribute(AttributeName.REPEATSTEP, @value, null); }
public virtual void setPresentValueMod(JDFXYPair @value) { setAttribute(AttributeName.PRESENTVALUEMOD, @value.ToString()); }
public virtual void setTolerance(JDFXYPair @value) { setAttribute(AttributeName.TOLERANCE, @value.ToString(), null); }
public virtual void setAllowedValueMod(JDFXYPair @value) { setAttribute(AttributeName.ALLOWEDVALUEMOD, @value.ToString(), null); }
// --------------------------------------------------------------------- // Methods for Attribute InitialResolution // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute InitialResolution </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setInitialResolution(JDFXYPair @value) { setAttribute(AttributeName.INITIALRESOLUTION, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute Size // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute Size </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setSize(JDFXYPair @value) { setAttribute(AttributeName.SIZE, @value, null); }
// --------------------------------------------------------------------- // Methods for Attribute FoldSheetIn // --------------------------------------------------------------------- /// /// <summary> * (36) set attribute FoldSheetIn </summary> /// * <param name="value">: the value to set the attribute to </param> /// public virtual void setFoldSheetIn(JDFXYPair @value) { setAttribute(AttributeName.FOLDSHEETIN, @value, null); }