public DxfMeshFace(EntityColor color, DxfVertex3D v1, DxfVertex3D v2, DxfVertex3D v3) { this.Color = color; this.list_0.Add(new DxfMeshFace.Corner(v1)); this.list_0.Add(new DxfMeshFace.Corner(v2)); this.list_0.Add(new DxfMeshFace.Corner(v3)); }
public DxfMeshFace(DxfVertex3D v1, DxfVertex3D v2, DxfVertex3D v3, DxfVertex3D v4) { this.list_0.Add(new DxfMeshFace.Corner(v1)); this.list_0.Add(new DxfMeshFace.Corner(v2)); this.list_0.Add(new DxfMeshFace.Corner(v3)); this.list_0.Add(new DxfMeshFace.Corner(v4)); }
private WW.Math.Geometry.Polyline3D method_18(int power, int noOfSplineLineParts) { WW.Math.Geometry.Polyline3D polyline3D = new WW.Math.Geometry.Polyline3D(this.Closed); int count = this.dxfVertex3DCollection_0.Count; if (count < power + 1) { return(this.method_17()); } BSplineD bsplineD = new BSplineD(power, count, this.Closed); double[] result = new double[power + 1]; double maxU = bsplineD.MaxU; int num1 = noOfSplineLineParts + 1; double num2 = maxU / (double)(num1 - 1); int num3 = 0; double u = 0.0; while (num3 < num1) { int knotSpanIndex = bsplineD.GetKnotSpanIndex(u); bsplineD.EvaluateBasisFunctions(knotSpanIndex, u, result); WW.Math.Point3D zero = WW.Math.Point3D.Zero; for (int index = 0; index < power + 1; ++index) { DxfVertex3D dxfVertex3D = this.dxfVertex3DCollection_0[(knotSpanIndex - power + index) % count]; zero += result[index] * (Vector3D)dxfVertex3D.Position; } polyline3D.Add(zero); ++num3; u += num2; } return(polyline3D); }
private WW.Math.Point3D[,] method_21( int power, int mNoOfSplineLineParts, int nNoOfSplineLineParts) { int mcontrolPointCount = (int)this.MControlPointCount; int ncontrolPointCount = (int)this.NControlPointCount; bool closedInMdirection = this.ClosedInMDirection; BSplineD bsplineD1 = new BSplineD(power, mcontrolPointCount, closedInMdirection); double maxU1 = bsplineD1.MaxU; int length1 = mNoOfSplineLineParts + 1; double num1 = maxU1 / (double)(length1 - 1); BSplineD bsplineD2 = new BSplineD(power, ncontrolPointCount, this.ClosedInNDirection); double maxU2 = bsplineD2.MaxU; int length2 = nNoOfSplineLineParts + 1; double num2 = maxU2 / (double)(length2 - 1); double[] result1 = new double[power + 1]; double[] result2 = new double[power + 1]; WW.Math.Point3D[,] point3DArray = new WW.Math.Point3D[length1, length2]; int index1 = 0; double u1 = 0.0; while (index1 < length1) { int knotSpanIndex1 = bsplineD1.GetKnotSpanIndex(u1); bsplineD1.EvaluateBasisFunctions(knotSpanIndex1, u1, result1); int index2 = 0; double u2 = 0.0; while (index2 < length2) { int knotSpanIndex2 = bsplineD2.GetKnotSpanIndex(u2); bsplineD2.EvaluateBasisFunctions(knotSpanIndex2, u2, result2); WW.Math.Point3D zero1 = WW.Math.Point3D.Zero; for (int index3 = 0; index3 < power + 1; ++index3) { int num3 = (knotSpanIndex1 - power + index3) % mcontrolPointCount * ncontrolPointCount; Vector3D zero2 = Vector3D.Zero; for (int index4 = 0; index4 < power + 1; ++index4) { int num4 = (knotSpanIndex2 - power + index4) % ncontrolPointCount; DxfVertex3D dxfVertex3D = this.dxfHandledObjectCollection_1[num3 + num4]; zero2 += result2[index4] * (Vector3D)dxfVertex3D.Position; } zero1 += result1[index3] * zero2; } point3DArray[index1, index2] = zero1; ++index2; u2 += num2; } ++index1; u1 += num1; } return(point3DArray); }
public override IGraphCloneable Clone(CloneContext cloneContext) { DxfVertex3D dxfVertex3D = (DxfVertex3D)cloneContext.GetExistingClone((IGraphCloneable)this); if (dxfVertex3D == null) { dxfVertex3D = new DxfVertex3D(); cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfVertex3D); dxfVertex3D.CopyFrom((DxfHandledObject)this, cloneContext); } return((IGraphCloneable)dxfVertex3D); }
private static void Clone( IList <DxfVertex3D> from, IList <DxfVertex3D> to, CloneContext cloneContext) { to.Clear(); foreach (DxfVertex3D dxfVertex3D1 in (IEnumerable <DxfVertex3D>)from) { if (dxfVertex3D1 == null) { to.Add((DxfVertex3D)null); } else { DxfVertex3D dxfVertex3D2 = (DxfVertex3D)dxfVertex3D1.Clone(cloneContext); to.Add(dxfVertex3D2); } } }
public virtual void Visit(DxfVertex3D vertex) { }
public DxfMeshFace(DxfVertex3D v) { this.list_0.Add(new DxfMeshFace.Corner(v)); }
public Corner(DxfVertex3D vertex, bool edgeVisible) { this.dxfObjectReference_0 = DxfObjectReference.GetReference((IDxfHandledObject)vertex); this.bool_0 = edgeVisible; }
public Corner(DxfVertex3D vertex) { this.dxfObjectReference_0 = DxfObjectReference.GetReference((IDxfHandledObject)vertex); this.bool_0 = true; }
public DxfMeshFace(EntityColor color, DxfVertex3D v) { this.Color = color; this.list_0.Add(new DxfMeshFace.Corner(v)); }
public virtual void Visit(DxfVertex3D vertex) { this.VisitVertex((DxfVertex)vertex); }