Ejemplo n.º 1
0
        public static Bitmap CreateAutoSizedBitmap(
            DxfModel model,
            GDIGraphics3D cadGraphics,
            SmoothingMode smoothingMode,
            Matrix4D transform,
            System.Drawing.Color backColor,
            Size maxSize)
        {
            cadGraphics.CreateDrawables(model);
            Bounds3D bounds = new Bounds3D();

            cadGraphics.BoundingBox(bounds, transform);
            int      num1       = maxSize.Width - 4;
            int      num2       = maxSize.Height - 4;
            Matrix4D transform1 = DxfUtil.GetScaleTransform(bounds.Corner1, bounds.Corner2, new WW.Math.Point3D(bounds.Corner1.X, bounds.Corner2.Y, 0.0), new WW.Math.Point3D(0.0, (double)num2, 0.0), new WW.Math.Point3D((double)num1, 0.0, 0.0), new WW.Math.Point3D(2.0, 2.0, 0.0)) * transform;

            bounds.Reset();
            cadGraphics.BoundingBox(bounds, transform1);
            if (!bounds.Initialized)
            {
                return(ImageExporter.CreateEmptyBitmap(backColor, maxSize.Width, maxSize.Height));
            }
            WW.Math.Vector3D delta = bounds.Delta;
            int width  = System.Math.Min(maxSize.Width, (int)System.Math.Ceiling(delta.X) + 4);
            int height = System.Math.Min(maxSize.Height, (int)System.Math.Ceiling(delta.Y) + 4);

            return(ImageExporter.CreateBitmap(cadGraphics, smoothingMode, transform1, backColor, width, height));
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
0
        private void DrawInternal(DxfInsert.Interface46 drawHandler, bool drawBlock)
        {
            Matrix4D toWcsTransform = DxfUtil.GetToWCSTransform(this.ZAxis);
            Matrix4D matrix4D1      = Transformation4D.Translation((WW.Math.Vector3D) this.InsertionPoint);
            Matrix4D matrix4D2      = Transformation4D.RotateZ(this.Rotation);
            Matrix4D matrix4D3      = Transformation4D.Scaling(this.ScaleFactor);
            ushort   num1           = this.RowCount;

            if (num1 < (ushort)1)
            {
                num1 = (ushort)1;
            }
            ushort num2 = this.ColumnCount;

            if (num2 < (ushort)1)
            {
                num2 = (ushort)1;
            }
            for (int row = 0; row < (int)num1; ++row)
            {
                for (int column = 0; column < (int)num2; ++column)
                {
                    if (drawBlock)
                    {
                        Matrix4D matrix4D4 = toWcsTransform * matrix4D1 * matrix4D2 * Transformation4D.Translation((double)column * this.ColumnSpacing, (double)row * this.RowSpacing, 0.0) * matrix4D3;
                        drawHandler.imethod_0(row, column, matrix4D4);
                        if (this.Block != null)
                        {
                            switch (this.method_16(matrix4D4, drawHandler))
                            {
                            case DxfInsert.Enum44.const_1:
                            case DxfInsert.Enum44.const_2:
                                drawHandler.Draw(this.Block, true);
                                break;

                            case DxfInsert.Enum44.const_3:
                                drawHandler.Draw(this.Block, true);
                                drawHandler.InsertCellDrawContext.vmethod_1();
                                break;
                            }
                        }
                    }
                    if (this.Attributes.Count > 0)
                    {
                        WW.Math.Vector3D vector = new WW.Math.Vector3D((double)column * this.ColumnSpacing, (double)row * this.RowSpacing, 0.0);
                        vector = (toWcsTransform * matrix4D2).Transform(vector);
                        Matrix4D instanceTransform = Transformation4D.Translation(vector.X, vector.Y, vector.Z);
                        drawHandler.imethod_1(row, column, instanceTransform);
                        foreach (DxfAttribute attribute in (IEnumerable <DxfAttribute>) this.Attributes)
                        {
                            drawHandler.Draw(attribute);
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
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));
     }
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 7
0
 public void SetImageDef(DxfImageDef imageDef, bool updateAxes)
 {
     this.dxfObjectReference_6 = DxfObjectReference.GetReference((IDxfHandledObject)imageDef);
     if (!updateAxes || imageDef == null)
     {
         return;
     }
     this.vector3D_0 = new WW.Math.Vector3D(imageDef.DefaultPixelSize.X, 0.0, 0.0);
     this.vector3D_1 = new WW.Math.Vector3D(0.0, imageDef.DefaultPixelSize.Y, 0.0);
     this.size2D_0   = imageDef.Size;
 }
Ejemplo n.º 8
0
 public DxfMTextObjectContextData(DxfMText mtext, DxfScale scale)
     : base(scale)
 {
     this.size2D_0.X        = mtext.ReferenceRectangleWidth;
     this.size2D_0.Y        = mtext.ReferenceRectangleHeight;
     this.size2D_1.X        = mtext.BoxWidth;
     this.size2D_1.Y        = mtext.BoxHeight;
     this.vector3D_0        = mtext.XAxis;
     this.point3D_0         = mtext.InsertionPoint;
     this.attachmentPoint_0 = mtext.AttachmentPoint;
 }
Ejemplo n.º 9
0
        internal MLeader.TextAttachment method_9(DxfMLeader mleader)
        {
            bool flag;

            MLeader.TextAttachment textAttachment = (flag = mleader.TextAttachmentDirection == MLeader.TextAttachmentDirection.Horizontal) ? this.TextRightAttachment : this.TextTopAttachment;
            if (this.LeaderNodes.Count > 0)
            {
                WW.Math.Vector3D direction = this.LeaderNodes[0].Direction;
                textAttachment = !flag ? (direction.X >= 0.0 ? this.TextLeftAttachment : this.TextRightAttachment) : (direction.Y >= 0.0 ? this.TextBottomAttachment : this.TextTopAttachment);
            }
            return(textAttachment);
        }
Ejemplo n.º 10
0
        internal void method_10(Class434 or, Class259 ob)
        {
            Interface30 objectBitStream = or.ObjectBitStream;
            int         num             = objectBitStream.imethod_11();

            for (int index = 0; index < num; ++index)
            {
                MLeader.LeaderNode leaderNode = new MLeader.LeaderNode();
                leaderNode.Read(or);
                this.list_0.Add(leaderNode);
            }
            this.double_0          = objectBitStream.imethod_8();
            this.point3D_0         = objectBitStream.imethod_39();
            this.double_1          = objectBitStream.imethod_8();
            this.double_2          = objectBitStream.imethod_8();
            this.double_3          = objectBitStream.imethod_8();
            this.textAttachment_0  = (MLeader.TextAttachment)objectBitStream.imethod_14();
            this.textAttachment_1  = (MLeader.TextAttachment)objectBitStream.imethod_14();
            this.textAlignment_0   = (MLeader.TextAlignment)objectBitStream.imethod_14();
            this.blockAttachment_0 = (MLeader.BlockAttachment)objectBitStream.imethod_14();
            this.bool_1            = objectBitStream.imethod_6();
            if (this.bool_1)
            {
                MLeader.ContentText contentText = new MLeader.ContentText();
                contentText.Read(or);
                this.content_0 = (MLeader.Content)contentText;
            }
            else
            {
                this.bool_2 = objectBitStream.imethod_6();
                if (this.bool_2)
                {
                    MLeader.ContentBlock contentBlock = new MLeader.ContentBlock();
                    contentBlock.Read(or);
                    this.content_0 = (MLeader.Content)contentBlock;
                }
            }
            this.point3D_1  = objectBitStream.imethod_39();
            this.vector3D_0 = objectBitStream.imethod_51();
            this.vector3D_1 = objectBitStream.imethod_51();
            this.bool_3     = objectBitStream.imethod_6();
            if (or.Builder.Version <= DxfVersion.Dxf21)
            {
                return;
            }
            this.textAttachment_3 = (MLeader.TextAttachment)objectBitStream.imethod_14();
            this.textAttachment_2 = (MLeader.TextAttachment)objectBitStream.imethod_14();
        }
Ejemplo n.º 11
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfViewport dxfViewport = (DxfViewport)from;

            this.point3D_0  = dxfViewport.point3D_0;
            this.size2D_0   = dxfViewport.size2D_0;
            this.point2D_0  = dxfViewport.point2D_0;
            this.point2D_1  = dxfViewport.point2D_1;
            this.vector2D_0 = dxfViewport.vector2D_0;
            this.vector2D_1 = dxfViewport.vector2D_1;
            this.vector3D_0 = dxfViewport.vector3D_0;
            this.point3D_1  = dxfViewport.point3D_1;
            this.double_1   = dxfViewport.double_1;
            this.double_2   = dxfViewport.double_2;
            this.double_3   = dxfViewport.double_3;
            this.double_4   = dxfViewport.double_4;
            this.double_5   = dxfViewport.double_5;
            this.double_6   = dxfViewport.double_6;
            this.double_7   = dxfViewport.double_7;
            foreach (DxfLayer from1 in dxfViewport.dxfHandledObjectCollection_1)
            {
                DxfLayer layer = Class906.GetLayer(cloneContext, from1);
                if (!this.dxfHandledObjectCollection_1.Contains(layer))
                {
                    this.dxfHandledObjectCollection_1.Add(layer);
                }
            }
            this.StatusFlags          = dxfViewport.viewportStatusFlags_0;
            this.dxfObjectReference_6 = DxfObjectReference.Null;
            this.string_1             = dxfViewport.string_1;
            this.renderMode_0         = dxfViewport.renderMode_0;
            this.bool_2               = dxfViewport.bool_2;
            this.bool_3               = dxfViewport.bool_3;
            this.dxfUcs_0             = Class906.smethod_2(cloneContext, dxfViewport.dxfUcs_0);
            this.orthographicType_0   = dxfViewport.orthographicType_0;
            this.shadePlotMode_0      = dxfViewport.shadePlotMode_0;
            this.short_1              = dxfViewport.short_1;
            this.bool_4               = dxfViewport.bool_4;
            this.lightingType_0       = dxfViewport.lightingType_0;
            this.double_8             = dxfViewport.double_8;
            this.double_9             = dxfViewport.double_9;
            this.color_0              = dxfViewport.color_0;
            this.ViewportEntityHeader = dxfViewport.dxfViewportEntityHeader_0 != null ? (DxfViewportEntityHeader)dxfViewport.dxfViewportEntityHeader_0.Clone(cloneContext) : (DxfViewportEntityHeader)null;
            this.method_23();
        }
Ejemplo n.º 12
0
        public void TransformMe(TransformConfig config, Matrix4D matrix, CommandGroup undoGroup)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            DxfMLeaderAnnotationContext.Class358 class358 = new DxfMLeaderAnnotationContext.Class358();
            // ISSUE: reference to a compiler-generated field
            class358.dxfMLeaderAnnotationContext_0 = this;
            // ISSUE: reference to a compiler-generated field
            class358.point3D_0 = this.point3D_1;
            // ISSUE: reference to a compiler-generated field
            class358.vector3D_0 = this.vector3D_0;
            // ISSUE: reference to a compiler-generated field
            class358.vector3D_1 = this.vector3D_1;
            this.point3D_1      = matrix.Transform(this.point3D_1);
            this.vector3D_0     = matrix.Transform(this.vector3D_0);
            this.vector3D_1     = matrix.Transform(this.vector3D_1);
            CommandGroup undoGroup1 = (CommandGroup)null;

            if (undoGroup != null)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: reference to a compiler-generated method
                // ISSUE: reference to a compiler-generated method
                undoGroup1 = new CommandGroup((object)this, new ICommand[1]
                {
                    (ICommand) new Command((object)this, new System.Action(new DxfMLeaderAnnotationContext.Class359()
                    {
                        class358_0 = class358,
                        point3D_0  = this.point3D_1,
                        vector3D_0 = this.vector3D_0,
                        vector3D_1 = this.vector3D_1
                    }.method_0), new System.Action(class358.method_0))
                });
                undoGroup.UndoStack.Push((ICommand)undoGroup1);
            }
            foreach (MLeader.LeaderNode leaderNode in this.list_0)
            {
                leaderNode.TransformMe(config, matrix, undoGroup1);
            }
            if (this.content_0 == null)
            {
                return;
            }
            this.content_0.TransformMe(config, matrix, undoGroup1);
        }
Ejemplo n.º 13
0
        internal void method_0(
            DxfTableContent tableContent,
            double width,
            double height,
            double rotation,
            double horizontalMargin,
            double verticalMargin)
        {
            DxfBlock valueObject = this.ValueObject as DxfBlock;

            if (valueObject == null)
            {
                this.dxfContentFormat_0.method_6(1.0);
            }
            else
            {
                DxfInsert dxfInsert = new DxfInsert(valueObject);
                foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0)
                {
                    if (dxfTableAttribute.AttributeDefinition != null)
                    {
                        DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition);
                        dxfAttribute1.Text = dxfTableAttribute.Value;
                        DxfAttribute dxfAttribute2 = dxfAttribute1;
                        dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint;
                        if (dxfAttribute1.AlignmentPoint2.HasValue)
                        {
                            DxfAttribute     dxfAttribute3   = dxfAttribute1;
                            WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2;
                            WW.Math.Vector3D basePoint       = valueObject.BasePoint;
                            dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?();
                        }
                    }
                }
                BoundsCalculator boundsCalculator = new BoundsCalculator();
                boundsCalculator.GetBounds(tableContent.Model, (DxfEntity)dxfInsert);
                Bounds3D bounds    = boundsCalculator.Bounds;
                Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(rotation) * Transformation4D.Translation(-valueObject.BasePoint);
                bounds.Transform(transform);
                Vector2D vector2D = new Vector2D((width - 2.0 * horizontalMargin) / bounds.Delta.X, (height - 2.0 * verticalMargin) / bounds.Delta.Y);
                this.dxfContentFormat_0.BlockScale = System.Math.Min(vector2D.X, vector2D.Y);
            }
        }
Ejemplo n.º 14
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfMLine dxfMline = (DxfMLine)from;

            if (dxfMline.Style != null)
            {
                if (cloneContext.SourceModel == cloneContext.TargetModel)
                {
                    this.Style = dxfMline.Style;
                }
                else if ((this.Style = cloneContext.TargetModel.MLineStyles.Find(dxfMline.Style.Name)) == null)
                {
                    switch (cloneContext.ReferenceResolutionType)
                    {
                    case ReferenceResolutionType.IgnoreMissing:
                        this.Style = cloneContext.TargetModel.DefaultMLineStyle;
                        break;

                    case ReferenceResolutionType.CloneMissing:
                        DxfMLineStyle dxfMlineStyle = (DxfMLineStyle)dxfMline.Style.Clone(cloneContext);
                        if (!cloneContext.CloneExact)
                        {
                            cloneContext.TargetModel.MLineStyles.Add(dxfMlineStyle);
                        }
                        this.Style = dxfMlineStyle;
                        break;

                    case ReferenceResolutionType.FailOnMissing:
                        throw new DxfException(string.Format("Could not resolve reference to mline style with name {0}.", (object)dxfMline.Style.Name));
                    }
                }
            }
            this.double_1         = dxfMline.double_1;
            this.mlineAlignment_0 = dxfMline.mlineAlignment_0;
            this.mlineFlags_0     = dxfMline.mlineFlags_0;
            this.point3D_0        = dxfMline.point3D_0;
            this.vector3D_0       = dxfMline.vector3D_0;
            foreach (DxfMLine.Segment segment in dxfMline.list_0)
            {
                this.list_0.Add(segment.Clone(cloneContext));
            }
        }
Ejemplo n.º 15
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
            DxfMLine.Class1015 class1015 = new DxfMLine.Class1015();
            // ISSUE: reference to a compiler-generated field
            class1015.dxfMLine_0 = this;
            // ISSUE: reference to a compiler-generated field
            class1015.point3D_0 = this.point3D_0;
            // ISSUE: reference to a compiler-generated field
            class1015.vector3D_0 = this.vector3D_0;
            CommandGroup undoGroup1 = (CommandGroup)null;

            if (undoGroup != null)
            {
                undoGroup1 = new CommandGroup((object)this);
                undoGroup.UndoStack.Push((ICommand)undoGroup1);
            }
            this.vector3D_0 = matrix.Transform(this.vector3D_0);
            this.vector3D_0.Normalize();
            this.point3D_0 = matrix.Transform(this.point3D_0);
            if (undoGroup != null)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: reference to a compiler-generated method
                // ISSUE: reference to a compiler-generated method
                undoGroup1.UndoStack.Push((ICommand) new Command((object)this, new System.Action(new DxfMLine.Class1016()
                {
                    class1015_0 = class1015,
                    point3D_0   = this.point3D_0,
                    vector3D_0  = this.vector3D_0
                }.method_0), new System.Action(class1015.method_0)));
            }
            foreach (DxfMLine.Segment segment in this.list_0)
            {
                segment.TransformMe(matrix, undoGroup1);
            }
        }
Ejemplo n.º 16
0
        public DxfAttribute AddAttribute(DxfAttributeDefinition attdef, string text)
        {
            DxfAttribute dxfAttribute = new DxfAttribute(attdef, text);

            this.Attributes.Add(dxfAttribute);
            if (dxfAttribute.Model == null)
            {
                try
                {
                    dxfAttribute.Style = attdef.Style;
                }
                catch (NullReferenceException ex)
                {
                    throw new DxfException("Cannot create attribute from attribute definition which is not attached to a model!\nDid you already add the attribute definition to a block and the block to the model's Blocks?");
                }
            }
            WW.Math.Vector3D vector3D = this.Block != null ? this.Block.BasePoint : WW.Math.Vector3D.Zero;
            dxfAttribute.FixAlignmentPoints();
            dxfAttribute.TransformMe((TransformConfig)GraphicsConfig.WhiteBackground, this.BasicBlockInsertionTransformation * Transformation4D.Translation(-vector3D));
            return(dxfAttribute);
        }
Ejemplo n.º 17
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfBlock dxfBlock = (DxfBlock)from;

            this.blockFlags_0       = dxfBlock.blockFlags_0;
            this.blockStatusFlags_0 = dxfBlock.blockStatusFlags_0;
            this.vector3D_0         = dxfBlock.vector3D_0;
            this.string_0           = dxfBlock.string_0;
            this.string_1           = dxfBlock.string_1;
            this.string_2           = dxfBlock.string_2;
            this.BlockBegin         = (DxfBlockBegin)dxfBlock.BlockBegin.Clone(cloneContext);
            this.BlockEnd           = (DxfBlockEnd)dxfBlock.BlockEnd.Clone(cloneContext);
            if (object.ReferenceEquals((object)dxfBlock.dxfEntityCollection_0, (object)cloneContext.SourceModel.Entities))
            {
                this.method_10(cloneContext.TargetModel.Entities);
            }
            this.drawingUnits_0 = dxfBlock.drawingUnits_0;
            this.bool_0         = dxfBlock.bool_0;
            this.bool_1         = dxfBlock.bool_1;
        }
Ejemplo n.º 18
0
        public static Bitmap CreateAutoSizedBitmap(
            GDIGraphics3D cadGraphics,
            SmoothingMode smoothingMode,
            Matrix4D transform,
            System.Drawing.Color backColor)
        {
            transform = Transformation4D.Translation(2.0, 2.0, 0.0) * transform;
            Bounds3D bounds = new Bounds3D();

            cadGraphics.BoundingBox(bounds, transform);
            if (!bounds.Initialized)
            {
                return(ImageExporter.CreateEmptyBitmap(backColor, 1, 1));
            }
            WW.Math.Vector3D delta      = bounds.Delta;
            Matrix4D         transform1 = DxfUtil.GetScaleTransform(bounds.Min, bounds.Max, new WW.Math.Point3D(2.0, delta.Y + 2.0, 0.0), new WW.Math.Point3D(delta.X + 2.0, 2.0, 0.0)) * transform;
            int width  = (int)System.Math.Ceiling(delta.X) + 4;
            int height = (int)System.Math.Ceiling(delta.Y) + 4;

            return(ImageExporter.CreateBitmap(cadGraphics, smoothingMode, transform1, backColor, width, height));
        }
Ejemplo n.º 19
0
        public static Bitmap CreateAutoSizedBitmap(
            DxfModel model,
            Matrix4D transform,
            GraphicsConfig graphicsConfig,
            SmoothingMode smoothingMode)
        {
            BoundsCalculator boundsCalculator = new BoundsCalculator(graphicsConfig);

            boundsCalculator.GetBounds(model, transform);
            Bounds3D bounds = boundsCalculator.Bounds;

            if (!bounds.Initialized)
            {
                return(ImageExporter.CreateEmptyBitmap((System.Drawing.Color)graphicsConfig.BackColor, 1, 1));
            }
            WW.Math.Vector3D delta      = bounds.Delta;
            Matrix4D         transform1 = DxfUtil.GetScaleTransform(bounds.Min, bounds.Max, new WW.Math.Point3D(2.0, delta.Y + 2.0, 0.0), new WW.Math.Point3D(delta.X + 2.0, 2.0, 0.0)) * transform;
            int width  = (int)System.Math.Ceiling(delta.X) + 4;
            int height = (int)System.Math.Ceiling(delta.Y) + 4;

            return(ImageExporter.CreateBitmap(model, transform1, graphicsConfig, smoothingMode, width, height));
        }
Ejemplo n.º 20
0
 private void method_8(DxfMLeaderAnnotationContext from, CloneContext cloneContext)
 {
     this.list_0.Clear();
     foreach (MLeader.LeaderNode leaderNode in from.list_0)
     {
         this.list_0.Add(leaderNode.Clone(cloneContext));
     }
     this.double_0          = from.double_0;
     this.point3D_0         = from.point3D_0;
     this.double_1          = from.double_1;
     this.double_2          = from.double_2;
     this.double_3          = from.double_3;
     this.textAttachment_0  = from.textAttachment_0;
     this.textAttachment_1  = from.textAttachment_1;
     this.blockAttachment_0 = from.blockAttachment_0;
     this.bool_1            = from.bool_1;
     this.bool_2            = from.bool_2;
     this.plane3D_0         = from.plane3D_0;
     this.point3D_1         = from.point3D_1;
     this.vector3D_0        = from.vector3D_0;
     this.vector3D_1        = from.vector3D_1;
     this.bool_3            = from.bool_3;
     this.contentType_0     = from.contentType_0;
     this.textAttachment_2  = from.textAttachment_2;
     this.textAttachment_3  = from.textAttachment_3;
     if (from.content_0 == null)
     {
         this.content_0 = (MLeader.Content)null;
     }
     else if (this.content_0 != null && !(this.content_0.GetType() != from.content_0.GetType()))
     {
         this.content_0.CopyFrom(from.content_0, cloneContext);
     }
     else
     {
         this.content_0 = from.content_0.Clone(cloneContext);
     }
 }
Ejemplo n.º 21
0
            public void TransformMe(Matrix4D matrix, CommandGroup undoGroup)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                DxfMLine.Segment.Class1013 class1013 = new DxfMLine.Segment.Class1013();
                // ISSUE: reference to a compiler-generated field
                class1013.segment_0 = this;
                // ISSUE: reference to a compiler-generated field
                class1013.point3D_0 = this.point3D_0;
                // ISSUE: reference to a compiler-generated field
                class1013.vector3D_0 = this.vector3D_0;
                // ISSUE: reference to a compiler-generated field
                class1013.vector3D_1 = this.vector3D_1;
                this.point3D_0       = matrix.Transform(this.point3D_0);
                this.vector3D_0      = matrix.Transform(this.vector3D_0);
                this.vector3D_0.Normalize();
                this.vector3D_1 = matrix.Transform(this.vector3D_1);
                double length = this.vector3D_1.GetLength();

                this.vector3D_1.Normalize();
                if (undoGroup != null)
                {
                    // 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 DxfMLine.Segment.Class1014()
                    {
                        class1013_0 = class1013,
                        point3D_0   = this.point3D_0,
                        vector3D_0  = this.vector3D_0,
                        vector3D_1  = this.vector3D_1
                    }.method_0), new System.Action(class1013.method_0)));
                }
                foreach (DxfMLine.Segment.Element element in this.list_0)
                {
                    element.TransformMe(length, undoGroup);
                }
            }
Ejemplo n.º 22
0
        public static Bitmap CreatePlotLayoutBitmap(
            Size maxSize,
            DxfModel model,
            DxfLayout layout,
            DxfViewportCollection viewports,
            GraphicsConfig config,
            SmoothingMode smoothingMode)
        {
            DxfLayout.PlotInfo plotInfo = layout.GetPlotInfo((double)maxSize.Width, (double)maxSize.Height, new Rectangle2D(0.0, 0.0, (double)(maxSize.Width - 1), (double)(maxSize.Height - 1)), false, true);
            Size     size;
            Matrix4D to2DTransform;

            if (plotInfo != null)
            {
                Rectangle2D printableArea = plotInfo.PrintableArea;
                size = new Size((int)System.Math.Ceiling(printableArea.Width), (int)System.Math.Ceiling(printableArea.Height));
                WW.Math.Point2D center = printableArea.Center;
                to2DTransform = Transformation4D.Translation((WW.Math.Vector3D)(new WW.Math.Point2D(0.5 * (double)(size.Width - 1), 0.5 * (double)(size.Height - 1)) - center)) * plotInfo.ToPaperTransform;
            }
            else
            {
                BoundsCalculator boundsCalculator = new BoundsCalculator();
                boundsCalculator.GetBounds(model, layout);
                Bounds3D bounds = boundsCalculator.Bounds;
                if (!bounds.Initialized)
                {
                    return((Bitmap)null);
                }
                WW.Math.Point3D  min      = bounds.Min;
                WW.Math.Point3D  max      = bounds.Max;
                WW.Math.Vector3D vector3D = max - min;
                WW.Math.Point3D  point3D  = new WW.Math.Point3D(min.X, min.Y, 0.0);
                double           scaling;
                to2DTransform = DxfUtil.GetScaleTransform(point3D, new WW.Math.Point3D(max.X, min.Y, 0.0), point3D, WW.Math.Point3D.Zero, new WW.Math.Point3D((double)(maxSize.Width - 1), (double)(maxSize.Height - 1), 0.0), WW.Math.Point3D.Zero, out scaling);
                size          = new Size((int)System.Math.Ceiling(vector3D.X * scaling), (int)System.Math.Ceiling(vector3D.Y * scaling));
            }
            return(ImageExporter.CreateBitmap(model, layout, (ICollection <DxfViewport>)viewports, config, smoothingMode, (System.Drawing.Color)config.BackColor, to2DTransform, size.Width, size.Height));
        }
Ejemplo n.º 23
0
        internal Bounds3D method_1(DxfTable table)
        {
            DxfBlock valueObject = this.ValueObject as DxfBlock;

            if (valueObject == null)
            {
                return((Bounds3D)null);
            }
            DxfInsert dxfInsert = new DxfInsert(valueObject);

            foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0)
            {
                if (dxfTableAttribute.AttributeDefinition != null)
                {
                    DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition);
                    dxfAttribute1.Text = dxfTableAttribute.Value;
                    DxfAttribute dxfAttribute2 = dxfAttribute1;
                    dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint;
                    if (dxfAttribute1.AlignmentPoint2.HasValue)
                    {
                        DxfAttribute     dxfAttribute3   = dxfAttribute1;
                        WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2;
                        WW.Math.Vector3D basePoint       = valueObject.BasePoint;
                        dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?();
                    }
                }
            }
            BoundsCalculator boundsCalculator = new BoundsCalculator();

            boundsCalculator.GetBounds(table.Content.Model, (DxfEntity)dxfInsert);
            Bounds3D bounds    = boundsCalculator.Bounds;
            Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(this.dxfContentFormat_0.Rotation) * Transformation4D.Translation(-valueObject.BasePoint);

            bounds.Transform(transform);
            return(bounds);
        }
Ejemplo n.º 24
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfGeoData dxfGeoData = (DxfGeoData)from;

            this.int_0 = dxfGeoData.int_0;
            this.designCoordinatesType_0 = dxfGeoData.designCoordinatesType_0;
            this.HostBlock               = Class906.smethod_0(cloneContext, dxfGeoData.HostBlock, false);
            this.point3D_0               = dxfGeoData.point3D_0;
            this.point3D_1               = dxfGeoData.point3D_1;
            this.vector2D_0              = dxfGeoData.vector2D_0;
            this.vector2D_1              = dxfGeoData.vector2D_1;
            this.unitsValue_0            = dxfGeoData.unitsValue_0;
            this.unitsValue_1            = dxfGeoData.unitsValue_1;
            this.vector3D_0              = dxfGeoData.vector3D_0;
            this.scaleEstimationMethod_0 = dxfGeoData.scaleEstimationMethod_0;
            this.bool_0   = dxfGeoData.bool_0;
            this.double_0 = dxfGeoData.double_0;
            this.double_1 = dxfGeoData.double_1;
            this.double_2 = dxfGeoData.double_2;
            this.string_0 = dxfGeoData.string_0;
            this.string_1 = dxfGeoData.string_1;
            this.string_2 = dxfGeoData.string_2;
            this.string_3 = dxfGeoData.string_3;
            this.string_4 = dxfGeoData.string_4;
            this.list_0.Clear();
            foreach (GeoMeshPoint geoMeshPoint in dxfGeoData.list_0)
            {
                this.list_0.Add(new GeoMeshPoint(geoMeshPoint.Source, geoMeshPoint.Destination));
            }
            this.list_1.Clear();
            foreach (GeoMeshFace geoMeshFace in dxfGeoData.list_1)
            {
                this.list_1.Add(new GeoMeshFace(geoMeshFace.FaceIndex1, geoMeshFace.FaceIndex2, geoMeshFace.FaceIndex3));
            }
        }
Ejemplo n.º 25
0
 internal Matrix4D method_15()
 {
     WW.Math.Vector3D unit = WW.Math.Vector3D.CrossProduct(this.vector3D_0, this.vector3D_1).GetUnit();
     return(Transformation4D.Translation((WW.Math.Vector3D) this.point3D_0) * new Matrix4D(this.vector3D_0.X, this.vector3D_1.X, unit.X, 0.0, this.vector3D_0.Y, this.vector3D_1.Y, unit.Y, 0.0, this.vector3D_0.Z, this.vector3D_1.Z, unit.Z, 0.0, 0.0, 0.0, 0.0, 1.0) * Transformation4D.Translation(0.5, 0.5, 0.0));
 }
Ejemplo n.º 26
0
        private void GetPolylines4D(
            DrawContext context,
            int elementIndex,
            int minElementCount,
            DxfMLineStyle.Element styleElement,
            IClippingTransformer transformer,
            out IList <Polyline4D> polylines4D,
            out IList <IShape4D> shapes)
        {
            WW.Math.Point3D     point3D0       = this.point3D_0;
            bool                closed         = this.Closed;
            IList <Polyline3D>  polyline3DList = (IList <Polyline3D>) new List <Polyline3D>();
            IList <FlatShape4D> resultShapes   = (IList <FlatShape4D>) new List <FlatShape4D>();

            if (minElementCount == 0)
            {
                Polyline3D polyline3D = new Polyline3D(closed);
                foreach (DxfMLine.Segment segment in this.list_0)
                {
                    polyline3D.Add(segment.Position);
                }
                if (polyline3D.Count > 0)
                {
                    DxfUtil.smethod_2(context.Config, polyline3DList, resultShapes, (IList <Polyline3D>) new Polyline3D[1]
                    {
                        polyline3D
                    }, styleElement.LineType, this.vector3D_0, 1.0, transformer.LineTypeScaler);
                }
            }
            else
            {
                IList <Polyline3D> polylines  = (IList <Polyline3D>) new List <Polyline3D>();
                Polyline3D         polyline3D = new Polyline3D();
                bool flag = false;
                foreach (DxfMLine.Segment segment in this.list_0)
                {
                    WW.Math.Vector3D miterDirection = segment.MiterDirection;
                    WW.Math.Point3D  position       = segment.Position;
                    if (elementIndex < segment.Elements.Count)
                    {
                        DxfMLine.Segment.Element element  = segment.Elements[elementIndex];
                        WW.Math.Point3D          point3D1 = position;
                        if (element.Parameters.Count > 0)
                        {
                            WW.Math.Point3D point3D2 = point3D1 + miterDirection * element.Parameters[0];
                            if (element.Parameters.Count > 1)
                            {
                                for (int index = 1; index < element.Parameters.Count; index += 2)
                                {
                                    WW.Math.Point3D point3D3 = point3D2 + segment.Direction * element.Parameters[index];
                                    polyline3D.Add(point3D3);
                                    if (index + 1 < element.Parameters.Count)
                                    {
                                        WW.Math.Point3D point3D4 = point3D2 + segment.Direction * element.Parameters[index + 1];
                                        polyline3D.Add(point3D4);
                                        polylines.Add(polyline3D);
                                        polyline3D = new Polyline3D();
                                    }
                                }
                            }
                            else if (polyline3D.Count > 0)
                            {
                                polyline3D.Add(point3D2);
                                polylines.Add(polyline3D);
                                polyline3D = new Polyline3D();
                            }
                        }
                        else if (element.AreaFillParameters.Count > 0)
                        {
                            flag = true;
                        }
                    }
                }
                DxfMLine.Segment segment1 = this.list_0[this.list_0.Count - 1];
                if (closed && polyline3D.Count > 0)
                {
                    DxfMLine.Segment segment2 = this.list_0[0];
                    if (elementIndex < segment2.Elements.Count)
                    {
                        DxfMLine.Segment.Element element  = segment2.Elements[elementIndex];
                        WW.Math.Point3D          position = segment2.Position;
                        if (element.Parameters.Count > 0)
                        {
                            WW.Math.Vector3D miterDirection = segment2.MiterDirection;
                            WW.Math.Point3D  point3D        = position + miterDirection * element.Parameters[0];
                            polyline3D.Add(point3D);
                        }
                    }
                }
                if (polyline3D.Count > 0)
                {
                    polylines.Add(polyline3D);
                }
                if (flag)
                {
                    polyline3DList.Add(polyline3D);
                }
                else if (polylines.Count > 0)
                {
                    DxfUtil.smethod_2(context.Config, polyline3DList, resultShapes, polylines, styleElement.LineType, this.vector3D_0, 1.0, transformer.LineTypeScaler);
                }
            }
            polylines4D = DxfUtil.smethod_36(polyline3DList, false, transformer);
            shapes      = DxfUtil.smethod_37((ICollection <FlatShape4D>)resultShapes, transformer);
        }
Ejemplo n.º 27
0
        private IList <Polyline4D> method_16(IClippingTransformer transformer)
        {
            WW.Math.Point3D point3D0 = this.point3D_0;
            bool            closed   = this.Closed;

            DxfMLine.Segment segment1 = this.list_0[0];
            int num1 = int.MaxValue;

            foreach (DxfMLine.Segment segment2 in this.list_0)
            {
                if (segment2.Elements.Count < num1)
                {
                    num1 = segment2.Elements.Count;
                }
            }
            IList <Polyline4D> polyline4DList;

            if (num1 >= 2)
            {
                Polyline3D[] polyline3DArray = new Polyline3D[2];
                for (int index = 0; index < polyline3DArray.Length; ++index)
                {
                    polyline3DArray[index] = new Polyline3D(closed);
                }
                foreach (DxfMLine.Segment segment2 in this.list_0)
                {
                    WW.Math.Vector3D miterDirection = segment2.MiterDirection;
                    WW.Math.Point3D  position       = segment2.Position;
                    if (segment2.Elements.Count == 0)
                    {
                        polyline3DArray[0].Add(position);
                    }
                    else
                    {
                        DxfMLine.Segment.Element element1 = (DxfMLine.Segment.Element)null;
                        DxfMLine.Segment.Element element2 = (DxfMLine.Segment.Element)null;
                        double num2 = double.MaxValue;
                        double num3 = double.MinValue;
                        for (int index = 0; index < num1; ++index)
                        {
                            DxfMLine.Segment.Element element3 = segment2.Elements[index];
                            if (element3.Parameters.Count != 0)
                            {
                                if (element1 == null)
                                {
                                    element1 = element3;
                                    num2     = element1.Parameters[0];
                                }
                                else if (element3.Parameters[0] < num2)
                                {
                                    element1 = element3;
                                    num2     = element1.Parameters[0];
                                }
                                if (element2 == null)
                                {
                                    element2 = element3;
                                    num3     = element2.Parameters[0];
                                }
                                else if (element3.Parameters[0] > num3)
                                {
                                    element2 = element3;
                                    num3     = element2.Parameters[0];
                                }
                            }
                        }
                        if (num2 == double.MaxValue)
                        {
                            num2 = 0.0;
                        }
                        if (num3 == double.MinValue)
                        {
                            num3 = 0.0;
                        }
                        if (element1 != null && element2 != null)
                        {
                            polyline3DArray[0].Add(position + miterDirection * num2);
                            polyline3DArray[1].Add(position + miterDirection * num3);
                        }
                    }
                }
                List <Polyline3D> polyline3DList;
                if (closed)
                {
                    polyline3DList = new List <Polyline3D>(2);
                    polyline3DList.AddRange((IEnumerable <Polyline3D>)polyline3DArray);
                }
                else
                {
                    polyline3DList = new List <Polyline3D>(1);
                    Polyline3D polyline3D = new Polyline3D(polyline3DArray[0].Count + polyline3DArray[1].Count, true);
                    polyline3D.AddRange((IEnumerable <WW.Math.Point3D>)polyline3DArray[0]);
                    polyline3D.AddRange((IEnumerable <WW.Math.Point3D>)polyline3DArray[1].GetReverse());
                    polyline3DList.Add(polyline3D);
                }
                IClippingTransformer transformer1 = (IClippingTransformer)transformer.Clone();
                transformer1.SetPreTransform(DxfUtil.GetToWCSTransform(this.vector3D_0));
                polyline4DList = DxfUtil.smethod_36((IList <Polyline3D>)polyline3DList, false, transformer1);
            }
            else
            {
                polyline4DList = (IList <Polyline4D>)null;
            }
            return(polyline4DList);
        }
Ejemplo n.º 28
0
 private WW.Math.Vector3D method_17(DxfMLine.Segment segment)
 {
     WW.Math.Vector3D vector3D = WW.Math.Vector3D.CrossProduct(segment.Direction, WW.Math.Vector3D.CrossProduct(segment.Direction, segment.MiterDirection));
     vector3D.Normalize();
     return(vector3D);
 }
Ejemplo n.º 29
0
 public Segment(WW.Math.Point3D position, WW.Math.Vector3D direction, WW.Math.Vector3D miterDirection)
 {
     this.point3D_0  = position;
     this.vector3D_0 = direction;
     this.vector3D_1 = miterDirection;
 }
Ejemplo n.º 30
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
            DxfMText.Class416 class416 = new DxfMText.Class416();
            // ISSUE: reference to a compiler-generated field
            class416.dxfMText_0 = this;
            // ISSUE: reference to a compiler-generated field
            class416.point3D_0 = this.point3D_0;
            // ISSUE: reference to a compiler-generated field
            class416.double_0 = this.double_1;
            // ISSUE: reference to a compiler-generated field
            class416.double_1 = this.double_2;
            // ISSUE: reference to a compiler-generated field
            class416.vector3D_0 = this.vector3D_0;
            // ISSUE: reference to a compiler-generated field
            class416.vector3D_1 = this.vector3D_1;
            // ISSUE: reference to a compiler-generated field
            class416.attachmentPoint_0 = this.attachmentPoint_0;
            this.vector3D_1            = matrix.Transform(this.vector3D_1);
            this.vector3D_1.Normalize();
            this.vector3D_0 = matrix.Transform(this.vector3D_0);
            this.vector3D_0.Normalize();
            Matrix4D inverse = DxfUtil.GetToWCSTransform(this.vector3D_1, this.vector3D_0).GetInverse();
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            Matrix4D toWcsTransform = DxfUtil.GetToWCSTransform(class416.vector3D_1, class416.vector3D_0);
            Matrix4D matrix4D       = inverse * matrix * toWcsTransform;

            this.point3D_0 = matrix.Transform(this.point3D_0);
            this.double_1  = matrix4D.Transform(new WW.Math.Vector3D(0.0, this.double_1, 0.0)).GetLength();
            this.double_2  = matrix4D.Transform(new WW.Math.Vector3D(this.double_2, 0.0, 0.0)).GetLength();
            if (matrix.GetDeterminant() < 0.0)
            {
                // ISSUE: reference to a compiler-generated field
                bool     flag       = WW.Math.Vector3D.DotProduct(this.vector3D_1, class416.vector3D_1) < 0.0;
                Bounds2D textBounds = this.TextBounds;
                if (flag)
                {
                    this.vector3D_1 = -this.vector3D_1;
                    switch (this.attachmentPoint_0)
                    {
                    case AttachmentPoint.TopLeft:
                        this.attachmentPoint_0 = AttachmentPoint.TopRight;
                        break;

                    case AttachmentPoint.TopRight:
                        this.attachmentPoint_0 = AttachmentPoint.TopLeft;
                        break;

                    case AttachmentPoint.MiddleLeft:
                        this.attachmentPoint_0 = AttachmentPoint.MiddleRight;
                        break;

                    case AttachmentPoint.MiddleRight:
                        this.attachmentPoint_0 = AttachmentPoint.MiddleLeft;
                        break;

                    case AttachmentPoint.BottomLeft:
                        this.attachmentPoint_0 = AttachmentPoint.BottomRight;
                        break;

                    case AttachmentPoint.BottomRight:
                        this.attachmentPoint_0 = AttachmentPoint.BottomLeft;
                        break;
                    }
                }
                else
                {
                    WW.Math.Vector3D.CrossProduct(this.vector3D_0, this.vector3D_1).GetUnit();
                    switch (this.attachmentPoint_0)
                    {
                    case AttachmentPoint.TopLeft:
                        this.attachmentPoint_0 = AttachmentPoint.BottomLeft;
                        break;

                    case AttachmentPoint.TopCenter:
                        this.attachmentPoint_0 = AttachmentPoint.BottomCenter;
                        break;

                    case AttachmentPoint.TopRight:
                        this.attachmentPoint_0 = AttachmentPoint.BottomRight;
                        break;

                    case AttachmentPoint.BottomLeft:
                        this.attachmentPoint_0 = AttachmentPoint.TopLeft;
                        break;

                    case AttachmentPoint.BottomCenter:
                        this.attachmentPoint_0 = AttachmentPoint.TopCenter;
                        break;

                    case AttachmentPoint.BottomRight:
                        this.attachmentPoint_0 = AttachmentPoint.TopRight;
                        break;
                    }
                }
            }
            this.method_15();
            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 DxfMText.Class417()
            {
                class416_0        = class416,
                point3D_0         = this.point3D_0,
                double_0          = this.double_1,
                double_1          = this.double_2,
                vector3D_0        = this.vector3D_0,
                vector3D_1        = this.vector3D_1,
                attachmentPoint_0 = this.attachmentPoint_0
            }.method_0), new System.Action(class416.method_0)));
        }