Beispiel #1
0
 private void _appenedAttriuteDef(ref AttributeDefinition acAttDef)
 {
     if (Mode == DirectionMode.Horizontal)
     {
         acAttDef.HorizontalMode = TextHorizontalMode.TextCenter;
         acAttDef.VerticalMode   = TextVerticalMode.TextBase;
     }
     else
     {
         acAttDef.HorizontalMode = TextHorizontalMode.TextRight;
         acAttDef.VerticalMode   = TextVerticalMode.TextVerticalMid;
     }
     acAttDef.AlignmentPoint = acAttDef.Position.TransformBy(Matrix3d.Displacement(ArrowLine.GetPointAtDist(defLength / 2d) - acAttDef.Position));
     acAttDef.AlignmentPoint = acAttDef.AlignmentPoint.TransformBy(Matrix3d.Displacement((ArrowLine.GetFirstDerivative(acAttDef.AlignmentPoint).GetPerpendicularVector()).MultiplyBy(acAttDef.Height * 0.1)));
 }
Beispiel #2
0
            private AttributeDefinition _createAttribute(Point3d position)
            {
                AttributeDefinition acAttDef = new AttributeDefinition();

                acAttDef.Verifiable = true;
                acAttDef.Height     = 1.8;
                //acAttDef.Justify = AttachmentPoint.BaseMid;
                acAttDef.Prompt     = anchorTag;
                acAttDef.Tag        = anchorTag;
                acAttDef.TextString = "0";
                //acAttDef.HorizontalMode = TextHorizontalMode.TextCenter;
                //acAttDef.VerticalMode = TextVerticalMode.TextBase;
                if (Mode == DirectionMode.Horizontal)
                {
                    acAttDef.HorizontalMode = TextHorizontalMode.TextCenter;
                    acAttDef.VerticalMode   = TextVerticalMode.TextBase;
                }
                else
                {
                    acAttDef.HorizontalMode = TextHorizontalMode.TextRight;
                    acAttDef.VerticalMode   = TextVerticalMode.TextVerticalMid;
                }
                acAttDef.Position       = position;
                acAttDef.AlignmentPoint = acAttDef.Position.TransformBy(Matrix3d.Displacement(ArrowLine.GetPointAtDist(defLength / 2d) - acAttDef.Position));
                acAttDef.AlignmentPoint = acAttDef.AlignmentPoint.TransformBy(Matrix3d.Displacement((ArrowLine.GetFirstDerivative(acAttDef.AlignmentPoint).GetPerpendicularVector()).MultiplyBy(acAttDef.Height * 0.1)));


                return(acAttDef);
            }