Exemplo n.º 1
0
 public DxfUcs(string name, WW.Math.Point3D origin, Vector3D xAxis, Vector3D yAxis)
 {
     this.string_0   = name;
     this.point3D_0  = origin;
     this.vector3D_0 = xAxis;
     this.vector3D_1 = yAxis;
 }
Exemplo n.º 2
0
        private WW.Math.Geometry.Polyline3D method_14(GraphicsConfig graphicsConfig)
        {
            double num1    = 2.0 * System.Math.PI / (double)graphicsConfig.NoOfArcLineSegments;
            double double2 = this.double_2;
            double double3 = this.double_3;

            if (double3 <= double2)
            {
                double3 += 2.0 * System.Math.PI;
            }
            Matrix4D transform = this.Transform;
            Vector3D vector3D0 = this.vector3D_0;

            vector3D0.Normalize();
            Vector3D vector3D = Vector3D.CrossProduct(this.vector3D_1, vector3D0);

            vector3D.Normalize();
            double length = this.vector3D_0.GetLength();
            double num2   = this.double_1 * length;

            WW.Math.Geometry.Polyline3D polyline3D = new WW.Math.Geometry.Polyline3D();
            for (; double2 < double3; double2 += num1)
            {
                WW.Math.Point3D point = (WW.Math.Point3D)(length * System.Math.Cos(double2) * vector3D0 + num2 * System.Math.Sin(double2) * vector3D);
                polyline3D.Add(transform.Transform(point));
            }
            polyline3D.Add(transform.Transform((WW.Math.Point3D)(length * System.Math.Cos(double3) * vector3D0 + num2 * System.Math.Sin(double3) * vector3D)));
            return(polyline3D);
        }
Exemplo n.º 3
0
 public override void TransformMe(
     TransformConfig config,
     Matrix4D matrix,
     CommandGroup undoGroup)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     DxfVertex3D.Class642 class642 = new DxfVertex3D.Class642();
     // ISSUE: reference to a compiler-generated field
     class642.dxfVertex3D_0 = this;
     // ISSUE: reference to a compiler-generated field
     class642.point3D_0 = this.point3D_0;
     this.point3D_0     = matrix.Transform(this.point3D_0);
     if (undoGroup == null)
     {
         return;
     }
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     undoGroup.UndoStack.Push((ICommand) new Command((object)this, new System.Action(new DxfVertex3D.Class643()
     {
         class642_0 = class642,
         point3D_0  = this.point3D_0
     }.method_0), new System.Action(class642.method_0)));
 }
Exemplo n.º 4
0
 private void method_0(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != '\r' && e.KeyChar != '\t')
     {
         if (e.KeyChar != '\x001B')
         {
             return;
         }
         this.class13_0.Transaction.Rollback();
         e.Handled = true;
     }
     else
     {
         DxfCircle.Class13.Class537 controlPoints = (DxfCircle.Class13.Class537) this.class13_0.ControlPoints;
         WW.Math.Point3D            point3D1      = (WW.Math.Point3D)(WW.Math.Point2D) controlPoints.Get(0);
         WW.Math.Point3D            point3D2      = (WW.Math.Point3D)(WW.Math.Point2D) controlPoints.Get(1);
         if (((DxfEntity.DefaultCreateInteractor) this.Interactor).ControlPointIndex < 1)
         {
             int num1 = (int)MessageBox.Show(Class881.DxfCircle_CreateInteractor_WinFormsDrawable_NoCenterPointMessage);
         }
         else if (!controlPoints.EnteredRadius.HasValue && (((DxfEntity.DefaultCreateInteractor) this.Interactor).ControlPointIndex < 2 || point3D1 == point3D2))
         {
             int num2 = (int)MessageBox.Show(Class881.DxfCircle_CreateInteractor_WinFormsDrawable_NoControlPoint1OrRadiusMessage);
         }
         else if (controlPoints.method_0())
         {
             this.class13_0.Transaction.Commit();
         }
         e.Handled = true;
     }
 }
Exemplo n.º 5
0
 public override void TransformMe(
     TransformConfig config,
     Matrix4D matrix,
     CommandGroup undoGroup)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     DxfRay.Class1056 class1056 = new DxfRay.Class1056();
     // ISSUE: reference to a compiler-generated field
     class1056.dxfRay_0 = this;
     // ISSUE: reference to a compiler-generated field
     class1056.point3D_0 = this.point3D_0;
     // ISSUE: reference to a compiler-generated field
     class1056.vector3D_0 = this.vector3D_0;
     this.point3D_0       = matrix.Transform(this.point3D_0);
     this.vector3D_0      = matrix.Transform(this.vector3D_0).GetUnit();
     if (undoGroup == null)
     {
         return;
     }
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     undoGroup.UndoStack.Push((ICommand) new Command((object)this, new System.Action(new DxfRay.Class1057()
     {
         class1056_0 = class1056,
         point3D_0   = this.point3D_0,
         vector3D_0  = this.vector3D_0
     }.method_0), new System.Action(class1056.method_0)));
 }
Exemplo n.º 6
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfVPort dxfVport = (DxfVPort)from;

            this.string_0           = dxfVport.string_0;
            this.point2D_0          = dxfVport.point2D_0;
            this.point2D_1          = dxfVport.point2D_1;
            this.point2D_2          = dxfVport.point2D_2;
            this.point2D_3          = dxfVport.point2D_3;
            this.vector2D_0         = dxfVport.vector2D_0;
            this.vector2D_1         = dxfVport.vector2D_1;
            this.vector3D_0         = dxfVport.vector3D_0;
            this.point3D_0          = dxfVport.point3D_0;
            this.double_0           = dxfVport.double_0;
            this.double_1           = dxfVport.double_1;
            this.double_2           = dxfVport.double_2;
            this.double_3           = dxfVport.double_3;
            this.double_4           = dxfVport.double_4;
            this.double_5           = dxfVport.double_5;
            this.double_6           = dxfVport.double_6;
            this.standardFlags_0    = dxfVport.standardFlags_0;
            this.ViewMode           = dxfVport.viewMode_0;
            this.short_0            = dxfVport.short_0;
            this.short_1            = dxfVport.short_1;
            this.bool_0             = dxfVport.bool_0;
            this.bool_1             = dxfVport.bool_1;
            this.snapStyle_0        = dxfVport.snapStyle_0;
            this.short_2            = dxfVport.short_2;
            this.renderMode_0       = dxfVport.renderMode_0;
            this.bool_2             = dxfVport.bool_2;
            this.bool_3             = dxfVport.bool_3;
            this.Ucs                = Class906.smethod_2(cloneContext, dxfVport.Ucs);
            this.orthographicType_0 = dxfVport.orthographicType_0;
        }
Exemplo n.º 7
0
        private void method_15(
            DrawContext.Wireframe context,
            Bitmap bitmap,
            out DxfRasterImage rasterImage,
            out Vector4D transformedOrigin,
            out Vector4D transformedXAxis,
            out Vector4D transformedYAxis)
        {
            GdiBitmap gdiBitmap = new GdiBitmap(bitmap);

            rasterImage = (DxfRasterImage) new DxfImage();
            DxfImageDef imageDef = new DxfImageDef(context.Model);

            imageDef.SetBitmap((IBitmap)gdiBitmap);
            rasterImage.SetImageDef(imageDef, true);
            IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone();
            Matrix4D             preTransform1       = Transformation4D.Translation((WW.Math.Vector3D) this.point3D_3);

            clippingTransformer.SetPreTransform(preTransform1);
            Matrix4D preTransform2 = Transformation4D.Scaling((this.point3D_2 - this.point3D_3).GetLength() / (double)bitmap.Width, (this.point3D_0 - this.point3D_3).GetLength() / (double)bitmap.Height, 1.0);

            clippingTransformer.SetPreTransform(preTransform2);
            Matrix4D matrix = clippingTransformer.Matrix;

            WW.Math.Point3D zero = WW.Math.Point3D.Zero;
            transformedOrigin = matrix.TransformTo4D(zero);
            transformedXAxis  = matrix.TransformTo4D(zero + WW.Math.Vector3D.XAxis);
            transformedYAxis  = matrix.TransformTo4D(zero + WW.Math.Vector3D.YAxis);
        }
Exemplo n.º 8
0
 public override void TransformMe(
     TransformConfig config,
     Matrix4D matrix,
     CommandGroup undoGroup)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     DxfRasterImage.Class738 class738 = new DxfRasterImage.Class738();
     // ISSUE: reference to a compiler-generated field
     class738.dxfRasterImage_0 = this;
     // ISSUE: reference to a compiler-generated field
     class738.point3D_0 = this.point3D_0;
     // ISSUE: reference to a compiler-generated field
     class738.vector3D_0 = this.vector3D_0;
     // ISSUE: reference to a compiler-generated field
     class738.vector3D_1 = this.vector3D_1;
     // ISSUE: reference to a compiler-generated field
     class738.point3D_1 = matrix.Transform(this.point3D_0);
     // ISSUE: reference to a compiler-generated field
     class738.vector3D_2 = matrix.Transform(this.vector3D_0);
     // ISSUE: reference to a compiler-generated field
     class738.vector3D_3 = matrix.Transform(this.vector3D_1);
     // ISSUE: reference to a compiler-generated field
     this.point3D_0 = class738.point3D_1;
     // ISSUE: reference to a compiler-generated field
     this.vector3D_0 = class738.vector3D_2;
     // ISSUE: reference to a compiler-generated field
     this.vector3D_1 = class738.vector3D_3;
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     undoGroup?.UndoStack.Push((ICommand) new Command((object)this, new System.Action(class738.method_0), new System.Action(class738.method_1)));
 }
Exemplo n.º 9
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfLayout dxfLayout = (DxfLayout)from;

            this.bool_0             = dxfLayout.bool_0;
            this.string_8           = dxfLayout.string_8;
            this.layoutOptions_0    = dxfLayout.layoutOptions_0;
            this.int_0              = dxfLayout.int_0;
            this.rectangle2D_1      = dxfLayout.rectangle2D_1;
            this.point3D_0          = dxfLayout.point3D_0;
            this.point3D_1          = dxfLayout.point3D_1;
            this.point3D_2          = dxfLayout.point3D_2;
            this.double_7           = dxfLayout.double_7;
            this.Ucs                = Class906.smethod_2(cloneContext, dxfLayout.Ucs);
            this.orthographicType_0 = dxfLayout.orthographicType_0;
            DxfBlock ownerBlock = dxfLayout.OwnerBlock;

            if (ownerBlock != null && ownerBlock.BlockBegin != null)
            {
                this.OwnerBlock = Class906.smethod_0(cloneContext, ownerBlock, true);
            }
            foreach (DxfHandledObject dxfHandledObject in (DxfHandledObjectCollection <DxfViewport>)dxfLayout.dxfViewportCollection_0)
            {
                this.dxfViewportCollection_0.Add((DxfViewport)dxfHandledObject.Clone(cloneContext));
            }
            this.LastActiveViewport = (DxfHandledObject)cloneContext.GetExistingClone((IGraphCloneable)dxfLayout.LastActiveViewport);
            switch (dxfLayout.Handle)
            {
            case 30:
            case 34:
                this.SetHandle(dxfLayout.Handle);
                break;
            }
        }
Exemplo n.º 10
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfOle dxfOle = (DxfOle)from;

            this.qualityType_0 = dxfOle.Quality;
            this.int_0         = dxfOle.OleDataVersion;
            this.int_1         = dxfOle.UnknownLong;
            this.byte_0        = dxfOle.UnknownByte1;
            this.byte_1        = dxfOle.UnknownByte2;
            this.point3D_0     = dxfOle.UpperLeft;
            this.point3D_1     = dxfOle.UpperRight;
            this.point3D_2     = dxfOle.LowerRight;
            this.point3D_3     = dxfOle.LowerLeft;
            this.short_1       = dxfOle.HimetricWidth;
            this.short_2       = dxfOle.HimetricHeight;
            this.int_2         = dxfOle.OleItemVersion;
            this.int_3         = (int)dxfOle.Model.UniqueOleItemCounter();
            this.aspect_0      = dxfOle.AdviseType;
            this.bool_2        = dxfOle.Moniker;
            this.aspect_1      = dxfOle.DrawAspect;
            this.string_0      = dxfOle.UserType;
            this.type_0        = dxfOle.OleObjectType;
            this.dxfOleXData_0 = dxfOle.dxfOleXData_0;
            this.byte_2        = dxfOle.OleData;
        }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
 public override void TransformMe(
     TransformConfig config,
     Matrix4D matrix,
     CommandGroup undoGroup)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     DxfPoint.Class420 class420 = new DxfPoint.Class420();
     // ISSUE: reference to a compiler-generated field
     class420.dxfPoint_0 = this;
     // ISSUE: reference to a compiler-generated field
     class420.point3D_0 = this.point3D_0;
     // ISSUE: reference to a compiler-generated field
     class420.vector3D_0 = this.vector3D_0;
     // ISSUE: reference to a compiler-generated field
     class420.double_0 = this.double_1;
     this.point3D_0    = matrix.Transform(this.point3D_0);
     this.vector3D_0   = matrix.Transform(this.vector3D_0);
     this.double_1    *= this.vector3D_0.GetLength();
     this.vector3D_0.Normalize();
     if (undoGroup == null)
     {
         return;
     }
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     undoGroup.UndoStack.Push((ICommand) new Command((object)this, new System.Action(new DxfPoint.Class421()
     {
         class420_0 = class420,
         point3D_0  = this.point3D_0,
         vector3D_0 = this.vector3D_0,
         double_0   = this.double_1
     }.method_0), new System.Action(class420.method_0)));
 }
Exemplo n.º 13
0
 public Dxf3DFace(EntityColor color, WW.Math.Point3D p1, WW.Math.Point3D p2, WW.Math.Point3D p3)
 {
     this.Color = color;
     this.list_0.Add(p1);
     this.list_0.Add(p2);
     this.list_0.Add(p3);
 }
Exemplo n.º 14
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfMText dxfMtext = (DxfMText)from;

            this.string_1              = dxfMtext.string_1;
            this.Style                 = Class906.GetTextStyle(cloneContext, dxfMtext.Style);
            this.point3D_0             = dxfMtext.point3D_0;
            this.double_1              = dxfMtext.double_1;
            this.double_2              = dxfMtext.double_2;
            this.double_3              = dxfMtext.double_3;
            this.attachmentPoint_0     = dxfMtext.attachmentPoint_0;
            this.drawingDirection_0    = dxfMtext.drawingDirection_0;
            this.vector3D_0            = dxfMtext.vector3D_0;
            this.vector3D_1            = dxfMtext.vector3D_1;
            this.lineSpacingStyle_0    = dxfMtext.lineSpacingStyle_0;
            this.double_4              = dxfMtext.double_4;
            this.backgroundFillFlags_0 = dxfMtext.backgroundFillFlags_0;
            if (dxfMtext.backgroundFillInfo_0 == null)
            {
                this.backgroundFillInfo_0 = (BackgroundFillInfo)null;
            }
            else
            {
                this.backgroundFillInfo_0 = dxfMtext.backgroundFillInfo_0.Clone(cloneContext);
            }
        }
Exemplo n.º 15
0
 public Dxf3DFace(WW.Math.Point3D p1, WW.Math.Point3D p2, WW.Math.Point3D p3, WW.Math.Point3D p4)
 {
     this.list_0.Add(p1);
     this.list_0.Add(p2);
     this.list_0.Add(p3);
     this.list_0.Add(p4);
 }
Exemplo n.º 16
0
            public override bool ProcessMouseButtonUp(
                CanonicalMouseEventArgs e,
                InteractionContext context)
            {
                this.int_2 = this.method_1(context, e.Position);
                bool isActive = this.IsActive;

                if (this.IsActive)
                {
                    if (this.int_0 > 0)
                    {
                        // ISSUE: object of a compiler-generated type is created
                        // ISSUE: variable of a compiler-generated type
                        DxfEntity.EditInteractor.Class16 class16 = new DxfEntity.EditInteractor.Class16();
                        // ISSUE: reference to a compiler-generated field
                        class16.editInteractor_0 = this;
                        int             int1        = this.int_1;
                        WW.Math.Point3D point3D0    = this.point3D_0;
                        WW.Math.Point3D newOcsPoint = this.Entity.Transform.GetInverse().Transform(this.GetWcsPosition(e, context));
                        // ISSUE: reference to a compiler-generated field
                        class16.action_0 = this.CreateDoAction(int1, newOcsPoint);
                        // ISSUE: reference to a compiler-generated field
                        class16.action_1 = this.CreateUndoAction(int1, point3D0);
                        // ISSUE: reference to a compiler-generated method
                        // ISSUE: reference to a compiler-generated method
                        this.OnCommandCreated(new CommandEventArgs((ICommand) new WW.Actions.Command((object)this.Entity, new System.Action(class16.method_0), new System.Action(class16.method_1))));
                        this.Deactivate();
                    }
                    else
                    {
                        ++this.int_0;
                    }
                }
                return(isActive);
            }
Exemplo n.º 17
0
 protected override WW.Math.Point3D ProcessWcsPosition(
     InteractionContext context,
     WW.Math.Point3D p)
 {
     p = base.ProcessWcsPosition(context, p);
     p = DxfLine.CreateInteractor.SnapHorizontalOrVertical((DxfEntity.Interactor) this, p, context, this.ControlPointIndex);
     return(p);
 }
Exemplo n.º 18
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfRay dxfRay = (DxfRay)from;

            this.point3D_0  = dxfRay.point3D_0;
            this.vector3D_0 = dxfRay.vector3D_0;
        }
Exemplo n.º 19
0
            public void SetValue(object owner, WW.Math.Point3D value)
            {
                DxfCircle dxfCircle = (DxfCircle)owner;
                Vector3D  vector3D  = value - dxfCircle.point3D_0;

                vector3D.Z         = 0.0;
                dxfCircle.double_1 = vector3D.GetLength();
            }
Exemplo n.º 20
0
 public bool method_0()
 {
     WW.Math.Point3D point3D1 = (WW.Math.Point3D)(WW.Math.Point2D) this.point3D_0[0];
     WW.Math.Point3D point3D2 = (WW.Math.Point3D)(WW.Math.Point2D) this.point3D_0[1];
     this.dxfCircle_0.point3D_0 = point3D1;
     this.dxfCircle_0.double_1  = !this.nullable_0.HasValue ? (point3D2 - point3D1).GetLength() : this.nullable_0.Value;
     return(true);
 }
Exemplo n.º 21
0
 public DxfVertex3D(WW.Math.Point3D position)
 {
     if (double.IsNaN(position.X) || double.IsNaN(position.Y) || double.IsNaN(position.Z))
     {
         throw new DxfException("One of the vertex components is not a number (nan).");
     }
     this.point3D_0 = position;
 }
Exemplo n.º 22
0
 public DxfVertex3D(double x, double y, double z)
 {
     if (double.IsNaN(x) || double.IsNaN(y) || double.IsNaN(z))
     {
         throw new DxfException("One of the vertex components is not a number (nan).");
     }
     this.point3D_0 = new WW.Math.Point3D(x, y, z);
 }
Exemplo n.º 23
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfXLine dxfXline = (DxfXLine)from;

            this.point3D_0  = dxfXline.point3D_0;
            this.vector3D_0 = dxfXline.vector3D_0;
        }
Exemplo n.º 24
0
 public DxfInsertBase(DxfBlock block, WW.Math.Point3D insertionPoint)
 {
     this.Block          = block;
     this.insertionPoint = insertionPoint;
     this.activeDxfHandledObjectCollection_0.Added   += new ItemEventHandler <DxfAttribute>(this.method_15);
     this.activeDxfHandledObjectCollection_0.Set     += new ItemSetEventHandler <DxfAttribute>(this.method_14);
     this.activeDxfHandledObjectCollection_0.Removed += new ItemEventHandler <DxfAttribute>(this.method_13);
     this.AttributesSeqEnd.vmethod_2((IDxfHandledObject)this);
 }
Exemplo n.º 25
0
 public void Set(int index, WW.Math.Point3D value)
 {
     this.point3D_0[index] = value;
     if (index < 0)
     {
         return;
     }
     this.method_0();
 }
Exemplo n.º 26
0
 public void CopyFrom(DxfMLine.Segment from, CloneContext cloneContext)
 {
     this.point3D_0  = from.point3D_0;
     this.vector3D_0 = from.vector3D_0;
     this.vector3D_1 = from.vector3D_1;
     foreach (DxfMLine.Segment.Element element in from.list_0)
     {
         this.list_0.Add(element.Clone(cloneContext));
     }
 }
Exemplo n.º 27
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfCircle dxfCircle = (DxfCircle)from;

            this.point3D_0  = dxfCircle.point3D_0;
            this.double_1   = dxfCircle.double_1;
            this.vector3D_0 = dxfCircle.vector3D_0;
            this.double_2   = dxfCircle.double_2;
        }
Exemplo n.º 28
0
        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);
        }
Exemplo n.º 29
0
 public Segment(
     WW.Math.Point3D position,
     WW.Math.Vector3D direction,
     WW.Math.Vector3D miterDirection,
     DxfMLine.Segment.Element[] elements)
 {
     this.point3D_0  = position;
     this.vector3D_0 = direction;
     this.vector3D_1 = miterDirection;
     this.list_0.AddRange((IEnumerable <DxfMLine.Segment.Element>)elements);
 }
Exemplo n.º 30
0
 protected virtual System.Action CreateUndoAction(
     int controlPointIndex,
     WW.Math.Point3D originalOcsPoint)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     return(new System.Action(new DxfEntity.EditInteractor.Class18()
     {
         int_0 = controlPointIndex, point3D_0 = originalOcsPoint, editInteractor_0 = this
     }.method_0));
 }