public byte LineTypeToDesPen(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return(1); case PicGraphics.LT.LT_PERFOCREASING: return(2); case PicGraphics.LT.LT_CONSTRUCTION: return(3); case PicGraphics.LT.LT_PERFO: return(4); case PicGraphics.LT.LT_HALFCUT: return(5); case PicGraphics.LT.LT_CREASING: return(6); case PicGraphics.LT.LT_AXIS: return(7); case PicGraphics.LT.LT_COTATION: return(8); case PicGraphics.LT.LT_ORIGIN: return(9); case PicGraphics.LT.LT_GRID: return(10); case PicGraphics.LT.LT_BRIDGES: return(11); case PicGraphics.LT.LT_DEFAULT: return(12); default: return(12); } }
protected PicTypedDrawable(uint id, PicGraphics.LT lType) : base(id) { LineType = lType; Group = 1; Layer = 1; }
protected PicTypedDrawable(uint id, PicGraphics.LT lType) : base(id) { _lineType = lType; _group = 1; _layer = 1; }
private string InternalLineTypeToDxfLineType(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return("cut"); case PicGraphics.LT.LT_PERFOCREASING: return("crease"); case PicGraphics.LT.LT_CONSTRUCTION: return(""); case PicGraphics.LT.LT_PERFO: return(""); case PicGraphics.LT.LT_HALFCUT: return("partial-cut"); case PicGraphics.LT.LT_CREASING: return("crease"); case PicGraphics.LT.LT_AXIS: return(""); case PicGraphics.LT.LT_COTATION: return(""); case PicGraphics.LT.LT_GRID: return(""); default: return(""); } }
protected PicTypedDrawable(uint id, PicGraphics.LT lType) : base(id) { _lineType = lType; _group = 1; _layer = 1; }
public string LineTypeToDxfLayer(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return("L5-113"); case PicGraphics.LT.LT_PERFOCREASING: return("L6-133"); case PicGraphics.LT.LT_CONSTRUCTION: return("LCN-27"); case PicGraphics.LT.LT_PERFO: return("EC1-193"); case PicGraphics.LT.LT_HALFCUT: return("LI5-103"); case PicGraphics.LT.LT_CREASING: return("L8-123"); case PicGraphics.LT.LT_AXIS: return("L2-106"); case PicGraphics.LT.LT_COTATION: return("LDM-4"); case PicGraphics.LT.LT_GRID: return("L2-106"); default: return(""); } }
public static PicText CreateNewText(uint id, PicGraphics.LT lineType, string text, Vector2D point, PicGraphics.HAlignment hAlignment, PicGraphics.VAlignment vAlignment = PicGraphics.VAlignment.VA_BOTTOM) { return(new PicText(id, lineType, text, point, hAlignment, vAlignment)); }
public static PicSegment CreateNewSegment(uint id, PicGraphics.LT lType, Vector2D pt0, Vector2D pt1) { PicSegment segment = new PicSegment(id, lType); segment._pt0 = pt0; segment._pt1 = pt1; return(segment); }
/// <summary> /// Add a new arc with center, radius, start angle and end angle /// </summary> /// <param name="lType">Line type</param> /// <param name="grp">Group</param> /// <param name="layer">Layer</param> /// <param name="xc">abscissa of center</param> /// <param name="yc">ordinate of center</param> /// <param name="radius">Radius of arc</param> /// <param name="angle0">Start angle</param> /// <param name="angle1">End angle</param> public PicArc AddArc(PicGraphics.LT lType, short grp, short layer , double xc, double yc, double radius, double angle0, double angle1) { PicArc arc = PicArc.CreateNewArc(GetNewEntityId(), lType, new Vector2D(xc, yc), radius, angle0, angle1); arc.Group = grp; arc.Layer = layer; AddEntity(arc); return(arc); }
/// <summary> /// Add a new arc with center, first point and second point /// </summary> /// <param name="lType">Line type</param> /// <param name="ptCenter">Center</param> /// <param name="radius">Radius of arc</param> /// <param name="pt0">Start point</param> /// <param name="pt1">End point</param> public PicArc AddArc(PicGraphics.LT lType, short grp, short layer , Vector2D ptCenter, Vector2D pt0, Vector2D pt1) { PicArc arc = PicArc.CreateNewArc(GetNewEntityId(), lType, ptCenter, pt0, pt1); arc.Group = grp; arc.Layer = layer; AddEntity(arc); return(arc); }
/// <summary> /// Create a new nurb entity /// </summary> /// <param name="lType">Line type</param> public PicNurb AddNurb(PicGraphics.LT lType, short grp, short layer) { var nurb = PicNurb.CreateNewNurb(GetNewEntityId(), lType); nurb.LineType = lType; nurb.Group = grp; nurb.Layer = layer; AddEntity(nurb); return(nurb); }
public static PicArc CreateNewArc(uint id, PicGraphics.LT lType, Vector2D center, double radius, double angleBeg, double angleEnd) { PicArc arc = new PicArc(id, lType); arc._center = center; arc._radius = radius; arc._angleBeg = angleBeg; arc._angleEnd = angleEnd; return(arc); }
/// <summary> /// Add new point /// </summary> /// <param name="pt"></param> public PicPoint AddPoint( PicGraphics.LT lType, short grp, short layer , Vector2D pt) { PicPoint point = PicPoint.CreateNewPoint(GetNewEntityId(), lType, pt); point.Group = grp; point.Layer = layer; AddEntity(point); return(point); }
/// <summary> /// Add new segment /// </summary> /// <param name="lType">Line type</param> /// <param name="pt0">First extremity of segment</param> /// <param name="pt1">Second extremity of segment</param> /// <returns>Segment entity</returns> public PicSegment AddSegment( PicGraphics.LT lType, short grp, short layer , Vector2D pt0, Vector2D pt1) { PicSegment seg = PicSegment.CreateNewSegment(GetNewEntityId(), lType, pt0, pt1); seg.Group = grp; seg.Layer = layer; AddEntity(seg); return(seg); }
/// <summary> /// Add new segment /// </summary> /// <param name="lType">Line type</param> /// <param name="grp">Group</param> /// <param name="layer">Layer</param> /// <param name="x0">First extremity abscissa</param> /// <param name="y0">First extremity ordinate</param> /// <param name="x1">Second extremity abscissa</param> /// <param name="y1">Second extremity ordinate</param> /// <returns>Segment entity</returns> public PicSegment AddSegment( PicGraphics.LT lType, short grp, short layer , double x0, double y0, double x1, double y1) { PicSegment seg = PicSegment.CreateNewSegment(GetNewEntityId(), lType, new Vector2D(x0, y0), new Vector2D(x1, y1)); seg.Group = grp; seg.Layer = layer; AddEntity(seg); return(seg); }
protected PicText(uint id, PicGraphics.LT lType, string text, Vector2D pt, PicGraphics.HAlignment hAlignment, PicGraphics.VAlignment vAlignment) : base(id, lType) { Text = text; Point = pt; HAlignment = hAlignment; VAlignment = vAlignment; }
private BaseColor LineTypeToBaseColor(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return(BaseColor.RED); case PicGraphics.LT.LT_FOLD: return(BaseColor.BLUE); case PicGraphics.LT.LT_COTATION: return(BaseColor.GREEN); default: return(BaseColor.WHITE); } }
public PicText AddText(PicGraphics.LT lType, short gp, short layer , string text, Vector2D pt , PicGraphics.HAlignment hAlignment, PicGraphics.VAlignment vAlignment , float size, float direction) { var picText = PicText.CreateNewText(GetNewEntityId(), lType , text, pt, hAlignment, vAlignment); picText.FontSize = size; picText.TextDirection = direction; AddEntity(picText); return(picText); }
private int InternalLineTypeToDxfColor(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return(7); case PicGraphics.LT.LT_CREASING: return(1); case PicGraphics.LT.LT_HALFCUT: return(7); default: return(256); } }
public override void DrawArc(PicGraphics.LT lineType, Vector2D ptCenter, double radius, double angle0, double angle1) { if (radius > 0.0) { _gdiGraphics.DrawArc(ToPen(lineType) , X(ptCenter.X) - DX(radius) , Y(ptCenter.Y) - DY(radius) , (float)(2.0 * DX(radius)) // width , (float)(2.0 * DY(radius)) // height , -(float)angle0 // start angle , -(float)(angle1 - angle0)); // sweep angle } }
public static PicArc CreateNewArc(uint id, PicGraphics.LT lType, Vector2D center, Vector2D pt0, Vector2D pt1) { PicArc arc = new PicArc(id, lType); arc._center = center; arc._radius = (pt0 - center).GetLength(); arc._angleBeg = vecToAngleDeg(pt0 - center); arc._angleEnd = vecToAngleDeg(pt1 - center); while (arc._angleBeg < 0.0) { arc._angleBeg += 360.0; } while (arc._angleEnd < arc._angleBeg) { arc._angleEnd += 360.0; } return(arc); }
ExpPen.ToolAttribute LineTypeToExpPen(PicGraphics.LT lineType) { ExpPen.ToolAttribute toolAttribute; switch (lineType) { case PicGraphics.LT.LT_CUT: toolAttribute = ExpPen.ToolAttribute.LT_CUT; break; case PicGraphics.LT.LT_CREASING: toolAttribute = ExpPen.ToolAttribute.LT_CREASING; break; case PicGraphics.LT.LT_PERFOCREASING: toolAttribute = ExpPen.ToolAttribute.LT_PERFOCREASING; break; case PicGraphics.LT.LT_HALFCUT: toolAttribute = ExpPen.ToolAttribute.LT_HALFCUT; break; case PicGraphics.LT.LT_COTATION: toolAttribute = ExpPen.ToolAttribute.LT_COTATION; break; case PicGraphics.LT.LT_CONSTRUCTION: toolAttribute = ExpPen.ToolAttribute.LT_CONSTRUCTION; break; default: toolAttribute = ExpPen.ToolAttribute.LT_CONSTRUCTION; break; } return(toolAttribute); }
public string LineTypeToDxfLayer(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return("L5-113"); case PicGraphics.LT.LT_PERFOCREASING: return("L6-133"); case PicGraphics.LT.LT_CONSTRUCTION: return("LCN-27"); case PicGraphics.LT.LT_PERFO: return("EC1-193"); case PicGraphics.LT.LT_HALFCUT: return("LI5-103"); case PicGraphics.LT.LT_CREASING: return("L8-123"); case PicGraphics.LT.LT_AXIS: return("L2-106"); case PicGraphics.LT.LT_COTATION: return("LDM-4"); case PicGraphics.LT.LT_GRID: return("L2-106"); default: return(""); } // ** // "Cut", "L5-113" // "Perfo-Crease", "L6-133" // "Construction", "LCN-27" // "Perfo", "EC1-193" // "Half-Cut", "LI5-103" // "Crease", "L8-123" // "Axis", "L2-106" // "Dimension", "LDM-4" // ** }
public byte LineTypeToDesPen(PicGraphics.LT lType) { switch (lType) { case PicGraphics.LT.LT_CUT: return(1); case PicGraphics.LT.LT_PERFOCREASING: return(2); case PicGraphics.LT.LT_CONSTRUCTION: return(3); case PicGraphics.LT.LT_PERFO: return(4); case PicGraphics.LT.LT_HALFCUT: return(5); case PicGraphics.LT.LT_CREASING: return(6); case PicGraphics.LT.LT_AXIS: return(7); case PicGraphics.LT.LT_COTATION: return(8); default: throw new Exception("LineType export not implemented!"); } }
// constructor public PicFilterLineType(PicGraphics.LT lt) { _lt = lt; }
public PicGraphics.LT DxfColor2PicLT(DxfEntity entity) { DxfColor dxfColor = entity.Color; if (dxfColor.IsByLayer) { string layerName = entity.Layer; if (!LineTypeDictionary.ContainsKey(layerName)) { PicGraphics.LT lt = PicGraphics.LT.LT_CUT; if (string.Equals(layerName, "CUTLINES", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CUT; } else if (string.Equals(layerName, "CREASELINES", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CREASING; } else if (string.Equals(layerName, "GLUEPERFORATIONS", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_PERFOCREASING; } else if (string.Equals(layerName, "0", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CUT; } else if (string.Equals(layerName, "1", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CREASING; } else if (string.Equals(layerName, "10", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CUT; } else if (string.Equals(layerName, "20", StringComparison.CurrentCultureIgnoreCase)) { lt = PicGraphics.LT.LT_CREASING; } else { lt = PicGraphics.LT.LT_CUT; } LineTypeDictionary.Add(layerName, lt); } return(LineTypeDictionary[layerName]); } else if (dxfColor.IsIndex) { string csIndex = dxfColor.Index.ToString(); if (!LineTypeDictionary.ContainsKey(csIndex)) { PicGraphics.LT lt = PicGraphics.LT.LT_CUT; if (csIndex == "0") { lt = PicGraphics.LT.LT_CREASING; } else if (csIndex == "1") { lt = PicGraphics.LT.LT_CUT; } else if (csIndex == "2") { lt = PicGraphics.LT.LT_CREASING; } else if (csIndex == "3") { lt = PicGraphics.LT.LT_CREASING; } else { lt = PicGraphics.LT.LT_CUT; } LineTypeDictionary.Add(csIndex, lt); } return(LineTypeDictionary[csIndex]); } else if (dxfColor.IsByBlock) { return(PicGraphics.LT.LT_CUT); } else { return(PicGraphics.LT.LT_CUT); } }
public void UpdateFactory() { PicFactory factory = viewer.Factory; factory.Clear(); PicGraphics.LT ltCut = PicGraphics.LT.LT_CUT; PicGraphics.LT ltFold = PicGraphics.LT.LT_CREASING; // free variables double B = this.ParamB; double H = this.ParamH; double L = this.ParamL; double ep = this.ParamEp; double hpr = this.ParamHpr; double hr = this.ParamHr; double lp = this.ParamLp; // formulas double b1 = B / 2; double b2 = L / 4; double l2 = L / 2; double Rp = hpr - 1; double Re = (hr / 2) - 3; SortedList <uint, PicEntity> entities = new SortedList <uint, PicEntity>(); // segments double x0 = 0.0, y0 = 0.0, x1 = 0.0, y1 = 0.0; // 3 : (478.344, 543.631) <-> (465.844, 556.131) x0 = 425.844 + lp + 12.5; y0 = 296.131 + hr + b1 - 12.5; x1 = 425.844 + lp; y1 = 296.131 + hr + b1; entities.Add(3, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 4 : (478.344, 543.631) <-> (478.344, 296.131) x0 = 425.844 + lp + 12.5; y0 = 296.131 + hr + b1 - 12.5; x1 = 425.844 + lp + 12.5; y1 = 296.131; entities.Add(4, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 5 : (478.344, 296.131) <-> (615.844, 296.131) x0 = 425.844 + lp + 12.5; y0 = 296.131; x1 = 425.844 + lp + b2; y1 = 296.131; entities.Add(5, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 6 : (615.844, 296.131) <-> (615.844, 356.131) x0 = 425.844 + lp + b2; y0 = 296.131; x1 = 425.844 + lp + b2; y1 = 296.131 + hr; entities.Add(6, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 7 : (615.844, 356.131) <-> (915.844, 356.131) x0 = 425.844 + lp + b2; y0 = 296.131 + hr; x1 = 425.844 + lp + b2 + l2; y1 = 296.131 + hr; entities.Add(7, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 8 : (915.844, 356.131) <-> (915.844, 296.131) x0 = 425.844 + lp + b2 + l2; y0 = 296.131 + hr; x1 = 425.844 + lp + b2 + l2; y1 = 296.131; entities.Add(8, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 9 : (915.844, 296.131) <-> (1053.34, 296.131) x0 = 425.844 + lp + b2 + l2; y0 = 296.131; x1 = 425.844 + lp + L - 12.5; y1 = 296.131; entities.Add(9, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 10 : (1053.34, 296.131) <-> (1053.34, 543.631) x0 = 425.844 + lp + L - 12.5; y0 = 296.131; x1 = 425.844 + lp + L - 12.5; y1 = 296.131 + hr + b1 - 12.5; entities.Add(10, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 11 : (1053.34, 543.631) <-> (1065.84, 556.131) x0 = 425.844 + lp + L - 12.5; y0 = 296.131 + hr + b1 - 12.5; x1 = 425.844 + lp + L; y1 = 296.131 + hr + b1; entities.Add(11, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 12 : (1065.84, 556.131) <-> (1265.84, 356.131) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + b1; y1 = 296.131 + hr; entities.Add(12, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 13 : (1265.84, 356.131) <-> (1244.5, 328.303) x0 = 425.844 + lp + L + b1; y0 = 296.131 + hr; x1 = 425.844 + lp + L + b1 - 21.3455; y1 = 296.131 + hr - 27.8274; entities.Add(13, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 14 : (1260.37, 296.131) <-> (1453.34, 296.131) x0 = 425.844 + lp + L + b1 - 5.47632; y0 = 296.131; x1 = 425.844 + lp + L + B - 12.5007; y1 = 296.131; entities.Add(14, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 15 : (1453.34, 296.131) <-> (1453.34, 543.631) x0 = 425.844 + lp + L + B - 12.5007; y0 = 296.131; x1 = 425.844 + lp + L + B - 12.5007; y1 = 296.131 + hr + b1 - 12.5; entities.Add(15, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 16 : (1453.34, 543.631) <-> (1465.84, 556.131) x0 = 425.844 + lp + L + B - 12.5007; y0 = 296.131 + hr + b1 - 12.5; x1 = 425.844 + lp + L + B; y1 = 296.131 + hr + b1; entities.Add(16, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 17 : (1465.84, 556.131) <-> (1615.84, 356.131) x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + b2; y1 = 296.131 + hr; entities.Add(17, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 18 : (1615.84, 356.131) <-> (1615.84, 296.131) x0 = 425.844 + lp + L + B + b2; y0 = 296.131 + hr; x1 = 425.844 + lp + L + B + b2; y1 = 296.131; entities.Add(18, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 19 : (1615.84, 296.131) <-> (1915.84, 296.131) x0 = 425.844 + lp + L + B + b2; y0 = 296.131; x1 = 425.844 + lp + L + B + b2 + l2; y1 = 296.131; entities.Add(19, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 20 : (1915.84, 296.131) <-> (1915.84, 356.131) x0 = 425.844 + lp + L + B + b2 + l2; y0 = 296.131; x1 = 425.844 + lp + L + B + b2 + l2; y1 = 296.131 + hr; entities.Add(20, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 21 : (1915.84, 356.131) <-> (2065.84, 556.131) x0 = 425.844 + lp + L + B + b2 + l2; y0 = 296.131 + hr; x1 = 425.844 + lp + L + B + L; y1 = 296.131 + hr + b1; entities.Add(21, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 22 : (2065.85, 556.131) <-> (2078.35, 543.631) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L + 12.5024; y1 = 296.131 + hr + b1 - 12.5; entities.Add(22, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 23 : (2078.35, 543.631) <-> (2078.35, 296.131) x0 = 425.844 + lp + L + B + L + 12.5024; y0 = 296.131 + hr + b1 - 12.5; x1 = 425.844 + lp + L + B + L + 12.5024; y1 = 296.131; entities.Add(23, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 24 : (2078.35, 296.131) <-> (2271.32, 296.131) x0 = 425.844 + lp + L + B + L + 12.5022; y0 = 296.131; x1 = 425.844 + lp + L + B + L + b1 + 5.47681; y1 = 296.131; entities.Add(24, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 25 : (2287.19, 328.304) <-> (2265.84, 356.131) x0 = 425.844 + lp + L + B + L + b1 + 21.3457; y0 = 296.131 + hr - 27.8272; x1 = 425.844 + lp + L + B + L + b1; y1 = 296.131 + hr; entities.Add(25, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 26 : (2265.84, 356.131) <-> (2465.84, 556.131) x0 = 425.844 + lp + L + B + L + b1; y0 = 296.131 + hr; x1 = 425.844 + lp + L + B + L + B; y1 = 296.131 + hr + b1; entities.Add(26, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 27 : (1065.84, 846.131) <-> (1465.84, 846.131) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B; y1 = 296.131 + hr + b1 + H - ep; entities.Add(27, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 28 : (2065.84, 846.131) <-> (2465.84, 846.131) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + L + B; y1 = 296.131 + hr + b1 + H - ep; entities.Add(28, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 29 : (1065.84, 846.131) <-> (1078.34, 856.131) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(29, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 30 : (1065.84, 556.131) <-> (1065.84, 846.131) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L; y1 = 296.131 + hr + b1 + H - ep; entities.Add(30, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 31 : (465.844, 556.131) <-> (465.844, 856.131) x0 = 425.844 + lp; y0 = 296.131 + hr + b1; x1 = 425.844 + lp; y1 = 296.131 + hr + b1 + H; entities.Add(31, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 32 : (465.844, 856.131) <-> (1078.34, 856.131) x0 = 425.844 + lp; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(32, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 33 : (1465.84, 846.131) <-> (1453.34, 856.131) x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B - 12.5007; y1 = 296.131 + hr + b1 + H; entities.Add(33, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 34 : (2065.84, 846.131) <-> (2078.34, 856.131) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + L + 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(34, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 35 : (1465.84, 556.131) <-> (1465.84, 846.131) x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B; y1 = 296.131 + hr + b1 + H - ep; entities.Add(35, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 36 : (2065.84, 556.131) <-> (2065.84, 846.131) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L; y1 = 296.131 + hr + b1 + H - ep; entities.Add(36, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 37 : (465.844, 856.131) <-> (453.344, 868.631) x0 = 425.844 + lp; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp - 12.5; y1 = 296.131 + hr + b1 + H + 12.5; entities.Add(37, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 38 : (465.844, 556.131) <-> (425.844, 556.131) x0 = 425.844 + lp; y0 = 296.131 + hr + b1; x1 = 425.844; y1 = 296.131 + hr + b1; entities.Add(38, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 39 : (425.844, 556.131) <-> (425.844, 856.131) x0 = 425.844; y0 = 296.131 + hr + b1; x1 = 425.844; y1 = 296.131 + hr + b1 + H; entities.Add(39, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 40 : (425.844, 856.131) <-> (465.844, 856.131) x0 = 425.844; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp; y1 = 296.131 + hr + b1 + H; entities.Add(40, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 41 : (2465.84, 556.131) <-> (2465.84, 846.131) x0 = 425.844 + lp + L + B + L + B; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L + B; y1 = 296.131 + hr + b1 + H - ep; entities.Add(41, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 42 : (2465.84, 846.131) <-> (2453.34, 856.131) x0 = 425.844 + lp + L + B + L + B; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + L + B - 12.5024; y1 = 296.131 + hr + b1 + H; entities.Add(42, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 43 : (453.344, 868.631) <-> (453.344, 1256.13) x0 = 425.844 + lp - 12.5; y0 = 296.131 + hr + b1 + H + 12.5; x1 = 425.844 + lp - 12.5; y1 = 296.131 + hr + b1 + H + B; entities.Add(43, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 44 : (453.344, 1256.13) <-> (465.844, 1256.13) x0 = 425.844 + lp - 12.5; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp; y1 = 296.131 + hr + b1 + H + B; entities.Add(44, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 45 : (1465.84, 846.131) <-> (1478.34, 856.131) x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + 12.4993; y1 = 296.131 + hr + b1 + H; entities.Add(45, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 46 : (2065.84, 846.131) <-> (2053.34, 856.131) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + L - 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(46, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 47 : (1478.34, 856.131) <-> (2053.34, 856.131) x0 = 425.844 + lp + L + B + 12.4995; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + L + B + L - 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(47, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 48 : (2453.34, 856.131) <-> (2453.34, 1046.13) x0 = 425.844 + lp + L + B + L + B - 12.5024; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + L + B + L + B - 12.5024; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(48, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 49 : (2078.34, 856.131) <-> (2078.34, 1046.13) x0 = 425.844 + lp + L + B + L + 12.5; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + L + B + L + 12.5; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(49, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 50 : (2078.34, 1046.13) <-> (2453.34, 1046.13) x0 = 425.844 + lp + L + B + L + 12.5; y0 = 296.131 + hr + b1 + H - ep + b1; x1 = 425.844 + lp + L + B + L + B - 12.5024; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(50, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 51 : (1453.34, 856.131) <-> (1453.34, 1046.13) x0 = 425.844 + lp + L + B - 12.5007; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + L + B - 12.5007; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(51, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 52 : (1453.34, 1046.13) <-> (1078.34, 1046.13) x0 = 425.844 + lp + L + B - 12.5007; y0 = 296.131 + hr + b1 + H - ep + b1; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(52, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 53 : (465.844, 1256.13) <-> (465.844, 1276.13) x0 = 425.844 + lp; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp; y1 = 296.131 + hr + b1 + H + B + 20; entities.Add(53, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 54 : (505.844, 1316.13) <-> (1025.84, 1316.13) x0 = 425.844 + lp + 40; y0 = 296.131 + hr + b1 + H + B + hpr; x1 = 425.844 + lp + L - 40; y1 = 296.131 + hr + b1 + H + B + hpr; entities.Add(54, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 55 : (1065.84, 1276.13) <-> (1065.84, 1256.13) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + H + B + 20; x1 = 425.844 + lp + L; y1 = 296.131 + hr + b1 + H + B; entities.Add(55, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 56 : (1065.84, 1256.13) <-> (1078.34, 1256.13) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H + B; entities.Add(56, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 57 : (1065.84, 1256.13) <-> (465.844, 1256.13) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp; y1 = 296.131 + hr + b1 + H + B; entities.Add(57, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 79 : (465.844, 556.131) <-> (1065.84, 556.131) x0 = 425.844 + lp; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L; y1 = 296.131 + hr + b1; entities.Add(79, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 80 : (1065.84, 556.131) <-> (1265.84, 556.131) x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + b1; y1 = 296.131 + hr + b1; entities.Add(80, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 81 : (1265.84, 556.131) <-> (1465.84, 556.131) x0 = 425.844 + lp + L + b1; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B; y1 = 296.131 + hr + b1; entities.Add(81, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 82 : (1465.84, 556.131) <-> (2065.84, 556.131) x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L; y1 = 296.131 + hr + b1; entities.Add(82, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 83 : (2065.85, 556.131) <-> (2265.84, 556.131) x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L + b1; y1 = 296.131 + hr + b1; entities.Add(83, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 84 : (2265.84, 556.131) <-> (2465.84, 556.131) x0 = 425.844 + lp + L + B + L + b1; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + L + B + L + B; y1 = 296.131 + hr + b1; entities.Add(84, factory.AddSegment(ltFold, 0, 1, x0, y0, x1, y1)); // 85 : (1078.34, 1046.13) <-> (1078.34, 856.131) x0 = 425.844 + lp + L + 12.5; y0 = 296.131 + hr + b1 + H - ep + b1; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H; entities.Add(85, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 86 : (1078.34, 1256.13) <-> (1078.34, 1046.13) x0 = 425.844 + lp + L + 12.5; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp + L + 12.5; y1 = 296.131 + hr + b1 + H - ep + b1; entities.Add(86, factory.AddSegment(ltCut, 0, 1, x0, y0, x1, y1)); // 58 : radius = 40 s0 = 54 s1 = 55 factory.ProcessTool(new PicToolRound( entities[54] , entities[55] , Rp // radius )); // 59 : radius = 40 s0 = 53 s1 = 54 factory.ProcessTool(new PicToolRound( entities[53] , entities[54] , Rp // radius )); // 89 : radius = 20 s0 = 13 s1 = 14 factory.ProcessTool(new PicToolRound( entities[13] , entities[14] , Re // radius )); // 90 : radius = 20 s0 = 24 s1 = 25 factory.ProcessTool(new PicToolRound( entities[24] , entities[25] , Re // radius )); // cotations double offset = 0.0; // 60: Pt0 = ( 2257.61, 846.131) Pt1 = ( 2257.61, 1046.13) offset = -8.7301 x0 = 425.844 + lp + L + B + L + b1 - 8.23413; y0 = 296.131 + hr + b1 + H - ep; x1 = 425.844 + lp + L + B + L + b1 - 8.23413; y1 = 296.131 + hr + b1 + H - ep + b1; offset = -8.7301; entities.Add(60, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 5, 1, x0, y0, x1, y1, offset, "", 1)); // 61: Pt0 = ( 856.89, 556.131) Pt1 = ( 856.89, 356.131) offset = -21.0876 x0 = 425.844 + lp + b2 + l2 - 58.9536; y0 = 296.131 + hr + b1; x1 = 425.844 + lp + b2 + l2 - 58.9536; y1 = 296.131 + hr; offset = -21.0876; entities.Add(61, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 62: Pt0 = ( 669.711, 1256.13) Pt1 = ( 669.711, 856.131) offset = -48.2816 x0 = 425.844 + lp + b2 + 53.8672; y0 = 296.131 + hr + b1 + H + B; x1 = 425.844 + lp + b2 + 53.8672; y1 = 296.131 + hr + b1 + H; offset = -48.2816; entities.Add(62, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 93: Pt0 = ( 465.844, 593.295) Pt1 = ( 1065.84, 593.295) offset = 2.71844 x0 = 425.844 + lp; y0 = 296.131 + hr + b1 + 37.1644; x1 = 425.844 + lp + L; y1 = 296.131 + hr + b1 + 37.1644; offset = 2.71844; entities.Add(93, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 94: Pt0 = ( 1065.84, 598.732) Pt1 = ( 1465.84, 598.732) offset = -2.71851 x0 = 425.844 + lp + L; y0 = 296.131 + hr + b1 + 42.6013; x1 = 425.844 + lp + L + B; y1 = 296.131 + hr + b1 + 42.6013; offset = -2.71851; entities.Add(94, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 95: Pt0 = ( 1465.84, 590.577) Pt1 = ( 2065.84, 590.577) offset = 2.71851 x0 = 425.844 + lp + L + B; y0 = 296.131 + hr + b1 + 34.4459; x1 = 425.844 + lp + L + B + L; y1 = 296.131 + hr + b1 + 34.4459; offset = 2.71851; entities.Add(95, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 96: Pt0 = ( 2065.84, 596.014) Pt1 = ( 2465.84, 596.014) offset = 0 x0 = 425.844 + lp + L + B + L; y0 = 296.131 + hr + b1 + 39.8828; x1 = 425.844 + lp + L + B + L + B; y1 = 296.131 + hr + b1 + 39.8828; offset = 0; entities.Add(96, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); // 97: Pt0 = ( 628.84, 856.131) Pt1 = ( 628.84, 556.131) offset = -3.36783 x0 = 425.844 + lp + b2 + 12.996; y0 = 296.131 + hr + b1 + H; x1 = 425.844 + lp + b2 + 12.996; y1 = 296.131 + hr + b1; offset = -3.36783; entities.Add(97, factory.AddCotation(PicCotation.CotType.COT_DISTANCE, 1, 1, x0, y0, x1, y1, offset, "", 1)); viewer.FitView(); }
static public void CreateFactoryEntities(PicFactory factory, ParameterStack stack, Transform2D transform) { PicFactory fTemp = new PicFactory(); const PicGraphics.LT ltCut = PicGraphics.LT.LT_CUT; const PicGraphics.LT ltFold = PicGraphics.LT.LT_CREASING; // free variables double A = stack.GetDoubleParameterValue("A"); double B = stack.GetDoubleParameterValue("B"); double H = stack.GetDoubleParameterValue("H"); double e = stack.GetDoubleParameterValue("e"); double g = stack.GetDoubleParameterValue("g"); double hc = stack.GetDoubleParameterValue("hc"); double pr = stack.GetDoubleParameterValue("pr"); // formulas double hp = B / 2 - e; double v9 = g * Tand(15); double v1 = 8; double v2 = 8; double v3 = hp * Tand(15); double r = pr / 4; SortedList <uint, PicEntity> entities = new SortedList <uint, PicEntity>(); // segments double x0 = 0.0, y0 = 0.0, x1 = 0.0, y1 = 0.0; // 3 : (481.462, 303.394) <-> (481.462, 467.206) x0 = 69.6211 + g + A + B + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(3, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 4 : (223.218, 468.17) <-> (352.341, 468.17) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; entities.Add(4, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 5 : (352.341, 467.206) <-> (480.017, 467.206) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(5, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 6 : (352.34, 302.431) <-> (223.218, 302.431) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; entities.Add(6, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 7 : (352.34, 303.394) <-> (480.017, 303.394) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(7, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 8 : (223.218, 240.761) <-> (101.323, 240.761) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(8, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 9 : (223.218, 211.853) <-> (101.323, 211.853) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(9, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 10 : (352.34, 211.853) <-> (474.235, 211.853) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(10, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 11 : (352.34, 240.761) <-> (474.235, 240.761) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(11, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 12 : (352.341, 530.804) <-> (461.326, 530.804) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; x1 = 69.6211 + g + A + B + A - e - v3; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(12, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 13 : (94.0963, 467.206) <-> (69.6211, 462.388) x0 = 69.6211 + g; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H - v9; entities.Add(13, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 14 : (69.6211, 308.213) <-> (69.6211, 462.388) x0 = 69.6211; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + v9; x1 = 69.6211; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H - v9; entities.Add(14, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 15 : (94.0963, 303.395) <-> (69.621, 308.213) x0 = 69.6211 + g; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + v9; entities.Add(15, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 16 : (223.218, 303.394) <-> (95.542, 303.394) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(16, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 17 : (223.218, 467.206) <-> (95.5415, 467.206) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(17, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 18 : (352.34, 149.701) <-> (474.235, 149.701) x0 = 69.6211 + g + A + B; y0 = 120.793 + g; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g; entities.Add(18, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 19 : (466.489, 120.793) <-> (360.086, 120.793) x0 = 69.6211 + g + A + B + A - e - v2 - v9; y0 = 120.793; x1 = 69.6211 + g + A + B + v9; y1 = 120.793; entities.Add(19, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 20 : (480.017, 467.206) <-> (480.017, 476.842) x0 = 69.6211 + g + A + B + A - e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5; entities.Add(20, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 21 : (474.235, 482.623) <-> (480.017, 476.842) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5 + v2; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5; entities.Add(21, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 22 : (474.235, 482.623) <-> (461.326, 530.804) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5 + v2; x1 = 69.6211 + g + A + B + A - e - v3; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(22, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 23 : (223.218, 530.804) <-> (114.233, 530.804) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; x1 = 69.6211 + g + e + v3; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(23, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 24 : (95.5415, 467.206) <-> (95.5415, 476.842) x0 = 69.6211 + g + e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5; entities.Add(24, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 25 : (101.323, 482.624) <-> (95.5415, 476.842) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5 + v2; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5; entities.Add(25, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 26 : (101.323, 482.624) <-> (114.233, 530.804) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + hp / 5 + v2; x1 = 69.6211 + g + e + v3; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(26, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 27 : (223.218, 149.701) <-> (101.323, 149.701) x0 = 69.6211 + g + A; y0 = 120.793 + g; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g; entities.Add(27, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 28 : (215.473, 120.793) <-> (109.069, 120.793) x0 = 69.6211 + g + A - v9; y0 = 120.793; x1 = 69.6211 + g + e + v2 + v9; y1 = 120.793; entities.Add(28, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 29 : (480.017, 303.394) <-> (480.017, 293.759) x0 = 69.6211 + g + A + B + A - e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5; entities.Add(29, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 30 : (474.235, 287.977) <-> (480.017, 293.759) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5 - v2; x1 = 69.6211 + g + A + B + A - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5; entities.Add(30, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 31 : (95.542, 303.394) <-> (95.542, 293.759) x0 = 69.6211 + g + e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5; entities.Add(31, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 32 : (101.323, 287.978) <-> (95.542, 293.759) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5 - v2; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5; entities.Add(32, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 33 : (101.323, 149.701) <-> (109.069, 120.793) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g; x1 = 69.6211 + g + e + v2 + v9; y1 = 120.793; entities.Add(33, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 34 : (223.218, 149.701) <-> (215.473, 120.793) x0 = 69.6211 + g + A; y0 = 120.793 + g; x1 = 69.6211 + g + A - v9; y1 = 120.793; entities.Add(34, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 35 : (352.34, 149.699) <-> (360.086, 120.793) x0 = 69.6211 + g + A + B; y0 = 120.793 + g; x1 = 69.6211 + g + A + B + v9; y1 = 120.793; entities.Add(35, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 36 : (474.235, 149.701) <-> (466.489, 120.793) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g; x1 = 69.6211 + g + A + B + A - e - v2 - v9; y1 = 120.793; entities.Add(36, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 37 : (609.621, 303.394) <-> (609.621, 467.206) x0 = 69.6211 + g + A + B + A + B - e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A + B - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(37, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 38 : (94.0963, 467.206) <-> (95.5415, 467.206) x0 = 69.6211 + g; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(38, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 39 : (94.0963, 303.394) <-> (95.542, 303.394) x0 = 69.6211 + g; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(39, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 40 : (94.0963, 303.394) <-> (94.0963, 467.206) x0 = 69.6211 + g; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(40, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 41 : (236.709, 594.401) <-> (338.85, 594.401) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; x1 = 69.6211 + g + A + B - 2 * e - v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; entities.Add(41, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 42 : (340.524, 625.236) <-> (235.034, 625.236) x0 = 69.6211 + g + A + B - 2 * e - v1 + 1.6741; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + pr; x1 = 69.6211 + g + A + 2 * e + v1 - 1.67455; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + pr; entities.Add(42, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 43 : (348.524, 617.236) <-> (348.524, 596.328) x0 = 69.6211 + g + A + B - 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + pr - 8.00006; x1 = 69.6211 + g + A + B - 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(43, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 59 : (227.034, 617.236) <-> (227.034, 596.328) x0 = 69.6211 + g + A + 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + pr - 8; x1 = 69.6211 + g + A + 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(59, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 69 : (338.85, 176.2) <-> (236.709, 176.2) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; x1 = 69.6211 + g + A + 2 * e + v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; entities.Add(69, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 70 : (235.035, 145.365) <-> (339.525, 145.364) x0 = 69.6211 + g + A + 2 * e + v1 - 1.67406; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - pr; x1 = 69.6211 + g + A + B - 2 * e - v1 + 0.674561; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - pr; entities.Add(70, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 71 : (227.035, 153.365) <-> (227.035, 174.272) x0 = 69.6211 + g + A + 2 * e; y0 = 120.793 + g + 3.66388; x1 = 69.6211 + g + A + 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(71, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 73 : (348.525, 174.272) <-> (348.525, 154.364) x0 = 69.6211 + g + A + B - 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + B - 2 * e; y1 = 120.793 + g + 4.66336; entities.Add(73, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 98 : (227.034, 596.328) <-> (223.218, 596.328) x0 = 69.6211 + g + A + 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(98, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 99 : (236.709, 596.328) <-> (227.034, 596.328) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A + 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(99, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 100 : (352.341, 303.394) <-> (352.341, 467.206) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(100, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 101 : (352.341, 467.206) <-> (352.341, 467.399) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(101, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 102 : (223.218, 303.394) <-> (223.218, 467.206) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(102, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 103 : (223.218, 467.206) <-> (223.218, 467.399) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(103, fTemp.AddSegment(ltFold, 1, 1, x0, y0, x1, y1)); // 104 : (480.017, 467.206) <-> (481.462, 467.206) x0 = 69.6211 + g + A + B + A - e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A + B + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(104, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 105 : (481.462, 467.206) <-> (609.621, 467.206) x0 = 69.6211 + g + A + B + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A + B + A + B - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(105, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 106 : (480.017, 303.394) <-> (481.462, 303.394) x0 = 69.6211 + g + A + B + A - e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(106, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 107 : (481.462, 303.394) <-> (609.621, 303.394) x0 = 69.6211 + g + A + B + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; x1 = 69.6211 + g + A + B + A + B - e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(107, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 108 : (352.341, 468.17) <-> (352.341, 467.399) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; entities.Add(108, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 109 : (352.341, 530.804) <-> (352.341, 468.17) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; entities.Add(109, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 110 : (352.341, 596.328) <-> (352.341, 530.804) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(110, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 111 : (223.218, 467.399) <-> (223.218, 468.17) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; entities.Add(111, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 112 : (223.218, 468.17) <-> (223.218, 530.804) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; entities.Add(112, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 113 : (223.218, 530.804) <-> (223.218, 596.328) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + B / 2 - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(113, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 114 : (474.235, 149.701) <-> (474.235, 211.853) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(114, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 115 : (474.235, 211.853) <-> (474.235, 240.761) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(115, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 116 : (474.235, 240.761) <-> (474.235, 287.977) x0 = 69.6211 + g + A + B + A - e - v2; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + A + B + A - e - v2; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5 - v2; entities.Add(116, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 117 : (101.323, 149.701) <-> (101.323, 211.853) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(117, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 118 : (101.323, 211.853) <-> (101.323, 240.761) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(118, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 119 : (101.323, 240.761) <-> (101.323, 287.978) x0 = 69.6211 + g + e + v2; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + e + v2; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - hp / 5 - v2; entities.Add(119, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 120 : (223.218, 149.701) <-> (223.218, 174.272) x0 = 69.6211 + g + A; y0 = 120.793 + g; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(120, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 121 : (223.218, 174.272) <-> (223.218, 211.853) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(121, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 122 : (223.218, 211.853) <-> (223.218, 240.761) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(122, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 123 : (223.218, 240.761) <-> (223.218, 302.431) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; entities.Add(123, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 124 : (223.218, 302.431) <-> (223.218, 303.394) x0 = 69.6211 + g + A; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(124, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 125 : (352.34, 149.701) <-> (352.34, 174.272) x0 = 69.6211 + g + A + B; y0 = 120.793 + g; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(125, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 126 : (352.34, 174.272) <-> (352.34, 211.853) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e; entities.Add(126, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 127 : (352.34, 211.853) <-> (352.34, 240.761) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc; entities.Add(127, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 128 : (352.34, 240.761) <-> (352.34, 302.431) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; entities.Add(128, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 129 : (352.34, 302.431) <-> (352.34, 303.394) x0 = 69.6211 + g + A + B; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e; entities.Add(129, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 130 : (338.85, 596.328) <-> (348.524, 596.328) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A + B - 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(130, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 131 : (348.524, 596.328) <-> (352.341, 596.328) x0 = 69.6211 + g + A + B - 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(131, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 132 : (338.85, 592.474) <-> (338.85, 594.401) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A - e; x1 = 69.6211 + g + A + B - 2 * e - v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; entities.Add(132, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 133 : (338.85, 594.401) <-> (338.85, 596.328) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; x1 = 69.6211 + g + A + B - 2 * e - v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; entities.Add(133, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 134 : (236.709, 594.401) <-> (236.709, 592.474) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; x1 = 69.6211 + g + A + 2 * e + v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A - e; entities.Add(134, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 135 : (236.709, 596.328) <-> (236.709, 594.401) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A + e; x1 = 69.6211 + g + A + 2 * e + v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e + H + e + A; entities.Add(135, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 136 : (338.85, 174.272) <-> (348.525, 174.272) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + B - 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(136, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 137 : (348.525, 174.272) <-> (352.341, 174.272) x0 = 69.6211 + g + A + B - 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + B; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(137, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 138 : (227.035, 174.272) <-> (223.218, 174.272) x0 = 69.6211 + g + A + 2 * e; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(138, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 139 : (236.709, 174.272) <-> (227.035, 174.272) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + 2 * e; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(139, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 140 : (236.709, 176.2) <-> (236.709, 174.272) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; x1 = 69.6211 + g + A + 2 * e + v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; entities.Add(140, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 141 : (236.709, 178.127) <-> (236.709, 176.2) x0 = 69.6211 + g + A + 2 * e + v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A + e; x1 = 69.6211 + g + A + 2 * e + v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; entities.Add(141, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 142 : (338.85, 174.272) <-> (338.85, 176.2) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A - e; x1 = 69.6211 + g + A + B - 2 * e - v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; entities.Add(142, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // 143 : (338.85, 176.2) <-> (338.85, 178.127) x0 = 69.6211 + g + A + B - 2 * e - v1; y0 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A; x1 = 69.6211 + g + A + B - 2 * e - v1; y1 = 120.793 + g + B / 2 - 2 * e + hc + B / 2 - e - e - A + e; entities.Add(143, fTemp.AddSegment(ltCut, 1, 1, x0, y0, x1, y1)); // arcs // 44 : radius = 8 s0 = 42 s1 = 43 fTemp.ProcessTool(new PicToolRound( entities[42] , entities[43] , r // radius )); // 60 : radius = 8 s0 = 42 s1 = 59 fTemp.ProcessTool(new PicToolRound( entities[42] , entities[59] , r // radius )); // 72 : radius = 8 s0 = 70 s1 = 71 fTemp.ProcessTool(new PicToolRound( entities[70] , entities[71] , r // radius )); // 144 : radius = 9 s0 = 70 s1 = 73 fTemp.ProcessTool(new PicToolRound( entities[70] , entities[73] , r // radius )); factory.AddEntities(fTemp, transform); }
static void Main(string[] args) { // set up a simple configuration that logs on the console. XmlConfigurator.Configure(); string assemblyName = System.Reflection.Assembly.GetExecutingAssembly().CodeBase; try { _log.Info(assemblyName + " starting..."); const PicGraphics.LT ltCut = PicGraphics.LT.LT_CUT; // instantiate factory PicFactory initialFactory = new PicFactory(); ParameterStack stack = Program.Parameters; Program.CreateFactoryEntities(initialFactory, stack, Transform2D.Identity); // imposition double width = 1000.0, height = 1000.0; ImpositionTool impositionTool = new ImpositionToolCardboardFormat(initialFactory, new CardboardFormat(0, "Format1", "Format1", width, height)); impositionTool.SpaceBetween = new Vector2D(0.0, 0.0); impositionTool.Margin = new Vector2D(0.0, 0.0); List <ImpositionSolution> solutions; impositionTool.GenerateSortedSolutionList(null, out solutions); _log.Info(string.Format("{0} : Solutions", solutions.Count)); if (solutions.Count <= 0) { return; } foreach (ImpositionSolution chosenSolution in solutions) { _log.Info(string.Format("NoRows={0}, NoCols={1}", chosenSolution.Rows, chosenSolution.Cols)); PicFactory factoryOut = new PicFactory(); chosenSolution.CreateEntities(factoryOut); factoryOut.AddSegment(ltCut, new Vector2D(0.0, 0.0), new Vector2D(width, 0.0)); factoryOut.AddSegment(ltCut, new Vector2D(width, 0.0), new Vector2D(width, height)); factoryOut.AddSegment(ltCut, new Vector2D(width, height), new Vector2D(0.0, height)); factoryOut.AddSegment(ltCut, new Vector2D(0.0, height), new Vector2D(0.0, 0.0)); // get bounding box Box2D box = new Box2D(); using (PicVisitorBoundingBox visitor = new PicVisitorBoundingBox()) { factoryOut.ProcessVisitor(visitor); box = visitor.Box; } string filePath = Path.Combine(Path.GetTempPath(), "Imposition.bmp"); PicGraphicsImage picImage = new PicGraphicsImage(); picImage.ImageSize = new System.Drawing.Size(4096, 4096); box.AddMargin(1.0); picImage.DrawingBox = box; factoryOut.Draw(picImage); picImage.SaveAs(filePath); System.Diagnostics.Process.Start(Path.Combine(Environment.SystemDirectory, "mspaint.exe"), filePath); _log.Info(assemblyName + " ending..."); } } catch (Exception ex) { _log.Error(ex.ToString()); } }
protected PicArc(uint id, PicGraphics.LT lType) : base(id, lType) { }
protected PicSegment(uint id, PicGraphics.LT lType) : base(id, lType) { }