/// <summary> /// draws a 3d-polygon, which is stored in Array. See also <see cref="xyzArray"/> if the <see cref="OpenGlDevice.PolygonMode"/> = <b>Fill</b> and the array is planar then /// the polygon is drawn as filled polygon else as a lined polygon. /// </summary> /// <param name="Array"><see cref="xyzArray"/>hollds the array information</param> public void drawPolyLine(xyzArray Array) { Object Handle = null; if ((RenderKind == RenderKind.SnapBuffer)) { Handle = Selector.RegisterSnapItem(new PolyLineSnappItem3D(Array)); } if ((PolygonMode == PolygonMode.Fill) && (Array.Count > 2) && (Array.planar)) { Loxy L = new Loxy(); PushMatrix(); MulMatrix(Array.Base.ToMatrix()); xyArray A = Array.ToxyArray(); L.Add(A); drawFilledArray2d(this, L); PopMatrix(); if ((RenderKind == RenderKind.SnapBuffer)) { Selector.UnRegisterSnapItem(Handle); } if (PolygonMode == PolygonMode.Fill) { return; } } Primitives3d.drawArrayLined(this, Array); if ((RenderKind == RenderKind.SnapBuffer)) { Selector.UnRegisterSnapItem(Handle); } }
Loxy getLoxy(double UpDown, ref Base Base) { Loxy Result = new Loxy(); if ((Curvextruders != null) && (Curvextruders.Count > 0) && (Curvextruders[0].Count > 3)) { xyzArray A = new xyzArray(); for (int j = 0; j < Curvextruders[0].Count; j++) { A.Add(Curvextruders[0][j].Value(0, UpDown)); } xyz N = A.normal(); Base = Base.DoComplete(Curvextruders[0][0].Value(0, UpDown), N); for (int i = 0; i < Curvextruders.Count; i++) { xyArray _A = new xyArray(); Result.Add(_A); for (int j = 0; j < Curvextruders[i].Count; j++) { xy P = Base.Relativ(Curvextruders[i][j].Value(0, UpDown)).toXY(); _A.Add(P); } if (_A.Count > 0) { _A.Add(_A[0]); } } } return(Result); }
/// <summary> /// draws a 2d-polygon, which is stored in Array. See also <see cref="xyArray"/>. /// </summary> /// <param name="Array"><see cref="xyArray"/>.</param> public void drawPolyLine(xyArray Array) { Object Handle = null; if ((RenderKind == RenderKind.SnapBuffer)) { Handle = Selector.RegisterSnapItem(new PolyLineSnappItem(Array)); } if (PolygonMode == PolygonMode.Fill) { Loxy L = new Loxy(); L.Add(Array); drawFilledArray2d(this, L); if ((RenderKind == RenderKind.SnapBuffer)) { Selector.UnRegisterSnapItem(Handle); } if (PolygonMode == PolygonMode.Fill) { return; } } Primitives2d.drawArrayLined(this, Array); if ((RenderKind == RenderKind.SnapBuffer)) { Selector.UnRegisterSnapItem(Handle); } }
private Loxy FromClipperLoxy(List <List <IntPoint> > Src) { Loxy Result = new Loxy(); for (int i = 0; i < Src.Count; i++) { Result.Add(FromClipperPoly(Src[i])); } return(Result); }
/// <summary> /// draws a list of 2d-curve lists. See also <see cref="Loca"/>. /// </summary> /// <param name="Loca">list of curve lists.</param> public void drawPolyPolyCurve(Loca Loca) { Loxy L = new Loxy(); for (int i = 0; i < Loca.Count; i++) { L.Add(Loca[i].getxyArray()); } _drawPolyPolyCurve(L, Loca, 1); }
/// <summary> /// converts the loca to a <see cref="Loxy"/> /// </summary> /// <returns></returns> public Loxy ToLoxy() { Loxy Result = new Loxy(); for (int i = 0; i < Count; i++) { CurveArray CA = this[i]; Result.Add(CA.getxyArray()); } return(Result); }
/// <summary> /// restricted the <see cref="Loxyz"/> to a <see cref="Loxy"/> by omitting the z-value. /// </summary> /// <returns>a <see cref="Loxy"/></returns> public Loxy ToLoxy() { Loxy result = new Loxy(); for (int i = 0; i < Count; i++) { xyArray A = new xyArray(this[i].Count); for (int j = 0; j < A.Count; j++) { A[j] = Base.Relativ(this[i][j]).toXY(); } result.Add(A); } return(result); }